cx3 dual camera

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

cross mob
ScGr_289066
Level 5
Level 5
100 replies posted 50 replies posted 25 replies posted

Hi All,

I'm having a couple of issues and will start a couple of different threads to discuss them.

In this thread I will discuss camera multiplexing on the CX3.  We have a CX3 design that uses an ON semiconductor FSA642 to multiplex the CX3's MIPI port between two different image sensors (currently two OV5647s).  There is also an SCCB multiplexer that connects the active sensor's SCCB signals to the CX3 SCCB bus.  For this hardware, I have pieced together some firmware examples to use the camera's brightness setting to switch the multiplexer inputs between the two sensors (by setting brightness to 0 or 1).

This configuration is functional and works with both e-camView and a simple OpenCV based viewer I wrote.  There is a rather large limitation I am trying to overcome: the time to switch from one camera to another is several frame times because the CX3 must be switched out and back into application streaming mode.  Ideally, we'd want to capture images alternating from the two sensors, but nothing I've done has been able to perform this "live" switching.

Any thoughts on how to reduce the time to switch between sensors is much appreciated.

Thanks,

Scott

0 Likes
1 Solution

Scott,

You are doing correctly.

Since the data streams stop from one sensor and getting started from another sensor, there will be a frame loss as you mentioned. If you adding some delays intentionally in the source, you may reduce/remove them to reduce the number of frames being lost.

View solution in original post

0 Likes
3 Replies
KandlaguntaR_36
Moderator
Moderator
Moderator
25 solutions authored 10 solutions authored 5 solutions authored

Scott,

Please let me how you are handling the switching now in your firmware.

We can suggest if there is a better way of doing this.

How much time it is taking now for switching between two cameras?

0 Likes

Hi srdr,

I decode the brightness ser_cur state in CyCx3UvcAppUSBSetupCB and perform these calls:

setbrightness(requested_brightness);

resetcameraresolution();

The setbrightness function simply sets I/O 26 (the multiplexer's select input) to the boolean requested_brightness value.  Changing the MUX input disrupts the CX3's input from the sensor and results in the system stalling, as one would expect since the transition isn't synchronized to the input MIPI stream.  I found the easiest way to resume streaming is to reinitialize the sensor by calling resetcameraresolution().  This function restarts streaming by calling the original sensor initialization routine based on the last selected sensor resolution.  Resetcameraresolution() calls one of: CyCx3_ImageSensor_Set_5M(), CyCx3_ImageSensor_Set_1080p(), ..._720p(), or CyCx3_ImageSensor_Set_Vga() to match the mode of the imager.

The switching time varies, but is typically between two and five frames.  There are notable discontinuities in the video.

Thanks,

Scott

0 Likes

Scott,

You are doing correctly.

Since the data streams stop from one sensor and getting started from another sensor, there will be a frame loss as you mentioned. If you adding some delays intentionally in the source, you may reduce/remove them to reduce the number of frames being lost.

0 Likes