Chunk Data from rc_visard
zaksel opened this issue · 4 comments
Hi, i have a Question about Chunkdata.
When I set the ChunkModeActive=1 and for example ChunkSelector=ComponentIDValue, then run the Aquisition and query the ChunkComponentIDValue it stays not available (NA)
When i want to use ChunkModeActive in harvesters (https://github.com/genicam/harvesters) I get the same error described here: genicam/harvesters#225 as soon as i try to access the returned buffer.
So is it possible to get Chunkdata from the rc_visard?
And what am i doing the wrong way?
Thanks for any help
Chunk data is meta data that is sent with every buffer. Every buffer that is received needs to be attached to the nodemap before accessing the chunk data of that buffer through the nodemap. Otherwise, all chunk parameter are not available.
gc_stream actually turns on chunk data by default. You do not need ChunkModeActive=1 and the ChunkSelector, but it does not do any harm. You may have noticed that gc_stream also stores a text file with every image. It contains some image related values that are actually taken from the chunk data of the buffer that contained the image.
The problem is that you try to access chunk values in a separate tool (i.e. gc_info), which never received any buffer. The buffer that was received by gc_stream in the call before is de-allocated within gc_stream. Your result is expected behavior. It cannot work like this. For accessing chunk values other than the ones that we automatically store in the text file with the image, you would need to programmatically change gc_stream.
BTW, the problem with harvester seem to me unrelated. Basler uses an older (deprecated) way of storing chunk data in buffers, but I have not tested Harvester with rc_visard.
Hope this info helps.
Thank you for your detailed explanation👍. So that different kind of structuring the buffer is causing my problems with harvester. I'm closing this issue and hope for a solution on the harvester side.
@heikohimu I might have missed it, but I didn't see instructions or an example on how to attach a buffer to a nodemap to be able to access the chunk data - could you point me to it/provide a brief example here?
With attachBuffers(true) (see here:
rc_genicam_api/tools/gc_stream.cc
Line 546 in 86c2e93