Khadas and Mipi camera

I have khadas Vim3 and Vim3 + mipi cam OS08A10. When I plug camera in Vim3 the guvcview shows me the camera’s frame:

(Sometimes it can be red/green do you know the reason?)

ONE big problem, it doesn’t work with OpenCV. I tried 2 versions (4.2 and 4.6) on ubuntu image 20.04, it’s just not getting the frame.

Then I decided to try it on Vim4 and here the fun begins - as I plugged mipi cam in Vim4, he turned of, and started making weird noises, I repluged it and he started with oowow. Hardly badly I turned it on, but he didn’t even recognize the camera. And yes, I plugged my mipi cam correctly in csi with right way as it was in instructions.

I’m afraid to touch Vim4, because after I’ve bought him there are only problems.

Please, tell me why mipi cam doesn’t work with OpenCV and why Vim4 doesn’t want to work with mipi cam?

The answers like “Try to reinstall the img” are useless, I already did it :slight_smile:

Thanks a lot for the answer!

It is IRCUT function, you can follow the sample code to control it.

  • 0 - off
  • 1 - on
static void do_sensor_ir_cut(int videofd, int ircut_state)
{
    struct v4l2_control ctrl;
    ctrl.id = ISP_V4L2_CID_CUSTOM_SENSOR_IR_CUT;          
    ctrl.value = ircut_state;
    if (-1 == ioctl (videofd, VIDIOC_S_CTRL, &ctrl)) {
        printf("do_sensor_ir_cut failed\n");
    }
}

Why not doesn’t work, please check here, it works well.

Please check here: