Static helper functions for stereo related computations. More...
#include <ImageUtilityStereo.h>
Static Public Member Functions | |
static bool | IsStereoCamera (CameraPtr pCamera) |
Returns true if the camera is a stereo camera or false otherwise. | |
static ImagePtr | FilterSpeckles (const ImagePtr &disparityImage, const int maxSpeckleSize, const int speckleThreshold, const float disparityScaleFactor, const float invalidDataValue) |
Filters speckles from a copy of the input mono disparity image. | |
static void | FilterSpecklesFromImage (ImagePtr &disparityImage, const int maxSpeckleSize, const int speckleThreshold, const float disparityScaleFactor, const float invalidDataValue) |
Filters speckles in-place on the input mono disparity image. | |
static bool | Compute3DPointFromPixel (const uint16_t disparity, const StereoCameraParameters &stereoCameraParameters, Stereo3DPoint &stereo3DPoint) |
Computes 3D point from disparity value. | |
static PointCloud | ComputePointCloud (const ImagePtr &disparityImage, const ImagePtr &referenceImage, const PointCloudParameters &pointCloudParameters, const StereoCameraParameters &stereoCameraParameters) |
Computes 3D point cloud from disparity and reference images using a stereo matching algorithm. | |
static void | ComputePointCloud (const ImagePtr &disparityImage, const ImagePtr &referenceImage, const PointCloudParameters &pointCloudParameters, const StereoCameraParameters &stereoCameraParameters, PointCloud &pointCloud) |
Computes 3D point cloud from disparity and reference images using a stereo matching algorithm. | |
static bool | ComputeDistanceToPoint (const ImagePtr &disparityImage, const StereoCameraParameters &stereoParam, const ImagePixel &imagePixel, float &distance) |
Computes the distance of a point to the camera world coordinates origin, from the disparity image. | |
static bool | ComputeDistanceBetweenPoints (const ImagePtr &disparityImage, const StereoCameraParameters &stereoParam, const ImagePixel &imagePixel1, const ImagePixel &ImagePixel2, float &distance) |
Computes the distance between two points in the disparity image. | |
static ImagePtr | CreateDepthImage (const ImagePtr &disparityImage, const StereoCameraParameters &stereoCameraParameters, const uint16_t invalidDepthVal, float &minDepthVal, float &maxDepthVal) |
Computes a depth image. | |
static void | CreateDepthImage (const ImagePtr &disparityImage, const StereoCameraParameters &stereoCameraParameters, const uint16_t invalidDepthVal, ImagePtr &depthImage, float &minDepthVal, float &maxDepthVal) |
Computes a depth image. | |
Static Public Attributes | |
static uint16_t | maxDepthThresholdInMm |
static uint16_t | maxDepthThresholdInMeter |
Static helper functions for stereo related computations.
|
static |
Computes 3D point from disparity value.
disparity | The disparity value |
stereoCameraParameters | The parameters for the stereo camera |
stereo3DPoint | The computed 3D point |
|
static |
Computes the distance between two points in the disparity image.
disparityImage | The disparity image |
stereoParam | The stereo camera parameters |
imagePixel1 | The first pixel in the image |
imagePixel2 | The second pixel in the image |
distance | The distance between the two points |
|
static |
Computes the distance of a point to the camera world coordinates origin, from the disparity image.
disparityImage | The disparity image |
stereoParam | The stereo camera parameters |
imagePixel | The pixel in the image |
distance | The distance of the point to the camera world coordinates origin |
|
static |
Computes 3D point cloud from disparity and reference images using a stereo matching algorithm.
disparityImage | The disparity image from a stereo pair |
referenceImage | The reference image from a stereo pair. This is the image that is used as a reference for the disparity image. |
pointCloudParameters | The parameters for computing the point cloud |
stereoCameraParameters | The parameters for the stereo camera |
|
static |
Computes 3D point cloud from disparity and reference images using a stereo matching algorithm.
disparityImage | The disparity image from a stereo pair |
referenceImage | The reference image from a stereo pair. This is the image that is used as a reference for the disparity image. |
pointCloudParameters | The parameters for computing the point cloud |
stereoCameraParameters | The parameters for the stereo camera |
pointCloud | The computed point cloud will be stored in this object |
|
static |
Computes a depth image.
A depth image reinterprets disparity data by mapping the disparity for each pixel to a depth (z) value based on the image focal length and baseline. The source image is required to carry disparity information.
disparityImage | The source image from which to create the depth values |
invalidDepthVal | value to mark invalid pixels, where the depth should not be computed for |
minDepthVal | The actual minimum depth in the image |
maxDepthVal | The actual maximum depth in the image |
|
static |
Computes a depth image.
A depth image reinterprets disparity data by mapping the disparity for each pixel to a depth (z) value based on the image focal length and baseline. The source image is required to carry disparity information. The destination is required to be initialized with Mono16 pixel format, and have the same width, height, x offset, and y offset as the source image.
disparityImage | The source image from which to create the depth values |
stereoCameraParameters | The stereo camera parameters |
invalidDepthVal | value to mark invalid pixels, where the depth should not be computed for |
depthImage | The destination image in which to store the created depth values |
minDepthVal | The actual minimum depth in the image |
maxDepthVal | The actual maximum depth in the image |
|
static |
Filters speckles from a copy of the input mono disparity image.
Note that only Mono16 pixel format image is supported.
disparityImage | The disparity image |
maxSpeckleSize | The maximum allowed speckle size |
speckleThreshold | The speckle size threshold |
disparityScaleFactor | The coordinate scale factor |
invalidDataValue | The value assigned to invalid data |
|
static |
Filters speckles in-place on the input mono disparity image.
Note that only Mono16 pixel format image is supported.
disparityImage | The disparity image |
maxSpeckleSize | The maximum allowed speckle size |
speckleThreshold | The speckle size threshold |
disparityScaleFactor | The coordinate scale factor |
invalidDataValue | The value assigned to invalid data |
|
static |
Returns true if the camera is a stereo camera or false otherwise.
pCamera | The camera |
|
static |
|
static |