Page 1 of 1

/dev/video0 camera support

Posted: Thu Jan 31, 2019 9:48 am
by rvalvekar
Hello All,
I have been reading that some cameras don't have the interface as /dev/video0 , and hence have to use gstreamer as primary execution medium for cameras.
I would like to ask, is there any way we can enable /dev/video* as filepath for Camera Devices ? Is there any specific module that the Linux OS has to have inorder to work with /dev/video* support ?

I know video4linux drivers which can be used with webcam, but i would like to know if it can be also used in CSI Cameras.
Thanks,
BR.

Re: /dev/video0 camera support

Posted: Thu Jan 31, 2019 1:55 pm
by pavelectric

Re: /dev/video0 camera support

Posted: Fri Feb 01, 2019 12:45 pm
by ayaromenok
I found some limitation by using Video4Linux with CSI camera with FriendlyDesktop:
- only full resolution can be used (you will need to downscale it outside of ISP) ;
- looks like NV12 encode image arrive (to convert to RGB/BGR you will need to decode it);

I am continue to evaluate this question, so some update is possible:

PS: looks like you can't use CSI cameras with armbian/any other linux right now due to some missed kernel support

Re: /dev/video0 camera support

Posted: Fri Feb 01, 2019 1:23 pm
by rvalvekar
ayaromenok wrote:
I found some limitation by using Video4Linux with CSI camera with FriendlyDesktop:
- only full resolution can be used (you will need to downscale it outside of ISP) ;
- looks like NV12 encode image arrive (to convert to RGB/BGR you will need to decode it);

I am continue to evaluate this question, so some update is possible:

PS: looks like you can't use CSI cameras with armbian/any other linux right now due to some missed kernel support


I have had worked before with a CSI Camera and Nano T3 board, and could not use /dev/video* in opencv. I tried implementing gstreamer at one point, but its quite tedious to compile OpenCV with gstreamer support. But I am also finding a way to get support in Linux for /dev/video* with CSI Camera.

I am not sure about the encode NV12 to decode, but it might be possible to do it in OpenCV

Re: /dev/video0 camera support

Posted: Fri Feb 01, 2019 5:14 pm
by ayaromenok
rvalvekar wrote:
I am not sure about the encode NV12 to decode, but it might be possible to do it in OpenCV

It's possible, but not rational - it will take a large amount of memory and CPU/GPU computation power, while ISP (Image Signal Processor - special unit, responsible for cameras and basic image operations) would stay idle.

Re: /dev/video0 camera support

Posted: Fri Feb 01, 2019 6:43 pm
by rvalvekar
ayaromenok wrote:
rvalvekar wrote:
I am not sure about the encode NV12 to decode, but it might be possible to do it in OpenCV

It's possible, but not rational - it will take a large amount of memory and CPU/GPU computation power, while ISP (Image Signal Processor - special unit, responsible for cameras and basic image operations) would stay idle.


I was researching about it and i figured that out after posting this. I am still going to dig in, if or how can we get it working /dev/video*

I dont know if all Single Board Computers are equipped with ISP.

Re: /dev/video0 camera support

Posted: Fri Feb 01, 2019 6:56 pm
by ayaromenok
rvalvekar wrote:
I dont know if all Single Board Computers are equipped with ISP.

without ISP it's impossible to grab image from Camera, connected via CSI lines ;) (so some chips don't have it, but Rk3399 include his own ISP). You can check Rockchip kernel 4.4 and gstreamer for details, as well as their official info.

Re: /dev/video0 camera support

Posted: Tue Feb 05, 2019 12:35 pm
by ayaromenok
rvalvekar wrote:
I would like to ask, is there any way we can enable /dev/video* as filepath for Camera Devices ? Is there any specific module that the Linux OS has to have inorder to work with /dev/video* support ?


Right now I am playing with Armbian\their kernel(4.4.172, which have all changes for friendlyelec cameras ), so direct answer to your question - need to enable in the kernel config:

Code: Select all

CONFIG_VIDEO_ROCKCHIP_ISP1=y
CONFIG_VIDEO_ROCKCHIP_ISP_DPHY_SY=y
CONFIG_VIDEO_ROCKCHIP_CIF=y

CONFIG_VIDEO_OV4689=y
CONFIG_VIDEO_OV13850=y

(for ISP and 4M & 13M cams)