|
IVALab Python Libraries
Collection of code for computer vision and robotics with specific API.
|
OAK class to capture only images (there are no color images for this camera) More...


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... | |
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
| [in] | configs | ConfigOak class. Optional argument |
| def capture | ( | self | ) |
Alias for get_frames.
Alias for get_frames
| def display | ( | self, | |
| np.ndarray | frame, | ||
| str | windowName = 'frame' |
||
| ) |
displays a frame
| frame | the frame to display |
| windowName | the 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
| def get_configs | ( | self | ) |
returns the configs of the camera
Returns the configs of the camera
Returns:
configs: the config dictionary of the camera
Reimplemented from Base.
| def get_frames | ( | self, | |
| bool | getBothMonoFrames = False, |
||
| int | scaleFactor = 1 |
||
| ) |
Gets the next frame.
| [in] | getBothMonoFrames | if True, returns both left and right frames, False returns only left |
| [in] | scaleFactor | scaling factor on outputted frame |
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)
| 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
| 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) |
| 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)
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 |
sets all of the configs of the camera
Args:
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.
| 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.
| cameraMatrix |
camera intrinsic matrix
| device |
camera device (dai.Device object)
| distortionCoeffs |
camera distortion coefficients
| K |
camera intrinsic matrix
| monoLeftCam |
left mono camera node (dai.node.MonoCamera object)
| monoLeftQueue |
frame queue for the left mono camera
| monoLeftXlink |
link for left mono camera (dai.node.XlinkOut object)
| monoRightCam |
right mono camera node (dai.node.MonoCamera object)
| monoRightQueue |
frame queue for the right mono camera
| monoRightXlink |
link for right mono camera (dai.node.XlinkOut object)
| pipeline |
camera pipeline (dai.Pipeline object)
| ready |
indicates if the camera is ready to stream images