|
IVALab Python Libraries
Collection of code for computer vision and robotics with specific API.
|
OAK class to capture depth frames. More...


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... | |
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
| def __init__ | ( | self, | |
configs = ConfigOak() |
|||
| ) |
| def capture | ( | self | ) |
Alias for get_frames.
Alias for get_frames
| def display | ( | self, | |
| frame, | |||
windowName = 'frame' |
|||
| ) |
displays a frame
| frame | the frame to display |
| windowName | the name of the window to display the frame on |
| def get_configs | ( | self | ) |
returns the configs of the camera
Reimplemented from Base.
| def get_frames | ( | self, | |
| bool | normalization = False, |
||
| int | scaleFactor = 1 |
||
| ) |
Gets the next frame.
| [in] | normalization | if True, will normalize depth frame [0,255] for viewing. If False, depth frame is in meters |
| [in] | scaleFactor | scaling factor on outputted 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]
| def getCameraIntrinsics | ( | self | ) |
Returns the intrinsic camera 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.
| def printConfigs | ( | self | ) |
Prints out the configurations in a more human readable way.
Prints out the configurations in a more human readable way
| def set | ( | self, | |
| cam, | |||
| key, | |||
| value | |||
| ) |
Set a particular configuration.
| cam | name of the camera to config (monoLeftCam / monoRightCam / depthCam / spatialLocationCalculator) |
| key | The configuration name |
| value | The 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
| def set_configs | ( | self, | |
| configs | |||
| ) |
sets all of the configs of the camera
| [in] | configs | the config dictionary for the camera |
Reimplemented from Base.
| 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.
| def stop | ( | self | ) |
| calculationAlgorithm |
the calculation algorithm used for the spacital location calculator
| cameraMatrix |
camera intrinsic matrix
| depthCam |
depth camera node (dai.node.StereoDetph object)
| depthQueue |
frame queue for the depth camera
| depthXLink |
link for depth camera (dai.node.XLinkOut object)
| device |
the camera device (dai.Device object)
| distortionCoeffs |
camera distortion coefficients
| K |
camera intrinsic matrix
| monoLeftCam |
left mono camera node (dai.node.MonoCamera object)
| monoRightCam |
right mono camera node (dai.node.MonoCamera object)
| pipeline |
camera pipeline (dai.Pipeline object)
| ready |
indicates if the camera is ready to stream images
| spatialCalcConfigInQueue |
queue for the spatial calculator configuration
| spatialCalcConfigXLink |
link for spatial loocation calculator (dai.node.XLinkOut object)
| spatialCalcQueue |
queue for the spactial calculator
| spatialDataXLink |
link for spatial location data (dai.node.XLinkOut object)
| spatialLocationCalculator |
spatial location calculator node (dai.node.SpatialLocationCalculator object)