6
Tara Windows Extension Unit API Document
Parameters
Description
Return Values
None
N/A
TRUE on Success
FALSE on Failure
Disparity APIs:
BOOL InitCamera(bool GenerateDisparity, bool FilteredDisparityMap)
This function creates an object for the CameraEnumeration class where the Device
ID and Resolution selected by the user are returned. Opens the camera device with
the following inputs. Invokes the InitExtensionUnit method of the HID. The Init
function is called based on the input parameters of the Disparity map are set.
Parameters
Description
Return Values
Bool
GenerateDisparity
Generates Disparity
Map
TRUE on Success
FALSE on Failure
Bool
FilteredDisparityMap
Generates Filtered
Disparity Map
BOOL GrabFrame(Mat *LeftImage, Mat *RightImage)
This function grabs the frame the camera device initialized. Converts the Y16 data
and splits the right image and left image respectively. Rectifies the frame using the
RemapStereoImage method and pass the image as the reference.
Parameters
Description
Return Values
Mat *LeftImage
Left Image of the
camera
TRUE on Success
FALSE on Failure
Mat *RightImage
Right Image of the
camera
Note:
For the camera to stream the custom format, OpenCV has to be rebuild. Refer to the
Tara-SDK_User_Manual in the documents folder of the SDK.
BOOL GetDisparity(Mat LImage, Mat RImage, Mat *DisparityMap, Mat
*disp_filtered)
This function computes the disparity map for the left and right images passed with
the parameters set in the SetAlgorithmParam method.
Parameters
Description
Return Values
Mat LImage
Left Image of the
camera
TRUE on Success
FALSE on Failure