Public Member Functions | Public Attributes | List of all members
tools.camera_tools.Camera Class Reference
Inheritance diagram for tools.camera_tools.Camera:
Inheritance graph
[legend]

Public Member Functions

def __del__ (self)
 
def __init__ (self, source, save_images=False)
 
def change_cv2_resolution (self)
 
def check_cv2_camera (self, source)
 
def find_frame_counter (self, source)
 
def get_first_ros_frame (self)
 
def get_from_camera_video_name (self)
 
def get_image (self)
 
def set_image_parameters (self, image)
 
def setup_cv2_cam (self, source)
 
def setup_image_saving (self)
 
def setup_ros_cam (self, source)
 

Public Attributes

 a
 
 camera_type
 
 count
 
 delay
 
 frame_count
 
 frame_counter
 
 image_size_to_show
 
 original_image_size
 
 show_size_ratio
 
 video_source
 

Detailed Description

Class defining a camera

Definition at line 45 of file camera_tools.py.

Constructor & Destructor Documentation

def tools.camera_tools.Camera.__init__ (   self,
  source,
  save_images = False 
)

Definition at line 47 of file camera_tools.py.

def tools.camera_tools.Camera.__del__ (   self)

Definition at line 66 of file camera_tools.py.

Member Function Documentation

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.

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.

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.

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.

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.

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.

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.

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.

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.

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.

Member Data Documentation

tools.camera_tools.Camera.a

Definition at line 54 of file camera_tools.py.

tools.camera_tools.Camera.camera_type

Definition at line 51 of file camera_tools.py.

tools.camera_tools.Camera.count

Definition at line 55 of file camera_tools.py.

tools.camera_tools.Camera.delay

Definition at line 56 of file camera_tools.py.

tools.camera_tools.Camera.frame_count

Definition at line 116 of file camera_tools.py.

tools.camera_tools.Camera.frame_counter

Definition at line 53 of file camera_tools.py.

tools.camera_tools.Camera.image_size_to_show

Definition at line 50 of file camera_tools.py.

tools.camera_tools.Camera.original_image_size

Definition at line 48 of file camera_tools.py.

tools.camera_tools.Camera.show_size_ratio

Definition at line 49 of file camera_tools.py.

tools.camera_tools.Camera.video_source

Definition at line 52 of file camera_tools.py.


The documentation for this class was generated from the following file:


cnn_bridge
Author(s): Noam C. Golombek , Alexander Beringolts
autogenerated on Mon Jun 10 2019 12:53:26