spinImageGetData usage example
AnsweredIs there a programming example on the usage of the function:
spinImageGetData |
// Assuming image is 640 x 480 resolution. The current pixel format as well as PixelColorFilter indicate the Bayer Tile Mapping for the camera. For example, BayerRG8 is RGGB. err = spinCameraGetNextImage(hCam, &hResultImage); void **data; spinImageGetData(hResultImage, data); // Assuming image is 640 x 480 -------------------------------------------------------------------------- |
the array data just comes back with a single value (in my case with either one or 2 cameras).
using spinnaker library version 3.1.0.79 and MSVC 2022 (v143)
-
Official comment
So I followed your suggestion more closely, and it appears to work! The routine "spiImageGetData" appears to return an address. The malloc statement was a misleading usage. Thank you Manuel so very much!
Eric
-
Hello Eric,
Could you please try this way?
err = spinCameraGetNextImage(hCam, &hResultImage); unsigned char *data; err = spinImageGetData(hResultImage, &data);
Best regards,
Manuel
0 -
I tried something similar but it failed because the function prototype specifically wants a pointer to a pointer (**).
0
Please sign in to leave a comment.
Comments
3 comments