Commit bb42fe32 authored by tihmels's avatar tihmels
Browse files

Entry Point erstellt

parent 439e443d
import cv2
def createwindow(name, view, x=70, y=70, width=700, height=700):
cv2.namedWindow(name, cv2.WINDOW_NORMAL)
cv2.resizeWindow(name, width, height)
cv2.moveWindow(name, x, y)
cv2.imshow(name, view)
\ No newline at end of file
import cv2
import sys
import cvhelper
def main():
if len(sys.argv) > 1:
cap = cv2.VideoCapture(str(sys.argv[1]))
cap = cv2.VideoCapture(0)
# Capture frame-by-frame
ret, frame =
# Our operations on the frame come here
gray = cv2.cvtColor(frame, cv2.COLOR_BGR2GRAY)
cvhelper.createwindow('Grayscale', gray)
if cv2.waitKey(1) & 0xFF == ord('q'):
# When everything done, release the capture
if __name__ == '__main__':
\ No newline at end of file
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment