For calibrating cameras, you need a calibration pattern. The NxLib supports two different types of calibration patterns.
Some of the pattern types can encode some information. This information can be decoded with the DecodeData parameter of the CollectPattern command. When this is not possible due to the light conditions, they can also be specified in the global pattern data .
A Halcon pattern always has a grid size 7x7 and always needs to be observed completely. The dots in the pattern can encode its grid spacing and thickness.
All Ensenso patterns have a different point arrangement and are automatically distinguished from Halcon patterns when observing them. The main difference to Halcon patterns is that the camera doesn’t need to observe the whole pattern. As soon as it sees any 4x4 patch, the location of this patch in the complete pattern can be uniquely determined and the pattern section can be used just like any other pattern observation. The offset of the observed patch is published in the Offset node of a pattern specification.
Very small patches can only be localized uniquely in their complete pattern, but not in all possible Ensenso patterns. The NxLib uses the global pattern data to decide which complete pattern the patch belongs to. When this data is not correct while you collect the pattern, you will get inconsistent results. It is therefore recommended to first collect an observation with DecodeData enabled (which requires the observation of a patch that is big enough to decode all information). When the global data got updated, you can then disable the decoding flag and start collecting smaller patches.
There are three different types of Ensenso patterns, which can encode different information. The type of a collected pattern is indicated with the Type node.
Patterns of type “Single” always have size 15x15 and can encode their grid spacing and thickness. To decode the information, you need to see the whole pattern. The origin of such a pattern always lies at its center point.
Patterns of type “Flexible” can have an arbitrary size in both dimensions and their center can have an offset to the origin of the world coordinate system.
Flexible patterns can have an arbitrary grid spacing, but it is not encoded in the pattern. You always have to specify the grid spacing manually when using them. For calibrating a single monocular or stereo camera the flexibility of the size and the offset doesn’t have any advantages, so we recommend using an official or “Single” pattern with its grid spacing encoded for these cases.
For patterns of type “Assembly”, you can combine multiple flat calibration patterns to an arbitrary structure. Individually, each of these patterns behaves the same as a pattern of type “Single” and has its grid spacing encoded.
Additionally, though, you can calibrate the different sides of the assembly to each other, so that they get a common coordinate system. You can start such a calibration from NxCalTab. The result is a JSON file that you can load into the global AssemblyCalibration node. The NxView calibration wizard will automatically ask for a calibration when it detects an assembly pattern.
The assembly calibration must already be loaded when you collect an assembly pattern. Otherwise some of the patterns in the pattern buffer will not have a calibration and each of their sides will have its own coordinate system.
Measurement of the Grid Spacing¶
The grid spacing measures the horizontal and vertical distance between two adjacent points on the pattern. For Ensenso patterns, the small encoding points do not count.