SkLinescan-U3-LX Handbuch (englisch)

Add to my manuals
27 Pages

advertisement

SkLinescan-U3-LX Handbuch (englisch) | Manualzz

Schäfter

+

Kirchhoff

Software program

SKLineScan-U3-LX

Manual

Linux (Debian and based distrubutions, Kernel >= 3.13)

Version 1.0

Schäfter+Kirchhoff GmbH

October 16, 2015

0.1

Copyright

Unless explicitly allowed, the duplication, distribution, sale or use of this document or its contents, for purposes other than those intended, is forbidden. Repeated transgressions will lead to prosecution and demands for compensation.

All rights of patent protection and registration or copyright of a product or its design lie with

Schäfter+Kirchhoff GmbH and the Schäfter+Kirchhoff logo are registered trademarks. We reserve the right to improve or change specifications so that the system description and depictions in the

Instruction Manual may differ in detail from the system actually supplied. The Instruction Manual is not covered by an update service.

Schäfter+Kirchhoff GmbH

Kieler Str. 212

D-22525 Hamburg, Germany www.SuKHamburg.com

Date of publication: October 16, 2015

Phone +49 40 853 997 – 0

Fax +49 40 853 997 – 79

Email [email protected]

Revision

1.0 (10/15)

Changes creation of the manual

2

Kieler Str. 212, D-22525 Hamburg • Tel: (+49) 40 85 39 97-0 • Fax: (+49) 40 85 39 97-79 • [email protected] • Web: http://www.SuKHamburg.com

Contents

0.1 Copyright . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

2

1 Introduction 5

1.1 Basics of Line Scan Camera Systems . . . . . . . . . . . . . . . . . . . . . . . . . . . .

5

2 Installation 7

2.1 Folder structure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

7

3 Operating SKLineScan Program 8

3.1 Start-up and Setup Dialog . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

8

3.1.1

Downward Compatibility . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

8

3.1.2

Multi Camera Operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

9

3.2 Overview Of Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10

3.3 Oscilloscope Display of Line Scan Signal . . . . . . . . . . . . . . . . . . . . . . . . . . 11

3.3.1

Zoomed View X-Axis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11

3.3.2

Zoomed View Y-Axis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11

3.3.3

Save Line Scan Signal . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12

3.4 Performing an Area Scan . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13

3.4.1

Setup Area Scan . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13

3.4.2

Single Area Scan . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13

3.4.3

Continuous Area Scan . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14

3.4.4

Save Area Scan . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15

3.4.5

Area Scan View Options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15

4 Adjustments for Optimum Scan Results 16

4.1 Lens Focussing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16

4.2 Sensor Alignment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17

4.3 Parameterizing a Line Scan . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18

4.3.1

Integration Time and Exposure Period . . . . . . . . . . . . . . . . . . . . . . . . 19

4.3.2

Integration Control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19

4.3.3

Synchronization Modes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20

4.3.4

Decoupling Line Frequency . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21

4.4 Gain / Offset Adjustments and Serial Commands . . . . . . . . . . . . . . . . . . . . . . 22

3

Kieler Str. 212, D-22525 Hamburg • Tel: (+49) 40 85 39 97-0 • Fax: (+49) 40 85 39 97-79 • [email protected] • Web: http://www.SuKHamburg.com

4.4.1

Offset Adjustment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22

4.4.2

Gain Adjustment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23

4.4.3

Input Field . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23

4.5 Shading Correction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24

4.5.1

Perform the Shading Correction . . . . . . . . . . . . . . . . . . . . . . . . . . . 24

5 Error Codes 26

4

Kieler Str. 212, D-22525 Hamburg • Tel: (+49) 40 85 39 97-0 • Fax: (+49) 40 85 39 97-79 • [email protected] • Web: http://www.SuKHamburg.com

1 Introduction

The operating program SKLineScan visualizes the brightness signal of the connected line scan camera on the PC monitor as an oscilloscope. Using this display the user can adjust the optical system with camera, lens and illumination. The operation parameters of the camera can be changed interactively during the scan acquisition. With zoom and scroll functions each individual pixel of the CCD line signal can be displayed. Furthermore the program demonstrates the two-dimensional area scanning of surfaces with the CCD line scan camera. Saving of images is possible.

The SKLineScan progam is suitable for line scan cameras with USB 3.0 Interface, which connected at

PCs or Notebooks with operating systems Debian and debian-based distributions (Kernel >= 3.13).

1.1

Basics of Line Scan Camera Systems

