|
GCPS - Grey Code Phase Stepping, instrument is used to generate 3D images or point clouds with Scorpion Vision Software. A GCPS instrument consists of the following:
Before generating a 3D Images the GCPS Instrument must be calibrated. The 3D Image is generated by processing multiple images with different stripe pattern projected. Typical number of images is from 15 to 21. The concept is often described as stripelight. The 3D model generating is divided into to parts. Image Aquisition projecting and capturing stripelight images. This typically performance is 3 images / seconds. A typical capture time is from 5 to 10 seconds. After capturing images the system processing time is typically 2 seconds. In a multicamera system Scorpion process the different images in different threads thus in a multi-core the image processing time is not affected by adding cameras. The 3D Images has one point for each pixel in the camera. In Scorpion 3D points from different cameras can be merged into on 3D image. Installations Some installation must be done: The contents of the folder: GCPS must be placed under Program Files/ Tordivel AS/ Scorpion #/GCPS The run time library for the Visual Studio 2005 SP2 is recommended to install. The GCPSGrab.dll, is the first 3D camera driver in Scorpion. The GCPSGrab.dll may be found in the release notes of GCPS. License To enable GCPS, you will need a Scorpion license with GCPS, and in addition you must place a GCPS.lic file in the Scorpion directory (Program Files/Tordivel AS/Scorpion/) If you don't have such a file, please contact Tordivel AS. Adding GCPS camera
In order to enable GCPS for 3D inspection of physical objects a GCPS Camera must be added in the camera list as shown in Figure 1. A GCPS driver supports several "cameras", see the table below.
We have named the camera GCPS1. The Figure also shows that by right clicking the camera, we may access the camera properties. Then the GCPS Instrument setup dialog will appear.
Figure 1: Camera settings GCPS GCPS Instrument Setup Figure 2: GCPS Instrument Setup Multiple cameras may mounted to increase the field of view due to shadow and reflection limitations. Instrument
Camera
ROI
Pointcloud output
Image logging
GCPS calibration The calibration of the GCPS instrument is done by measuring at a calibration plate in different heights and angles. The calibration plate must be a hard and stiff plate painted with a "chess pattern" of at least 10x10 white and black squares. It is important that the calibration plate is large enough in order to achieve a valid calibration. This means that the whole volume seen by the 2 cameras and the projector light must be covered by the calibration plate. The calibration of the GCPS instrument must be valid for a volume in 3D. This is done by calibrating a sequence of 2D pictures. Each 2D picture account for lens distortion and camera perspective in one particular 2D plane. With interpolation techniques it is then possible to account for lens distortion and camera perspective in the 3D Volume covered by the sequence of 2D pictures. Calibration of the instrument covers camera intrinsics, extrinics and height calibration and is done by measuring at the calibration plate at at least 3 heights with the calibration plate in a horizontal plane and at least 3 different horizontal planes.
The calibration process consists of 3 steps, recording of calibration images, generation of calibration files and the calibration. Recording of calibration images. In order to retrieve calibration images the video projector must be set up to to give a GCPS pattern. In Figure 2 (above on this page) the instrument => GCPS configuration input field points to a GCPS configuration file called gcps.conf, which holds the pattern setup. The contents of this file is shown in figure 3. Figure 3: GCPS configuration file The .conf file is structured as follows: To get the best calibration result, adjust the lens aperture/camera shutter so the pixel values in the white squares is as close to 255 as possible to get maximum contrast/dynamic in the 2D images. Show the 'live viewer' by clicking view for the camera as shown in Figure 4. Figure 4: adjusting light conditions The yellow area is the region of interest. To remove the ROI press Ctrl + z, and to add ROI press Ctrl + a. ROI is used to lower the computational time in processing the images to a 3D image. Click the 'Show pattern' checkbox to activate the projector while adjusting to get operating light conditions. Pixels with value of 255 will be indicated in pink colour to ease the camera adjustment. Note that the light conditions may vary at different heights so the calibration plate should be placed at different heights to verify settings There should not be any pink colour pixels on the calibration plate in the picture. Adjust the focus on the camera until you have achieved a good focus for the centre of the calibration volume you want to inspect. Use the zooming functionality for this purpose (Click and mark the area you want to zoom with the mouse). After applying appropriate values, you are ready to start the calibration process. Start the calibration process by launching the calibration dialog by pressing the 'Calibrate' button and a date stamped calibration dialog box will appear. Figure 5: Adding calibration planes for two cameras Press the green "+" button to add a calibration plane. Generation of calibration files Press the "generate calibration files" button to generate the calibration files. This button generates a point cloud in several files. The files must be post processed with MatLab to generate a proper calibration. Calibration Open the file c:Program Files\Tordivel AS\<Scorpion version>\GCPS\MCRInstaller.exe. This will install a MatLab runtime library. A MatLab calibration toolbox may now be run under MatLab, and will show as a MatLab Component Runtime in the list of programs on the computer. Now one must run GCPSCalibrationGui.exe. This will unpack MatLab files and place them in Scorpion 7\GCPS\GCPSCalibrationGUI_mcr. Afterwards a GUI application will open. This application is shown in Figure 6. It is important newer to close any windows generated by this application when calibrating. The console window in the back of Figure 6 must be watched the whole time, cause if you click wrong, messages will be displayed in the console window. All lot of user interaction happens through the console window during calibration. Figure 6: Matlab calibration GUI Click Select directory in the MatLab calibration GUI. (browse to <ProfileName>\Hardware\GCPS\GCPS1
\<dateStampedCatalogue>\cam1\CALIB) Click Camera Calibration in the MatLab GUI. It might be a good idea to
organize the windows so that you may see the console window the Image window and
the calibration GUI at the same time. You are now going to work your way through
defining the calibration grid for all pictures for camera 1. Figure 7: Resulting square In the console window press ENTER to confirm the pattern (the green square in
figure 7. You are now asked to identify the Calibration grid size. In case you
use a 50 mm grid, simply type 50 in the console window and confirm with ENTER. You are
then shown the identified calibration points from the picture. Make sure that
you zoom these points to verify that they are identified correctly. Press ENTER in
the console window to confirm the calibration points for this picture. Once one
calibration plane is defined, you are asked to define the calibration points for
the next calibration plane. After completing all pictures for one camera the insintric calculations for the camera will be performed. You are now asked to
specify picture for exentric calculations. This specifies which picture holds
the origin. Click enter to use the default (first picture,
first click gives the origin) PS: If multiple cameras are used, it is important
that the origin is the same point for both cameras. Remember which image number
you used for camera 1, so that the same image may be used for origin in camera
2. In the Matlab GUI window press the Height Calibration. After enter is pressed
in the console window, give in the number of pixtures that is in the horizontal
plane, without perspective. The console window will perform a lot of tasks and
write out created files and results. The last line in the console window should
be: A 3D image will display. Press the button rotate 3d. Click and drag in the picture to rotate, and verify that the e.g. 6 planes that you had as height calibration is present as shown in Figure 8. Figure 8: 3D image of calibration planes Close the application by pressing Exit in the Matlab GUI, and do Step 4 to Step 9 for the next camera. Remember to change the file path in step 4 to point to the correct camera calibration. Run GCPSCalibrationGui.exe once more for the next camera. Remember to change the file path in step 4 to point to the correct camera calibration. Open the GCPS.conf file located in the folder: Additional tips |
|