1. Introduction
There is some processing done by the FPGA:
- Strobe: we can set some outputs of the camera to strobe a light, these outputs will be activated during the exposure time.
- Flipping image: we can apply a flip on the image.
- Color processing: The Bayer conversion could be done internally.
Let's start with the first topic.
2. How to Strobe a lighting system
Some outputs can be affected as a strobe signal automatically activated during the exposure time of the sensor. By default, no output is strobed, the value is 'none'. If the value is 'ringled', the ring LEDs of the VC Pro Z will be strobed. Otherwise you can set a custom GPIO Nr, for example '0', '1', ...
For every VC Z camera, the values should be a combination of these values:
- 'none', no output is strobed during exposure time.
- '0', the GPIONr 0 (OUT0) will be strobed during exposure time.
- '1', the GPIONr 1 (OUT1) will be strobed during exposure time.
- '2', the GPIONr 2 (OUT2) will be strobed during exposure time.
- '3', the GPIONr 3 (OUT3) will be strobed during exposure time.
- '31', the GPIONr 31 (TrigOut) will be strobed during exposure time.
For the VC ProZ camera, there are more possibilities for 4 LED controllers:
- 'ringled', the GPIONr 19 and 20 for the integrated ring LEDs will be strobed during exposure time.
- 'flash0', the GPIONr 31 (TrigOut), the LED controller Flash0 will be strobed during exposure time.
- 'flash1', the GPIONr 18 (Flash1), the LED controller Flash1 will be strobed during exposure time.
For the VC ProZ camera, the 4 LED controllers are set to provide maximum current: 1.5A by default.
Example of setting for a VC NanoZ to strobe the output 0:
set_framegrabber_param(AcqHandle, 'strobe', ['0'])
Or to strobe the output 3, 2 and 1:
set_framegrabber_param(AcqHandle, 'strobe', ['3','2','1'])
Or to strobe the output TrigOut:
set_framegrabber_param(AcqHandle, 'strobe', '31')
Example of setting for a VC ProZ to strobe the integrated ring LEDs:
set_framegrabber_param(AcqHandle, 'strobe', 'ringled')
Or to strobe the 'flash1' and the integrated ring LEDs:
set_framegrabber_param(AcqHandle, 'strobe', ['flash1','ringled'])
3. Flipping the image
We can apply a processing step to flip the image directly in the FPGA. Example of setting for a vertical flip:
set_framegrabber_param(AcqHandle, 'flip', 'vert')
Or for a horizontal flip:
set_framegrabber_param(AcqHandle, 'flip', 'hor')
In this case the images grabbed by HALCON will be the result image of the flip.
4. Color processing
The color cameras have the Bayer conversion processing in the FPGA. So the output colorspace for the resulting HALCON image should be adjusted by the parameter 'colorspace' of the 'open_framegrabber()' operator. The following colorspaces are available for color cameras:
- 'rgb' in order to get RGB images (by default).
- 'yuv' in order to get YUV or YCbCr images.
- 'gray' in order to get monochrome images.
- 'bayer' in order to get bayer pattern images.
Example of open_framegrabber call in order to get YUV images:
open_framegrabber (AcqName, 1, 1, 0, 0, 0, 0, 'default', -1, 'yuv', -1, 'false', 'default', 'default', -1, -1, AcqHandle)