Difference between Cvb.SharedImg and Cvb.Image.IMG

Hi @andrea.annovi

I think @Sebastian and @parsd have covered the topic of why the SharedImg is called SharedImg (sorry for the confusion this name has apparently caused).

I’d like to address the issue you raised in the last paragraph about the output generated by Image.CreateDuplicateImageEx. I am a bit puzzled because - like you - I would have expected the result image to be linearized, in which case Utilities.GetLinearAccess should return true and give you the base pointer and the increments needed to access the pixel data. To further investigate this: Can you call Utilities.AnalyzeXVPAT and Utilities.AnalyzeYVPAT on capturedImg and check the return values (and post them here)? Also a code snippet that shows what you are doing would be good.

Additionally you might want to have a look at this post (specifically the 2nd half), because often the image would not even need to be copied - the image data will remain intact until the next IGrab.G2Wait call returns (and copying can be a bit of a performance hog).

1 Like