CCD (Charge Coupled Device) line scan cameras are semiconductor cameras with one single photosensitive line, which contains - depending on sensor type - up to 22800 individually addressable picture elements (pixels) from 5 - 25 microns width. Light energy incident on the sensor is transformed into an electric signal; shift registers following the bucket chain principle transport this. The transfer rate is determined by the pixel frequency. For further processing in the PC the signal must be digitized. The analogue/digital conversion is done in the camera itself. At 8-bit-resolution, the A/D converter transmits the output voltage of each pixel into one of 256 brightness levels, at 12 bit resolution into 4096 brightness levels.

The advantages of the CCD line scan camera are

• high optical resolution up to 8160 pixels (monochrome) and 3x7600 (color RGB)

• high speed up to 54 kHz line frequency

• flexible parameter setting of the line scans

• free synchronizing of each individual line

The image produced by a line scan camera represents the brightness profile of the test object captured by the line sensor. A two?dimensional image is possible, by performing a scanning movement of either the object or the camera, during which the individual line signals are transferred to the computer and assembled to produce a composite 2D image.

Generally, the applications can be grouped into one-dimensional and two-dimensional measuring tasks.

For one-dimensional applications the measured result is extracted from the pixel information of an individual line scan. Measurements in two-dimensional images require moving the object or the line sensor.

Camera application

Signal / Image generation

Examples

1-dimensional

Individual line scan

Measurement of width, edge positions, glass thickness

2-dimensional

Several line scans are combined to a 2D image (frame)

Surface inspection, texture analysis, scanner

For an image to be correct in all proportions, the scanning speed and the image acquisition process must be synchronized and this is most easily achieved by adjusting the transport speed to the line

5

Kieler Str. 212, D-22525 Hamburg • Tel: (+49) 40 85 39 97-0 • Fax: (+49) 40 85 39 97-79 • [email protected] • Web: http://www.SuKHamburg.com

frequency of the camera. However, in practice, it is usually the transport speed and the image resolution that are constraining and these predefine the line frequency.

At constant transport speeds, such as when examining objects on a conveyor belt, a line scan camera can be allowed to operate in a free-running mode. Conversely, any velocity fluctuations or discordant movements require the coordinated triggering of the line camera over equally spaced increments. The most convenient solution is for the software control unit of the transport motor to be made responsible for coordinating the individual line scans also. This precise synchronization guarantees images with a reproducible resolution and correct aspect ratio (see Figure 1). The line frequency for a given object speed v

0 f

L can be calculated and field width FOV , sensor length S and pixel width w from

f

L

=

v

0

·S w

·FOV

Figure 1: Relation of travel velocity, field of view and line frequency to acquire an image with correct aspect ratio.

6

Kieler Str. 212, D-22525 Hamburg • Tel: (+49) 40 85 39 97-0 • Fax: (+49) 40 85 39 97-79 • [email protected] • Web: http://www.SuKHamburg.com

2 Installation

Before the camera will be connected the software should be installed. At first the CD SK91USB3-LX must insert in the CD-Drive. Please install the packages sk91usb3-lx_*.deb and sklinescan_*.deb.

These two packages checks the needed dependencies for the packages and install the library for camera control and the tool SKLineScan to view the line scan signal. Also, during the install process, a new udev rule is installed and activated to control the camera with user privileges. Root privilege is not needed.

Next plug the camera at a USB 3.0 connector. It is possible to use a USB 2.0 port but note the slower transfer speed and the lower provided power.

The camera LED should light red. If does it not, the USB port is defect or the power consumption of the camera is too high for this USB port. In this case connect the external power supply to the camera.

The camera is now ready to use.

2.1

Folder structure

Folder name usr/lib/ usr/share/sk/ usr/bin/ etc/udev/rules.d/

Content shared library file libSK91USB3-LX.so(.1 / .1.0) boot image for camera and manuals

SKLineScan (program) udev rule for usb cameras

(88-skusb.rules)

7

Kieler Str. 212, D-22525 Hamburg • Tel: (+49) 40 85 39 97-0 • Fax: (+49) 40 85 39 97-79 • [email protected] • Web: http://www.SuKHamburg.com

3 Operating SKLineScan Program

3.1

Start-up and Setup Dialog

After the program has been started a start-up window appears, which displays the connected cameras.

The camera type will be detected automatically. It is important that the displayed camera type is identical with the connected line scan camera. If not, close the program, disconnect the camera, wait few seconds before reconnect the camera and start the program again.

During initialization of the camera, the LED should change from red (a) to green (b):

Figure 2: Start-up window in SKLineScan program

Acknowledge the start-up dialog by OK. After closing the start-up dialog a window with the oscilloscopic view of the line scan signal appears.

With the click at the Setup button a new dialog will be opened. All connected cameras are sorted by their Camera ID. It is possible to deactivate or activate several cameras by click at the checker control field. Please note, the greater the number of activated cameras the higher CPU uses is needed.

Furthermore the pixel frequency and the bit depth can be changed.

Figure 3: Setup dialog in SKLineScan program

3.1.1

Downward Compatibility

The USB 3.0 line scan cameras are downward compatible to USB 2.0. If a camera is connected at a

USB 2.0 interface, the user has to note the slower transfer rate. In the setup dialog should be selected

8

Kieler Str. 212, D-22525 Hamburg • Tel: (+49) 40 85 39 97-0 • Fax: (+49) 40 85 39 97-79 • [email protected] • Web: http://www.SuKHamburg.com

the lower pixel rate. Particularly the note to the cable specification can be important. Some data cables of third party manufactures are not suitable for Super Speed transfer rates. So it is possible that the camera is connected at a USB 3.0 port, and has been detected as an USB 2.0 device. The ordering of data cable type SK9020.x from Schäfter + Kirchhoff is recommended.

3.1.2

Multi Camera Operation

The SKLineScan program supports multi camera operation with up to 4 cameras. Each camera get an index number (Camera ID) to identify the camera. The IDs start by 0. The order of the assignment of the IDs is given by the USB controller port assignment. The camera which is connected to USB port 0, gets the Camera ID 0, a.s.o.

Figure 4: Start-up window in SKLineScan program with multi camera operation

Acknowledge the start-up dialog by

OK. After closing the start-up dialog a window with the oscilloscopic view of the line scan signal appears for each detected camera. In the window title stands the camera name, the ID and the serial number for identification of the cameras.

If the given order is not as desired then a manual customization of this order is possible. For this customization click on

Setup to open the setup dialog for the cameras.

In the opened dialog is the ability to change the Camera ID under the point Camera ID / SN. The new

ID of the camera can be selected in the drop down menu in the middle of the section. After the click on the new id the parameters (name, pixel frequency, etc.) will change immediately. This is shown in the figures 5 and 6. Here switched the SK8160U3KO-LB with the SK6288U3KOC.

Figure 5: Camera IDs at program start Figure 6: Swapped Camera IDs

Other options of the setup dialog are the change of the pixel frequency or the bit depth. It is possible to activate or deactivate the cameras with the check box under the section Camera ID / SN. The third row in the section Camera ID / SN stands for the serial number (SN) of the camera.

9

Kieler Str. 212, D-22525 Hamburg • Tel: (+49) 40 85 39 97-0 • Fax: (+49) 40 85 39 97-79 • [email protected] • Web: http://www.SuKHamburg.com

3.2

Overview Of Functions

Figure 7: Toolbar of SKLineScan

: New line scan. All open signal windows will be closed ( [ F2 ])

: Save brightness profile of a single line scan or the image of a 2D scan

: Open / Close the parameter dialog ( [ F4 ])

: Zoom IN, x-axis

: Zoom OUT, x-axis

: Zoom IN, y-axis

: Zoom OUT, y-axis

: Opens the dialog for Shading-Correction (white balance) ( [ Alt ] + [ S ])

: Opens the dialog for Gain / Offset control and input serial commands ( [ Shift ] + [ F4 ])

: Starts an area scan ( [ F3 ])

Under the menu Setup Area Scan it is possible to change the number of lines per image before start an area scan

: Repeatedly grabbing

: Snap an image

: Increase the pixel intensity for more brightness of area scan (x 2)

: Reduce the pixel intensity for lower brightness of area scan (/ 2)

10

Kieler Str. 212, D-22525 Hamburg • Tel: (+49) 40 85 39 97-0 • Fax: (+49) 40 85 39 97-79 • [email protected] • Web: http://www.SuKHamburg.com

3.3

Oscilloscope Display of Line Scan Signal

The sensor of a line scan camera is one-dimensional and, therefore, the image produced is made up of a single line and represents the brightness profile of the equivalent object line directly mapped onto the sensor line.

The oscilloscope display plots the digitalized brightness profile as signal intensity (y-axis) against sensor length (x-axis) at a high refresh rate. The scaling of the y-axis depends on the resolution of the A/D converter: at 8-bits the scale is from 0 to 255 and at 12-bits from 0 to 4095. The scaling of the x-axis corresponds to the number of pixels in the line sensor.

With sensor lengths of up to 8160 pixels, the full details of the signal are only visible after using the zoom function. Magnification of one or several sections of the signal allows individual pixels to be resolved for a detailed evaluation of the line scan signal (see magnification of full signal in the upper panels).

Figure 8: Oscilloscope display of gray scale line scan signal

Optimal signals were only obtained when the lens is correctly focussed and a form of white balance or shading correction has been performed. Shading Correction compensates for nonuniform illumination, lens vignetting as well as any differences in pixel sensitivity.

3.3.1

Zoomed View X-Axis

Click on one of the windows and adjust the zoom factor and zoom range on x-axis using or

3.3.2

Zoomed View Y-Axis

Click on one of the windows and adjust the zoom factor and zoom range on x-axis using or

11

Kieler Str. 212, D-22525 Hamburg • Tel: (+49) 40 85 39 97-0 • Fax: (+49) 40 85 39 97-79 • [email protected] • Web: http://www.SuKHamburg.com

3.3.3

Save Line Scan Signal

It is possible to save the area scan as a image in png or bitmap format or to save it as raw data. Raw data means a txt or csv file where for each pixel the intensity is stored.

It is recommanded to save the image as png. Png is a lossless compression format.

Store as raw data

Hot key: [ Ctrl ] + [ S ]

Menu: File - Save CSV

Store as image

Hot key:

Menu:

Toolbar Icon:

[ Ctrl ] + [ Alt ] + [ S ]

File - Save Bitmap

12

Kieler Str. 212, D-22525 Hamburg • Tel: (+49) 40 85 39 97-0 • Fax: (+49) 40 85 39 97-79 • [email protected] • Web: http://www.SuKHamburg.com

3.4

Performing an Area Scan

3.4.1

Setup Area Scan

The Setup Area Scan menu item Area Scan Data of the SKLineScan window enables the preparation of an area scan.

To open the dialog, use the following:

Hot key:

[ Alt ] + [ F3 ]

Menu: Setup Area Scan - Area Scan Data

The input Nr. of Lines defines the number of lines to be acquired for production of an area image, which when multiplied by the pixel number of the sensor determines the total image size.

The waiting time for an image to be completed is defined using the input field Timeout. The time should always be greater than the integration time

·

Nr. Of Lines.

The width for the drawed line of the oscilloscopiv view is defined by the input field Thickness. The default value is 1.

The single area scan function, started by [ F3 ] or the Area scan icon in the toolbar, acquires the complete image for the defined number of lines and this image is displayed (if all lines have been written to the

PC memory).

Figure 9: Area Scan Data dialog

3.4.2

Single Area Scan

To start the area scan immediately, call the following:

Hot key:

[ F3 ]

Menu: View - New Area Scan

Toolbar Icon:

It is possible to synchronize the acquisition with external events (see section 4.3.3) or to save the images as a file in png or bitmap format (see section 3.4.4).

The images can be fully displayed in a window ( [ S ] - stretch mode) or in 1:1 imaging for visualizing details ( [ C ] - copy mode). The truncated partial image can be moved using the horizontal and vertical scroll bars.

The image acquisition can be displayed repeatedly or in a one snap shot mode. The repeatly mode is called with the icon . For the one snap shot mode click on the icon .

While the area scan is displayed repeatedly, adjusting of the camera parameters is possible. To do this, open the camera control dialog (see section 4.3). The changes of the parameters will be used for the next image.

13

Kieler Str. 212, D-22525 Hamburg • Tel: (+49) 40 85 39 97-0 • Fax: (+49) 40 85 39 97-79 • [email protected] • Web: http://www.SuKHamburg.com

Figure 10: Area scan with external events

3.4.3

Continuous Area Scan

The image acquisition in continuous mode grabs images cyclical into a buffer queue. The image acquisition rate in continuous mode is much faster than in the repeating acquisition of single images. The single-image capturing requests the initialization of grab for each image. In the continuous mode the image acquisition needs the setup only once. Thereafter, the detection is performed without interruption. The triggering of the images in FrameSync and LineSync is possible, but the trigger mode must be installed before the continuous grab starts.

Using the SDK, the size of the buffer queue can be defined and managed by the user. The SKLineScan program usses 10 buffers. The ring buffer will be written continuously by the camera until the user stop the acquisition.

The advantage of the continuous area scan is the once-only overhead at the beginning and the maximum image acquisition rate by continuous grabbing in a buffer queue.

To start the continuous area scan, do the following:

Hot key:

[ Alt ] + [ F3 ]

Menu: Setup Area Scan - Grab Continuous and then

Hot key:

Menu:

Toolbar Icon:

[ F3 ]

View - New Area Scan

It is possible to save the last grabbed image as a file in png or bitmap format. Look at section

3.4.4 to save images.

The images can be fully displayed in a window ( [ S ] - stretch mode) or in 1:1 imaging for visualizing details ( [ C ] - copy mode). The truncated partial image can be moved using the horizontal and vertical scroll bars.

14

Kieler Str. 212, D-22525 Hamburg • Tel: (+49) 40 85 39 97-0 • Fax: (+49) 40 85 39 97-79 • [email protected] • Web: http://www.SuKHamburg.com

3.4.4

Save Area Scan

It is possible to save the area scan as a image in png or bitmap format. Alternativly, area scan can be saved as raw data. Raw data means a txt or csv file where for each pixel the intensity is stored. A 2D matrix is constructed by using separators and line breaks.

It is recommended to save the iamge as png. PNG is a lossless compression format.

Store as raw data

Hot key:

[ Ctrl ] + [ S ]

Menu: File - Save Data

Store as image

Hot key:

Menu:

Toolbar Icon:

[ Ctrl ] + [ Alt ] + [ S ]

File - Save Image

3.4.5

Area Scan View Options

In the area scan view exists the menu item View.

This menu item contains several functions to manipulate the view. The functions Flip Horizontal ([

Alt ] + [ H ]) and Flip Vertical ([ Alt ] + [ V ]) flips the displayed image. Flip Horizontal flips the image around the x axis and Flip Vertical around the y axis. But these operations requrie some time and increase the load on the CPU.

The functions Bright Up and Bright Down increase / decrease the pixel intensity. They can be called by clicking the menu items or over the hot keys [ + ] (Bright Up) or [ - ] (Bright Down).

Bright down decreases the multiplier by the same

Figure 11: Menu item View in area scan view factor. This operations require no additional time and increase not the CPU load.

For color line scan cameras is the menu item Change RGB Direction important. Color line sacen cameras use for each color a different sensor line, normaly they have three sensor lines (see camera manual for more details). The transport direction of the objects has to conform to the sequence of the lines. Otherwise the wrong transport direction causes color convergence aberration (showed in figure

12). If this is the case, then the function Change RGB Direction must be activated to correct this issue.

Figure 12: Monochrome font pattern with line synchronous object pattern (good) and asynchronous transport of the object (bad - causes color convergence aberration)

15

Kieler Str. 212, D-22525 Hamburg • Tel: (+49) 40 85 39 97-0 • Fax: (+49) 40 85 39 97-79 • [email protected] • Web: http://www.SuKHamburg.com

4 Adjustments for Optimum Scan Results

4.1

Lens Focussing

The oscilloscope display facilitates the effective focussing of the line scan camera system, even for twodimensional measurement tasks. For determining the correct focus, the edge steepness at dark-bright transitions and the modulation of the line scan signal are the most important factors.

Adjust the focus using a fully opened aperture to restrict the depth of field and to amplify the effects of focus adjustments.

The signal amplitude may have to be trimmed when using a fully opened aperture and this can achieved most readily by shortening the integration time.

Line scan camera signal - ideal focus settings

Dark-bright transitions with steep edges

Large modulation in the signal peaks

High-frequency gray value variations

Out-of-focus line scan camera signal

Low edge steepness

Signal peaks are blurred

High-frequency gray values with low modulation

16

Kieler Str. 212, D-22525 Hamburg • Tel: (+49) 40 85 39 97-0 • Fax: (+49) 40 85 39 97-79 • [email protected] • Web: http://www.SuKHamburg.com

4.2

Sensor Alignment

If you are operating with a linear illumination source, check the alignment of the illumination source and the sensor prior to shading correction, as rotating the line sensor results in asymmetric vignetting.

Figure 13: Sensor and optics rotated in apposition Figure 14: Sensor and optics aligned

17

Kieler Str. 212, D-22525 Hamburg • Tel: (+49) 40 85 39 97-0 • Fax: (+49) 40 85 39 97-79 • [email protected] • Web: http://www.SuKHamburg.com

4.3

Parameterizing a Line Scan

To open the camera control dialog, use the following:

Hot key:

[ F4 ]

Menu: Edit - Operation Parameters

Toolbar Icon:

Integration Time:

Moving the right vertical slider makes adjustments to the integration time. With the left slider set the control range of integration time. The position of the pointer is displayed in the respective status fields.

The current line frequency is displayed in the Line Frequency status field.

The default integration time of a

SK2048U3PD camera is 36

µ s

, what is equivalent to 27.777 kHz line frequency.

Figure 15: Camera settings dialog

The adjustment of the integration time in the range of Integration Control (shutter) with an integration time shorter than the minimum of exposure period does not change the line frequency. It will be held at maximum.

Sets the integration time to the limit of exposure period (maximum line frequency).

Reprogramming of integration time to the start value.

Closes the camera control dialog and resets integration time to the start value.

Uses the programmed parameters and closes the camera control dialog.

Synchronization

The functioning of synchronization modes is described in section 4.3.3.

Note:

For LineSync and FrameSync, there are separate signal inputs at the camera I/O connector (see figure 16).

In external synchronization modes Line Start and Exposure Start, it is possible to divide the input clock by an integral factor. Valid values of Divider are:

1 = divide by 1 -> line frequency is equal to the frequency of external TTL signal

2 = divide by 2 -> line frequency is half of the external TTL signal frequency

3 = divide by 3 -> line frequency is one third of the external TTL signal frequency

Maximum divider value: 2

32−1

18

Kieler Str. 212, D-22525 Hamburg • Tel: (+49) 40 85 39 97-0 • Fax: (+49) 40 85 39 97-79 • [email protected] • Web: http://www.SuKHamburg.com

4.3.1

Integration Time and Exposure Period

The light sensitive elements of the photoelectric sensor accumulate the charge that is generated by the incident light. The duration of this charge accumulation is called the integration time. Longer integration times increase the intensity of the line scan signal, assuming constant illumination conditions.

The complete read-out of accumulated charges and output procedure determines the

minimum expo-

sure period, which is a function of sensor length and the minimum number of clock cycles required to complete the read-out and output process. Thus, the minimum exposure period of particular line scan camera determines the maximum line frequency of that camera and this is declared in the data sheet of the particular camera type.

For example, the SK2048U3PD line scan camera with 60 MHz pixel frequency: maximum line frequency minimum exposure period f

Lmax

= 27.777kHz

t

Emin

= 0.036ms

4.3.2

Integration Control

Integration Control allows the integration time of light-induced charge accumulation to be set at a value that is shorter than the

minimal exposure period for the designated CCD line scan camera.

Integration Control works like a shutter by stopping pixel charge accumulation, thereby restricting the integration of the signal. A shorter integration time tA cannot influence the minimum exposure period and, so, the line frequency remains unaltered.

Examples:

The SK_SETINTEGRATIONTIME parameter is used to program the SK2048U3PD camera with different integration times:

1. 0.036 [ms]

SK_SETINTEGRATIONTIME(CamID, 0.036): integration time = 0.036 ms; exposure period = 0.036 ms; line frequency = 27.777 kHz (= limit)

2. 0.106 [ms]

SK_SETINTEGRATIONTIME(CamID, 0.106): integration time = 0.106 ms; exposure period = 0.106 ms; line frequency = 9.433 kHz

3. 0.021 [ms]

SK_SETINTEGRATIONTIME(CamID, 0.021): integration time = 0.021 ms; exposure period = 0.036 ms; line frequency = 27.777 kHz (= limit)

In example 3, the set integration time is shorter than the minimum exposure period and the camera performs in integration control mode (shutter) automatically. The shorter integration time means that the signal intensity is reduced, but the line frequency remains at the maximum of 27.777 kHz.

19

Kieler Str. 212, D-22525 Hamburg • Tel: (+49) 40 85 39 97-0 • Fax: (+49) 40 85 39 97-79 • [email protected] • Web: http://www.SuKHamburg.com

4.3.3

Synchronization Modes

Synchronization mode determines the timing of the line scan. Synchronization can be performed internally or by trigger signals sourced externally.

Figure 16: I/O conector of USB 3.0 line scan camera

The line scan camera system has two modes of external synchronization.

1.

Line-triggered synchronization

Each single line scan is triggered by an external signal (TTL).

2.

Frame-triggered synchronization

A set of lines for producing 2-dimensional images is triggered (TTL).

The synchronization modes work as follows:

FreeRun / SK Mode 0:

Each line is acquired by internal synchronization. The completion of one line scan initiates the subsequent line scan immediately (free-running).

LineStart / SK Mode 1:

An external trigger (TTL at Pin 5, falling edge) initiates the read-out of the current exposed line at the next trigger without any effect on the exposure process. The start of exposure is not controlled and the exposure time is determined by the programmed value. The exposed line is held in the camera up until the next trigger. The trigger clock determines the line frequency.

Restriction: the TTL period must be longer than the exposure time.

ExposureStart / SK Mode 4:

An external trigger (TTL at Pin 5, falling edge) resets the current exposure and starts a new exposure process. The exposure time is determined by the programmed value. The exposed line will be read out with the next trigger. The trigger clock determines the line frequency.

Restriction: the TTL period must be longer than the exposure time.

ExposureActive / SK extSOS (mode 5):

The start-of-scan (SOS) pulse of the camera is generated externally by a TTL-source. The TTL clock period determines the exposure time of the camera. The exposed line will be read out with the next trigger.

FrameTrigger / SK FrameSync:

Trigger mode for a set of lines (frame, image). The camera waits for a falling TTL edge at the ?FrameSync?

input (Pin 3). The FrameSync works independently of the programmed line synchronization. The falling

TTL edge starts an acquisition of one frame for the programmed number of lines. For further external line synchronization inside of an initiated frame then an additional TTL clock is required for every line event interruption.

NB: LineSync and FrameSync are separate signal inputs at the camera I/O connector.

20

Kieler Str. 212, D-22525 Hamburg • Tel: (+49) 40 85 39 97-0 • Fax: (+49) 40 85 39 97-79 • [email protected] • Web: http://www.SuKHamburg.com

4.3.4

Decoupling Line Frequency

This feature allows the decoupling of the line frequency and the integration time. In normally the changing of integration time causes a changing of line frequency. If the feature is activated, the camera holds the current line frequency. The integration time can be controlled in the range from the reciprocal value of the fixed line frequency down to the shortest possible integration time.

This function is useful e.g. in untriggered image acquisition in Free Run mode, if the line frequency is synchronized with the scan velocity and must be constant, but the integration time has to be reduced because of too much light.

Step 1

Adjust the line frequency to the desired value.

Figure 17: Select the line frequency which should be hold

Step 2

Activate the feature with a click on

Decoupl. LF

Figure 18: Click on Decoupl. LF

Step 3

Using the right slider the adjustment of integration time without changing of line frequency is possible.

Figure 19: Change of integration time has no effect to line frequency

21

Kieler Str. 212, D-22525 Hamburg • Tel: (+49) 40 85 39 97-0 • Fax: (+49) 40 85 39 97-79 • [email protected] • Web: http://www.SuKHamburg.com

4.4

Gain / Offset Adjustments and Serial Commands

To open the gain / offset control dialog, use the following:

Hot key: [ Shift ] + [ F4 ]

Menu: Edit - Gain / Offset Control

Toolbar Icon:

Note:

The line scan camera is provided with correctly adjusted gain / offset. Only if necessary, these settings should be changed. This must be done carefully.

Figure 20: Gain / Offset Control Dialog

The number of activated sliders for gain and offset corresponds with the number of ADC channels of the camera. Changes to gain and offset settings are immediately visible in the oscilloscope display of the line scan signal.

Adjustment principle:

4.4.1

Offset Adjustment

The zero baselines of the video signal 1 to 2 must be adjusted and balanced. To do this, totally block the incident light and enter "00" (volts) in boxes 1 to 2. Minimize any differences using the Offset sliders

"1" to "2".

A slight signal noise should be visible in the zero baseline.

Figure 21: Line Signal at absolute darkness for offset adjustments

22

Kieler Str. 212, D-22525 Hamburg • Tel: (+49) 40 85 39 97-0 • Fax: (+49) 40 85 39 97-79 • [email protected] • Web: http://www.SuKHamburg.com

4.4.2

Gain Adjustment

Illuminate the sensor with a slight overexposure to identify the maximum clipping. Use the gain slider

"1" to adjust the maximum output voltage. Adjust the signal intensity with slider "2" to minimize the difference between channels 1 and 2.

Figure 22: a) Signal ROI from pixel 200 - 456 with not aligned 1/2 channel, b) with correct adjusted 1/2 channel

4.4.3

Input Field

The input field in the Gain / Offset dialog allows the user to send serial commands to the camera and readout the results. The list of serial commands is documented in the manual of the camera.

Figure 23: Gain / Offset Control Dialog with input / output

23

Kieler Str. 212, D-22525 Hamburg • Tel: (+49) 40 85 39 97-0 • Fax: (+49) 40 85 39 97-79 • [email protected] • Web: http://www.SuKHamburg.com

4.5

Shading Correction

Shading Correction compensates for non-uniform illumination, lens vignetting as well as any differences in pixel sensitivity. The signal from a white homogeneous background is obtained and used as a reference to correct each pixel of the sensor with an individual factor, scaled up to the intensity maximum

(255 at 8-bit resolution and 4095 at 12-bit) to provide a flat signal. The reference signal is stored in the

SCM (Shading Correction Memory) of the camera and subsequent scans are normalized using the scale factors from this white reference.

Figure 24: Structure of Shading Correction Memory

To open the shading correction dialog, use the following:

Hot key:

Menu:

[ Ctrl ] + [ Alt ] + [ S ]

Edit - Shading Correction

Toolbar Icon:

Button Active:

Activate Shading Correction with the reference signal which is stored in the SCM.

Button OFF :

Switch off Shading Correction.

If the Shading

Correction should be active at the next start, save the SCM into the flash memory and let the Shading Correction active.

Figure 25: Shading Correction Dialog

Load up SCM:

A stored reference signal will be loaded in the CM of the camera. If the load process completes then the Shading Correction is active.

If it not possible to grab an image of a white object, the Natural Lens Vignetting can be used for raising the edge areas left and right.

4.5.1

Perform the Shading Correction

Use a homogeneous white object for the acquisition of a reference. The reference can be a grabbed 2-dimensional scan about a determined number of lines (call this function from an Area

Scan - recommended) or a line signal which was averaged over a number of single line scans.

During the image acquisition the white object should be moved to suppress influences of surface

