Jump to content
sohonomura2020

IMX219 CSI-2 Camera on Tinker Board 2

Recommended Posts

Dear Sirs

I'm now connecting the IMX219 camera to tinker board 2s board.

I can see the camera image now but I cannot configure the Field of View nor size.

I can just see the image of center portion, very narrow FoV.

I could configure the camera with media-ctl command when operating it on "tinker board".

It would be great if you tell me the way to configure the camera (size, FoV, mirror/flip, etc.) with the reference scripts or sample code.

Similar way to "tinker board" will be fine.

I appreciate your kind help in advance.

 

sohonomura2020

Share this post


Link to post
Share on other sites

Dear Sirs

 

I found the Capture_Test.sh in the Test_tool directory shown on Desktop.

By using this script, I could see the Full FoV image.

I'd like to know how to switch to binning mode to get full FoV smaller image of higher frame rate.

Thank you very much for your kind help in advance.

 

Best Regards,

 

sohonomura2020

 

 

Share this post


Link to post
Share on other sites

One more question, please.

I cannot find the IQ tuning file and just run plane gst-launch-1.0 can get dark image.

I can see better image when running Capture_Test.sh in Desktop directory.

I'd like to know how to apply the IQ tuning file. (I remember the xml file is called in the gst-launch command line in tinker board case.)

 

Best Regards,

 

NOMURA

 

Share this post


Link to post
Share on other sites

Dear Sirs

I found I can get brighter image if I create /tmp/flicker_mode file, but it seems the AE function does not work.

Do you have any suggestion to activate the camera ISP function other than demosaic?

 

Best Regards,

 

sohonomura2020

Share this post


Link to post
Share on other sites

Dear Sirs

The reason I thought the AE didn't work is maybe the lower light condition for AE set maximum exposure condition (shutter/gain).

Under the sun light condition, I can confirm the AE does work.

I apologize for the confusion caused by the inadequate investigation.

 

Now I would like to know how to set 2x2 binning mode of 30fps streaming. 

 

Best Regards,

 

sohonomura2020

Share this post


Link to post
Share on other sites

Hello @sohonomura2020

On 11/27/2021 at 9:34 AM, sohonomura2020 said:

Now I would like to know how to set 2x2 binning mode of 30fps streaming. 

 

the driver has to be modified in order to support this feature, and we don't have a schedule for this yet

Share this post


Link to post
Share on other sites

Thank you for the reply. I understood current driver does not support this mode. however, the driver layer should be the same as the one for tinker board(RK3288), then I hope it will be available soon.

By the way, when I run the gstreamer script modified from Capture_Test.sh, I experienced the instability of the camera, stopped and reboot.

We just clean installed the OS and run Capture_Test.sh and see this symptom.

Do you have any report about the symptom?

 

I appreciate your kind help in advance.

 

Bests Regards,

 

sohonomura2020

 

Share this post


Link to post
Share on other sites
On 11/26/2021 at 4:16 PM, sohonomura2020 said:

I can see the camera image now but I cannot configure the Field of View nor size.

I can just see the image of center portion, very narrow FoV.

I am also facing the same issue.

I'm connecting the IMX219 camera (3840x2160) to tinker board 2s board.

But  "v4l2-ctl --list-formats-ext" command displays only 1920x1080 resolutions.

ioctl: VIDIOC_ENUM_FMT
        Type: Video Capture Multiplanar

        [0]: 'YUYV' (YUYV 4:2:2)
                Size: Stepwise 32x16 - 1920x1080 with step 8/8
        [1]: '422P' (Planar YVU 4:2:2)
                Size: Stepwise 32x16 - 1920x1080 with step 8/8
        [2]: 'NV16' (Y/CbCr 4:2:2)
                Size: Stepwise 32x16 - 1920x1080 with step 8/8
        [3]: 'NV61' (Y/CrCb 4:2:2)
                Size: Stepwise 32x16 - 1920x1080 with step 8/8
        [4]: 'YM16' (Planar YUV 4:2:2 (N-C))
                Size: Stepwise 32x16 - 1920x1080 with step 8/8
        [5]: 'NV21' (Y/CrCb 4:2:0)
                Size: Stepwise 32x16 - 1920x1080 with step 8/8
        [6]: 'NV12' (Y/CbCr 4:2:0)
                Size: Stepwise 32x16 - 1920x1080 with step 8/8
        [7]: 'NM21' (Y/CrCb 4:2:0 (N-C))
                Size: Stepwise 32x16 - 1920x1080 with step 8/8
        [8]: 'NM12' (Y/CbCr 4:2:0 (N-C))
                Size: Stepwise 32x16 - 1920x1080 with step 8/8
        [9]: 'YU12' (Planar YUV 4:2:0)
                Size: Stepwise 32x16 - 1920x1080 with step 8/8
        [10]: 'YM24' (Planar YUV 4:4:4 (N-C))
                Size: Stepwise 32x16 - 1920x1080 with step 8/8
        [11]: 'RGGB' (8-bit Bayer RGRG/GBGB)
                Size: Stepwise 32x16 - 1920x1080 with step 8/8
        [12]: 'GRBG' (8-bit Bayer GRGR/BGBG)
                Size: Stepwise 32x16 - 1920x1080 with step 8/8
        [13]: 'GBRG' (8-bit Bayer GBGB/RGRG)
                Size: Stepwise 32x16 - 1920x1080 with step 8/8
        [14]: 'BA81' (8-bit Bayer BGBG/GRGR)
                Size: Stepwise 32x16 - 1920x1080 with step 8/8
        [15]: 'RG10' (10-bit Bayer RGRG/GBGB)
                Size: Stepwise 32x16 - 1920x1080 with step 8/8
        [16]: 'BA10' (10-bit Bayer GRGR/BGBG)
                Size: Stepwise 32x16 - 1920x1080 with step 8/8
        [17]: 'GB10' (10-bit Bayer GBGB/RGRG)
                Size: Stepwise 32x16 - 1920x1080 with step 8/8
        [18]: 'BG10' (10-bit Bayer BGBG/GRGR)
                Size: Stepwise 32x16 - 1920x1080 with step 8/8
        [19]: 'RG12' (12-bit Bayer RGRG/GBGB)
                Size: Stepwise 32x16 - 1920x1080 with step 8/8
        [20]: 'BA12' (12-bit Bayer GRGR/BGBG)
                Size: Stepwise 32x16 - 1920x1080 with step 8/8
        [21]: 'GB12' (12-bit Bayer GBGB/RGRG)
                Size: Stepwise 32x16 - 1920x1080 with step 8/8
        [22]: 'BG12' (12-bit Bayer BGBG/GRGR)
                Size: Stepwise 32x16 - 1920x1080 with step 8/8
        [23]: 'RGB3' (24-bit RGB 8-8-8)
                Size: Stepwise 32x16 - 1920x1080 with step 8/8

With "media-ctl -p" command, the board seems to recognize the IMX219 correctly.

Media controller API version 0.1.0

Media device information
------------------------
driver          rkisp1
model           rkisp1
serial
bus info
hw revision     0x0
driver version  0.0.0

Device topology
- entity 1: rkisp1-isp-subdev (4 pads, 6 links)
            type V4L2 subdev subtype Unknown flags 0
            device node name /dev/v4l-subdev0
        pad0: Sink
                [fmt:SRGGB10_1X10/1920x1080 field:none
                 crop.bounds:(0,0)/1920x1080
                 crop:(0,0)/1920x1080]
                <- "rkisp1_dmapath":0 []
                <- "rockchip-mipi-dphy-rx":1 [ENABLED]
        pad1: Sink
                <- "rkisp1-input-params":0 [ENABLED]
        pad2: Source
                [fmt:YUYV8_2X8/1920x1080 field:none
                 crop.bounds:(0,0)/1920x1080
                 crop:(0,0)/1920x1080]
                -> "rkisp1_selfpath":0 [ENABLED]
                -> "rkisp1_mainpath":0 [ENABLED]
        pad3: Source
                -> "rkisp1-statistics":0 [ENABLED]

- entity 2: rkisp1_mainpath (1 pad, 1 link)
            type Node subtype V4L flags 0
            device node name /dev/video0
        pad0: Sink
                <- "rkisp1-isp-subdev":2 [ENABLED]

- entity 3: rkisp1_selfpath (1 pad, 1 link)
            type Node subtype V4L flags 0
            device node name /dev/video1
        pad0: Sink
                <- "rkisp1-isp-subdev":2 [ENABLED]

- entity 4: rkisp1_dmapath (1 pad, 1 link)
            type Node subtype V4L flags 0
            device node name /dev/video2
        pad0: Source
                -> "rkisp1-isp-subdev":0 []

- entity 5: rkisp1-statistics (1 pad, 1 link)
            type Node subtype V4L flags 0
            device node name /dev/video3
        pad0: Sink
                <- "rkisp1-isp-subdev":3 [ENABLED]

- entity 6: rkisp1-input-params (1 pad, 1 link)
            type Node subtype V4L flags 0
            device node name /dev/video4
        pad0: Source
                -> "rkisp1-isp-subdev":1 [ENABLED]

- entity 7: rockchip-mipi-dphy-rx (2 pads, 2 links)
            type V4L2 subdev subtype Unknown flags 0
            device node name /dev/v4l-subdev1
        pad0: Sink
                [fmt:SRGGB10_1X10/1920x1080@10000/300000 field:none]
                <- "m00_b_imx219 1-0010":0 [ENABLED]
        pad1: Source
                [fmt:SRGGB10_1X10/1920x1080@10000/300000 field:none]
                -> "rkisp1-isp-subdev":0 [ENABLED]

- entity 8: m00_b_imx219 1-0010 (1 pad, 1 link)
            type V4L2 subdev subtype Sensor flags 0
            device node name /dev/v4l-subdev2
        pad0: Source
                [fmt:SRGGB10_1X10/1920x1080@10000/300000 field:none]
                -> "rockchip-mipi-dphy-rx":0 [ENABLED]

I appreciate your kind help in advance.

 

And, I cannot find the Test_tool directory. Could you give any information about the Capture_Test.sh ?

On 11/26/2021 at 5:16 PM, sohonomura2020 said:

Capture_Test.sh in the Test_tool directory shown on Desktop

 

Best regards,

Kenta

Share this post


Link to post
Share on other sites

hello @kenta

the default sensor settings of IMX219 is 1920x1080, the cmds below can be used to adjust IMX219 sensor settings to 3280x2464:

media-ctl -d /dev/media0 --set-v4l2 '"rkisp1-isp-subdev":0[fmt:SRGGB10_1X10/3280x2464]'

media-ctl -d /dev/media0 --set-v4l2 '"rkisp1-isp-subdev":0[crop:(0,0)/3280x2464]'

media-ctl -d /dev/media0 --set-v4l2 '"rkisp1-isp-subdev":2[fmt:YUYV8_2X8/3280x2464]'

media-ctl -d /dev/media0 --set-v4l2 '"rkisp1-isp-subdev":2[crop:(0,0)/3280x2464]'

media-ctl -d /dev/media0 --set-v4l2 '"m00_b_imx219 1-0010":0[fmt:SRGGB10_1X10/3280x2464]'

v4l2-ctl -d /dev/video0 --set-fmt-video=width=3280,height=2464,pixelformat=NV12 --set-crop=top=0,left=0,width=3280,height=2464

 

And, I cannot find the Test_tool directory. Could you give any information about the Capture_Test.sh 

the script can be downloaded here: https://www.asuswebstorage.com/navigate/a/#/s/5B06BC29115E4004A181738E5E0F909E4 

Share this post


Link to post
Share on other sites

Hello there,

I am currently facing a similar issue where I am connecting the IMX219 camera (3840x2160 resolution) to a Tinker Board 2S. However, when using the "v4l2-ctl --list-formats-ext" command, I only observe resolutions limited to 1920x1080 being displayed.

On the other hand, when I utilize the "media-ctl -p" command, it appears that the board correctly recognizes the IMX219 camera. The output reveals the media device information, device topology, and entities involved in the media pipeline.

I sincerely appreciate any assistance you can provide to resolve this matter.

Regards

Devid Lucas

Share this post


Link to post
Share on other sites

hello @Lucas32

8 hours ago, Lucas32 said:

I am currently facing a similar issue where I am connecting the IMX219 camera (3840x2160 resolution) to a Tinker Board 2S. However, when using the "v4l2-ctl --list-formats-ext" command, I only observe resolutions limited to 1920x1080 being displayed.

 

the sensor setting for imx219 is 1920x1080 by default, you can change it to 3840x2160 with commands:

media-ctl -d /dev/media0 --set-v4l2 '"rkisp1-isp-subdev":0[fmt:SRGGB10_1X10/3840x2160]'
media-ctl -d /dev/media0 --set-v4l2 '"rkisp1-isp-subdev":0[crop:(0,0)/3840x2160]'
media-ctl -d /dev/media0 --set-v4l2 '"rkisp1-isp-subdev":2[fmt:YUYV8_2X8/3840x2160]'
media-ctl -d /dev/media0 --set-v4l2 '"rkisp1-isp-subdev":2[crop:(0,0)/3840x2160]'
media-ctl -d /dev/media0 --set-v4l2 '"m00_b_imx219 1-0010":0[fmt:SRGGB10_1X10/3840x2160]'
v4l2-ctl -d /dev/video0 --set-fmt-video=width=3840,height=2160,pixelformat=NV12 --set-crop=top=0,left=0,width=3840,height=2160

 

 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...