Difference between revisions of "CaspaPX"

From Gumstix User Wiki
Jump to: navigation, search
Line 16: Line 16:
 
Extract the modules.
 
Extract the modules.
 
  $ tar -xf lib.tar.gz
 
  $ tar -xf lib.tar.gz
+
 
 
Copy them to an Overo already running the image that you want.
 
Copy them to an Overo already running the image that you want.
 
  $ scp lib/* root@overo:/lib/
 
  $ scp lib/* root@overo:/lib/
Line 32: Line 32:
  
 
  # export -DISPLAY :0.0
 
  # export -DISPLAY :0.0
 +
 
  # gst-launch v4l2src ! xvimagesink
 
  # gst-launch v4l2src ! xvimagesink
or
+
<or>
 
  # mplayer tv:// -tv driver=v4l2:device=/dev/video0
 
  # mplayer tv:// -tv driver=v4l2:device=/dev/video0
  
Line 39: Line 40:
  
 
  <left-click on desktop> Applications > Multimedia > Cheese
 
  <left-click on desktop> Applications > Multimedia > Cheese
 
=== Bitbake ===
 
 
To
 
  
 
== Customization ==
 
== Customization ==
  
 
=== Hardware Overview ===
 
=== Hardware Overview ===
The OMAP35X processors have dedicated hardware for capturing and processing data from image sensors. The CaspaPX camera sensor outputs raw 10-bit Bayer images which is transfered to the Image Signal Processor (ISP) via a parallel interface. The ISP contains a previewer module that converts the Bayer data to YUYV. This data is accessible as a V4L2 device in /dev/video0.  
+
The OMAP35X processors have dedicated hardware for capturing and processing data from image sensors. The CaspaPX camera sensor outputs raw 10-bit Bayer images which is transfered to the Image Signal Processor (ISP) via a parallel interface. The ISP contains various submodules that can be exported as V4L2 devices in /dev. For additional hardware information see the external links section below. The remainder of this section will deal with
  
=== Image Signal Processor ===
 
To get the best performance from the camera under other lighting conditions we need to get our hands dirty in the kernel source.
 
  
 
=== MT9V032 Driver ===
 
=== MT9V032 Driver ===
Line 60: Line 55:
  
 
These steps will allow you to customize the camera driver and kernel for your own application.
 
These steps will allow you to customize the camera driver and kernel for your own application.
 +
 +
=== Image Signal Processor ===
 +
To get the best performance from the camera under other lighting conditions we need to get our hands dirty in the kernel source.
  
 
== 2.6.34 ==
 
== 2.6.34 ==
Line 73: Line 71:
 
  $ cp ~/overo-oe/org.openembedded.dev/recipes/linux/linux-omap3-2.6.34/defconfig ./
 
  $ cp ~/overo-oe/org.openembedded.dev/recipes/linux/linux-omap3-2.6.34/defconfig ./
 
  $ cp defconfig .config
 
  $ cp defconfig .config
 +
 +
== External Links ==
 +
 +
[http://focus.ti.com/general/docs/lit/getliterature.tsp?literatureNumber=spruf98m&fileType=pdf OMAP35x Technical Reference Manual]
 +
 +
[http://www.aptina.com/assets/downloadDocument.do?id=668 MT9V032 Datasheet]

Revision as of 12:32, 8 February 2011

The MT9V032 sensor at the heart off the CaspaPX is not yet supported in the kernel, so a little work is necessary to get the camera up and running.

Quickstart

The first steps are important to verify your hardware setup and to test your customizations later.

Install Pre-built Kernel

The easiest way to get started is to replace the kernel and modules of an existing image. This method was tested on an Overo Fire with a Tobi expansion board using the desktop image available here.

Get the kernel and modules.

$ mkdir ~/caspakernel
$ cd ~/caspakernel
$ wget cumulus.gumstix.org/images/caspapx/uImage
$ wget cumulus.gumstix.org/images/caspapx/lib.tar.gz

Extract the modules.

$ tar -xf lib.tar.gz

Copy them to an Overo already running the image that you want.

$ scp lib/* root@overo:/lib/
$ scp uImage root@overo:/boot/uImage;
$ scp uImage root@overo:/media/mmcblk0p1/uImage

Reset the overo.

$ ssh root@overo 'shutdown -r now'

This method is especially convenient for making modifications to the driver or kernel. See the customization section for more information.

Test

From the serial console:

# export -DISPLAY :0.0
# gst-launch v4l2src ! xvimagesink
<or>
# mplayer tv:// -tv driver=v4l2:device=/dev/video0

From the desktop:

<left-click on desktop> Applications > Multimedia > Cheese

Customization

Hardware Overview

The OMAP35X processors have dedicated hardware for capturing and processing data from image sensors. The CaspaPX camera sensor outputs raw 10-bit Bayer images which is transfered to the Image Signal Processor (ISP) via a parallel interface. The ISP contains various submodules that can be exported as V4L2 devices in /dev. For additional hardware information see the external links section below. The remainder of this section will deal with


MT9V032 Driver

If you want to take advantage of an unimplemented sensor feature, change defaults, etc., you need to modify the driver source. First, make sure that you

You can write scripts to make it even faster.


These steps will allow you to customize the camera driver and kernel for your own application.

Image Signal Processor

To get the best performance from the camera under other lighting conditions we need to get our hands dirty in the kernel source.

2.6.34

Get the kernel source that is used in the Gumstix kernel recipe (~/overo-oe/org.openmebedded.dev/recipes/linux/linux-omap3_2.6.34.bb) and create a new branch from the recipe SRCREV.

$ cd ~
$ git clone git://www.sakoman.com/git/linux-omap-2.6.git
$ cd linux-omap-2.6
$ git checkout cb89736af28f583598e49a05249334a194d00f1d
$ git checkout -b 2.6.34

Make a copy of the default kernel configuration to use as a starting point for your customizations.

$ cp ~/overo-oe/org.openembedded.dev/recipes/linux/linux-omap3-2.6.34/defconfig ./
$ cp defconfig .config

External Links

OMAP35x Technical Reference Manual

MT9V032 Datasheet