Page 1 of 1

Is there a c++ API based on raspiraw?

Posted: Fri Oct 26, 2018 3:00 pm
by njsss
Currently, I am using raspicam c++ API, would love to be able to get the raw image instead. However, all the hardware stuff are a bit hard to follow.

Re: Is there a c++ API based on raspiraw?

Posted: Fri Oct 26, 2018 3:15 pm
by 6by9
What do you define as raw? Bayer, YUV, RGB, or something else? Some people don't understand the difference.

Raspicam should be able to deliver you YUV or RGB.
Bayer is generally a right pain in the neck to deal with. The only access to the Bayer data as a video stream is through raspiraw, and that is the only app I'm aware of. It's also provided as an example only - please note the huge disclaimers about not being able to offer support on the sensor register sets.

Re: Is there a c++ API based on raspiraw?

Posted: Fri Oct 26, 2018 3:41 pm
by njsss
6by9 wrote:
Fri Oct 26, 2018 3:15 pm
What do you define as raw? Bayer, YUV, RGB, or something else? Some people don't understand the difference.

Raspicam should be able to deliver you YUV or RGB.
Bayer is generally a right pain in the neck to deal with. The only access to the Bayer data as a video stream is through raspiraw, and that is the only app I'm aware of. It's also provided as an example only - please note the huge disclaimers about not being able to offer support on the sensor register sets.
Well I am interested in the data before gamma correction (as it seems to be the case). From all the searching there's seems no other way than getting the image directly from the camera board but before GPU processing. So that makes the raspiraw the only way, or is there a way to get the gamma profile?

Re: Is there a c++ API based on raspiraw?

Posted: Fri Oct 26, 2018 3:46 pm
by 6by9
njsss wrote:
Fri Oct 26, 2018 3:41 pm
Well I am interested in the data before gamma correction (as it seems to be the case). From all the searching there's seems no other way than getting the image directly from the camera board but before GPU processing. So that makes the raspiraw the only way, or is there a way to get the gamma profile?
Pretty much.
You can disable the gamma block (see viewtopic.php?f=43&t=175711), but I doubt you'll get the results you want.

Re: Is there a c++ API based on raspiraw?

Posted: Fri Oct 26, 2018 4:39 pm
by njsss
6by9 wrote:
Fri Oct 26, 2018 3:46 pm
You can disable the gamma block (see viewtopic.php?f=43&t=175711), but I doubt you'll get the results you want.
Thank you for pointing out, I didn't know that. So just set MMAL_PARAMETER_DIGITAL_GAIN to 1? I'll give it a try.

But why you think it won't work as expected?