Triclops SDK
4.0.3.0
Functions
OpenCV stereo control functions

Functions

enum TriclopsError triclopsGetOpenCVBMPreFilterSize (const TriclopsContext context, int *preFilterSize)
 Retrieves the current mask size for OpenCV Block Matching stereo algorithm Normalized response pre-filter. More...
 
enum TriclopsError triclopsGetOpenCVBMPreFilterType (const TriclopsContext context, OpenCVPrefilterType *prefilterType)
 Retrieves the current pre-filter for OpenCV Block Matching stereo algorithm. More...
 
enum TriclopsError triclopsGetOpenCVBMTextureThreshold (const TriclopsContext context, int *textureThreshold)
 Retrieves the current texture threshold for OpenCV Block Matching stereo algorithm. More...
 
enum TriclopsError triclopsGetOpenCVDisp12MaxDiff (const TriclopsContext context, int *disp12MaxDiff)
 Retrieves the current maximum difference for OpenCV Stereo Algorithms' consistency checks. More...
 
enum TriclopsError triclopsGetOpenCVDisparityRange (const TriclopsContext context, int *minDisparity, int *numDisparities)
 Retrieves the current minimum and maximum disparities for OpenCV Stereo Algorithms. More...
 
enum TriclopsError triclopsGetOpenCVMaxDisparity (const TriclopsContext context, int *maxDisparity)
 Retrieves the current maximum disparity for OpenCV Stereo Algorithms. More...
 
enum TriclopsError triclopsGetOpenCVMinDisparity (const TriclopsContext context, int *minDisparity)
 Retrieves the current minimum disparity for OpenCV Stereo Algorithms. More...
 
enum TriclopsError triclopsGetOpenCVMinMaxDisparities (const TriclopsContext context, int *minDisparity, int *maxDisparity)
 Retrieves the current minimum and maximum disparities for OpenCV Stereo Algorithms. More...
 
enum TriclopsError triclopsGetOpenCVNumDisparities (const TriclopsContext context, int *numDisparities)
 Retrieves the current number of disparities for OpenCV Stereo Algorithms. More...
 
enum TriclopsError triclopsGetOpenCVPreFilterCap (const TriclopsContext context, int *preFilterCap)
 Retrieves the current truncation value for OpenCV Block Matching stereo algorithm pre-filters. More...
 
enum TriclopsError triclopsGetOpenCVSGBMMode (const TriclopsContext context, OpenCVSGBMMode *mode)
 Retrieves the current computation mode for OpenCV Semi-Global Block Matching stereo algorithm. More...
 
enum TriclopsError triclopsGetOpenCVSGBMP1 (const TriclopsContext context, int *P1)
 Retrieves the first smoothing parameter for OpenCV Semi-Global Block Matching stereo algorithm. More...
 
enum TriclopsError triclopsGetOpenCVSGBMP2 (const TriclopsContext context, int *P2)
 Retrieves the second smoothing parameter for OpenCV Semi-Global Block Matching stereo algorithm. More...
 
enum TriclopsError triclopsGetOpenCVSpeckleRange (const TriclopsContext context, int *speckleRange)
 Retrieves the current speckle filter maximum disparity for OpenCV Stereo Algorithms. More...
 
enum TriclopsError triclopsGetOpenCVSpeckleWindowSize (const TriclopsContext context, int *speckleWindowSize)
 Retrieves the current speckle filter window size for OpenCV Stereo Algorithms. More...
 
enum TriclopsError triclopsGetOpenCVStereoMaskSize (const TriclopsContext context, int *stereoMaskSize)
 Retrieves the current Stereo Mask size for OpenCV Stereo Algorithms. More...
 
enum TriclopsError triclopsGetOpenCVUniquenessRatio (const TriclopsContext context, int *uniquenessRatio)
 Retrieves the current texture threshold for OpenCV stereo algorithms. More...
 
enum TriclopsError triclopsSetOpenCVBMPreFilterSize (const TriclopsContext context, int preFilterSize)
 Sets a new mask size for OpenCV Block Matching stereo algorithm Normalized response pre-filter. More...
 
enum TriclopsError triclopsSetOpenCVBMPreFilterType (const TriclopsContext context, OpenCVPrefilterType preFilterType)
 Sets a new pre-filter for OpenCV Block Matching stereo algorithm. More...
 
enum TriclopsError triclopsSetOpenCVBMTextureThreshold (const TriclopsContext context, int textureThreshold)
 Sets a new texture threshold for OpenCV Block Matching stereo algorithm. More...
 
enum TriclopsError triclopsSetOpenCVDisp12MaxDiff (const TriclopsContext context, int disp12MaxDiff)
 Sets a new maximum difference for OpenCV Stereo Algorithms' consistency checks. More...
 
enum TriclopsError triclopsSetOpenCVDisparityRange (const TriclopsContext context, int minDisparity, int numDisparities)
 Sets new minimum and number of disparities for OpenCV Stereo Algorithms. More...
 
enum TriclopsError triclopsSetOpenCVMaxDisparity (const TriclopsContext context, int maxDisparity)
 Sets a new maximum disparity for OpenCV Stereo Algorithms. More...
 
enum TriclopsError triclopsSetOpenCVMinDisparity (const TriclopsContext context, int minDisparity)
 Sets a new minimum disparity for OpenCV Stereo Algorithms. More...
 
enum TriclopsError triclopsSetOpenCVMinMaxDisparities (const TriclopsContext context, int minDisparity, int maxDisparity)
 Sets new minimum and maximum disparities for OpenCV Stereo Algorithms. More...
 
enum TriclopsError triclopsSetOpenCVNumDisparities (const TriclopsContext context, int numDisparities)
 Sets a new number of disparities for OpenCV Stereo Algorithms. More...
 
enum TriclopsError triclopsSetOpenCVPreFilterCap (const TriclopsContext context, int preFilterCap)
 Sets a new truncation value for OpenCV Block Matching stereo algorithm pre-filters. More...
 
enum TriclopsError triclopsSetOpenCVSGBMMode (const TriclopsContext context, OpenCVSGBMMode mode)
 Sets a new computation mode for OpenCV Semi-Global Block Matching stereo algorithm. More...
 
enum TriclopsError triclopsSetOpenCVSGBMP1 (const TriclopsContext context, int P1)
 Sets a new first smoothing parameter for OpenCV Semi-Global Block Matching stereo algorithm. More...
 
enum TriclopsError triclopsSetOpenCVSGBMP2 (const TriclopsContext context, int P2)
 Sets a new second smoothing parameter for OpenCV Semi-Global Block Matching stereo algorithm. More...
 
enum TriclopsError triclopsSetOpenCVSpeckleRange (const TriclopsContext context, int speckleRange)
 Sets a new speckle filter maximum disparity for OpenCV Stereo Algorithms. More...
 
enum TriclopsError triclopsSetOpenCVSpeckleWindowSize (const TriclopsContext context, int speckleWindowSize)
 Sets a new speckle filter window size for OpenCV Stereo Algorithms. More...
 
enum TriclopsError triclopsSetOpenCVStereoMaskSize (const TriclopsContext context, int stereoMaskSize)
 Sets a new Stereo Mask size for OpenCV Stereo Algorithms. More...
 
enum TriclopsError triclopsSetOpenCVUniquenessRatio (const TriclopsContext context, int uniquenessRatio)
 Sets a new uniqueness ratio for OpenCV stereo algorithms. More...
 

Detailed Description

Triclops integrates two OpenCV (OCV) stereo 3D reconstruction algorithms: Block Matching (BM) and Semi-Global Block Matching (SGBM). The parameters for OCV stereo processing are separate from Triclops' Block Matching parameters, allowing for a finer tuning of OCV algorithms, as all of the native parameters have been exposed through Triclops.

Even though OCV stereo algorithms use the left frame as reference for stereo processing, Triclops has integrated a frame processing pipeline that allows to use OCV stereo algorithms using the right frame as reference, making them follow the same pattern as Triclops' Block Matching.

Due to optimization constrains OCV stereo algorithms do not allow the computation of disparity ranges that are not multiples of 16.

Speckle filter

OpenCV runs a speckle removal filter at the end of each stereo computation, removing all the computation artifacts based on two parameters:

Semi-Global Block Matching (SGBM) smoothness parameters

SGMB uses two parameters in order to even out the resulting disparity map:

The larger the parameters are the smoother and "flatter" the disparity map will result. As a rule of thumb a good smoothing parameters pair is: 8*StereoMaskSize^2 and 32*StereoMaskSize^2

Function Documentation

enum TriclopsError triclopsGetOpenCVBMPreFilterSize ( const TriclopsContext  context,
int *  preFilterSize 
)

Retrieves the current mask size for OpenCV Block Matching stereo algorithm Normalized response pre-filter.

Parameters
contextThe context from which to get the mask size
preFilterSizeThe current mask size
Returns
An error code representing the outcome of the function
Return values
TriclopsErrorOkThe function completed successfully
TriclopsErrorInvalidContextThe provided context is invalid
See also
triclopsSetOpenCVBMPreFilterSize()
enum TriclopsError triclopsGetOpenCVBMPreFilterType ( const TriclopsContext  context,
OpenCVPrefilterType prefilterType 
)

Retrieves the current pre-filter for OpenCV Block Matching stereo algorithm.

Parameters
contextThe context from which to get the pre-filter
prefilterTypeThe current pre-filter
Returns
An error code representing the outcome of the function
Return values
TriclopsErrorOkThe function completed successfully
TriclopsErrorInvalidContextThe provided context is invalid
See also
triclopsSetOpenCVDisp12MaxDiff()
enum TriclopsError triclopsGetOpenCVBMTextureThreshold ( const TriclopsContext  context,
int *  textureThreshold 
)

Retrieves the current texture threshold for OpenCV Block Matching stereo algorithm.

Parameters
contextThe context from which to get the truncation value
textureThresholdThe current texture threshold
Returns
An error code representing the outcome of the function
Return values
TriclopsErrorOkThe function completed successfully
TriclopsErrorInvalidContextThe provided context is invalid
See also
triclopsSetOpenCVBMTextureThreshold()
enum TriclopsError triclopsGetOpenCVDisp12MaxDiff ( const TriclopsContext  context,
int *  disp12MaxDiff 
)

Retrieves the current maximum difference for OpenCV Stereo Algorithms' consistency checks.

Parameters
contextThe context from which to get the maximum difference in pixels
disp12MaxDiffThe current maximum difference in pixels
Returns
An error code representing the outcome of the function
Return values
TriclopsErrorOkThe function completed successfully
TriclopsErrorInvalidContextThe provided context is invalid
See also
triclopsSetOpenCVDisp12MaxDiff()
enum TriclopsError triclopsGetOpenCVDisparityRange ( const TriclopsContext  context,
int *  minDisparity,
int *  numDisparities 
)

Retrieves the current minimum and maximum disparities for OpenCV Stereo Algorithms.

Parameters
contextThe context from which to get the minimum and maximum disparities
minDisparityThe current minimum disparity
numDisparitiesThe current number of disparities
Returns
An error code representing the outcome of the function
Return values
TriclopsErrorOkThe function completed successfully
TriclopsErrorInvalidContextThe provided context is invalid
See also
triclopsSetOpenCVDisparityRange()
enum TriclopsError triclopsGetOpenCVMaxDisparity ( const TriclopsContext  context,
int *  maxDisparity 
)

Retrieves the current maximum disparity for OpenCV Stereo Algorithms.

Parameters
contextThe context from which to get the maximum disparity
maxDisparityThe current maximum disparity
Returns
An error code representing the outcome of the function
Return values
TriclopsErrorOkThe function completed successfully
TriclopsErrorInvalidContextThe provided context is invalid
See also
triclopsSetOpenCVMaxDisparity()
triclopsGetOpenCVMinMaxDisparities()
enum TriclopsError triclopsGetOpenCVMinDisparity ( const TriclopsContext  context,
int *  minDisparity 
)

Retrieves the current minimum disparity for OpenCV Stereo Algorithms.

Parameters
contextThe context from which to get the minimum disparity
minDisparityThe current minimum disparity
Returns
An error code representing the outcome of the function
Return values
TriclopsErrorOkThe function completed successfully
TriclopsErrorInvalidContextThe provided context is invalid
See also
triclopsSetOpenCVMinDisparity()
triclopsGetOpenCVNumDisparities()
triclopsGetOpenCVDisparityRange()
enum TriclopsError triclopsGetOpenCVMinMaxDisparities ( const TriclopsContext  context,
int *  minDisparity,
int *  maxDisparity 
)

Retrieves the current minimum and maximum disparities for OpenCV Stereo Algorithms.