24

Kieler Str. 212, D-22525 Hamburg • Tel: (+49) 40 85 39 97-0 • Fax: (+49) 40 85 39 97-79 • [email protected] • Web: http://www.SuKHamburg.com

structures.

Input the scale range

Minimum in %: intensities lower than "Minimum" will be not changed

Maximum in %: target for scaling, e.g. bit depth of 8: result is a homogeneous line at intensity of 230 (90% of 255), bit depth of 12: homogeneous line at intensity 3686 (90% of

4095)

Recommended: 0% - the correction will be scaled to the maximum intensity of the reference signal

Click on button

New Reference

Click on Save SCM to Flash to save the SCM reference signal in the flash memory of the camera

The camera maintains the data in the flash memory during power-down. If the Shading Correction was active at program exit, it will be reactivated automatically at the next start.

The reference signal is restored from the flash memory into the SCM.

Figure 26: Line Signal of a white paper sheet before Shading Correction

After Shading Correction, the line scan signal has a homogeneous intensity at the maximum intensity of the reference signal.

Figure 27: Line Signal of a white paper sheet after Shading Correction

25

Kieler Str. 212, D-22525 Hamburg • Tel: (+49) 40 85 39 97-0 • Fax: (+49) 40 85 39 97-79 • [email protected] • Web: http://www.SuKHamburg.com

5 Error Codes

Error Name

SK_RESULT_OK

SK_RESULT_ABORTED

SK_RESULT_ARGUMENT_TOO_LONG

SK_RESULT_BAD_ADDRESS

SK_RESULT_BUFFER_TOO_SMALL

SK_RESULT_CANNOT_CREATE_EVENT

SK_RESULT_CANNOT_OPEN_FILE

SK_RESULT_CANNOT_SET_EVENT

SK_RESULT_CONSTRUCTOR_FAILED

SK_RESULT_CORRUPTED_FILE

SK_RESULT_DEVICE_ERROR

SK_RESULT_DEVICE_RESET

SK_RESULT_DRIVER_ERROR

SK_RESULT_EMPTY_SEQUENCE

SK_RESULT_IMAGE_COMPLETED

SK_RESULT_FILE_ERROR

SK_RESULT_INTERNAL_ERROR

SK_RESULT_INVALID_ARGUMENT

SK_RESULT_BUS_ERROR

SK_RESULT_NO_AVAILABLE_DATA

SK_RESULT_NO_MORE_ITEM

SK_RESULT_NO_SELECTED_ITEM

SK_RESULT_NOT_CONNECTED

SK_RESULT_NOT_ENOUGH_MEMORY

SK_RESULT_NOT_FOUND

SK_RESULT_NOT_SUPPORTED

SK_RESULT_OVERFLOW

SK_RESULT_STATE_ERROR

SK_RESULT_THREAD_ERROR

SK_RESULT_TIMEOUT

SK_RESULT_UNDERFLOW

SK_RESULT_UNEXPECTED_ERROR

-0x0E

-0x0F

-0x0F

-0x10

-0x11

-0x12

-0x13

-0x14

-0x15

-0x16

-0x17

Value (Hex.)

0x00

-0x01

-0x02

-0x03

-0x04

-0x05

-0x06

-0x07

-0x08

-0x09

-0x0C

-0x0D

-0x18

-0x19

-0x1A

-0x1B

-0x1C

-0x1D

-0x1E

-0x1F

-0x20

-18

-19

-20

-21

-22

-23

-14

-15

-15

-16

-17

Value (Dec.)

0

-1

-2

-3

-4

-5

-9

-12

-13

-6

-7

-8

-29

-30

-31

-32

-24

-25

-26

-27

-28

26

Kieler Str. 212, D-22525 Hamburg • Tel: (+49) 40 85 39 97-0 • Fax: (+49) 40 85 39 97-79 • [email protected] • Web: http://www.SuKHamburg.com

Error Name

SK_RESULT_FIFOFULL

SK_RESULT_UNKNOWN_ERROR

SK_RESULT_UNSUPPORTED_CONVERSION

SK_RESULT_OPERATION_PENDING

SK_RESULT_IMAGE_ERROR

SK_RESULT_CORRUPTED_IMAGE

SK_RESULT_MISSING_PACKETS

Value (Dec.)

-33

-34

-35

-36

-37

-38

-39

Value (Hex.)

-0x21

-0x22

-0x23

-0x24

-0x25

-0x26

-0x27

27

Kieler Str. 212, D-22525 Hamburg • Tel: (+49) 40 85 39 97-0 • Fax: (+49) 40 85 39 97-79 • [email protected] • Web: http://www.SuKHamburg.com

advertisement

Was this manual useful for you? Yes No
Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Related manuals