-
Notifications
You must be signed in to change notification settings - Fork 1
camera module for python
documentation for custom module.
this module simplifies the cv2 functions for controling cameras, windows, trackbars, and contours.
starts a camera using height and width, then returns the setup to be used when calling other function, namely snap()
starts the sliders using the starting positions provided
reads the current value of the sliders, and returns it as a array
takes a photo and returns its data, which can then be used by other functions
creates a window and shows the picture it is given
creates and shows a mask based on the picture it is given and slider values, returns the data of the mask to be used in other functions, such as find_contours
takes the character that is given and a time in milliseconds. waits a certain amount of time while checking for a key press, returns 1 if the the key related to the character is pressed, and 0 if it doesn't detect it
returns a list of contours with their data, based on a mask
takes a contour and finds the middle of its bounding rectangle
adds a contour to a frame and then shows it