Re: [beagleboard] BeagleBone camera cape on Ubuntu 14.04

2015-01-11 Thread Mashiat Sarker Shakkhar

On 1/11/15, 12:34 PM, Chris Whittenburg wrote:



On Sun, Jan 11, 2015 at 10:21 AM, Mashiat Sarker Shakkhar 
mailto:mashiat.sar...@gmail.com>> wrote:



Thanks a lot for your response. After downgrading the kernel, I
got /dev/video0. The problem is, I cannot get an image from the
camera. All I get is a black frame. I have tried both OpenCV and
v4l2grab (https://github.com/twam/v4l2grab). The result was the
same black image. 



A common issue with this camera is that it takes several frames for 
the automatic gain to kick in.  Thus, you get black frames at first.  
Try capturing a couple hundred frames at the same time and then look 
at the last one.

Indeed, that did the trick. Thank you very much.

Regards
Shakkhar

--
For more options, visit http://beagleboard.org/discuss
--- 
You received this message because you are subscribed to the Google Groups "BeagleBoard" group.

To unsubscribe from this group and stop receiving emails from it, send an email 
to beagleboard+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [beagleboard] BeagleBone camera cape on Ubuntu 14.04

2015-01-11 Thread Chris Whittenburg
On Sun, Jan 11, 2015 at 10:21 AM, Mashiat Sarker Shakkhar <
mashiat.sar...@gmail.com> wrote:
>
>
> Thanks a lot for your response. After downgrading the kernel, I got
> /dev/video0. The problem is, I cannot get an image from the camera. All I
> get is a black frame. I have tried both OpenCV and v4l2grab (
> https://github.com/twam/v4l2grab). The result was the same black image.


A common issue with this camera is that it takes several frames for the
automatic gain to kick in.  Thus, you get black frames at first.  Try
capturing a couple hundred frames at the same time and then look at the
last one.

-- 
For more options, visit http://beagleboard.org/discuss
--- 
You received this message because you are subscribed to the Google Groups 
"BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to beagleboard+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [beagleboard] BeagleBone camera cape on Ubuntu 14.04

2015-01-11 Thread Mashiat Sarker Shakkhar

On 1/9/15, 9:31 AM, Robert Nelson wrote:

On Fri, Jan 9, 2015 at 5:48 AM,   wrote:

Hi

I have a BeagleBone camera cape from QuickLogic like the one shown here:
http://elinux.org/CircuitCo:BeagleBone_3.1MP_Camera.

I am running Ubuntu 14.04 on a BeagleBone Black. It looks like Ubuntu does
not support the cape out of the box. I have spent a lot of time looking for
a driver but could not find anything useful. I got the Ubuntu 14.04 image
from here: http://elinux.org/BeagleBoardUbuntu.

Angstrom on the other hand does come with camera cape support. It is mounted
as /dev/video0, just like any V4L2 compatible device.

Can anoyone tell me how do I mount the camera as a V4L2 device on Ubuntu?

To fully support that cape, you need to downgrade to the v3.8.x kernel:

sudo apt-get update
sudo apt-get install linux-image-3.8.13-bone69
sudo reboot


Hi Robert

Thanks a lot for your response. After downgrading the kernel, I got 
/dev/video0. The problem is, I cannot get an image from the camera. All 
I get is a black frame. I have tried both OpenCV and v4l2grab 
(https://github.com/twam/v4l2grab). The result was the same black image. 
Here are some (possibly) relevant information:


```
ubuntu@arm:~$ v4l2-ctl --info
Driver Info (not using libv4l2):
Driver name   : cssp_camera
Card type : cssp_camera
Bus info  : cssp_camera-000
Driver version: 3.8.13
Capabilities  : 0x0501
Video Capture
Read/Write
Streaming

ubuntu@arm:~$ v4l2-ctl --list-formats
ioctl: VIDIOC_ENUM_FMT
Index   : 0
Type: Video Capture
Pixel Format: 'YUYV'
Name: 4:2:2, packed, YUYV

Index   : 1
Type: Video Capture
Pixel Format: 'RGBP'
Name: RGB565 (LE)

Index   : 2
Type: Video Capture
Pixel Format: 'RGBO'
Name: RGB555 (LE)

ubuntu@arm:~$ v4l2-ctl -V
Format Video Capture:
Width/Height  : 640/480
Pixel Format  : 'YUYV'
Field : None
Bytes per Line: 1280
Size Image: 614400
Colorspace: JPEG (JFIF/ITU601)
```

Here is the relevant portion from dmesg (immediately after trying to 
capture an image with OpenCV): 
https://gist.github.com/shahriman/0c7d8dd2683a5d1abb8d.


I will really appreciate it if you can provide me some hint as to what 
might be the issue here.


Regards
Shakkhar

--
For more options, visit http://beagleboard.org/discuss
--- 
You received this message because you are subscribed to the Google Groups "BeagleBoard" group.

To unsubscribe from this group and stop receiving emails from it, send an email 
to beagleboard+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [beagleboard] BeagleBone camera cape on Ubuntu 14.04

2015-01-09 Thread Robert Nelson
On Fri, Jan 9, 2015 at 5:48 AM,   wrote:
> Hi
>
> I have a BeagleBone camera cape from QuickLogic like the one shown here:
> http://elinux.org/CircuitCo:BeagleBone_3.1MP_Camera.
>
> I am running Ubuntu 14.04 on a BeagleBone Black. It looks like Ubuntu does
> not support the cape out of the box. I have spent a lot of time looking for
> a driver but could not find anything useful. I got the Ubuntu 14.04 image
> from here: http://elinux.org/BeagleBoardUbuntu.
>
> Angstrom on the other hand does come with camera cape support. It is mounted
> as /dev/video0, just like any V4L2 compatible device.
>
> Can anoyone tell me how do I mount the camera as a V4L2 device on Ubuntu?

To fully support that cape, you need to downgrade to the v3.8.x kernel:

sudo apt-get update
sudo apt-get install linux-image-3.8.13-bone69
sudo reboot

Regards,

-- 
Robert Nelson
http://www.rcn-ee.com/

-- 
For more options, visit http://beagleboard.org/discuss
--- 
You received this message because you are subscribed to the Google Groups 
"BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to beagleboard+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.