sksurgeryimage.acquire.video_source module¶
Module for video source acquisition. Classes capture data from a video source into a numpy array.
-
class
sksurgeryimage.acquire.video_source.TimestampedVideoSource(source_num_or_file, dims=None)[source]¶ Bases:
objectCapture and store data from camera/file source. Augments the cv2.VideoCapture() to provide passing of camera dimensions in constructor, and storage of frame data.
-
class
sksurgeryimage.acquire.video_source.VideoSourceWrapper[source]¶ Bases:
objectWrapper for multiple TimestampedVideoSource objects.
-
add_camera(camera_number, dims=None)[source]¶ Create VideoCapture object from camera and add it to the list of sources.
Parameters: - camera_number – integer camera number
- dims – (width, height) as integer numbers of pixels
-
add_file(filename, dims=None)[source]¶ Create videoCapture object from file and add it to the list of sources.
Parameters: - filename – a string containing a valid file path
- dims – (width, height) as integer numbers of pixels
-