Jump to content
elvis

How to use CSI camera(s)

Recommended Posts

Edge R board is equipped with two, 22-pins CSI interfaces. Unfortunately I couldn't find any information which camera type is compatible with this board. Can I connect regular Raspberry Pi cam or it requires something special?

It would be also nice to know how to enable camera under Linux and Android. Do you have any documentation related to camera interfaces?

Share this post


Link to post
Share on other sites

Hi Elvis,

Camera for Tinker Edge R:

Find the QVL (Qualified Vendor List) for Tinker Edge R Here, which including Reasberry Pi cameras. Below table is for your reference:

  RASPBERRY PI CAMERA V1.3 RASPBERRY PI CAMERA V2.1
Image Sensor: OmniVision OV5647 Sony IMX219
Resolution: 2592 × 1944 pixels (5 megapixel) 3280 × 2464 (8 megapixel)
Sensor Image Area: 3.76 × 2.74 mm 3.69 × 2.81 mm
Pixel Size: 1.4 µm × 1.4 µm 1.12 µm × 1.12 µm
Video: 1920 × 1080 (1080p)30p 1920 × 1080 (1080p)30p

CSI locations:

MIPI CSI0 is set for OV5647 camera as default.
MIPI CSI1 is set for IMX219 camera as default.
Edge-R-CSI.png.7a9836d02219724e800237c1f484b427.png

Debian Test command: (NOTE: It's based on ASUS official released Debian image.)

MIPI CSI0 for OV5647
$ gst-launch-1.0 v4l2src device=/dev/video0 num-buffers=100 ! video/x-raw,format=NV12,width=1920,height=1080, framerate=30/1 ! videoconvert ! kmssink 

MIPI CSI1 for IMX219
$ gst-launch-1.0 v4l2src device=/dev/video5 num-buffers=100 ! video/x-raw,format=NV12,width=1920,height=1080,framerate=30/1 ! videoconvert ! rkximagesink

Android:

Under Android, it would auto-detect to initial camera.
It doesn't support camera switch as default under official Android image; CSI0 (OV5647) camera is the first priority and CSI1 (IMX219) one is the next, if just one camera connected.

Download Official Image:

You could download the image from https://tinker-board.asus.com/download-list.html.

Share this post


Link to post
Share on other sites

Thank you for the answer, I will test board with RPi cam then.

However you wrote:

3 hours ago, FredYu said:

MIPI CSI0 is set for OV5647 camera as default.
MIPI CSI1 is set for IMX219 camera as default.

It makes a lot sense to use two different cameras for testing, but in more real scenario it would be nice to connect both cameras of the same type.

How can I change "default" settings? Will it just work if I connect two OV5647 cameras for example?

Share this post


Link to post
Share on other sites
On 10/16/2020 at 7:02 PM, elvis said:

Thank you for the answer, I will test board with RPi cam then.

However you wrote:

It makes a lot sense to use two different cameras for testing, but in more real scenario it would be nice to connect both cameras of the same type.

How can I change "default" settings? Will it just work if I connect two OV5647 cameras for example?

Hi Elvis,

For Debian, the hardware can be configured thru /boot/config.txt file.

Regarding CSI cameras, CSI0 is enabled with OV5647 and CSI1 is enabled with IMX219 by default.
1. If you would like to enable CSI0 with IMX219, you can add the overlay CSI-IMX219 as the following and reboot the device.
overlay=CSI0-IMX219

2. If you would like to enable CSI1 with OV5647, you can add the overlay CSI1-OV5647 as the following and reboot the device.
overlay=CSI1-OV5647

You could find more details from the file.

For Android, it seems not easy to be achieved, has to modify from the source code.

Share this post


Link to post
Share on other sites

@FredYu - I wanted to connect two OV5647 cameras. Using different camera for left and right channel makes no sense to me.

Share this post


Link to post
Share on other sites

Hi Elvis,

MIPI CSI0 is set for OV5647 camera as default, you could additionally set the CSI1 to OV5647 as the following in the /boot/config.txt file, then reboot the device.

overlay=CSI1-OV5647

Edited by FredYu

Share this post


Link to post
Share on other sites

Thank you for the answer. I misunderstood this default settings, but finally I think I got it 🙂

Share this post


Link to post
Share on other sites

@FredYuI've tried to connect IMX219 camera to CSI0 using the overlay in config.txt, but then i2c-6 interface, enabled in same config.txt, is disappeared

if I connecting IMX219 sensor to CSO1, then both works, but I'm planning to have 2 IMX cameras connected eventually. How I can keep all of them working at same time?

i2c-6 is where my peripheral connected to i2c bus using pins 3/5

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...