Parameters
contextThe context from which to get the minimum and maximum disparities
minDisparityThe current minimum disparity
maxDisparityThe current maximum disparity
Returns
An error code representing the outcome of the function
Return values
TriclopsErrorOkThe function completed successfully
TriclopsErrorInvalidContextThe provided context is invalid
See also
triclopsSetOpenCVMinMaxDisparities()
enum TriclopsError triclopsGetOpenCVNumDisparities ( const TriclopsContext  context,
int *  numDisparities 
)

Retrieves the current number of disparities for OpenCV Stereo Algorithms.

Parameters
contextThe context from which to get the number of disparities
numDisparitiesThe current number of disparities
Returns
An error code representing the outcome of the function
Return values
TriclopsErrorOkThe function completed successfully
TriclopsErrorInvalidContextThe provided context is invalid
See also
triclopsSetOpenCVNumDisparities()
triclopsGetOpenCVMinDisparity()
triclopsGetOpenCVDisparityRange()
enum TriclopsError triclopsGetOpenCVPreFilterCap ( const TriclopsContext  context,
int *  preFilterCap 
)

Retrieves the current truncation value for OpenCV Block Matching stereo algorithm pre-filters.

Parameters
contextThe context from which to get the truncation value
preFilterCapThe current truncation value
Returns
An error code representing the outcome of the function
Return values
TriclopsErrorOkThe function completed successfully
TriclopsErrorInvalidContextThe provided context is invalid
See also
triclopsSetOpenCVBMPreFilterSize()
enum TriclopsError triclopsGetOpenCVSGBMMode ( const TriclopsContext  context,
OpenCVSGBMMode mode 
)

Retrieves the current computation mode for OpenCV Semi-Global Block Matching stereo algorithm.

Parameters
contextThe context from which to get the SGBM mode
modeThe current SGBM mode
Returns
An error code representing the outcome of the function
Return values
TriclopsErrorOkThe function completed successfully
TriclopsErrorInvalidContextThe provided context is invalid
See also
triclopsSetOpenCVSGBMMode()
enum TriclopsError triclopsGetOpenCVSGBMP1 ( const TriclopsContext  context,
int *  P1 
)

Retrieves the first smoothing parameter for OpenCV Semi-Global Block Matching stereo algorithm.

Parameters
contextThe context from which to get the first smoothing parameter
P1The current first smoothing parameter
Returns
An error code representing the outcome of the function
Return values
TriclopsErrorOkThe function completed successfully
TriclopsErrorInvalidContextThe provided context is invalid
See also
triclopsSetOpenCVSGBMP1()
triclopsGetOpenCVSGBMP2()
enum TriclopsError triclopsGetOpenCVSGBMP2 ( const TriclopsContext  context,
int *  P2 
)

Retrieves the second smoothing parameter for OpenCV Semi-Global Block Matching stereo algorithm.

Parameters
contextThe context from which to get the second smoothing parameter
P2The current second smoothing parameter
Returns
An error code representing the outcome of the function
Return values
TriclopsErrorOkThe function completed successfully
TriclopsErrorInvalidContextThe provided context is invalid
See also
triclopsSetOpenCVSGBMP2()
triclopsGetOpenCVSGBMP1()
enum TriclopsError triclopsGetOpenCVSpeckleRange ( const TriclopsContext  context,
int *  speckleRange 
)

Retrieves the current speckle filter maximum disparity for OpenCV Stereo Algorithms.

Parameters
contextThe context from which to get the maximum disparity
speckleRangeThe current maximum disparity
Returns
An error code representing the outcome of the function
Return values
TriclopsErrorOkThe function completed successfully
TriclopsErrorInvalidContextThe provided context is invalid
See also
triclopsSetOpenCVSpeckleRange()
enum TriclopsError triclopsGetOpenCVSpeckleWindowSize ( const TriclopsContext  context,
int *  speckleWindowSize 
)

Retrieves the current speckle filter window size for OpenCV Stereo Algorithms.

Parameters
contextThe context from which to get the window size
speckleWindowSizeThe current window size
Returns
An error code representing the outcome of the function
Return values
TriclopsErrorOkThe function completed successfully
TriclopsErrorInvalidContextThe provided context is invalid
See also
triclopsSetOpenCVSpeckleWindowSize()
enum TriclopsError triclopsGetOpenCVStereoMaskSize ( const TriclopsContext  context,
int *  stereoMaskSize 
)

Retrieves the current Stereo Mask size for OpenCV Stereo Algorithms.

