Class defining a camera
Definition at line 45 of file camera_tools.py.
◆ __init__()
def tools.camera_tools.Camera.__init__ |
( |
|
self, |
|
|
|
source, |
|
|
|
save_images = False |
|
) |
| |
◆ __del__()
def tools.camera_tools.Camera.__del__ |
( |
|
self | ) |
|
◆ change_cv2_resolution()
def tools.camera_tools.Camera.change_cv2_resolution |
( |
|
self | ) |
|
Change the resolution of a cv2 device to match the input size
Input: None
Output: None
Definition at line 140 of file camera_tools.py.
◆ check_cv2_camera()
def tools.camera_tools.Camera.check_cv2_camera |
( |
|
self, |
|
|
|
source |
|
) |
| |
Verify that a cv2 camera is opened
Input:
source (str) The camera to setup
Output: None
Definition at line 119 of file camera_tools.py.
◆ find_frame_counter()
def tools.camera_tools.Camera.find_frame_counter |
( |
|
self, |
|
|
|
source |
|
) |
| |
Find the frame count of a video
Input:
source (str) The cv2 source
Output: (int or None)
The number of frames
Definition at line 128 of file camera_tools.py.
◆ get_first_ros_frame()
def tools.camera_tools.Camera.get_first_ros_frame |
( |
|
self | ) |
|
Wait for the first frame of a ROS camera.
Due to issues with the initialization sometimes it takes
several calls to get the first image
Input: None
Output: cv2 image in BGR
Definition at line 186 of file camera_tools.py.
◆ get_from_camera_video_name()
def tools.camera_tools.Camera.get_from_camera_video_name |
( |
|
self | ) |
|
Create name for output video if source is a camera
Definition at line 210 of file camera_tools.py.
◆ get_image()
def tools.camera_tools.Camera.get_image |
( |
|
self | ) |
|
Get a single image
Input: None
Output: cv2 image in RGB
Definition at line 161 of file camera_tools.py.
◆ set_image_parameters()
def tools.camera_tools.Camera.set_image_parameters |
( |
|
self, |
|
|
|
image |
|
) |
| |
Set the size parameters of the image
Input:
image (cv2 Image) The image to take the sizes from
Output: None
Definition at line 198 of file camera_tools.py.
◆ setup_cv2_cam()
def tools.camera_tools.Camera.setup_cv2_cam |
( |
|
self, |
|
|
|
source |
|
) |
| |
Set up a cv2 camera
Input:
source (str) The camera to setup
Output: None
Definition at line 91 of file camera_tools.py.
◆ setup_image_saving()
def tools.camera_tools.Camera.setup_image_saving |
( |
|
self | ) |
|
Set up the ability to save all the capture images
Input: None
Output: None
Definition at line 219 of file camera_tools.py.
◆ setup_ros_cam()
def tools.camera_tools.Camera.setup_ros_cam |
( |
|
self, |
|
|
|
source |
|
) |
| |
Set up a ROS camera
Input:
source (str) The camera to setup
Output: None
Definition at line 70 of file camera_tools.py.
tools.camera_tools.Camera.a |
◆ camera_type
tools.camera_tools.Camera.camera_type |
◆ count
tools.camera_tools.Camera.count |
◆ delay
tools.camera_tools.Camera.delay |
◆ frame_count
tools.camera_tools.Camera.frame_count |
◆ frame_counter
tools.camera_tools.Camera.frame_counter |
◆ image_size_to_show
tools.camera_tools.Camera.image_size_to_show |
◆ original_image_size
tools.camera_tools.Camera.original_image_size |
◆ show_size_ratio
tools.camera_tools.Camera.show_size_ratio |
◆ video_source
tools.camera_tools.Camera.video_source |
The documentation for this class was generated from the following file: