ArduCAM / MIPI_Camera

235 stars 109 forks source link

IMX135 MIPI with Raspberry Pi 4B - frames order mishmash #94

Open mjfryc opened 3 years ago

mjfryc commented 3 years ago

Problem

Sample application, e.g arducamstill (also other samples) works, but displayed frames are not in chronological order - part of frames are correct, but some random frames are "injected" from e.g. 3 seconds ago. When watching stopper with this camera I can see seconds numbers: 1,2,3,4,2,5,6,7,4,8,9...

Problem occurs when camera is in mode 4 only.

My test application also reproduces this problem, and I can see that:

Configuration

Camera ArduCam IMX135 MIPI 13MPx Color. Computer Raspberry Pi 4 Model B 2GB RAM. Operating system Linux raspberrypi 5.10.11-v7l+ #1399 SMP Thu Jan 28 12:09:48 GMT 2021 armv7l GNU/Linux I've set 196 MB of video memory, next I've set 512 and it doesn't help.

(standard Raspberry OS, updated with apt). Executable command

pi@raspberrypi:~/MIPI_Camera/RPI $ ./arducamstill -t 0 -m 4 -awb 1 -ae 1

without -awb 0 -ae 0 it also works wrong.

Sample arducamstill call:

Open camera...
Hardware platform: b03112
Found sensor imx135 at address 10
mode: 0, width: 1280, height: 720, pixelformat: pRAA, desc: (null)
mode: 1, width: 1920, height: 1080, pixelformat: pRAA, desc: (null)
mode: 2, width: 2592, height: 1944, pixelformat: pRAA, desc: (null)
mode: 3, width: 3264, height: 2464, pixelformat: pRAA, desc: (null)
mode: 4, width: 4192, height: 3120, pixelformat: pRAA, desc: (null)
index: 0, CID: 0x00980914, desc: V4L2_CID_HFLIP, min: 0, max: 1, default: 0, current: 0
index: 1, CID: 0x00980915, desc: V4L2_CID_VFLIP, min: 0, max: 1, default: 0, current: 0
index: 2, CID: 0x00980911, desc: V4L2_CID_EXPOSURE, min: 0, max: 65535, default: 1606, current: 1000
index: 3, CID: 0x00980913, desc: V4L2_CID_GAIN, min: 0, max: 4095, default: 1024, current: 256
index: 4, CID: 0x0098090E, desc: V4L2_CID_RED_BALANCE, min: 0, max: 4095, default: 1664, current: 256
index: 5, CID: 0x0098090F, desc: V4L2_CID_BLUE_BALANCE, min: 0, max: 4095, default: 1664, current: 256
index: 6, CID: 0x009A090A, desc: V4L2_CID_FOCUS_ABSOLUTE, min: 0, max: 1000, default: 270, current: 270
Start preview...
Current mode: 4, width: 4192, height: 3120, pixelformat: pRAA, desc: (null)
[Framerate]: 02 pfs, [Exposure]: 14379, [Focus]: 0270,[Rgain]: 0100, [Bgain]: 0100

Best regards, MJ