Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
lirec:firewire_camera_notes [2009-03-24 16:39] 161.23.251.227lirec:firewire_camera_notes [2009-05-08 12:55] (current) davegriffiths
Line 5: Line 5:
   * [[http://www.theimagingsource.com/|Imaging Source]] DFK 31AF03-Z   * [[http://www.theimagingsource.com/|Imaging Source]] DFK 31AF03-Z
  
-===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 34: Line 34:
   - In Trigger you should be able to select 30fps   - 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. This is where we might need a debayer algorithm. The caminfo for OpenCV I used was as follows (I think Marek has a better way):+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):
  
 <code> <code>
Line 54: Line 58:
 }; };
 </code> </code>
 +
 +===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:
 +<code>cvCvtColor(bayerimage, rgbimage, CV_BayerGB2RGB);</code>
 +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==
 +{{:lirec:bayerpattern.png|}}
 +
 +==Converted to RGB==
 +{{:lirec:bayerrgb.png|}}
 +
  • lirec/firewire_camera_notes.1237912783.txt.gz
  • Last modified: 2009-03-24 16:39
  • by 161.23.251.227