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

OAK class to capture only images (there are no color images for this camera) More...

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

Public Member Functions

def __init__ (self, ConfigOak configs=ConfigOak())
 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, bool getBothMonoFrames=False, int scaleFactor=1)
 Gets the next frame. More...
 
def getCameraIntrinsics (self)
 Returns the intrinsic camera matrix and distortion coefficients. More...
 
def printConfigs (self)
 Prints out the configurations in a more human readable way. More...
 
def set (self, cam, key, value)
 Set a particular configuration. More...
 
def set_configs (self, configs)
 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 get_frames (self)
 
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_intrinsic (self, K)
 

Public Attributes

 cameraMatrix
 camera intrinsic matrix More...
 
 device
 camera device (dai.Device object) More...
 
 distortionCoeffs
 camera distortion coefficients More...
 
 K
 camera intrinsic matrix More...
 
 monoLeftCam
 left mono camera node (dai.node.MonoCamera object) More...
 
 monoLeftQueue
 frame queue for the left mono camera More...
 
 monoLeftXlink
 link for left mono camera (dai.node.XlinkOut object) More...
 
 monoRightCam
 right mono camera node (dai.node.MonoCamera object) More...
 
 monoRightQueue
 frame queue for the right mono camera More...
 
 monoRightXlink
 link for right mono camera (dai.node.XlinkOut object) More...
 
 pipeline
 camera pipeline (dai.Pipeline object) More...
 
 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...
 

Detailed Description

OAK class to capture only images (there are no color images for this camera)

OAK class to capture only images (there are no color images for this camera)

Constructor & Destructor Documentation

◆ __init__()

def __init__ (   self,
ConfigOak  configs = ConfigOak() 
)

constructor

Parameters
[in]configsConfigOak class. Optional argument

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
framethe frame to display
windowNamethe name of the window to display the frame on
displays a frame
Args:
    frame (ndarray): frame the frame to display
    windowName (str): the name of the window to display the frame on

◆ get_configs()

def get_configs (   self)

returns the configs of the camera

Returns
configs the config dictionary of the camera
 Returns the configs of the camera
Returns:
    configs: the config dictionary of the camera

Reimplemented from Base.

◆ get_frames()

def get_frames (   self,
bool  getBothMonoFrames = False,
int  scaleFactor = 1 
)

Gets the next frame.

Parameters
[in]getBothMonoFramesif True, returns both left and right frames, False returns only left
[in]scaleFactorscaling factor on outputted frame
Returns
out the requested frames
 Gets the next frame

Args:
    getBothMonoFrames (optional) : 
        - if True -> returns both left and right frame
        - if False -> returns only left frame
    scaleFactor (optional) : scaling factor on outputted frame

Returns:
    - if getBothMonoFrames = False -> leftCameraImage
    - if getBothMonoFrames = True -> tuple (leftCameraImage, rightCameraImage)

◆ 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:
    distortionCoeffs :
        (list (3,3)) intrinsice camera matrix distortionCoeffs 
        (list (,14)) distortion coefficients of the camera

◆ 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()

def set (   self,
  cam,
  key,
  value 
)

Set a particular configuration.

Parameters
camname of the camera to config (monoLeftCam / monoRightCam)
keyThe configuration name
valueThe value to be set
Set a particular configuration

Args:
    cam (any): name of the camera to config (monoLeftCam / monoRightCam)
    key (any): The configuration name
    value (any): The value to be set

◆ set_configs()

def set_configs (   self,
  configs 
)

sets all of the configs of the camera

Parameters
[in]configsthe config dictionary for the camera
sets all of the configs of the camera
Args:
    configs: the config dictionary for the camera

Reimplemented from Base.

◆ 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

◆ cameraMatrix

cameraMatrix

camera intrinsic matrix

◆ device

device

camera device (dai.Device object)

◆ distortionCoeffs

distortionCoeffs

camera distortion coefficients

◆ K

K

camera intrinsic matrix

◆ monoLeftCam

monoLeftCam

left mono camera node (dai.node.MonoCamera object)

◆ monoLeftQueue

monoLeftQueue

frame queue for the left mono camera

◆ monoLeftXlink

monoLeftXlink

link for left mono camera (dai.node.XlinkOut object)

◆ monoRightCam

monoRightCam

right mono camera node (dai.node.MonoCamera object)

◆ monoRightQueue

monoRightQueue

frame queue for the right mono camera

◆ monoRightXlink

monoRightXlink

link for right mono camera (dai.node.XlinkOut object)

◆ pipeline

pipeline

camera pipeline (dai.Pipeline object)

◆ ready

ready

indicates if the camera is ready to stream images


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