auto-exposure algorithm on CX3

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
alyo_4754581
Level 1
Level 1
10 likes given 5 likes given First like given

Hi,

My question is regarding running an auto exposure algorithm on the CX3 chip but only for images and not large video formats.

From my understanding as there is no ISP on the CX3, the only way to adjust the image parameters such as exposure  on the fly, is to send these data to the PC through the USB3.0 connection, do the processing there on a host application and then send back commands through the UVC to adjust the gain or other parameters to the CX3. Then the CX3 can write to the the image sensor these new parameters through the I2C connection and adjust the gain. so to summarize: 

Image sensor ------I2C read ------> CX3 ----- (USB 3.0) UVC connection ------> PC (process) ----> (USB 3.0) UVC connection -----> CX3 ------I2C write ------> Image sensor

Is this correct?

If so I have the following questions:

1) What is a typical round trip time for an update like this. From reading the values from the sensor to writing new ones to it given that the processing step in the PC is known and is not too large? If you don't know this can you please refer me to some documentation with which I could find out the timings of the I2C read/writes ans the UVC read/Writes?

2) Can the ARM9 processor on the CX3 not process the information such as exposure and automatically adjust and reply with a correct gain value. This will obviously take a lot of time but for single image this time might be acceptable. I am wondering if the FX3 SDK comes with any API functions to help with this.

3) the ultimate goal here is to have an automatic way of adjusting the exposure of the sensor based on the surrounding on the fly. I know that having and ISP is the easiest way but for our application we only care about still images so a high performance custom ISP is not required and we might be able to get by with the ARM9. Are there any resources that could help us calculate how performant the ARM9 could be? What is the performance overhead of all the UVC and other peripherals?

Thanks for your help in advance

Cheers

Ali

0 Likes
1 Solution
Rashi_Vatsa
Moderator
Moderator
Moderator
5 likes given 500 solutions authored 1000 replies posted

Hello Ali,

1) What is a typical round trip time for an update like this. From reading the values from the sensor to writing new ones to it given that the processing step in the PC is known and is not too large? If you don't know this can you please refer me to some documentation with which I could find out the timings of the I2C read/writes ans the UVC read/Writes?

>> The total time for changing the exposure as explained by you will depend on the I2C speed, DMA fabric speed, and USB.

I2C clocks supported by CX3: The I2C controller supports bus frequencies of 400 kHz and 1 MHz

DMA fabric: Distributed DMA controller that is capable of moving data at 800 MBps. This speed depends on different aspects like type of DMA channel, DMA buffer size, etc.

USB: You can refer to this app note https://www.cypress.com/file/125281/download  which mentions about the different aspects that impact the USB speed.

2) Can the ARM9 processor on the CX3 not process the information such as exposure and automatically adjust and reply with a correct gain value. This will obviously take a lot of time but for a single image, this time might be acceptable. I am wondering if the FX3 SDK comes with any API functions to help with this.

>> Yes, your understanding is right regarding the latency. Along with that CX3 has SRAM size of 512 KB and out of which 224 KB is assigned for DMA buffer. So storing a whole frame on CX3 would not be possible.

The idea of sending the frames to the host and doing the processing there and then sending back the data would be better if you are not planning to use an ISP

Please let me know if you have more queries on this

Regards,

Rashi

Regards,
Rashi

View solution in original post

8 Replies