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

OAK class to capture depth frames. More...

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

Public Member Functions

def __init__ (self, configs=ConfigOak())
 @breif constructor More...
 
def capture (self)
 Alias for get_frames. More...
 
def display (self, frame, windowName='frame')
 displays a frame More...
 
def get_configs (self)
 returns the configs of the camera More...
 
def get_frames (self, bool normalization=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 Base
None __init__ (self, configs, K=None)
 Base class instantiator for camera runners. More...
 
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

 calculationAlgorithm
 the calculation algorithm used for the spacital location calculator More...
 
 cameraMatrix
 camera intrinsic matrix More...
 
 depthCam
 depth camera node (dai.node.StereoDetph object) More...
 
 depthQueue
 frame queue for the depth camera More...
 
 depthXLink
 link for depth camera (dai.node.XLinkOut object) More...
 
 device
 the 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...
 
 monoRightCam
 right mono camera node (dai.node.MonoCamera object) More...
 
 pipeline
 camera pipeline (dai.Pipeline object) More...
 
 ready
 indicates if the camera is ready to stream images More...
 
 spatialCalcConfigInQueue
 queue for the spatial calculator configuration More...
 
 spatialCalcConfigXLink
 link for spatial loocation calculator (dai.node.XLinkOut object) More...
 
 spatialCalcQueue
 queue for the spactial calculator More...
 
 spatialDataXLink
 link for spatial location data (dai.node.XLinkOut object) More...
 
 spatialLocationCalculator
 spatial location calculator node (dai.node.SpatialLocationCalculator object) More...
 
- 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 depth frames.

The depth images are aligned to the left camera by default class initialization

OAK class to capture depth frames

The depth images are aligned to the left camera by default class initialization

Constructor & Destructor Documentation

◆ __init__()

def __init__ (   self,
  configs = ConfigOak() 
)

@breif constructor

Parameters
[in]configsConfigOak object. Optional argument

Reimplemented in RGBD.

Member Function Documentation

◆ capture()

def capture (   self)

Alias for get_frames.

Alias for get_frames

◆ display()

def display (   self,
  frame,
  windowName = 'frame' 
)

displays a frame

Parameters
framethe frame to display
windowNamethe 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

Reimplemented from Base.

◆ get_frames()

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

Gets the next frame.

Parameters
[in]normalizationif True, will normalize depth frame [0,255] for viewing. If False, depth frame is in meters
[in]scaleFactorscaling factor on outputted frame
Returns
depthFrame the depth frame
Gets the next frame

Args:
    normalization (optional) : 
        - if True -> will normalize the depth frame [0,255]
        - if False -> raw depth frame will be returned
    scaleFactor (optional) : scaling factor on outputted frame
Returns:
    depth frame in units of [m] if not normalized
        - if normalized, range will be from [0,255]

◆ 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

Reimplemented in RGBD.

◆ 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 / depthCam / spatialLocationCalculator)
keyThe configuration name
valueThe value to be set
Set a particular configuration

Args:
    cam (any): name of the camera to config 
        - (monoLeftCam / monoRightCam / depthCam / spatialLocationCalculator)
    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

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.

Reimplemented in RGBD.

◆ 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.

Reimplemented in RGBD.

Member Data Documentation

◆ calculationAlgorithm

calculationAlgorithm

the calculation algorithm used for the spacital location calculator

◆ cameraMatrix

cameraMatrix

camera intrinsic matrix

◆ depthCam

depthCam

depth camera node (dai.node.StereoDetph object)

◆ depthQueue

depthQueue

frame queue for the depth camera

◆ depthXLink

depthXLink

link for depth camera (dai.node.XLinkOut object)

◆ device

device

the 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)

◆ monoRightCam

monoRightCam

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

◆ pipeline

pipeline

camera pipeline (dai.Pipeline object)

◆ ready

ready

indicates if the camera is ready to stream images

◆ spatialCalcConfigInQueue

spatialCalcConfigInQueue

queue for the spatial calculator configuration

◆ spatialCalcConfigXLink

spatialCalcConfigXLink

link for spatial loocation calculator (dai.node.XLinkOut object)

◆ spatialCalcQueue

spatialCalcQueue

queue for the spactial calculator

◆ spatialDataXLink

spatialDataXLink

link for spatial location data (dai.node.XLinkOut object)

◆ spatialLocationCalculator

spatialLocationCalculator

spatial location calculator node (dai.node.SpatialLocationCalculator object)


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