I am actually working with 13MPx CMOS Image Sensor. this sensor has 10 bits accuracy in his dynamic range. So, for this reason has the possibility to sending both 8 bits per pixel either 10 bits per pixel (using full dynamic range).
As I am currently working with the CX3, using RGB888 as data input and 24 bits size as data output. I have to use The the 8 bits per pixel profile from the sensor,knowing that I am lossing accuracy which is esential in order to quantize the analog value.
So, I have the following question: Is it possible to send 10 bits per pixel from the sensor, using a CX3's configuration based on RGB888 as data input and holding the same output size of 24 bits?. Because if I do it, we will not have to do zero padding as with the RAW10 format. (Please, see the attached picture).
What code sections will have to change in order to get this profile?.
Thanks so much.
Please let us know the following so that we can understand the requirement better:
1. What exactly is the input format to CX3? Is it RGB888 or RAW10? As you might be knowing RGB888 signifies 8 bits per colour component (that is 8 bits for Red, 8 bits for Green and 8 bits for Blue) which indicates that pixel depth of RGB888 is 24 bits. RAW10 on the other side specifies 10 bits per pixel. This question is asked because in your description you have mentioned in multiple places that you need 8/10 bits per pixel and also refer to RGB888.
2. In the attachment (Getimage.png) present in your original description, what exactly does pixA1, pixA2.. etc signify? Are they the individual colour components or are they individual pixels? Also, can you please share the diagram that shows the data transmission from the sensor as shown in the following snapshot which is for RAW10.
Firstly, thanks for your response.
About the point 1 : The input format which is set in CX3 is RGB888. And the reason of that is because the CMOS image sensor has 13MPx (4200 columns x 3120 rows), and also has the capability to send both configurations 8 bits per pixel either 10 bits per pixel.
In the recent CX3 firmware I have a custom profile which the following characteristics:
- CMOS image sensor configured to send 8bits per pixel.
-RGB888 input data format in CX3.
-24bits output data size in CX3.
-Frame configuration showed in attached picture.
As you can see, I receive 4200x3120x8bits = 104832000 bits per frame from the image sensor, and as the output data format configured in CX3 is 24bits per pixel, I will have 104832000bitsperframe/24bitsperpixel = 4368000 pixels per frame. Which is exactly 1400 columns x 3120 rows. This configuration is completely functional.
But Now, I want to have a profile which works with the same sensor sending 10 bits per frame. The custom configuration will have:
- CMOS image sensor configured to send 10 bits per pixel : 4200 columns x 3120 rows x 10bits = 131040000 bits per frame from the image sensor.
- RGB888 input data format in CX3.
- 24bits output data size in CX3.
- Frame configuration : As I receive 131040000 bits per frame, and as the output data format configured in CX3 is 24bits per pixel, I will have 131040000 bitsperframe/24bitsperpixel =5460000 pixels per frame. Which is exactly 1750 columns x 3120 rows.
the reason to implement this configuration is because of I want to hold the CX3's maximum bandwidth in both Image sensor configurations 8 bits per pixel either 10 bits per pixel.
About the pint 2 : with the second implementation, I mean, the implementation based on 10 bits per pixel from the CMOS image sensor. I will have the following data output structure from CX3 (attached pictured named output_data_fromCX3), taking into a count, which it will works with 24 bits data output size. Finally I will have a custom software in my host application which will convert the 24 bits data from CX3 into a 10 bits words array.
We have only tested the packing of RAW10 data into 24 bits. We have not tested the approach that you have described. But, I feel that this approach is possible provided the CX3 is configured correctly. Please try this and let us know if you face any issues.