Difference between revisions of "RawImage"

From ElphelWiki
Jump to: navigation, search
 
(3 intermediate revisions by 2 users not shown)
Line 1: Line 1:
The raw sensor data can be obtained on the 353 camera by reading from the /dev/ccam_img file.
+
The raw sensor data can be obtained on the NC353L camera by reading from the /dev/ccam_img file.
  
However, I am having some problems doing this:
+
Here you can find a PHP script example on how to acquire a RAW image from Elphel camera.: http://elphel.cvs.sourceforge.net/viewvc/elphel/elphel353-8.0/packages/web/353/php_top/raw.php?view=markup
  #. Trying to read from /dev/ccam_img right after booting the camera causes the reading process (I've tried dd and cat) to take all the CPU and block. Only after opening the web page of the camera (192.168.0.9) the proccess finishes (with error :( read error: invalid argument)
 
''Yes, it is supposed to be so''. Sensor is not detected/programmed until it is accessed, and /dev/ccam_img relies on something else to detect and initialize the sensor. It just provides access to the intermediate result of the last acquired image.''--[[User:Andrey.filippov|Andrey.filippov]] 01:26, 13 June 2008 (CDT)
 
  
  #. Once I get the raw sensor data and convert it to an image (a PNG), I get the expected picture... sometimes. See URL for the results
+
That script accepts parameters similar to parsedit.php, i.e. BITS=16 to get 16 raw image in 2 bytes/pxel format. In the case of MT9P031 sensor output data is left-shifted by 3 to get into the 0..2^15 range.
  
''If the image acquisition is not stopped, you may get part of the image from one frame, and the other part - from the next one. In default configuration data from the sensor is continuously acquired to the memory attached to the FPGA''--[[User:Andrey.filippov|Andrey.filippov]] 01:26, 13 June 2008 (CDT)
+
'''Attention: If the image acquisition is not stopped, you may get part of the image from one frame, and the other part - from the next one. In default configuration data from the sensor is continuously acquired to the memory attached to the FPGA'''--[[User:Andrey.filippov|Andrey.filippov]] 01:26, 13 June 2008 (CDT)
 +
 
 +
Adding parameter "stop" to the URL would stop sensor acquisition so the video buffer will not be overrun during data readout.It is also possible to trigger camera externally (or from the internal FPGA timer).--[[User:Andrey.filippov|Andrey.filippov]] 09:45, 11 October 2012 (PDT)

Latest revision as of 21:44, 13 October 2012

The raw sensor data can be obtained on the NC353L camera by reading from the /dev/ccam_img file.

Here you can find a PHP script example on how to acquire a RAW image from Elphel camera.: http://elphel.cvs.sourceforge.net/viewvc/elphel/elphel353-8.0/packages/web/353/php_top/raw.php?view=markup

That script accepts parameters similar to parsedit.php, i.e. BITS=16 to get 16 raw image in 2 bytes/pxel format. In the case of MT9P031 sensor output data is left-shifted by 3 to get into the 0..2^15 range.

Attention: If the image acquisition is not stopped, you may get part of the image from one frame, and the other part - from the next one. In default configuration data from the sensor is continuously acquired to the memory attached to the FPGA--Andrey.filippov 01:26, 13 June 2008 (CDT)

Adding parameter "stop" to the URL would stop sensor acquisition so the video buffer will not be overrun during data readout.It is also possible to trigger camera externally (or from the internal FPGA timer).--Andrey.filippov 09:45, 11 October 2012 (PDT)