Difference between revisions of "Photo-finish"
(31 intermediate revisions by the same user not shown) | |||
Line 17: | Line 17: | ||
[[Outdoor enclosure]] | [[Outdoor enclosure]] | ||
---- | ---- | ||
+ | ==<font color='blue'>What is line scan?</font>== | ||
− | |||
− | |||
− | |||
Line-scan is an image acquisition method that continuously samples (sensor) lines into a composite image. A Flatbed or hand held scanner is essentially also kind of a line-scanner. For some historic reasons (I guess due to the various application and realms they derived from) there are many terms: | Line-scan is an image acquisition method that continuously samples (sensor) lines into a composite image. A Flatbed or hand held scanner is essentially also kind of a line-scanner. For some historic reasons (I guess due to the various application and realms they derived from) there are many terms: | ||
Line 35: | Line 33: | ||
Applications of these line-scan method include industrial surface scanning, photo-finish, rotating panorama cameras, aerial imaginary, the arts (an interesting overview of art and research related slit-scan approaches can be found here) and certainly many more. | Applications of these line-scan method include industrial surface scanning, photo-finish, rotating panorama cameras, aerial imaginary, the arts (an interesting overview of art and research related slit-scan approaches can be found here) and certainly many more. | ||
− | === Line scan with Elphel == | + | |
+ | |||
+ | ==<font color='blue'>Line scan with Elphel</font>== | ||
+ | |||
+ | [[File:Elphelimg 1015229 a.jpeg|thumb|500px|This image is downsized from 2592x3872 and rotated by 90° CCW]] | ||
{| class='wikitable' | {| class='wikitable' | ||
Line 42: | Line 44: | ||
|- | |- | ||
|align='center'| 333 | |align='center'| 333 | ||
− | |align='center'| '''+''' | + | |align='center'| '''<font color='green'>+</font>''' |
|- | |- | ||
|align='center'| 353 | |align='center'| 353 | ||
− | |align='center'| '''+''' | + | |align='center'| '''<font color='green'>+</font>''' |
|- | |- | ||
|align='center'| 393 | |align='center'| 393 | ||
− | |align='center'| '''+''' | + | |align='center'| '''<font color='green'>+</font>''' |
|} | |} | ||
− | Since 2005 and the older 333 model, Elphel cameras have a | + | Since 2005 and the older 333 model, Elphel cameras have a “photo-finish” mode. With its 3Mpix Aptina CMOS sensor Elphel 333 was able so sample around 3072 lines per second. The photo-finsh mode was revived for the current Elphel 353 model with firmware release 8.0.8.7 by end of April 2010. The current 5Mpix Aptina CMOS sensor (width: 2536px) is a bit slower and allows a sample rate of approx. 2300 lines per second – or a line rate of 2.3 kHz (as it seems to be measured in dedicated line-scan cameras). |
Elphel 353 software is fully ported to the new Elphel 393 generation of camera systems and works for JP4 format. | Elphel 353 software is fully ported to the new Elphel 393 generation of camera systems and works for JP4 format. | ||
− | In | + | In the photo finish mode the camera then samples just lines and delivers composite images as video frames via RTSP network stream or directly to a hard-disc. |
Due to the Bayer pattern of the sensor the minimal sample height is 2 lines. | Due to the Bayer pattern of the sensor the minimal sample height is 2 lines. | ||
+ | ==<font color='blue'>Instructions for 393</font>== | ||
+ | |||
+ | * A link for quick access to parameters that might be required: | ||
+ | <font size='2'> | ||
+ | http://192.168.0.9/parsedit.php?sensor_port=0&WB_EN&AUTOEXP_ON&EXPOS&COMPRESSOR_RUN&TRIG&TRIG_PERIOD&PF_HEIGHT&WOI_HEIGHT&WOI_TOP&WOI_LEFT&WOI_WIDTH | ||
+ | </font> | ||
+ | |||
+ | * Before changing any image parameters affecting this mode it's better to stop the compressor and restart it only after everything is set. If image freezes it's better to reboot and start over. | ||
+ | [[Tmp_manual#Change_parameters|More info]] on changing parameters. | ||
+ | |||
+ | * If sensor is in a free run mode, the line-pairs are sampled as fast as (exposure) settings allow with a maximum rate of ~2300 line-pairs per second and a maximum width of the composite frame of '''16384px''', defined by WOI_HEIGHT. The sensor location that is used as source for these lines is defined by WOI_TOP, WOI_LEFT and WOI_WIDTH. | ||
− | + | * For variable control of the line sampling speed you can either: | |
+ | ** Change exposure settings. | ||
+ | ** Slow down that process by defining a virtual size with VIRT_KEEP and VIRT_HEIGHT (which still samples as fast as it can for given virtual size and exposure settings) | ||
+ | ** Use the camera’s internal [http://wiki.elphel.com/index.php?title=Trigger trigger mode] with TRIG=4 and TRIG_PERIOD settings to generate a regular trigger impulse. (but due to camera’s internal delays in that mode the line rate is a bit smaller). | ||
+ | * The instructions are the same as for 353, the key difference is switching sensor to free run (or reasonable fps) and JP4 format modes. | ||
+ | 393's factory default setting is 10 fps from internal trigger while 353's factory default is free run mode. | ||
− | + | ===Examples=== | |
− | |||
− | + | Note: Parameters in a single line can be changed at the same time | |
− | * Example 1: 2592x1936, not changing any frame dimensions, sensor is in a free run mode | + | |
+ | * '''Example 1:''' 2592x1936, not changing any frame dimensions, sensor is in a free run mode | ||
** COMPRESSOR_RUN=0, WB_EN=0, AUTOEXP_ON=0, EXPOS=400, TRIG=0, COLOR=5 | ** COMPRESSOR_RUN=0, WB_EN=0, AUTOEXP_ON=0, EXPOS=400, TRIG=0, COLOR=5 | ||
− | ** | + | ** PF_HEIGHT=2 |
** COMPRESSOR_RUN=2 | ** COMPRESSOR_RUN=2 | ||
− | * Example 2: | + | |
+ | * '''Example 2:''' 2592x'''3872''', not changing any frame dimensions, sensor is in a free run mode | ||
** COMPRESSOR_RUN=0, WB_EN=0, AUTOEXP_ON=0, EXPOS=400, TRIG=0, COLOR=5 | ** COMPRESSOR_RUN=0, WB_EN=0, AUTOEXP_ON=0, EXPOS=400, TRIG=0, COLOR=5 | ||
− | ** | + | ** PF_HEIGHT=2 |
** WOI_HEIGHT=3872 | ** WOI_HEIGHT=3872 | ||
** COMPRESSOR_RUN=2 | ** COMPRESSOR_RUN=2 | ||
− | * Example 3: 2592x1936, not changing any frame dimensions, sensor is triggered from internal counter | + | * '''Example 3:''' 2592x1936, not changing any frame dimensions, sensor is triggered from internal counter at '''2000 fps''' |
** COMPRESSOR_RUN=0, WB_EN=0, AUTOEXP_ON=0, EXPOS=400, TRIG=0, COLOR=5 | ** COMPRESSOR_RUN=0, WB_EN=0, AUTOEXP_ON=0, EXPOS=400, TRIG=0, COLOR=5 | ||
− | ** | + | ** PF_HEIGHT=2 |
** TRIG_PERIOD=50000 (units are in 1/100MHz) | ** TRIG_PERIOD=50000 (units are in 1/100MHz) | ||
** TRIG=4 | ** TRIG=4 | ||
** COMPRESSOR_RUN=2 | ** COMPRESSOR_RUN=2 | ||
− | + | ==<font color='blue'>Instructions for 353</font>== | |
− | === | ||
− | |||
* A link for quick access to parameters that might be required: | * A link for quick access to parameters that might be required: | ||
+ | <font size='2'> | ||
http://192.168.0.9/parsedit.php?WB_EN&AUTOEXP_ON&EXPOS&COMPRESSOR_RUN&TRIG&TRIG_PERIOD&PF_HEIGHT&WOI_HEIGHT&WOI_TOP&WOI_LEFT&WOI_WIDTH | http://192.168.0.9/parsedit.php?WB_EN&AUTOEXP_ON&EXPOS&COMPRESSOR_RUN&TRIG&TRIG_PERIOD&PF_HEIGHT&WOI_HEIGHT&WOI_TOP&WOI_LEFT&WOI_WIDTH | ||
+ | </font> | ||
− | * | + | * Before changing any image related parameters in this mode it's better to stop the compressor and restart it after everything is set. If image freezes it's better to reboot and start over. |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | Before changing any image related parameters in this mode it's better to stop the compressor and restart it after everything is set. | ||
For more details about changing parameters, see [[Elphel_353_series_quick_start_guide#Accessing_camera_parameters|Accessing camera parameters]]. | For more details about changing parameters, see [[Elphel_353_series_quick_start_guide#Accessing_camera_parameters|Accessing camera parameters]]. | ||
− | + | ===Examples=== | |
− | + | Note: Parameters in a single line can be changed at the same time | |
− | + | * '''Example 1:''' 2592x1936, not changing any frame dimensions, sensor is in a free run mode | |
− | + | ** COMPRESSOR_RUN=0, WB_EN=0, AUTOEXP_ON=0, EXPOS=400, TRIG=0, COLOR=1 | |
− | + | ** PF_HEIGHT=2 | |
− | |||
− | |||
− | |||
− | |||
− | * Example 1: 2592x1936, not changing any frame dimensions, sensor is in a free run mode | ||
− | ** COMPRESSOR_RUN=0, WB_EN=0, AUTOEXP_ON=0, EXPOS=400, TRIG=0 | ||
− | ** | ||
** COMPRESSOR_RUN=2 | ** COMPRESSOR_RUN=2 | ||
− | * Example 2: 2592x1936, not changing any frame dimensions, sensor is triggered from internal counter: 2000fps | + | * '''Example 2:''' 2592x1936, not changing any frame dimensions, sensor is triggered from internal counter: '''2000fps''' |
− | ** COMPRESSOR_RUN=0, WB_EN=0, AUTOEXP_ON=0, EXPOS=400, TRIG=0 | + | ** COMPRESSOR_RUN=0, WB_EN=0, AUTOEXP_ON=0, EXPOS=400, TRIG=0, COLOR=1 |
− | ** | + | ** PF_HEIGHT=2 |
− | ** TRIG_PERIOD= | + | ** TRIG_PERIOD=48000 (units are in 1/96MHz) |
** TRIG=4 | ** TRIG=4 | ||
** COMPRESSOR_RUN=2 | ** COMPRESSOR_RUN=2 | ||
− | === | + | ==<font color='blue'>Important notes</font>== |
* A common pitfall in trying out photo-finish mode is that one needs to take care of appropriate exposure setting before going into photo-finish mode. If you just start that mode in low light conditions you will end up waiting for frames endlessly – and get the impression the camera does not work anymore. For example: | * A common pitfall in trying out photo-finish mode is that one needs to take care of appropriate exposure setting before going into photo-finish mode. If you just start that mode in low light conditions you will end up waiting for frames endlessly – and get the impression the camera does not work anymore. For example: | ||
<font size='2'> | <font size='2'> | ||
Line 129: | Line 132: | ||
</font> | </font> | ||
− | === | + | ==<font color='blue'>Example images</font>== |
*[http://legacy.elphel.com/3fhlo/samples/pf/ Photo-finish mode testing (elphel333)] | *[http://legacy.elphel.com/3fhlo/samples/pf/ Photo-finish mode testing (elphel333)] | ||
*[http://community.elphel.com/pictures/linescan/ Photo-finish mode testing (elphel353)] | *[http://community.elphel.com/pictures/linescan/ Photo-finish mode testing (elphel353)] | ||
Line 136: | Line 139: | ||
---- | ---- | ||
− | ''Free Software and Open Hardware. Elphel, Inc., 2005'' | + | ''Free Software and Open Hardware. Elphel, Inc., 2005-2017'' |
Revision as of 15:46, 22 January 2018
Elphel Network Cameras Manual
Using the cameras | Camera software | Camera hardware | Diagnostic and repair | Development documentation | Information | Glossary | About Elphel, Inc
Photo-finish | Zeroconf for Elphel cameras | Elphel cameras and Zoneminder | USB host interface | Motorized lens control | Outdoor enclosure
Contents
What is line scan?
Line-scan is an image acquisition method that continuously samples (sensor) lines into a composite image. A Flatbed or hand held scanner is essentially also kind of a line-scanner. For some historic reasons (I guess due to the various application and realms they derived from) there are many terms:
Basically they all describe the same principle, a principle that is rather old and was already used in traditional analogue photography (for instance rotating panorama cameras), where you have a slit as an aperture, exposing the film as it moves by. In the digital realm one would cut out slices of existing image footage or – as in case of dedicated line-scan cameras – it is really just a one line sensor (to be correct: that’s true for monochrome cameras, color line-scan cameras normally have either 3 lines – in case of CCD sensor: one for each color – or 2, if the sensor is CMOS using Bayer pattern).
Applications of these line-scan method include industrial surface scanning, photo-finish, rotating panorama cameras, aerial imaginary, the arts (an interesting overview of art and research related slit-scan approaches can be found here) and certainly many more.
Line scan with Elphel
Camera series | Photo finish support |
---|---|
333 | + |
353 | + |
393 | + |
Since 2005 and the older 333 model, Elphel cameras have a “photo-finish” mode. With its 3Mpix Aptina CMOS sensor Elphel 333 was able so sample around 3072 lines per second. The photo-finsh mode was revived for the current Elphel 353 model with firmware release 8.0.8.7 by end of April 2010. The current 5Mpix Aptina CMOS sensor (width: 2536px) is a bit slower and allows a sample rate of approx. 2300 lines per second – or a line rate of 2.3 kHz (as it seems to be measured in dedicated line-scan cameras).
Elphel 353 software is fully ported to the new Elphel 393 generation of camera systems and works for JP4 format.
In the photo finish mode the camera then samples just lines and delivers composite images as video frames via RTSP network stream or directly to a hard-disc.
Due to the Bayer pattern of the sensor the minimal sample height is 2 lines.
Instructions for 393
- A link for quick access to parameters that might be required:
http://192.168.0.9/parsedit.php?sensor_port=0&WB_EN&AUTOEXP_ON&EXPOS&COMPRESSOR_RUN&TRIG&TRIG_PERIOD&PF_HEIGHT&WOI_HEIGHT&WOI_TOP&WOI_LEFT&WOI_WIDTH
- Before changing any image parameters affecting this mode it's better to stop the compressor and restart it only after everything is set. If image freezes it's better to reboot and start over.
More info on changing parameters.
- If sensor is in a free run mode, the line-pairs are sampled as fast as (exposure) settings allow with a maximum rate of ~2300 line-pairs per second and a maximum width of the composite frame of 16384px, defined by WOI_HEIGHT. The sensor location that is used as source for these lines is defined by WOI_TOP, WOI_LEFT and WOI_WIDTH.
- For variable control of the line sampling speed you can either:
- Change exposure settings.
- Slow down that process by defining a virtual size with VIRT_KEEP and VIRT_HEIGHT (which still samples as fast as it can for given virtual size and exposure settings)
- Use the camera’s internal trigger mode with TRIG=4 and TRIG_PERIOD settings to generate a regular trigger impulse. (but due to camera’s internal delays in that mode the line rate is a bit smaller).
- The instructions are the same as for 353, the key difference is switching sensor to free run (or reasonable fps) and JP4 format modes.
393's factory default setting is 10 fps from internal trigger while 353's factory default is free run mode.
Examples
Note: Parameters in a single line can be changed at the same time
- Example 1: 2592x1936, not changing any frame dimensions, sensor is in a free run mode
- COMPRESSOR_RUN=0, WB_EN=0, AUTOEXP_ON=0, EXPOS=400, TRIG=0, COLOR=5
- PF_HEIGHT=2
- COMPRESSOR_RUN=2
- Example 2: 2592x3872, not changing any frame dimensions, sensor is in a free run mode
- COMPRESSOR_RUN=0, WB_EN=0, AUTOEXP_ON=0, EXPOS=400, TRIG=0, COLOR=5
- PF_HEIGHT=2
- WOI_HEIGHT=3872
- COMPRESSOR_RUN=2
- Example 3: 2592x1936, not changing any frame dimensions, sensor is triggered from internal counter at 2000 fps
- COMPRESSOR_RUN=0, WB_EN=0, AUTOEXP_ON=0, EXPOS=400, TRIG=0, COLOR=5
- PF_HEIGHT=2
- TRIG_PERIOD=50000 (units are in 1/100MHz)
- TRIG=4
- COMPRESSOR_RUN=2
Instructions for 353
- A link for quick access to parameters that might be required:
http://192.168.0.9/parsedit.php?WB_EN&AUTOEXP_ON&EXPOS&COMPRESSOR_RUN&TRIG&TRIG_PERIOD&PF_HEIGHT&WOI_HEIGHT&WOI_TOP&WOI_LEFT&WOI_WIDTH
- Before changing any image related parameters in this mode it's better to stop the compressor and restart it after everything is set. If image freezes it's better to reboot and start over.
For more details about changing parameters, see Accessing camera parameters.
Examples
Note: Parameters in a single line can be changed at the same time
- Example 1: 2592x1936, not changing any frame dimensions, sensor is in a free run mode
- COMPRESSOR_RUN=0, WB_EN=0, AUTOEXP_ON=0, EXPOS=400, TRIG=0, COLOR=1
- PF_HEIGHT=2
- COMPRESSOR_RUN=2
- Example 2: 2592x1936, not changing any frame dimensions, sensor is triggered from internal counter: 2000fps
- COMPRESSOR_RUN=0, WB_EN=0, AUTOEXP_ON=0, EXPOS=400, TRIG=0, COLOR=1
- PF_HEIGHT=2
- TRIG_PERIOD=48000 (units are in 1/96MHz)
- TRIG=4
- COMPRESSOR_RUN=2
Important notes
- A common pitfall in trying out photo-finish mode is that one needs to take care of appropriate exposure setting before going into photo-finish mode. If you just start that mode in low light conditions you will end up waiting for frames endlessly – and get the impression the camera does not work anymore. For example:
Switching to photo finish from 2592x1936 and 50ms exposure to 2592x2 and 2592x1936 composite image will result in waiting for that composite image for 50 seconds (1936/2*50ms).
Example images
- Photo-finish mode testing (elphel333)
- Photo-finish mode testing (elphel353)
- river views test examples I
- river views test examples II
Free Software and Open Hardware. Elphel, Inc., 2005-2017