NI Vision for LabVIEW

IMAQ Learn Binocular Stereo Calibration VI

  • Updated2023-02-21
  • 6 minute(s) read
Owning Palette: Locate Edges
Requires: NI Vision Development Module

Learns binocular stereo information. This VI takes the calibrated template images from the left and right cameras as input, and computes the calibration information required for binocular stereo vision. The calibration process computes the rotation matrix and translation vector between the two cameras. It also computes the essential and fundamental matrices. During the learn process, this VI will also compute the lookup tables required to rectify the left and right images and identifies the regions in the left and right images that overlap.

This VI assumes that both the calibrated templates have been learned from the same set of grid images (or points). This VI will use the reference points stored in the two calibrated templates to learn the binocular stereo calibration information. It will use the points from the first set (the first grid image or points) to select the origin of the real world coordinate system.

Examples

IMAQ Learn Binocular Stereo Calibration

crn.gif

Binocular Stereo Session is the reference to the binocular stereo vision session on which this VI operates.

cgenclasstagrefflat.gif

Left Calibration Template is the calibrated image that represents the single camera information from the left camera in the binocular stereo setup.

cgenclasstagrefflat.gif

Right Calibration Template is the calibrated image that represents the single camera information from the right camera in the binocular stereo setup.

cerrcodeclst.gif

error in (no error) describes the error status before this VI or function runs. The default is no error. If an error occurred before this VI or function runs, the VI or function passes the error in value to error out. This VI or function runs normally only if no error occurred before this VI or function runs. If an error occurs while this VI or function runs, it runs normally and sets its own error status in error out. Use the Simple Error Handler or General Error Handler VIs to display the description of the error code. Use error in and error out to check errors and to specify execution order by wiring error out from one node to error in of the next node.

cbool.gif

status is TRUE (X) if an error occurred before this VI or function ran or FALSE (checkmark) to indicate a warning or that no error occurred before this VI or function ran. The default is FALSE.

ci32.gif

code is the error or warning code. If status is TRUE, code is a nonzero error code. If status is FALSE, code is 0 or a warning code.

cstr.gif

source describes the origin of the error or warning and is, in most cases, the name of the VI or function that produced the error or warning. The default is an empty string.

ccclst.gif

Rectification Settings specifies the information that is learned to rectify the left and right images.

cbool.gif

Learn Lookup Table? specifies whether lookup tables need to be learned to rectify the left and right images. If this input is set to TRUE, then two lookup tables are computed and are used to rectify the left and right camera images. Using lookup tables drastically improves the rectification speed but comes at a cost of increased memory usage.

cbool.gif

Render to original image? specifies learning of a lookup table for mapping disparity image to the original left image. This option will learn one lookup table and hence increase memory usage, further, it will also increase overhead in computation.

csgl.gif

Scaling Factor is a value between 0 and 1 that specifies a value by which the rectified images (and disparity images) should be scaled. This parameter is useful for changing the size of the rectified images and the disparity map to speed up the depth reconstruction operation.

irn.gif

Binocular Stereo Session (dup) is the reference to the stereo vision session on which this VI operates.

inclst.gif

Quality indicates the quality of the stereo calibration that is learned.

idbl.gif

Max. Projection Error specifies the maximum error in the stereo camera calibration. The error is computed by projecting the grid points in the left image onto the right image and computing the maximum error obtained between the projected points and the original points in the right image.

idbl.gif

Calibration Quality is a value between 0 and 1. A value of 1 suggests that the calibration is of the best quality. Anything below 0.7 suggests that the system should be calibrated again.

idbl.gif

Max. Rectification Error specifies how well the rectified images are aligned. Any value greater than 1.5 indicates the system should be recalibrated.

idbl.gif

Rectification Quality specifies the quality of the rectification process. A value of 1 specifies that the images are rectified perfectly. A lower value indicates imperfect rectification.

ierrcodeclst.gif

error out contains error information. If error in indicates that an error occurred before this VI or function ran, error out contains the same error information. Otherwise, it describes the error status that this VI or function produces. Right-click the error out indicator on the front panel and select Explain Error from the shortcut menu for more information about the error.

ibool.gif

status is TRUE (X) if an error occurred or FALSE (checkmark) to indicate a warning or that no error occurred.

ii32.gif

code is the error or warning code. If status is TRUE, code is a nonzero error code. If status is FALSE, code is 0 or a warning code.

istr.gif

source describes the origin of the error or warning and is, in most cases, the name of the VI or function that produced the error or warning. The default is an empty string.

Examples

Refer to the following for examples that use this VI.

  • LabVIEW\examples\Vision\Stereo Vision\Compute Depth Image\Compute Depth Image.vi