CollectPattern

Navigation:  NxLib API > Commands >

CollectPattern

Previous pageReturn to chapter overviewNext page

This command searches for a calibration pattern of the size specified in Pattern and puts it into the pattern buffer. If you set the DecodeData parameter to true, the global Pattern setting will be ignored and the pattern will be inserted into the buffer with its the decoded size.

 

The command will also try to match all patterns detected in the left image with the patterns from the right image. If such a match is found the pattern will be listed in the Stereo result node, if not it will be in the Monocular result node, depending in which image it was found.

 

Note: Each pattern's grid spacing will be stored together with the pattern point coordinates in the global pattern buffer. The grid spacing is either determined by decoding the pattern's dot centers when specifying DecodeData as true, or by the global GridSpacing parameter.

Note: Please note that you should always clear the pattern buffer with DiscardPatterns before collecting a new pattern while tracking a non-static pattern pose.

Error Symbols

PatternNotFound

Cause:
The calibration pattern of the defined size could not be located in both images, possible problems preventing the correct pattern detection are:

the contrast of the dots is not sufficient

one of the dots is damaged

the pattern is held at a too steep angle towards the camera

the pattern orientation could not be detected in both images because the marked corner is damaged

Solution:
Make sure the pattern is clearly and completely visible in both camera images. Replace or clean the pattern if it's damaged.

PatternNotDecodable

Cause:
The DecodeData parameter was specified as true but the pattern data could not be read. Possible causes for decoding problems could be:

The small white points (data dots) inside the pattern dots are not clearly visible

Too many data dots are damaged

Solution:
Ensure that the data dots are visible and not damaged in at least one of the images. Replace or clean the pattern, if the data dots are corrupted.