how to set CSI module parameter if want to crop the image captured from sensor

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

how to set CSI module parameter if want to crop the image captured from sensor

ソリューションへジャンプ
2,714件の閲覧回数
zhshuangp
Contributor II

Hi guys,

I am using the csi module to capture video, but the image outputted from sensor is special, the first 24 rows are invalid, we need to skip it, please see the image attached, so we just want to config the corresponding registers of CSI module to work around it, such as IPUx_CSI0_SENS_CONF, IPUx_CSI0_SENS_FRM_SIZE, IPUx_CSI0_ACT_FRM_SIZE, IPUx_CSI0_OUT_FRM_CTRL and so on. but we do not know how to set those registers in detail, can you help us ?

for example, if the actual image size we want to captured is 1280x720, should we set the sensor frame size is 1280x744 ?

in the csi driver code you provided, we found the following three variables, why three necessary ?

/* crop */
struct v4l2_rect crop_bounds;
struct v4l2_rect crop_defrect;
struct v4l2_rect crop_current;

because the v4l2 standard structure only have two variables, what the difference btw them ?
/*
* I N P U T I M A G E C R O P P I N G
*/
struct v4l2_cropcap {
__u32 type; /* enum v4l2_buf_type */
struct v4l2_rect bounds;
struct v4l2_rect defrect;
struct v4l2_fract pixelaspect;
};

ラベル(1)
0 件の賞賛
返信
1 解決策
2,607件の閲覧回数
zhshuangp
Contributor II

Thanks for your replay.

we have get the answer, just change the csi driver as follow.

for example, the unmodified image size is 1280x(720+24), the output image is 1280x720, just config the register like this.

CSI_SENS_FRM_SIZE, 1280x744;

CSI_ACT_FRM_SIZE, 1280x720

CSI_OUT_FRM_CTRL, left = 0, top = 24.

元の投稿で解決策を見る

0 件の賞賛
返信
2 返答(返信)
2,607件の閲覧回数
igorpadykov
NXP Employee
NXP Employee

Hi

please check crop_ex1 example on

https://community.freescale.com/docs/DOC-94961

Best regards
igor
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 件の賞賛
返信
2,608件の閲覧回数
zhshuangp
Contributor II

Thanks for your replay.

we have get the answer, just change the csi driver as follow.

for example, the unmodified image size is 1280x(720+24), the output image is 1280x720, just config the register like this.

CSI_SENS_FRM_SIZE, 1280x744;

CSI_ACT_FRM_SIZE, 1280x720

CSI_OUT_FRM_CTRL, left = 0, top = 24.

0 件の賞賛
返信