Parameters
contextThe context from which to retrieve the Stereo Mask size
stereoMaskSizeThe current stereo mask size
Returns
An error code representing the outcome of the function
Return values
TriclopsErrorOkThe function completed successfully
TriclopsErrorInvalidContextThe provided context is invalid
See also
triclopsSetOpenCVStereoMaskSize()
enum TriclopsError triclopsGetOpenCVUniquenessRatio ( const TriclopsContext  context,
int *  uniquenessRatio 
)

Retrieves the current texture threshold for OpenCV stereo algorithms.

Parameters
contextThe context from which to get the uniqueness ratio
uniquenessRatioThe current uniqueness ratio
Returns
An error code representing the outcome of the function
Return values
TriclopsErrorOkThe function completed successfully
TriclopsErrorInvalidContextThe provided context is invalid
See also
triclopsSetOpenCVBMTextureThreshold()
enum TriclopsError triclopsSetOpenCVBMPreFilterSize ( const TriclopsContext  context,
int  preFilterSize 
)

Sets a new mask size for OpenCV Block Matching stereo algorithm Normalized response pre-filter.

This value only affects Normalized response pre-filter as X-Sobel pre-filter uses a fixed mask size.

Parameters
contextThe context for which to set the mask size
preFilterSizeThe new mask size (odd value between 5 and 255)
Returns
An error code representing the outcome of the function
Return values
TriclopsErrorOkThe function completed successfully
TriclopsErrorInvalidContextThe provided context is invalid
TriclopsErrorInvalidSettingThe provided mask size is invalid
See also
triclopsGetOpenCVBMPreFilterSize()
triclopsSetOpenCVBMPreFilterType()
OpenCVPrefilterType
enum TriclopsError triclopsSetOpenCVBMPreFilterType ( const TriclopsContext  context,
OpenCVPrefilterType  preFilterType 
)

Sets a new pre-filter for OpenCV Block Matching stereo algorithm.

Parameters
contextThe context for which to set the pre-filter
preFilterTypeThe new pre-filter
Returns
An error code representing the outcome of the function
Return values
TriclopsErrorOkThe function completed successfully
TriclopsErrorInvalidContextThe provided context is invalid
TriclopsErrorInvalidRequestThe provided pre-filer is not supported or is invalid (e.g. casted integer)
See also
triclopsGetOpenCVBMPreFilterType()
triclopsSetStereoAlgorithm()
triclopsSetOpenCVBMPreFilterSize()
enum TriclopsError triclopsSetOpenCVBMTextureThreshold ( const TriclopsContext  context,
int  textureThreshold 
)

Sets a new texture threshold for OpenCV Block Matching stereo algorithm.

Parameters
contextThe context for which to set the truncation value
textureThresholdThe new texture threshold
Returns
An error code representing the outcome of the function
Return values
TriclopsErrorOkThe function completed successfully
TriclopsErrorInvalidContextThe provided context is invalid
TriclopsErrorInvalidSettingThe provided texture threshold is invalid (i.e. negative)
See also
triclopsGetOpenCVBMTextureThreshold()
enum TriclopsError triclopsSetOpenCVDisp12MaxDiff ( const TriclopsContext  context,
int  disp12MaxDiff 
)

Sets a new maximum difference for OpenCV Stereo Algorithms' consistency checks.

Parameters
contextThe context for which to set the maximum difference in pixels
disp12MaxDiffThe new maximum difference in pixels
Returns
An error code representing the outcome of the function
Return values
TriclopsErrorOkThe function completed successfully
TriclopsErrorInvalidContextThe provided context is invalid
See also
triclopsGetOpenCVDisp12MaxDiff()
enum TriclopsError triclopsSetOpenCVDisparityRange ( const TriclopsContext  context,
int  minDisparity,
int  numDisparities 
)

Sets new minimum and number of disparities for OpenCV Stereo Algorithms.

The number of disparities has to be a multiple of 16, due to OpenCV limitations.

Parameters
contextThe context for which to set the minimum and maximum
minDisparityThe new minimum disparity
numDisparitiesThe new number of disparities
Returns
An error code representing the outcome of the function
Return values
TriclopsErrorOkThe function completed successfully
TriclopsErrorInvalidContextThe provided context is invalid
TriclopsErrorInvalidSettingThe number of disparities is not a multiple of 16
TriclopsErrorUnknownOpenCV returned an error while trying to set the provided minimum
See also
triclopsSetOpenCVMinDisparity()
triclopsSetOpenCVNumDisparities()
triclopsGetOpenCVDisparityRange()
enum TriclopsError triclopsSetOpenCVMaxDisparity ( const TriclopsContext  context,
int  maxDisparity 
)

