AnsweredAssumed Answered

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

Question asked by 赵双朋 赵 on Aug 31, 2016
Latest reply on Sep 1, 2016 by 赵双朋 赵

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;
};

Outcomes