Without depth map / 3D pointcloud, the remapping of streams on a reference is not useable. To align images in different streams from bounding boxes defined in the reference stream, a linear transform (warp) can be used.
When depth map / 3D pointcloud information is not available, the remapping of streams onto a reference is not useable.
It is however still possible to align images in different streams, by using bounding boxes defined in the reference
stream and applying a linear transform (warp).
To create such transform, it is necessary to collect four fixed points static in all streams. First, capture an hdf5 file with a chessboard target kept static during the whole capture, in front of the camears and at a defined distance.
This linear calibration is dependent of the distance camera-target: it simply is the shift of a point from on
camera's image to another camera, at a certain distance. Therefore the transform should only be used for images where
the subject is at the same distance from the cameras than during the calibration.
To create such a transform, it is necessary to collect four fixed points, static in all streams. First, capture an hdf5
file with a chessboard target kept static during the whole capture, in front of the camears and at a defined distance.
The calibration can then be performed with the ``warp_calibration.py`` script.
This linear calibration is dependent of the distance camera-target, thus the result of an alignement will depend of this distance.
Configuration
-------------
...
...
@@ -20,7 +28,7 @@ Here is an example of JSON configuration to create for a warp calibration.
{
"stream_config" : "/path/to/streams_config.json",
"pattern_rows": 9,
"pattern_columns": 6
"pattern_columns": 6,
"frame" : 0,
"streams": {
"camera1_rgb": null,
...
...
@@ -43,13 +51,16 @@ Here is an example of JSON configuration to create for a warp calibration.
}
| - ``stream_config`` : Path to the JSON data config.
| - ``pattern_rows/columns`` : Number of square rows/columns in the chessboard target. See the image below that correspond to 9x6.
| - ``frame`` : Frame number to select in the dataset.
| - ``streams`` : Streams to calibrate. It must correspond to the datasets in the hdf5 file.
| - ``pattern_rows/columns`` : Number of square rows/columns in the chessboard target. See the image below that
corresponds to 9x6.
| - ``frame`` : Frame number to select in each dataset in the ``hdf5`` files.
| - ``streams`` : Streams to calibrate. The names must correspond to the stream names in the ``stream_config``.
| - ``threshold`` : Pixel value (0-255) used to binary threshold grayscale image.
| - ``closing`` : Closing size in pixel.
| - ``invert`` : Invert the pixel intensity (used for thermal images, when black square render white pixel under halogen illumination).
| - ``duplicate_calibration`` : To copy the calibration of one streams to another. Used by example for depth stream that is aligned with a NIR streams.
| - ``invert`` : Invert the pixel intensity (used for thermal images, when black square render white pixel under
halogen illumination).
| - ``duplicate_calibration`` : To copy the calibration of one streams to another. Used by example for depth stream that