Sets a new maximum disparity for OpenCV Stereo Algorithms.

This function is just syntactic sugar to replace

int maxDisparity, minDisparity;
triclopsSetOpenCVNumDisparities(context, maxDisparity-minDisparity);

The resulting number of disparities has to be a multiple of 16, due to OpenCV limitations.

Parameters
contextThe context for which to set the maximum
maxDisparityThe new maximum disparity
Returns
An error code representing the outcome of the function
Return values
TriclopsErrorOkThe function completed successfully
TriclopsErrorInvalidContextThe provided context is invalid
TriclopsErrorInvalidSettingThe provided number of disparities is not a multiple of 16
TriclopsErrorInvalidRequestThe provided maximum is smaller than the current minimum
See also
triclopsGetOpenCVMaxDisparity()
triclopsSetOpenCVMinDisparity()
triclopsSetOpenCVNumDisparities()
triclopsSetOpenCVMinMaxDisparities()
enum TriclopsError triclopsSetOpenCVMinDisparity ( const TriclopsContext  context,
int  minDisparity 
)

Sets a new minimum disparity for OpenCV Stereo Algorithms.

Parameters
contextThe context for which to set the minimum disparity
minDisparityThe new minimum disparity
Returns
An error code representing the outcome of the function
Return values
TriclopsErrorOkThe function completed successfully
TriclopsErrorInvalidContextThe provided context is invalid
TriclopsErrorUnkownThe provided disparity generated an error into OpenCV. An extended error is returned via standard output
See also
triclopsGetOpenCVMinDisparity()
triclopsSetOpenCVNumDisparities()
triclopsSetOpenCVDisparityRange()
enum TriclopsError triclopsSetOpenCVMinMaxDisparities ( const TriclopsContext  context,
int  minDisparity,
int  maxDisparity 
)

Sets new minimum and maximum disparities for OpenCV Stereo Algorithms.

The resulting number of disparities has to be a multiple of 16, due to OpenCV limitations.

Parameters
contextThe context for which to set the minimum and maximum
minDisparityThe new minimum disparity
maxDisparityThe new maximum disparity
Returns
An error code representing the outcome of the function
Return values
TriclopsErrorOkThe function completed successfully
TriclopsErrorInvalidContextThe provided context is invalid
TriclopsErrorInvalidSettingThe resulting number of disparities is not a multiple of 16
TriclopsErrorInvalidRequestThe provided maximum is smaller than the provided minimum
See also
triclopsSetOpenCVMaxDisparity()
triclopsSetOpenCVMinDisparity()
triclopsSetOpenCVNumDisparities()
triclopsGetOpenCVMinMaxDisparities()
enum TriclopsError triclopsSetOpenCVNumDisparities ( const TriclopsContext  context,
int  numDisparities 
)

Sets a new number of disparities for OpenCV Stereo Algorithms.

The number of disparities has to be a multiple of 16, due to OpenCV limitations.

Parameters
contextThe context for which to set the number of disparities
numDisparitiesThe new number of disparities
Returns
An error code representing the outcome of the function
Return values
TriclopsErrorOkThe function completed successfully
TriclopsErrorInvalidContextThe provided context is invalid
TriclopsErrorInvalidSettingThe provided number of disparities is either a negative value or it is not a multiple of 16
See also
triclopsGetOpenCVNumDisparities()
triclopsSetOpenCVMinDisparity()
triclopsSetOpenCVDisparityRange()
enum TriclopsError triclopsSetOpenCVPreFilterCap ( const TriclopsContext  context,
int  preFilterCap 
)

Sets a new truncation value for OpenCV Block Matching stereo algorithm pre-filters.

Parameters
contextThe context for which to set the truncation value
preFilterCapThe new truncation value (value between 1 and 63)
Returns
An error code representing the outcome of the function
Return values
TriclopsErrorOkThe function completed successfully
TriclopsErrorInvalidContextThe provided context is invalid
TriclopsErrorInvalidSettingThe provided truncation value is invalid
See also
triclopsGetOpenCVPreFilterCap()
enum TriclopsError triclopsSetOpenCVSGBMMode ( const TriclopsContext  context,
OpenCVSGBMMode  mode 
)

