Differences
This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
lirec:firewire_camera_notes [2009-03-24 16:32] – created 161.23.251.227 | lirec:firewire_camera_notes [2009-05-08 12:55] (current) – davegriffiths | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ======The Lirec camera & Linux====== | ||
- | Notes from getting the official lirec camera | + | The official lirec camera |
* [[http:// | * [[http:// | ||
- | ===Howto=== | + | ===Getting it working=== |
* After plugging the camera in, you may need to do: | * After plugging the camera in, you may need to do: | ||
Line 17: | Line 18: | ||
* Use [[http:// | * Use [[http:// | ||
- | To get an image you have to press the buttons in the following order: | + | To get an image working it's a bit picky - you have to press the buttons in the following order: |
- In the services tab click ' | - In the services tab click ' | ||
Line 26: | Line 27: | ||
< | < | ||
The examples in libunicap are very useful for debugging, such as device_info, | The examples in libunicap are very useful for debugging, such as device_info, | ||
+ | |||
+ | ===Getting debayering working in coriander=== | ||
+ | |||
+ | - In services tab again, in Format select ' | ||
+ | - In options click Nearest and GBRG | ||
+ | - In Trigger you should be able to select 30fps | ||
+ | |||
+ | You can also get OpenCV to read from this mode, but it will get the raw image directly. | ||
+ | |||
+ | ===Getting the camera working with OpenCV=== | ||
+ | |||
+ | The caminfo for OpenCV I used for the raw image was as follows (I think Marek has a better way): | ||
+ | |||
+ | < | ||
+ | static struct caminfo cameras[] = | ||
+ | { | ||
+ | { | ||
+ | handle: | ||
+ | device_identifier: | ||
+ | fourcc: | ||
+ | format_size: | ||
+ | window: | ||
+ | image: | ||
+ | properties: | ||
+ | property_count: | ||
+ | |||
+ | cascade: NULL, | ||
+ | storage: NULL, | ||
+ | }, | ||
+ | }; | ||
+ | </ | ||
+ | |||
+ | ===Using OpenCV for the debayering=== | ||
+ | |||
+ | OpenCV has a built in debayering algorithm, as part of it's colour space conversions. The one which works with the lirec camera is: | ||
+ | < | ||
+ | Where the input is a 1 channel image and the output is 3 channel RGB image. | ||
+ | |||
+ | ==The bayer pattern image, raw data from the camera CCD== | ||
+ | {{: | ||
+ | |||
+ | ==Converted to RGB== | ||
+ | {{: | ||