I'm attempting to capture and save color images from an ASI585MC camera on a Raspberry Pi 4 Model B, via the ASI SDK, in C++.
I'm able to capture images in monochrome by initializing the camera by calling the
ASIInitCamera function, and subsequently calling the
ASISetROIFormat function with the following image format settings:
iBin = 1
Img_type = ASI_IMG_RAW8
Capturing the image and then gathering the data by calling the
ASIGetDataAfterExp function into an array of type
unsigned char successfully produces a monochrome image.
However, I wanted to take a color image from the 585MC camera, since it's a camera capable of capturing color images.
Since I never really worked with camera SDKs before, the first question I would have is what datatype would the image data have to be saved in? The monochrome image was saved in the
ASI_IMG_RAW8 type, which gives possible values of 0 - 255 for each pixel. Does that mean I have to use the
ASI_IMG_RAW16 instead for a color image?
If so, how would I call the
ASIGetDataAfterExp function to gather my captured image data after a camera snap? That function only accepts the image buffer array of type
unsigned char, which would only work for a monochrome image. I'm assuming for a color image I would have to create a buffer array of type
unsigned short or something along the lines of that. Is there a different function used for gathering color image data?
Thank you for reading my post, any guidance is appreciated.