IVALab Python Libraries
Collection of code for computer vision and robotics with specific API.
Public Member Functions | Public Attributes | List of all members
Color Class Reference

Kinect class to capture only color images. More...

Inheritance diagram for Color:
Inheritance graph
[legend]
Collaboration diagram for Color:
Collaboration graph
[legend]

Public Member Functions

def __init__ (self, str yamlInitFilePath=None)
 the constructor More...
 
def capture (self)
 Alias for get_frames. More...
 
def display (self, np.ndarray frame, str windowName='frame')
 displays a frame More...
 
def get_configs (self)
 returns the configs of the camera More...
 
def get_frames (self)
 gets the next frame More...
 
def getCameraIntrinsics (self)
 Returns the intrinsic camera matrix and distortion coefficients. More...
 
tuple getImagePixelWidthAndHeight (self)
 returns the width and height of the color image More...
 
def printConfigs (self)
 Prints out the configurations in a more human readable way. More...
 
def set_configs (self, str yamlFilePath)
 sets all of the configs of the camera More...
 
def start (self)
 Start the capture stream. More...
 
def stop (self)
 Stop the capture stream and release the device from use. More...
 
- Public Member Functions inherited from Color
None __init__ (self, configs, K=None)
 Base class instantiator for camera runners. More...
 
- Public Member Functions inherited from Base
def get (self, key)
 
def readClicks (self)
 Read the mouse clicks recorded on a window. More...
 
def registerMouseClicks (self, str windowName)
 Register a window to record mouse clicks. More...
 
def set (self, key, value)
 
def set_configs (self, configs)
 
def set_intrinsic (self, K)
 

Public Attributes

 ready
 indicates if the camera is ready to stream images More...
 
- Public Attributes inherited from Color
 K
 
- Public Attributes inherited from Base
 configs
 configuration dictionary for the camera More...
 
 K
 the camera's intrinsic matrix More...
 
 pts
 callback to append clicks to points list More...
 
- Public Attributes inherited from _KinectCommon
 cameraMatrix
 camera intrinsic matrix More...
 
 depthCameraMatrix
 depth camera intrinsic matrix More...
 
 depthDistortionCoeffs
 depth camera distortion coefficients More...
 
 distortionCoeffs
 distortion coefficients for the camera More...
 
 K
 camera intrinsic matrix More...
 

Detailed Description

Kinect class to capture only color images.

Kinect class to capture only color images

Constructor & Destructor Documentation

◆ __init__()

def __init__ (   self,
str   yamlInitFilePath = None 
)

the constructor

Parameters
[in]yamlInitFilePathpath of yaml file to use for camera initialization
Kinect class to capture only color images

Args:
    yamlInitFilePath (str):
        path of yaml file to use for camera initialization

Member Function Documentation

◆ capture()

def capture (   self)

Alias for get_frames.

Alias for get_frames.

◆ display()

def display (   self,
np.ndarray  frame,
str   windowName = 'frame' 
)

displays a frame

Parameters
[in]framethe frame to display
[in]windowNamethe name of the window to display the frame on
Displays an image.

Args:
    frame (ndarray):
        an image frame
    windowName (str):
        the name of the window

◆ get_configs()

def get_configs (   self)

returns the configs of the camera

Returns
configs the config dictionary of the camera
Returns all of the configs for the camera.

Returns:
    configs:
        the config dictionary of the camera

Reimplemented from Base.

◆ get_frames()

def get_frames (   self)

gets the next frame

Returns
frame color frame. By default this is BGR for OpenCV compatibility.
Gets the next frame.

Returns:
    frame:
        color frame. By default this is BGR for OpenCV compatibility.

Reimplemented from Base.

◆ getCameraIntrinsics()

def getCameraIntrinsics (   self)

Returns the intrinsic camera matrix and distortion coefficients.

Returns
out the camera intrinsic matrix and distortion coefficients
Returns the intrinsic camera matrix and distortion coefficients.

Returns:
    cameraMatrix:
        intrinsic camera matrix
    distortionCoeffs:
        distortion coefficients of the camera

◆ getImagePixelWidthAndHeight()

tuple getImagePixelWidthAndHeight (   self)

returns the width and height of the color image

Returns
out image width, image height
Returns the width and height of the color image.

Returns:
    (imageWidth, imageHeight) (int, int)

◆ printConfigs()

def printConfigs (   self)

Prints out the configurations in a more human readable way.

Prints out the configurations in a more human readable way.

◆ set_configs()

def set_configs (   self,
str  yamlFilePath 
)

sets all of the configs of the camera

Parameters
[in]yamlFilePathpath of yaml configuration file
Re-sets all of the configs for the camera.

Args:
    yamlFilePath (str):
        path of yaml configuration file

◆ start()

def start (   self)

Start the capture stream.

This must be called before get_frames() or capture()

Start the capture stream. This must be called before get_frames() or capture()

Reimplemented from Base.

◆ stop()

def stop (   self)

Stop the capture stream and release the device from use.

Stop the capture stream and release the device from use

Reimplemented from Base.

Member Data Documentation

◆ ready

ready

indicates if the camera is ready to stream images


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