Dear all,
I’m trying to interface a Mechmind Nano 3d camera over genicam using aravis 0.8.30.
As documented here and looking at their Halcon-Genicam examples, in order to convert the received “Coord3d_ABC16” data to a pointcloud in metric [mm] one needs to get the buffers offset and scale values for all axis “ABC”.
This should be done by using “ChunkScan3dCoordinateSelector” together with querying “ChunkScan3dCoordinateScale”. I’m aware of the aravis chunk parser example 05-chunk-parser.c, but unsure how set the selector. I use a snippet like this to retrieve the data, but I get the exact same values for all scales/offsets for “Coordinate[A,B,C]”:
::std::pair<double, double> get_scale_and_offset(ArvCamera* camera, ArvChunkParser *parser, ArvBuffer *buffer, const char *coordinate){
GError *error = NULL;
arv_camera_set_string(camera, "ChunkScan3dCoordinateSelector", coordinate, &error);
throw_on_error(error);
auto scale = arv_chunk_parser_get_float_value(parser, buffer, "ChunkScan3dCoordinateScale", &error);
throw_on_error(error);
auto offset = arv_chunk_parser_get_float_value(parser, buffer, "ChunkScan3dCoordinateOffset", &error);
throw_on_error(error);
return ::std::make_pair(scale, offset);
}
An excerpt from arv-tool features output:
Category : 'ChunkDataControl'
Enumeration : [RW] 'ChunkComponentSelector'
EnumEntry : 'Texture'
EnumEntry : 'Normal'
EnumEntry : 'Range'
Boolean : [RO] 'ChunkEnable'
Boolean : [RO] 'ChunkModeActive'
Float : [RO] 'ChunkScan3dCoordinateOffset'
Float : [RO] 'ChunkScan3dCoordinateScale'
Enumeration : [RW] 'ChunkScan3dCoordinateSelector'
EnumEntry : 'CoordinateC'
EnumEntry : 'CoordinateB'
EnumEntry : 'CoordinateA'
“ArvChunkParser” atm does not provide any setters, and my intuition says setting the selector using “arv_camera_set_string” might have no effect.
I’d be glad for some pointers in the right direction.