Sets a new computation mode for OpenCV Semi-Global Block Matching stereo algorithm.

Parameters
contextThe context for which to set the SGBM mode
modeThe new SGBM mode
Returns
An error code representing the outcome of the function
Return values
TriclopsErrorOkThe function completed successfully
TriclopsErrorInvalidContextThe provided context is invalid
TriclopsErrorInvalidRequestThe provided SGBM mode is not supported or is invalid (e.g. casted integer)
See also
triclopsGetOpenCVSGBMMode()
triclopsSetStereoAlgorithm()
enum TriclopsError triclopsSetOpenCVSGBMP1 ( const TriclopsContext  context,
int  P1 
)

Sets a new first smoothing parameter for OpenCV Semi-Global Block Matching stereo algorithm.

Parameters
contextThe context for which to set the first smoothing parameter
P1The new first smoothing parameter
Returns
An error code representing the outcome of the function
Return values
TriclopsErrorOkThe function completed successfully
TriclopsErrorInvalidContextThe provided context is invalid
See also
triclopsGetOpenCVSGBMP1()
triclopsSetOpenCVSGBMP2()
triclopsSetStereoAlgorithm()
enum TriclopsError triclopsSetOpenCVSGBMP2 ( const TriclopsContext  context,
int  P2 
)

Sets a new second smoothing parameter for OpenCV Semi-Global Block Matching stereo algorithm.

Parameters
contextThe context for which to set the second smoothing parameter
P2The new second smoothing parameter
Returns
An error code representing the outcome of the function
Return values
TriclopsErrorOkThe function completed successfully
TriclopsErrorInvalidContextThe provided context is invalid
See also
triclopsGetOpenCVSGBMP1()
triclopsSetOpenCVSGBMP2()
triclopsSetStereoAlgorithm()
enum TriclopsError triclopsSetOpenCVSpeckleRange ( const TriclopsContext  context,
int  speckleRange 
)

Sets a new speckle filter maximum disparity for OpenCV Stereo Algorithms.

Parameters
contextThe context for which to set the maximum disparity
speckleRangeThe new maximum disparity
Returns
An error code representing the outcome of the function
Return values
TriclopsErrorOkThe function completed successfully
TriclopsErrorInvalidContextThe provided context is invalid
See also
triclopsGetOpenCVSpeckleRange()
enum TriclopsError triclopsSetOpenCVSpeckleWindowSize ( const TriclopsContext  context,
int  speckleWindowSize 
)

Sets a new speckle filter window size for OpenCV Stereo Algorithms.

Parameters
contextThe context for which to set the window size
speckleWindowSizeThe new window size
Returns
An error code representing the outcome of the function
Return values
TriclopsErrorOkThe function completed successfully
TriclopsErrorInvalidContextThe provided context is invalid
See also
triclopsGetOpenCVSpeckleWindowSize()
enum TriclopsError triclopsSetOpenCVStereoMaskSize ( const TriclopsContext  context,
int  stereoMaskSize 
)

Sets a new Stereo Mask size for OpenCV Stereo Algorithms.

Parameters
contextThe context for which to set the Stereo Mask size
stereoMaskSizeThe new stereo mask size, which needs to be a odd number between 5 and 255
Returns
An error code representing the outcome of the function
Return values
TriclopsErrorOkThe function completed successfully
TriclopsErrorInvalidContextThe provided context is invalid
TriclopsErrorInvalidSettingThe provided stereo mask size is either not valid or is too large for the chosen output resolution
See also
triclopsGetOpenCVStereoMaskSize()
enum TriclopsError triclopsSetOpenCVUniquenessRatio ( const TriclopsContext  context,
int  uniquenessRatio 
)

Sets a new uniqueness ratio for OpenCV stereo algorithms.

Parameters
contextThe context for which to set the uniqueness ratio
uniquenessRatioThe new uniqueness ratio
Returns
An error code representing the outcome of the function
Return values
TriclopsErrorOkThe function completed successfully
TriclopsErrorInvalidContextThe provided context is invalid
TriclopsErrorInvalidSettingThe provided uniqueness ratio is invalid (i.e. negative)
See also
triclopsGetOpenCVBMTextureThreshold()
Contact Support Triclops SDK Programmer's Guide and API Reference