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


Public Member Functions | |
| def | __init__ (self, str yamlInitFilePath=None) |
| 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 normalization=False) |
| 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 return out image width, image height 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 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_configs (self, configs) |
| def | set_intrinsic (self, K) |
Public Attributes | |
| align | |
| alignment variable to align depth frames with color frames (rs.align object) More... | |
| cameraMatrix | |
| camera intrinsic matrix More... | |
| config | |
| configuration for a realsense camera (rs.config object) More... | |
| depthCameraMatrix | |
| intrinsic matrix for depth camera More... | |
| depthDistortionCoeffs | |
| distortion coefficients for depth camera More... | |
| depthScale | |
| scale factor to convert depth sensor units to meters More... | |
| distortionCoeffs | |
| distortion coefficients for the camera More... | |
| K | |
| camera intrinsic matrix More... | |
| pipeline | |
| camera pipeline (rs.pipeline object) More... | |
| ready | |
| indicates if the camera is ready to stream images 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... | |
Realsense SR 305 class to capture depth frames.
Realsense305 class to capture depth frames The depth images are aligned to the left camera by default class initialization
| def __init__ | ( | self, | |
| str | yamlInitFilePath = None |
||
| ) |
constructor
| [in] | yamlInitFilePath | path of yaml file to use for camera initialization |
Realsense305 class to capture depth frames
Args:
yamlInitFilePath (str):
path of yaml file to use for camera initialization
Reimplemented in RGBD.
| 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 an image
Args:
frame (ndarray (N,M)):
an image frame
windowName (str):
the name of the window
| def get_configs | ( | self | ) |
returns the configs of the camera
Returns all of the configs for the camera
Reimplemented from Base.
| def get_frames | ( | self, | |
| bool | normalization = False |
||
| ) |
gets the next frame
| [in] | normalization | if True, will normalize depth frame [0,255] for viewing. If False, depth frame is in meters |
Gets the next frame.
Args:
normalization (bool):
- if True, the depth frame will be normalized to 0-255 for better visulaization
- if False, the depth frame will not be normalized and is returned in units of meters
Returns:
(colorFrame, depthFrame):
- colorFrame = color frame of camera
- depthFrame = depth frame of camera
Reimplemented in RGBD.
| def getCameraIntrinsics | ( | self | ) |
Returns the intrinsic camera matrix and distortion coefficients.
Returns the intrinsic camera matrix and distortion coefficients
Returns:
(cameraMatrix, distortionCoeffs) (ndarray (3,3), ndarray(,14)):
| tuple getImagePixelWidthAndHeight | ( | self | ) |
returns the width and height of the color image return out image width, image height
Returns the width and heigh of the color image
Returns:
(imageWidth, imageHeight) (int, int):
| 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_configs | ( | self, | |
| str | yamlFilePath | ||
| ) |
sets all of the configs of the camera
| [in] | yamlFilePath | path of yaml configuration file |
Re-sets all of the configs for the camera
Args:
yamlFilePath (str):
path of yaml configuration file
| 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.
| align |
alignment variable to align depth frames with color frames (rs.align object)
| cameraMatrix |
camera intrinsic matrix
| config |
configuration for a realsense camera (rs.config object)
| depthCameraMatrix |
intrinsic matrix for depth camera
| depthDistortionCoeffs |
distortion coefficients for depth camera
| depthScale |
scale factor to convert depth sensor units to meters
| distortionCoeffs |
distortion coefficients for the camera
| K |
camera intrinsic matrix
| pipeline |
camera pipeline (rs.pipeline object)
| ready |
indicates if the camera is ready to stream images