Distorted images with OV9281 sensor

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

cross mob
roMo_4201811
Level 2
Level 2
First like received

I am using a Denebola board from e-Con Systems with an OV9281 sensor. I modified the firmware and am able to stream images using e-camview, VLC, and AMcap but the images are distorted. A sample distorted image of my PC screen is shown below:

2019-08-22_143124_5970020.bmp

My parameters in image sensor config are:

RAW10 input

16 bit output

2 lane MIPI

1280x800

10 FPS

CyU3PMipicsiCfg_t mysensorname_RAW10_full = 

{

    CY_U3P_CSI_DF_RAW10,  /* CyU3PMipicsiDataFormat_t dataFormat */

    2,                          /* uint8_t numDataLanes */

    0,                                                     /* uint8_t pllPrd */

    31,                                    /* uint16_t pllFbd */

    CY_U3P_CSI_PLL_FRS_250_500M, /* CyU3PMipicsiPllClkFrs_t pllFrs */ 

    CY_U3P_CSI_PLL_CLK_DIV_8,     /* CyU3PMipicsiPllClkDiv_t csiRxClkDiv */

    CY_U3P_CSI_PLL_CLK_DIV_8,     /* CyU3PMipicsiPllClkDiv_t parClkDiv */

    0, /* uint16_t mClkCtl */

    CY_U3P_CSI_PLL_CLK_DIV_2,     /* CyU3PMipicsiPllClkDiv_t mClkRefDiv */

    1280,                        /* uint16_t hResolution */

    50                               /* uint16_t fifoDelay */

};

settings.bmp

Can you tell me how to stream undistorted images using a program such as e-cam view? Or does a custom PC program need to be developed?

I have tried the steps in KBA224387 but it results in black screen.

1 Solution

The capability to stream raw8 to yuy2 and be viewed by a standard viewer was discussed in this case -
stream raw8 to rgb24 or yuy2 with cx3

Which alludes to the possibility that it can be done. The general steps are summarized by HemanthR_06 in the last post.

Can you give more details on the changes that must be made to the descriptors and probe control structures?

Assume that you set the GPIF bus width as 16-bit

1. define YUY2 in format descriptor

2. define 16 btis/pixel for YUY2 instead of 8 bits/pixel for RAW8

3. define width to half. For example, if you're trying to stream 1080p, then set width to 960(1920/2)

It's not a real YUY2 format but a "fake" one.

View solution in original post

0 Likes
5 Replies
YangyangC_06
Employee
Employee
750 replies posted 500 replies posted 250 replies posted

Not very sure whethter the data are distorted. But it's true that you need to develop your own software to parase the RAW data to RGB or something else since RAW is not supported natively by Amcap, E-cam viewer, MPC-HC etc.

The screenshot below shows the live video from AR0521 sensor which outputs RAW8 data. It's covered by a green mask.

Snipaste_2019-08-27_09-27-55.png

To check if you have get the correct configuration, try to print the framesize and FPS to check if they are the expected values.

Or configure the sensor to output color bar to debug.

0 Likes

Thanks for your reply.

The capability to stream raw8 to yuy2 and be viewed by a standard viewer was discussed in this case -
stream raw8 to rgb24 or yuy2 with cx3

Which alludes to the possibility that it can be done. The general steps are summarized by HemanthR_06 in the last post.

Can you give more details on the changes that must be made to the descriptors and probe control structures?

0 Likes

I forgot to mention, the res and fps reported by ecamview is correct (1280x800, 10 fps).

I set the imager to output a bar pattern and it looks like this:

bar-pattern0001.bmp

0 Likes

Do you set the format to YUY2 or UYVY?

0 Likes

The capability to stream raw8 to yuy2 and be viewed by a standard viewer was discussed in this case -
stream raw8 to rgb24 or yuy2 with cx3

Which alludes to the possibility that it can be done. The general steps are summarized by HemanthR_06 in the last post.

Can you give more details on the changes that must be made to the descriptors and probe control structures?

Assume that you set the GPIF bus width as 16-bit

1. define YUY2 in format descriptor

2. define 16 btis/pixel for YUY2 instead of 8 bits/pixel for RAW8

3. define width to half. For example, if you're trying to stream 1080p, then set width to 960(1920/2)

It's not a real YUY2 format but a "fake" one.

0 Likes