imagingtools_d72

Upload: kaffel

Post on 06-Jul-2018

215 views

Category:

Documents


0 download

TRANSCRIPT

  • 8/18/2019 ImagingTools_D72

    1/146

    LaVisionWe count on Photons

    Product-Manual

    Imaging Tools

    Item-Number(s): 1005xxx

  • 8/18/2019 ImagingTools_D72

    2/146

    Product-Manual for DaVis 7.2

    LaVision GmbH, Anna-Vandenhoeck-Ring 19, D-37081 GöttingenProduced by LaVision GmbH, GöttingenPrinted in GermanyGöttingen, June 22, 2009

    Document name: 1003012_ImagingTools_D72.tex

  • 8/18/2019 ImagingTools_D72

    3/146

    Contents

    Contents

    1 Introduction 7

    2 Calibration wizard dialog 9

    2.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 92.1.1 How to open the dialog . . . . . . . . . . . . . . . . . . 102.1.2 Concept of the wizard . . . . . . . . . . . . . . . . . . . 102.1.3 Where the calibration is stored in your project . . . . . 13

    2.2 Choose your calibration mode . . . . . . . . . . . . . . . . . . . 142.3 Walkthrough : dene scale, no image distortion . . . . . . . . . 17

    2.3.1 Step 1 : Dene experimental setup . . . . . . . . . . . . 172.3.2 Step 2 : Dene scale / no image distortion . . . . . . . . 17

    2.4 Walkthrough : 1 camera system (2D) . . . . . . . . . . . . . . . 23

    2.4.1 Step 1 : Dene experimental setup . . . . . . . . . . . . 232.4.2 Step 2 : Dene coordinate system . . . . . . . . . . . . . 232.4.3 Step 3 : Select used calibration plate . . . . . . . . . . . 252.4.4 Step 4 : Image acquisition . . . . . . . . . . . . . . . . . 262.4.5 Step 5 : Mark denition . . . . . . . . . . . . . . . . . . 282.4.6 Step 6 : Finding all marks . . . . . . . . . . . . . . . . . 292.4.7 Step 7 : Fit mapping function . . . . . . . . . . . . . . . 302.4.8 Step 8 : Evaluation of corrected images . . . . . . . . . 332.4.9 Finish calibration . . . . . . . . . . . . . . . . . . . . . . 35

    2.5 Walkthrough : 2 cameras system (independent 2D+2D) . . . . 362.5.1 Step 1 : Dene experimental setup . . . . . . . . . . . . 362.5.2 Step 2 : Dene coordinate system . . . . . . . . . . . . . 362.5.3 Step 3 : Select used calibration plate(s) . . . . . . . . . 382.5.4 Step 4 : Image acquisition . . . . . . . . . . . . . . . . . 392.5.5 Step 5 : Mark denition . . . . . . . . . . . . . . . . . . 412.5.6 Step 6 : Finding all marks . . . . . . . . . . . . . . . . . 422.5.7 Step 7 : Fit mapping function . . . . . . . . . . . . . . . 442.5.8 Step 8 : Evaluation of corrected images . . . . . . . . . 46

    2.5.9 Finish calibration . . . . . . . . . . . . . . . . . . . . . . 482.6 Walkthrough : 2 cameras system (mapped, e.g. stereo) . . . . . 50

    3

  • 8/18/2019 ImagingTools_D72

    4/146

    Contents

    2.6.1 Step 1 : Dene experimental setup . . . . . . . . . . . . 502.6.2 Step 2 : Dene coordinate system . . . . . . . . . . . . . 502.6.3 Step 3 : Select used calibration plate . . . . . . . . . . . 522.6.4 Step 4 : Image acquisition . . . . . . . . . . . . . . . . . 542.6.5 Step 5 : Mark denition . . . . . . . . . . . . . . . . . . 562.6.6 Step 6 : Finding all marks . . . . . . . . . . . . . . . . . 572.6.7 Step 7 : Fit mapping function . . . . . . . . . . . . . . . 592.6.8 Step 8 : Evaluation of corrected images . . . . . . . . . 612.6.9 Finish calibration . . . . . . . . . . . . . . . . . . . . . . 63

    2.7 Walkthrough : advanced settings . . . . . . . . . . . . . . . . . 652.7.1 Step 1 : Dene experimental setup . . . . . . . . . . . . 652.7.2 Step 2 : Dene coordinate system . . . . . . . . . . . . . 652.7.3 Step 3 : Select used calibration plates . . . . . . . . . . 672.7.4 Step 4 : Image acquisition . . . . . . . . . . . . . . . . . 692.7.5 Step 5 : Mark denition . . . . . . . . . . . . . . . . . . 712.7.6 Step 6 : Finding all marks . . . . . . . . . . . . . . . . . 722.7.7 Step 7 : Fit mapping function . . . . . . . . . . . . . . . 742.7.8 Step 8 : Evaluation of corrected images . . . . . . . . . 762.7.9 Finish calibration . . . . . . . . . . . . . . . . . . . . . . 78

    2.8 Walkthrough : dene origin, maintain calibration . . . . . . . . 802.8.1 Step 1 : Dene experimental setup . . . . . . . . . . . . 802.8.2 Step 2 : Dene origin / maintain calibration . . . . . . . 802.8.3 Finish calibration . . . . . . . . . . . . . . . . . . . . . . 82

    2.9 Stitching in a side-to-side camera setup . . . . . . . . . . . . . . 842.9.1 Preparation . . . . . . . . . . . . . . . . . . . . . . . . . 842.9.2 Calibration . . . . . . . . . . . . . . . . . . . . . . . . . 842.9.3 Stitching images . . . . . . . . . . . . . . . . . . . . . . 852.9.4 Stitching vector elds . . . . . . . . . . . . . . . . . . . 85

    2.10 Troubleshooting . . . . . . . . . . . . . . . . . . . . . . . . . . . 86

    3 Imaging Tools 893.1 Mask Denition . . . . . . . . . . . . . . . . . . . . . . . . . . . 893.2 Overlay Editor . . . . . . . . . . . . . . . . . . . . . . . . . . . 933.3 Adapt existing palette . . . . . . . . . . . . . . . . . . . . . . . 953.4 Image correction and distortion . . . . . . . . . . . . . . . . . . 983.5 X/Y Plot . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 101

    3.5.1 Window Manager . . . . . . . . . . . . . . . . . . . . . . 101

    3.5.2 Plot mode . . . . . . . . . . . . . . . . . . . . . . . . . . 1013.5.3 Y - axis . . . . . . . . . . . . . . . . . . . . . . . . . . . 103

    4

  • 8/18/2019 ImagingTools_D72

    5/146

    Contents

    3.5.4 X - axis . . . . . . . . . . . . . . . . . . . . . . . . . . . 1043.5.5 Store mode . . . . . . . . . . . . . . . . . . . . . . . . . 1043.5.6 Processing . . . . . . . . . . . . . . . . . . . . . . . . . . 105

    3.6 Strain Gauge . . . . . . . . . . . . . . . . . . . . . . . . . . . . 105

    4 About Filter Operations 1114.1 Filter Operations . . . . . . . . . . . . . . . . . . . . . . . . . . 1114.2 Smoothing Filter . . . . . . . . . . . . . . . . . . . . . . . . . . 111

    4.2.1 Smoothing 3x3 . . . . . . . . . . . . . . . . . . . . . . . 1124.2.2 Gaussian LowPass . . . . . . . . . . . . . . . . . . . . . 112

    4.2.3 Median Filter . . . . . . . . . . . . . . . . . . . . . . . . 1124.3 Sobel Filter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1134.4 Compass Filter . . . . . . . . . . . . . . . . . . . . . . . . . . . 1144.5 Laplace Filter . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1154.6 Sharpening Filter . . . . . . . . . . . . . . . . . . . . . . . . . . 1164.7 Erosion and Dilation Filter . . . . . . . . . . . . . . . . . . . . 1174.8 Fourier Transformation . . . . . . . . . . . . . . . . . . . . . . . 117

    4.8.1 Basic FFT and Inverse FFT on Images . . . . . . . . . . 1184.8.2 Fast Fourier Transform . . . . . . . . . . . . . . . . . . . 1204.8.3 FFT-Filter . . . . . . . . . . . . . . . . . . . . . . . . . 1234.8.4 Using CL to design your own lter . . . . . . . . . . . . 1244.8.5 The Art of Filter Design . . . . . . . . . . . . . . . . . . 1264.8.6 Mathematical Operation on FFTs . . . . . . . . . . . . . 1284.8.7 FFT Data Storage . . . . . . . . . . . . . . . . . . . . . 1294.8.8 Correlation and Convolution . . . . . . . . . . . . . . . 1314.8.9 Autocorrelation . . . . . . . . . . . . . . . . . . . . . . . 1324.8.10 Convolution . . . . . . . . . . . . . . . . . . . . . . . . . 1324.8.11 Cyclic versus Non-Cyclic Computations . . . . . . . . . 1334.8.12 Literature . . . . . . . . . . . . . . . . . . . . . . . . . . 135

    4.9 Nonlinear Filter . . . . . . . . . . . . . . . . . . . . . . . . . . . 1364.9.1 The Math behind NonlinearFilter . . . . . . . . . . . . . 136

    4.10 Dialog for Linear Filter . . . . . . . . . . . . . . . . . . . . . . . 1394.10.1 User Filter . . . . . . . . . . . . . . . . . . . . . . . . . 141

    Index 143

    5

  • 8/18/2019 ImagingTools_D72

    6/146

    Contents

    6

  • 8/18/2019 ImagingTools_D72

    7/146

    1 Introduction

    The Imaging Tools manual describes different dialogs that are available in thebasic DaVis software package.The biggest part of this manual concerns the perspective image correction.The Calibration wizard chapter explains how to generate a calibration. TheImage distortion and correction chapter describes how to apply the calcu-lated calibration on a single image. This functionality is also available in theBatch Processing dialog.Masks are often used to restrict the area of interest during processing. Theayare dened in the Mask dialog. Overlays are painted above a image or vecterview. The XY Plot dialog allows to extract proles from a single or multiplevector elds.The Filter operations chapter explains the different possibilities of imageprocessing using linear or non-linear lters.

    7

  • 8/18/2019 ImagingTools_D72

    8/146

    1 Introduction

    8

  • 8/18/2019 ImagingTools_D72

    9/146

    2 Calibration wizard dialog

    2.1 Introduction

    The tutorial is based on DaVis 7.1 software package (or later versions) and willguide you to use LaVision Calibration Wizard dialog.Doing a calibration is important because:

    • The results should be shown in scaled units representing the true (world)dimensions. So the image scale pixel/mm should be determined.

    • The images usually show some image distortions due to perspective pro- jection and inherent camera lens distortion. This should be corrected(image dewarping)

    • for stereo measurements an internal representation for the geometrical

    setup of both cameras relative to the sample is needed. This is deter-mined.

    Below you will nd and example of how the image correction can correct per-spective correction and lens errors:

    9

  • 8/18/2019 ImagingTools_D72

    10/146

    2 Calibration wizard dialog

    This chapter will outline the three following topics:

    • How to choose the correct calibration mode ( Dene experimental setup )

    • A walkthrough explaining all calibration wizard dialog steps for the se-lected calibration mode

    • Import, export and adaptation of an existing calibration

    2.1.1 How to open the dialog

    To open the calibration wizard dialog press the calibration button in yourprojects tool bar (see bitmap at the page margin). In Davis Classic mode youcan access the calibration wizard dialog through the menu entry Compute →Perspective calibration wizard .

    A successful calibration procedure will store all acquired data and the cali-

    bration information under the Properties folder of your project in the folderCalibration . A new calibration (imported or using the wizard) or any ad-ditional adaptations of your calibration (setting a new origin) will store thepreviously active calibration in the folder Properties/Calibration Historybefore overwriting the Properties/Calibration les. So it is possible to re-store any previous calibration done in your project : do a right mouse clickin the project manager tree view entry of the calibration in question and se-lect import calibration . The Calibration History folder can be deletedanytime to save up hard disk space, but it will not be possible to restore old

    calibrations then (right mouse click : delete). This is not possible for the activeCalibration folder in the project manager and you should never delete theCalibration folder of a project yourself.

    In classic mode a Calibration History folder is not supported and the desti-nation name and path for the Calibration has to be specied every time youchange the calibration.

    2.1.2 Concept of the wizard

    Below you see the basic outline of the calibration wizard dialog.

    10

  • 8/18/2019 ImagingTools_D72

    11/146

    2.1 Introduction

    It consists of the following elements:

    • the tool bar where you can abort the calibration process and ( close )the dialog, go to the next or the previous step and adapt the currentlyactive window (zoom factor, color mapping and color palette etc..).

    • the center dialog area on the left where all interactions are done by settingcheck boxes, entering numbers or pressing buttons.

    • the center dialog area on the right showing all necessary calibration stepsto be done in the wizard to create a new calibration. It also indicatedwhere you are right now and gives you easy access to all other steps (goingback several steps or skipping various steps you have already done).

    • below that dialog you nd the window manager with selection boxes toshow the image for a specic camera / view combination in the work-ing window or the reference window. The reference window might beswitched on and off.

    • one or two image windows on the bottom to show camera images for aspecic camera / view combination. The image shown in the working

    11

  • 8/18/2019 ImagingTools_D72

    12/146

    2 Calibration wizard dialog

    window is used for all user interactions. The reference window is onlyfor your convenience to compare two images for different cameras and/orviews and might be switched off without any drawbacks.

    Depending on the choices you make the wizard consists of two to eight steps.Like a program installation for your computer’s operation system each stepdeals only with a special topic e.g. image acquisition or setting up parametersto calculate the image dewarping function or specifying physical dimensions of the calibration plate you are using. This should focus your attention to theimportant things to be done. When you have specied all necessary selectionsand entries for the current step you may proceed to the next step pressing thenext step button depicted to the side of the page or you might go to a previousstep pressing (iteratively) the previous step button also shown aside. If stillsome information is missing to proceed to the next step the next step buttonis disabled. Please refer to the section of that step to see how to resolve this.When you are nished with all steps the next button will change to becomea nish button (see image aside)Alternatively you might just press the corresponding button of the step youwant to go to in the step list labeled You are here: . Please be aware thatthis view might not always be visible e.g. when you have a screen resolutionof less than 1280x1024 or when Davis is not maximized or at the minimizedversion of some dialog steps to make more space for the displayed images.Also be aware that the steps depicted might be named differently as the con-tents varies from calibration mode to calibration mode. Below there are fortwo examples for different calibration modes.

    Also it might not be possible to go to a later step because you may have tomake additional selections or perform some actions (e.g. clicking of referencemarks) in an earlier step. So it will take you as far down the list as possible andhalt automatically at the step in question. So pressing e.g. the last step willaccept all settings made in the rst steps until some additional information isrequired e.g. reference marks have to be specied on some images.

    12

  • 8/18/2019 ImagingTools_D72

    13/146

    2.1 Introduction

    2.1.3 Where the calibration is stored in your project

    In the project a calibration will be stored in the Properties/Calibrationfolder of your project. The hierarchical set structure is shown in the followingscreen shot:

    All views for a camera will be stored in the corresponding set camera1 . . .camera6 . In corrected a number of corrected images are stored that holdthe summed up (corrected) images of all cameras and all views (see step eightof your calibration mode for further details). Clicking on any of those setslet you review all images in the data viewer on the right side of the projectmanager.

    Click on the calibration entry itself to show the parameters of the dewarpingfunction including the RMS of the t to check the quality of the mapping

    function t. This check up is only supported for calibration sets created withDavis 7.1 !

    Every time you do a new calibration, import a new calibration or changethe current one the previously active calibration is automatically stored in theCalibration History folder and given a postx to its name which holds date andtime of the storage. All of the checking described above (clicking on camera1. . . camera6 , corrected and Calibration set itself) can be done one thosestored calibrations as well to compare different calibrations made.

    Click on the Properties folder with the right mouse button or on any Cali-bration (active or in the Calibration History ) to open a context menu (seefollowing screenshot) with the following entries:

    13

  • 8/18/2019 ImagingTools_D72

    14/146

    2 Calibration wizard dialog

    • Import a new calibration from outside the project (when chosen onProperties folder) or Import the selected in the Calibration Historyfolder and make it the active calibration (when chosen on a calibrationset in Calibration History )

    • Copy the current calibration to Calibration History

    • Export selected calibration to your hard disk outside the project

    • Delete selected calibration (not possible for the active calibration !)

    • Apply the active calibration to all recordings

    • Rename selected calibration (not possible for the active calibration !)

    2.2 Choose your calibration mode

    After you enter the dialog a number of different calibration modes can beselected: For some systems it is sufficient to specify the scaling of camerapixel / mm without taking further distortions into account. Other systemsrequire the calculation of a dewarping function to map of camera images toa undistorted world coordinate system. Stereo PIV or StrainMaster 3D forexample need the mapping of two cameras to a common coordinate system tobe able to calculate 3D component vectors.To make the dialog as easy as possible for a basic experiment and still provideall the functionality needed for complex setups you rst have to dene what

    kind of experiment you are doing. This selection will limit the dialog items /necessary steps to the ones you will need. The choices are the following:

    14

  • 8/18/2019 ImagingTools_D72

    15/146

    2.2 Choose your calibration mode

    dene origin, maintain calibration Choose this option if you have al-ready done a calibration but your are not happy with the origin of thecoordinate system. You can adapt the origin without changing the imagedewarping.

    dene scale, no image distortion Choose this option if you do not needimage dewarping because you do not have perspective projection errorsan small camera lens errors. You specify two points in the image andthe distance in mm between them or enter the pixel / mm ratio directly.In either case any previously dened image dewarping function will be

    overwritten and reset to no dewarping .1 camera ( 2D ) Choose this option if you just want to calibrate one camera

    to correct image distortions due to perspective projection and/or cameralens errors. A dewarping function is calculated based on an image of a calibration plate (which LaVision usually provides with your system)with a regular grid of marks on it.

    2 cameras (independent 2D+2D) Choose this option if you just want tocalibrate two independent cameras to correct image distortions due to

    perspective projection and/or camera lens errors. A dewarping functionis calculated based on an image of a calibration plate (which LaVision usually provides with your system) with a regular grid of marks on it.The two resulting mapping functions are not mapped onto each otherand may have different scalings pixel/mm . So choose this if you eitherlook at different places of your sample (side-to-side) or if you use differentzoom factors (nested images).

    2 cameras (mapped, e.g. stereo ) Choose this option if you just want tocalibrate two mapped cameras looking at the same place to correct imagedistortions due to perspective projection and/or camera lens errors. Adewarping function is calculated based on an image of a calibration plate(which LaVision usually provides with your system) with a regular gridof marks on it. In contrast to the previous choice the resulting mappingfunctions are mapped onto each other and have the same scalings. Imagepoints for z=0 fall exactly into the same pixel location in the dewarpedimages of both cameras. So choose this if you have a stereo system (e.g.Stereo PIV, StrainMaster 3D, SurfaceFlow) or locked signals from twodifferent cameras (e.g. PIV-LIF) that you want to combine afterward.Also the image stitching routine requires a common pixel/mm scale. tot overlapping camera images together.

    15

  • 8/18/2019 ImagingTools_D72

    16/146

    2 Calibration wizard dialog

    advanced settings Choose this option if you have a more complex experi-mental setup (e.g. if you want to calibrate more than two cameras like ina 2x Stereo PIV system or Stereo PIV-LIF experiment) or if you want anon standard calibration using cameras other than camera 1 and camera2.

    The following sections provide a step by step walkthrough for all these differentcases.

    16

  • 8/18/2019 ImagingTools_D72

    17/146

    2.3 Walkthrough : dene scale, no image distortion

    2.3 Walkthrough : dene scale, no image distortion

    You should use this option if you have (almost) no perspective or camera lensdistortions and a simple pixel/mm scaling is sufficient.

    2.3.1 Step 1 : Dene experimental setup

    To do this kind of calibration you should select the second option - see leftscreenshot below.The list of available step then indicates that the total calibration process con-sists of two steps - see right screenshot below:

    To proceed to the second step either press the next step button in the toolbar or press the second button in the list of available steps You are here:

    2.3.2 Step 2 : Dene scale / no image distortion

    When you enter the second step the dialog looks like either of the two followingscreenshots depending on whether the Maximize button has been pressed ornot — see images shown aside.

    17

  • 8/18/2019 ImagingTools_D72

    18/146

    2 Calibration wizard dialog

    The goal of the current step is to dene conveniently the pixel / mm scale of the image leaving any distortion untouched. This dialog requires two differentactions:

    1. image acquisition or import

    2. the interactive denition of the pixel / mm scale by entering numbersdirectly or by denition with mouse clicks into the image.

    Image acquisition

    For the image acquisition you can take a new image directly from the camerasthat are currently connected to your system. To do this press the Take imageor the Grab button in the dialog.This takes one image of the cameras that are selected in the general deviceinterface GDI to its right (only visible in the minimized images, maximizeddialog setting - see above). In the GDI you also set up the exposure times,external trigger, (laser) light sources, step motor positions and other hardwaresettings important to your image acquisition.Changing the average value in the text box on the left to any other value than

    1 will result in the averaging of the specied number of images to improveimage quality due to poor lighting conditions. Please make sure that neitherthe camera nor the calibration sample is moving !

    Import

    Another option is to import one or more previously recorded les from yourhard disk by pressing the Load button. You can either load single images orwhole (Davis) sets. This opens a modal dialog that shows a preview of theimage in question (see screenshot below).

    18

  • 8/18/2019 ImagingTools_D72

    19/146

    2.3 Walkthrough : dene scale, no image distortion

    Here you specify which of the image frames you want to import. For imagesoriginating from Davis you can leave the check box that follows unchecked andread out the default camera number that is stored in each image (and shownfor the current image). For imported bitmaps ( .bmp or .tif les) you haveto specify to which camera the image corresponds. If want to overwrite thestored camera number you can also specify another (wrong) camera number.The selection box will turn red (instead of green) to warn you that the programrecognized a discrepancy - so you should really know what you are doing.Furthermore you need to specify if you want to append the selected le /les to your selection of images, replace previously imported frames for the

    selected camera number or start all over deleting any previously present imagesand replace all images with the selected image(s) by the new selection.

    Denition of pixel/mm scaling

    To dene the pixel/mm scale you have two options: either you scale the im-age interactively using the mouse (see left button shown below) or you enternumbers directly to dene the scale (see right button shown below).

    After clicking on the left button in the Instruction group instructions aregiven what to do: click on a rst then on a second reference point in theimage. After doing so the following dialog will open:

    The dialog consists of three parts:

    • the top group box shows the clicked pixel coordinates.

    • the center group box let you choose if you are going to specify just hori-zontal the distance between the two points, just the vertical distance orthe (diagonal) point to point distance in mm .

    19

  • 8/18/2019 ImagingTools_D72

    20/146

    2 Calibration wizard dialog

    • the bottom group box contains the text eld to enter the (known) dis-tance in mm .

    After pressing the return key or OK the pixel / mm scaling is calculated andany present dewarping function is reset to unity (no dewarping).In any case the rst point you clicked will become the new origin of the coor-dinate system or (if you happen to do so in the Options box) the speciedreference coordinate point.If on the other hand you select the right Scale button a dialog appears whereyou can dene the scaling directly:

    Either you already know the pixel / mm scale or you give the position of tworeference points and the point to point distance in mm between them.Again after accepting the new scale any previously dened image dewarpingfunction will be reset to no dewarping .

    Denition of new origin / reference point

    If you are happy with the scaling but not with the origin after such a scaledenition, you can redene a new origin for the (already scaled) image or set

    the value of any other reference point (not necessarily the origin).

    Clicking into the image interactively using the mouse is done by clicking on theleft button shown above and following the instructions: click into the image tospecify the new origin / reference point.Or you can enter numbers directly to dene the position and coordinates inthe image of the new origin / reference point by clicking on the right buttonshown above. This opens the dialog where you specify a pixel position and the(new) corresponding mm coordinates.

    20

  • 8/18/2019 ImagingTools_D72

    21/146

    2.3 Walkthrough : dene scale, no image distortion

    After either of the two procedures the pixel / mm scaling is maintained andonly the new origin / reference point reset to the new value. Any presentdewarping function is set to unity (no dewarping).

    Reset calibration to pixel scaling

    To just switch back to no scaling at all and delete all previous settings pressthe Reset button. This will reset the pixel/mm scaling as well as any presentdewarping function and sets the origin to the upper left (default).

    When you are content with the achieved calibration press the Finish buttonin the tool bar (see image aside) to accept the calibration (image dewarpingfunction + pixel/mm scaling) which might then be written to your project.The following dialog opens :

    • Select the rst choice to open a new project with the new calibrationleaving the current project untouched.

    • Select the second option to overwrite the calibration of the currently ac-tive project - be aware that previously recorded images and their derivedresults might not be consistent with results that will be calculated withthe new calibration.

    21

  • 8/18/2019 ImagingTools_D72

    22/146

    2 Calibration wizard dialog

    • Select the third choice to overwrite the calibration of the currently ac-tive project and scale all previous recordings present in the root level of your project to be consistent with the new calibration - be aware that re-sults that have been derived before the changed calibration might not beconsistent with results that will be calculated with the new calibration.

    • Select the fourth choice if you want to discard everything you have done inthe calibration wizard. Then the old calibration active when you enteredthe calibration wizard will be restored. Note that you might have to dothe whole calibration procedure again.

    The calibration wizard dialog will close and you return to the project manager.

    22

  • 8/18/2019 ImagingTools_D72

    23/146

    2.4 Walkthrough : 1 camera system (2D)

    2.4 Walkthrough : 1 camera system (2D)

    2.4.1 Step 1 : Dene experimental setup

    To do this kind of calibration you should select the third option - see leftscreenshot below.The list of available step then indicates that the total calibration process con-sists of eight steps - see right screenshot below:

    To proceed to the second step either press the next step button in the toolbar or press the second button in the list of available steps You are here:

    2.4.2 Step 2 : Dene coordinate systemWhen you enter the second step the dialog looks like the following screenshot:

    In this step you dene your coordinate system and the number of views youprovide for your calibration plate in different places to calculate the imagedewarping function.On the right side in Coordinate system axis orientation you select if youwant a right handed coordinate system (z-axis orientated toward you whenyou look at the images) or a left handed coordinate system (z-axis pointingaway from you).

    23

  • 8/18/2019 ImagingTools_D72

    24/146

    2 Calibration wizard dialog

    On the left side you specify the number of views you will provide for thecamera dened in this coordinate system. Although in general one view isenough to nd a dewarping function to correct all distortions in your cameraimages providing several views makes the result more accurate. In any casethe x −y−plane (and hence the z-axis ) is always dened by the orientationof calibration plate of the rst view.In case you want to provide several views you have to specify if they arecoplanar (that is aligned in parallel among them) and if they are placed atequidistant z- positions. Please be aware that some kind of mapping functionsrequire coplanar views. In case you have equidistant views you have to specify

    the distance d z between two neighbor views.Below you will nd a table with the required and recommended number of views for your experiment. Depending on the combination of the dewarpingmapping function type, your calibration plate type (2D or 3D) and the numberof mapped cameras in your coordinate system you have different limitationsand recommendations:

    System type Mapping model Required Recommendedfor dewarping of views of views

    1 camera polynomialor pinhole

    1 1

    Limitations from your experiment might force you to make special choices:

    • You might be forced to use a 2D calibration plate because no 3D cali-bration plate is available (e.g. for a microscope).

    • Looking through a non planar glass window which adds non radial dis-tortions to your images might force you to use polynomial mapping asthe pinhole model does not work well in those conditions.

    The measurement itself in most Davis packages implies that the sample islocated at the z = 0 mm position. If you cannot place the calibration plate atthat position you can perform the calibration in front or behind that position.This can be done only for a pinhole calibration or for a polynomial calibrationwith two or more coplanar views. To use this feature please check the optionrst view not at origin and specify the z-position of the rst view. Thecalibration process will then take this offset into account. In any case thecoordinate system is set up so that the calibration plate position of the rstview denes the x

    −y-plane orientation (and hence the z-axis ). To proceed

    to the third step either press the next step button in the tool bar or pressthe third button in the list of available steps You are here:

    24

  • 8/18/2019 ImagingTools_D72

    25/146

    2.4 Walkthrough : 1 camera system (2D)

    2.4.3 Step 3 : Select used calibration plate

    When you enter the third step the dialog looks like the following screenshot:

    In this step you specify which calibration plate you are using. If you use acalibration plate from LaVision it is enough to select the plate type labeledon the plate e.g. Type 10. This will set all plate parameters to the correctvalues (see rst screenshot above).

    In case you want to use your own calibration plate you have to provide a numberof parameters (see second screenshot above): On the left side in Calibrationplate used you dene the calibration type:

    • calibration plate contains marks in form of crosses or dots . Both blackmarks on white background and white marks on black background aresupported and identied automatically.

    • calibration plate has only 1 plane = type 2D or is a two level plate =type 3D .

    On the right side in Calibration plate parameters you dene several of itsparameters (dimension and sizes):

    25

  • 8/18/2019 ImagingTools_D72

    26/146

    2 Calibration wizard dialog

    • distance between neighbor marks in one plane in mm

    • size of a single marks in mm

    • distance dz from plane to plane in mm (for 3D plates only)

    To proceed to the fourth step either press the next step button in the toolbar or press the fourth button in the list of available steps You are here:

    2.4.4 Step 4 : Image acquisition

    When you enter the fourth step the dialog looks like either of the two followingscreenshots depending on whether the Maximize button has been pressed ornot — see images shown aside.

    In the fourth step you acquire the necessary images of the calibration plate forall cameras and all views - only then you are allowed to proceed to the nextsteps.For the image acquisition you can take a new image directly from the camerasthat are currently connected to your system. To do this press the Take imageor the Grab button in the dialog.This takes one image (or in case of Grab continuously images until you pressthe stop button in the toolbar or hit the ESC key) of the cameras that areselected in the dialog for the specied view (check box on). For views thatalready contain non empty images the selection box entries are marked with(ok) . If a camera contains valid images for all views the selection box for theview selection becomes green. If all view entries of all coordinate systems aregreen then the next step button will be enabled. Pressing the button withthe red cross will delete the camera image of the selected view.

    26

  • 8/18/2019 ImagingTools_D72

    27/146

    2.4 Walkthrough : 1 camera system (2D)

    In the general device interface GDI to its right (only visible in the min-imized images, maximized dialog setting - see above) you can set up the ex-posure times, external trigger, (laser) light sources, step motor positions andother hardware settings important to your image acquisition.Changing the average value in the text box on the left to any other value than1 will result in the averaging of the specied number of images to improveimage quality due to poor lighting conditions. Please make sure that neitherthe camera nor the calibration sample is moving !Another option is to import one or more previously recorded les from yourhard disk by pressing the Load button. You can either load single images or

    whole (Davis) sets. This opens a modal dialog that shows a preview of theimage in question (see screenshot below).

    Here you specify which of the image frames you want to import. For imagesoriginating from Davis you can leave the check box that follows unchecked andread out the default camera number that is stored in each image (and shownfor the current image). For imported bitmaps ( .bmp or .tif les) you haveto specify to which camera the image corresponds. If want to overwrite thestored camera number you can also specify another (wrong) camera number.The selection box will turn red (instead of green) to warn you that the programrecognized a discrepancy - so you should really know what you are doing.In case you want to load several images at once from an image set you needto specify which images of a set you want to import (start and end imagenumber and an increment) and specify the start view to which the images areadded. If during the import more than one image for a camera is found it willautomatically add it to the next view. If all views hold valid camera imagesthe import stops automatically.This is a the recommended way to import old calibration images from an oldcalibration.set created by Davis 6.2 or Davis 7.0 into the new format.

    27

  • 8/18/2019 ImagingTools_D72

    28/146

    2 Calibration wizard dialog

    To proceed to the fth step either press the next step button in the tool baror press the fth button in the list of available steps You are here:

    2.4.5 Step 5 : Mark denition

    When you enter the fth step the dialog looks like the following screenshot:

    In the fth step you dene three start marks for the mark search. To start theprocess you can either

    • click All cameras/views which automatically will show you the imagesfor all camera / view combinations one after another to (re)dene thestart marks for all those combination or

    • you press Shown camera/views to (re)dene the start marks in thecurrently visible image in the working window or

    • you press a table entry in the table to the right corresponding to acamera / view combination to (re)dene the start marks for that combi-nation.

    When you do any of this instructions will appear in the Instructions eld of the dialog to guide you to the clicking process. First you have to click a startreference mark which must be the same physical mark in all cameras and allviews ! Then you are asked to click the neighbor mark to the right (to theleft if the camera is looking onto the backside of the calibration plate) and atlast the mark to the top of the rst mark you selected. Important: pleasemake sure that the marks you select are located on the front plane of a 3Dcalibration plate ! If you clicked all 3 marks successfully the table entry forthat camera/view combination will show an okay .You may stop the clicking process any time pressing the Stop button in thetool bar or by pressing the ESC key on your keyboard which will abort allfurther actions.If you have dened start marks successfully on all images (all table entries showan okay ) you may proceed to the next step. To proceed to the sixth step

    28

  • 8/18/2019 ImagingTools_D72

    29/146

    2.4 Walkthrough : 1 camera system (2D)

    either press the next step button in the tool bar or press the sixth button inthe list of available steps You are here:

    2.4.6 Step 6 : Finding all marks

    When you enter the sixth step the dialog looks like the following screenshot:

    In the sixth step you let the program nd all other marks for you. This isan automatic process and requires no user interaction. Just press the buttonStart search . Depending on the image quality and the speed of your computerthis might require several minutes, but you should see a screen update oncein a while. Usually it is enough if 20-30 marks could be identied. Please beaware that due to the nature of the dewarping functions for a polynomial tmarks have to be found everywhere in the image where you want to deriveresult later, for pinhole calibration it is enough if only parts of the image arecovered with found marks.In case you are not satised with the mark search quality you can enhance thesearch changing some parameters. First you should check if you selected thecorrect calibration plate type (2D or 3D) and the correct mark type (crossesor dots).If you think that some marks have not been found that should not pose aproblem for the mark search process you can adapt the search parameters inthe dialog accessible by pressing the button Mark search parameter... .

    29

  • 8/18/2019 ImagingTools_D72

    30/146

    2 Calibration wizard dialog

    In this dialog (see screenshot above) you can choose in use preset valuesyour impression of the image quality and ask to nd more or less marks withthe slider. On these assumptions the general search parameters are changed.In advanced settings you might change these values one by one althoughthis is only advisable for expert users as there are many dependences amongsome parameters.

    If you think that too many marks have been found e.g. due to reexes outsidethe calibration plate you can eliminate them one by one pressing the buttonDelete single mark where you can click iteratively on all marks that youthink should be deleted from the list of found marks (might take a while).Just click repeatedly very close to the center of a found mark and wait to seethe mark disappear from the display. Then either go on clicking the next markor press the Space bar to end this procedure.

    Another way to limit the mark search is to limit the search are in the rstplace. You add a masked area by pressing the red or the blue button polygonbutton of Limit search using a mask . In the Status text there are someinstructions how to proceed. You can click various times to dene the anglesof a polygon. Pressing the key d deletes the last point(s) repeatedly, q aborts

    the whole process and c closes the polygon and accepts the mask. Using theblue button enables all pixels inside the polygon masking out all pixels outside,the red polygon does it the other way round. With the button showing the redcross you delete the mask from the current camera / view selection.

    Please note that a mask is dened for the currently visible image only and thatyou can use different masks for images of other camera / view combinations.

    In the table to the right the number of marks found in each image is shown.In case the calibration plate has 2 planes (3D plate) the number of marks foreach plane is shown separately with the plus sign ( + ). When marks have beenfound in all images the next button is enabled and you may proceed to thenext step. To proceed to the seventh step either press the next stepbutton in the tool bar or press the seventh button in the list of available stepsYou are here:

    2.4.7 Step 7 : Fit mapping function

    When you enter the seventh step the dialog looks like the following screenshot:

    30

  • 8/18/2019 ImagingTools_D72

    31/146

    2.4 Walkthrough : 1 camera system (2D)

    In the seventh step you t the dewarping mapping function to the marksfound in each image. You can select between pinhole calibration and polygon

    calibration. Please note that in case you have more than one view and theseare not coplanar or equidistant the polynomial calibration is not available.To start the calculation process press the button Start calibration . Thecalibration process is automatic and requires no user interaction. The averagedeviation of the dewarped mark positions to the ideal regular grid is shown inthe table to the right for each image. A value lower than 1 pixel is good, a valuelower than 0.3 pixel is excellent, Values higher than 2 pixel are questionable.Please check if you clicked the front plane of a 3D calibration plate as thisis a common source of error. You can check the result of the t in detail by

    pressing the button Show t parameter... which opens either of the twofollowing dialogs depending on the kind of mapping function you selected.

    In both cases you can check the size of the corrected image and the RMSof the t .In case of the polynomial you can check the coefficients of the mapping func-tion.In case of the pinhole model you can check the physical parameters that de-scribe your model and compare them to the real world parameters of yourexperiment: focal length of your camera lens, distance T z from camera to cal-ibration plate. Rotation Rx and Ry around X − and Y −axis indicating theangle at which the cameras see the calibration plate. All those parameters

    31

  • 8/18/2019 ImagingTools_D72

    32/146

    2 Calibration wizard dialog

    should coincide with your experimental setup fairly well. The rst and secondradial distortion factors are the extra distortion that are produced by that termat a distance of 500 pixel to the center of distortion. This center of distortionis called the principle point as is located where the optical axis of the cameralens meet the CCD chip of your camera — if you use a Scheimpug adapterthis might not be the center center of your CCD chip! The radial distortioncontribution is usually 1 pixel or below — although this strongly depends onthe camera lens you use.If you are not happy with the t you can adapt some general parameters of the t by pressing the button Fit parameters (pinhole model t only !). It

    will open the following dialog:

    Here you can select which parameters should be tted and which are just setto xed (known) values. Switching to default t will reset all parameters totheir standard values and should work for most purposes (xing the principlepoint to the center of the camera CCD chip and using squared pixels, ttingthe rest — starting the t with focal length of 50 mm and distance T z of 500 mm ).If you are not happy with this preselection or if you are using a Scheimpugadapter (and the assumption that the principle point is at the center of theCCD chip is not true) you should switch to expert t . Here you specify forall cameras used in that coordinate system if you want to t the focal lengthor use a xed value. In the rst case the value is used as a start value for thet: the closer you can guess the focal length the easier it will be for the ttingalgorithm.

    32

  • 8/18/2019 ImagingTools_D72

    33/146

    2.4 Walkthrough : 1 camera system (2D)

    Furthermore it will help the algorithm if you can provide the rough distance of camera to calibration plate in mm along the viewing direction of the camera.At last you specify if your cameras are using a Scheimpug adapter on yourcameras.If your cameras have non square pixels you can check that option , but this isNEVER the case with the cameras LaVision provides and should be switchedon only if you imported images from other cameras. There is the rare casewhere additional distortions looking through a glass window can be correctedby switching on this option. If in doubt you may contact LaVision to adviseyou. Usually additional distortions by the optical access to your experiment

    strongly suggests to use the polynomial t.Then you may switch between various levels of radial distortions which willswitch on the t of rst and second order terms describing radial distortions.If you have done the t for all cameras (and coordinate systems) you mayproceed to the last step. To proceed to the last step either press the nextstep button in the tool bar or press the last button in the list of available stepsYou are here:

    2.4.8 Step 8 : Evaluation of corrected images

    When you enter the eighth step the dialog looks like the following screenshot:

    In this last step you can evaluate visually your t results. For that purpose allcamera / view combinations are dewarped - for 3D calibration plates even forboth z positions of the upper and the lower plane. Then also images are createdwhere the corrected images of all cameras and all views of a coordinate systemare overlayed (summed up) to see if indeed all corrected images coincide. Inaddition a grid of the ideal regular grid of marks is overlayed. Here you cancheck:

    • in single camera images if the marks fall to the ideal regular grid

    • if the marks in the summed up images of different cameras (and oneview) coincide for z=0 mm position

    33

  • 8/18/2019 ImagingTools_D72

    34/146

    2 Calibration wizard dialog

    • if the marks in the summed up images of different views for one cameracoincide for z=0 mm position

    • if the marks in the summed up images of all views for all camera coincidefor z=0 mm position

    In case you use a 3D calibration plate you can check furthermore:

    • all of the above for the position of the second plane in case you use a 3Dcalibration plate

    • in case you use more than one camera you can check by how much awrong z position will move the corrected images apart. In detail: cor-recting for the position of the upper plane ( z=0) to make the marks of the upper plane coincide will produce ghost images for the marks in thelower plane (e.g. at z=1 mm) due to the perspective parallax. This givesyou a direct information of the 3D resolution of a stereoscopic system.Let’s say the ghost images are 6 pixel apart. Then the vector calculation(which can resolve 0.05 pixel shifts on the CCD images) will detect atrue shift of 1 mm /6 pixel = x mm / 0.05 pixel

    ⇔ x = ca. 8 µm

    in z-direction in this experiment. You can increase this resolution byincreasing the angular separation of your system.

    Changing the selection boxed for camera, view and plane (if you have used a3D calibration plate) shows the corresponding corrected images for evaluation.The table Fit results to the right summarizes the most important t param-eter. For a more detailed overview of the t result you can click the buttonShow all t parameter... which opens either of the two following dialogswhich are described in detail in the section above - so please refer to the de-scriptions in step 7.

    34

  • 8/18/2019 ImagingTools_D72

    35/146

    2.4 Walkthrough : 1 camera system (2D)

    2.4.9 Finish calibration

    When you are content with the achieved calibration press the Finish buttonin the tool bar (see image aside) to accept the calibration (image dewarpingfunction + pixel/mm scaling) which might then be written to your project.The following dialog opens :

    • Select the rst choice to open a new project with the new calibrationleaving the current project untouched.

    • Select the second option to overwrite the calibration of the currently ac-tive project - be aware that previously recorded images and their derivedresults might not be consistent with results that will be calculated withthe new calibration.

    • Select the third choice to overwrite the calibration of the currently ac-tive project and scale all previous recordings present in the root level of your project to be consistent with the new calibration - be aware that re-sults that have been derived before the changed calibration might not beconsistent with results that will be calculated with the new calibration.

    • Select the fourth choice if you want to discard everything you have done inthe calibration wizard. Then the old calibration active when you enteredthe calibration wizard will be restored. Note that you might have to dothe whole calibration procedure again.

    The calibration wizard dialog will close and you return to the project manager.

    35

  • 8/18/2019 ImagingTools_D72

    36/146

    2 Calibration wizard dialog

    2.5 Walkthrough : 2 cameras system (independent2D+2D)

    2.5.1 Step 1 : Dene experimental setup

    To do this kind of calibration you should select the fourth option - see leftscreenshot below.The list of available step then indicates that the total calibration process con-sists of eight steps - see right screenshot below:

    To proceed to the second step either press the next step button in the toolbar or press the second button in the list of available steps You are here:

    2.5.2 Step 2 : Dene coordinate system

    When you enter the second step the dialog looks like the following screenshot:

    In this step you dene your coordinate system and the number of views youprovide for your calibration plate in different places to calculate the imagedewarping function.You have to do this for all coordinate systems. You change to set up anothercoordinate system clicking on the card item labeled Coordinate system 1to Coordinate system 6 depending on what coordinate systems are used.

    36

  • 8/18/2019 ImagingTools_D72

    37/146

    2.5 Walkthrough : 2 cameras system (independent 2D+2D)

    All settings are made independently so you do not have to dene them all thesame.On the right side in Coordinate system axis orientation you select if youwant a right handed coordinate system (z-axis orientated toward you whenyou look at the images) or a left handed coordinate system (z-axis pointingaway from you).On the left side you specify the number of views you will provide for thecamera dened in this coordinate system. Although in general one view isenough to nd a dewarping function to correct all distortions in your cameraimages providing several views makes the result more accurate. In any case

    the x −y−plane (and hence the z-axis ) is always dened by the orientationof calibration plate of the rst view.In case you want to provide several views you have to specify if they arecoplanar (that is aligned in parallel among them) and if they are placed atequidistant z- positions. Please be aware that some kind of mapping functionsrequire coplanar views. In case you have equidistant views you have to specifythe distance d z between two neighbor views.Below you will nd a table with the required and recommended number of views for your experiment. Depending on the combination of the dewarping

    mapping function type, your calibration plate type (2D or 3D) and the numberof mapped cameras in your coordinate system you have different limitationsand recommendations:

    System type Mapping model Required Recommendedfor dewarping of views of views

    cameras not mapped(independent 2D)

    polynomialor pinhole

    1 1

    Limitations from your experiment might force you to make special choices:• You might be forced to use a 2D calibration plate because no 3D cali-

    bration plate is available (e.g. for a microscope).

    • Looking through a non planar glass window which adds non radial dis-tortions to your images might force you to use polynomial mapping asthe pinhole model does not work well in those conditions.

    The measurement itself in most Davis packages implies that the sample islocated at the z = 0 mm position. If you cannot place the calibration plate atthat position you can perform the calibration in front or behind that position.This can be done only for a pinhole calibration or for a polynomial calibration

    37

  • 8/18/2019 ImagingTools_D72

    38/146

    2 Calibration wizard dialog

    with two or more coplanar views. To use this feature please check the optionrst view not at origin and specify the z-position of the rst view. Thecalibration process will then take this offset into account. In any case thecoordinate system is set up so that the calibration plate position of the rstview denes the x −y-plane orientation (and hence the z-axis ). To proceedto the third step either press the next step button in the tool bar or pressthe third button in the list of available steps You are here:

    2.5.3 Step 3 : Select used calibration plate(s)

    When you enter the third step the dialog looks like the following screenshot:

    In this step you specify which calibration plate you are using. If you use acalibration plate from LaVision it is enough to select the plate type labeledon the plate e.g. Type 10. This will set all plate parameters to the correctvalues (see rst screenshot above).In case you want to use your own calibration plate you have to provide a numberof parameters (see second screenshot above): On the left side in Calibrationplate used you dene the calibration type:

    38

  • 8/18/2019 ImagingTools_D72

    39/146

    2.5 Walkthrough : 2 cameras system (independent 2D+2D)

    • calibration plate contains marks in form of crosses or dots . Both blackmarks on white background and white marks on black background aresupported and identied automatically.

    • calibration plate has only 1 plane = type 2D or is a two level plate =type 3D .

    On the right side in Calibration plate parameters you dene several of itsparameters (dimension and sizes):

    • distance between neighbor marks in one plane in mm

    • size of a single marks in mm

    • distance dz from plane to plane in mm (for 3D plates only)

    To proceed to the fourth step either press the next step button in the toolbar or press the fourth button in the list of available steps You are here:

    2.5.4 Step 4 : Image acquisition

    When you enter the fourth step the dialog looks like either of the two followingscreenshots depending on whether the Maximize button has been pressed ornot — see images shown aside.

    In the fourth step you acquire the necessary images of the calibration plate forall cameras and all views - only then you are allowed to proceed to the nextsteps.For the image acquisition you can take a new image directly from the camerasthat are currently connected to your system. To do this press the Take imageor the Grab button in the dialog.

    39

  • 8/18/2019 ImagingTools_D72

    40/146

    2 Calibration wizard dialog

    This takes one image (or in case of Grab continuously images until you pressthe stop button in the toolbar or hit the ESC key) of the cameras that areselected in the dialog for the specied view (check box on). For views thatalready contain non empty images the selection box entries are marked with(ok) . If a camera contains valid images for all views the selection box for theview selection becomes green. If all view entries of all coordinate systems aregreen then the next step button will be enabled. Pressing the button withthe red cross will delete the camera image of the selected view.In the general device interface GDI to its right (only visible in the min-imized images, maximized dialog setting - see above) you can set up the ex-

    posure times, external trigger, (laser) light sources, step motor positions andother hardware settings important to your image acquisition.Changing the average value in the text box on the left to any other value than1 will result in the averaging of the specied number of images to improveimage quality due to poor lighting conditions. Please make sure that neitherthe camera nor the calibration sample is moving !Another option is to import one or more previously recorded les from yourhard disk by pressing the Load button. You can either load single images orwhole (Davis) sets. This opens a modal dialog that shows a preview of the

    image in question (see screenshot below).

    Here you specify which of the image frames you want to import. For imagesoriginating from Davis you can leave the check box that follows unchecked andread out the default camera number that is stored in each image (and shownfor the current image). For imported bitmaps ( .bmp or .tif les) you haveto specify to which camera the image corresponds. If want to overwrite thestored camera number you can also specify another (wrong) camera number.The selection box will turn red (instead of green) to warn you that the programrecognized a discrepancy - so you should really know what you are doing.

    40

  • 8/18/2019 ImagingTools_D72

    41/146

    2.5 Walkthrough : 2 cameras system (independent 2D+2D)

    In case you want to load several images at once from an image set you needto specify which images of a set you want to import (start and end imagenumber and an increment) and specify the start view to which the images areadded. If during the import more than one image for a camera is found it willautomatically add it to the next view. If all views hold valid camera imagesthe import stops automatically.This is a the recommended way to import old calibration images from an oldcalibration.set created by Davis 6.2 or Davis 7.0 into the new format.To proceed to the fth step either press the next step button in the tool baror press the fth button in the list of available steps You are here:

    2.5.5 Step 5 : Mark denition

    When you enter the fth step the dialog looks like the following screenshot:

    In the fth step you dene three start marks for the mark search. To start theprocess you can either

    • click All cameras/views which automatically will show you the imagesfor all camera / view combinations one after another to (re)dene thestart marks for all those combination or

    • you press Shown camera/views to (re)dene the start marks in thecurrently visible image in the working window or

    • you press a table entry in the table to the right corresponding to acamera / view combination to (re)dene the start marks for that combi-nation.

    When you do any of this instructions will appear in the Instructions eld of the dialog to guide you to the clicking process. First you have to click a startreference mark which must be the same physical mark in all cameras and allviews ! Then you are asked to click the neighbor mark to the right (to theleft if the camera is looking onto the backside of the calibration plate) and atlast the mark to the top of the rst mark you selected. Important: please

    41

  • 8/18/2019 ImagingTools_D72

    42/146

    2 Calibration wizard dialog

    make sure that the marks you select are located on the front plane of a 3Dcalibration plate ! If you clicked all 3 marks successfully the table entry forthat camera/view combination will show an okay .You may stop the clicking process any time pressing the Stop button in thetool bar or by pressing the ESC key on your keyboard which will abort allfurther actions.If you have dened start marks successfully on all images (all table entries showan okay ) you may proceed to the next step. To proceed to the sixth stepeither press the next step button in the tool bar or press the sixth button inthe list of available steps You are here:

    2.5.6 Step 6 : Finding all marks

    When you enter the sixth step the dialog looks like the following screenshot:

    In the sixth step you let the program nd all other marks for you. This isan automatic process and requires no user interaction. Just press the buttonStart search . Depending on the image quality and the speed of your computerthis might require several minutes, but you should see a screen update oncein a while. Usually it is enough if 20-30 marks could be identied. Please beaware that due to the nature of the dewarping functions for a polynomial tmarks have to be found everywhere in the image where you want to deriveresult later, for pinhole calibration it is enough if only parts of the image arecovered with found marks.In case you are not satised with the mark search quality you can enhance thesearch changing some parameters. First you should check if you selected thecorrect calibration plate type (2D or 3D) and the correct mark type (crossesor dots).If you think that some marks have not been found that should not pose aproblem for the mark search process you can adapt the search parameters inthe dialog accessible by pressing the button Mark search parameter... .

    42

  • 8/18/2019 ImagingTools_D72

    43/146

    2.5 Walkthrough : 2 cameras system (independent 2D+2D)

    In this dialog (see screenshot above) you can choose in use preset valuesyour impression of the image quality and ask to nd more or less marks withthe slider. On these assumptions the general search parameters are changed.In advanced settings you might change these values one by one althoughthis is only advisable for expert users as there are many dependences amongsome parameters.

    If you think that too many marks have been found e.g. due to reexes outsidethe calibration plate you can eliminate them one by one pressing the buttonDelete single mark where you can click iteratively on all marks that you

    think should be deleted from the list of found marks (might take a while).Just click repeatedly very close to the center of a found mark and wait to seethe mark disappear from the display. Then either go on clicking the next markor press the Space bar to end this procedure.

    Another way to limit the mark search is to limit the search are in the rstplace. You add a masked area by pressing the red or the blue button polygonbutton of Limit search using a mask . In the Status text there are someinstructions how to proceed. You can click various times to dene the anglesof a polygon. Pressing the key d deletes the last point(s) repeatedly, q aborts

    the whole process and c closes the polygon and accepts the mask. Using theblue button enables all pixels inside the polygon masking out all pixels outside,the red polygon does it the other way round. With the button showing the redcross you delete the mask from the current camera / view selection.

    Please note that a mask is dened for the currently visible image only and thatyou can use different masks for images of other camera / view combinations.

    In the table to the right the number of marks found in each image is shown.In case the calibration plate has 2 planes (3D plate) the number of marks foreach plane is shown separately with the plus sign ( + ). When marks have beenfound in all images the next button is enabled and you may proceed to thenext step. To proceed to the seventh step either press the next step

    43

  • 8/18/2019 ImagingTools_D72

    44/146

    2 Calibration wizard dialog

    button in the tool bar or press the seventh button in the list of available stepsYou are here:

    2.5.7 Step 7 : Fit mapping function

    When you enter the seventh step the dialog looks like the following screenshot:

    In the seventh step you t the dewarping mapping function to the marksfound in each image. You can select between pinhole calibration and polygoncalibration. Please note that in case you have more than one view and theseare not coplanar or equidistant the polynomial calibration is not available.

    To start the calculation process press the button Start calibration . Thecalibration process is automatic and requires no user interaction. The averagedeviation of the dewarped mark positions to the ideal regular grid is shown inthe table to the right for each image. A value lower than 1 pixel is good, a valuelower than 0.3 pixel is excellent, Values higher than 2 pixel are questionable.Please check if you clicked the front plane of a 3D calibration plate as thisis a common source of error. You can check the result of the t in detail bypressing the button Show t parameter... which opens either of the twofollowing dialogs depending on the kind of mapping function you selected.

    In both cases you can check the size of the corrected image and the RMSof the t .

    44

  • 8/18/2019 ImagingTools_D72

    45/146

    2.5 Walkthrough : 2 cameras system (independent 2D+2D)

    In case of the polynomial you can check the coefficients of the mapping func-tion.In case of the pinhole model you can check the physical parameters that de-scribe your model and compare them to the real world parameters of yourexperiment: focal length of your camera lens, distance T z from camera to cal-ibration plate. Rotation Rx and Ry around X − and Y −axis indicating theangle at which the cameras see the calibration plate. All those parametersshould coincide with your experimental setup fairly well. The rst and secondradial distortion factors are the extra distortion that are produced by that termat a distance of 500 pixel to the center of distortion. This center of distortion

    is called the principle point as is located where the optical axis of the cameralens meet the CCD chip of your camera — if you use a Scheimpug adapterthis might not be the center center of your CCD chip! The radial distortioncontribution is usually 1 pixel or below — although this strongly depends onthe camera lens you use.If you are not happy with the t you can adapt some general parameters of the t by pressing the button Fit parameters (pinhole model t only !). Itwill open the following dialog:

    Here you can select which parameters should be tted and which are just setto xed (known) values. Switching to default t will reset all parameters totheir standard values and should work for most purposes (xing the principlepoint to the center of the camera CCD chip and using squared pixels, ttingthe rest — starting the t with focal length of 50 mm and distance T z of 500 mm ).

    45

  • 8/18/2019 ImagingTools_D72

    46/146

    2 Calibration wizard dialog

    If you are not happy with this preselection or if you are using a Scheimpugadapter (and the assumption that the principle point is at the center of theCCD chip is not true) you should switch to expert t . Here you specify forall cameras used in that coordinate system if you want to t the focal lengthor use a xed value. In the rst case the value is used as a start value for thet: the closer you can guess the focal length the easier it will be for the ttingalgorithm.Furthermore it will help the algorithm if you can provide the rough distance of camera to calibration plate in mm along the viewing direction of the camera.At last you specify if your cameras are using a Scheimpug adapter on your

    cameras.If your cameras have non square pixels you can check that option , but this isNEVER the case with the cameras LaVision provides and should be switchedon only if you imported images from other cameras. There is the rare casewhere additional distortions looking through a glass window can be correctedby switching on this option. If in doubt you may contact LaVision to adviseyou. Usually additional distortions by the optical access to your experimentstrongly suggests to use the polynomial t.Then you may switch between various levels of radial distortions which will

    switch on the t of rst and second order terms describing radial distortions.If you have done the t for all cameras (and coordinate systems) you mayproceed to the last step. To proceed to the last step either press the nextstep button in the tool bar or press the last button in the list of available stepsYou are here:

    2.5.8 Step 8 : Evaluation of corrected images

    When you enter the eighth step the dialog looks like the following screenshot:

    In this last step you can evaluate visually your t results. For that purpose allcamera / view combinations are dewarped - for 3D calibration plates even forboth z positions of the upper and the lower plane. Then also images are createdwhere the corrected images of all cameras and all views of a coordinate system

    46

  • 8/18/2019 ImagingTools_D72

    47/146

    2.5 Walkthrough : 2 cameras system (independent 2D+2D)

    are overlayed (summed up) to see if indeed all corrected images coincide. Inaddition a grid of the ideal regular grid of marks is overlayed. Here you cancheck:

    • in single camera images if the marks fall to the ideal regular grid

    • if the marks in the summed up images of different cameras (and oneview) coincide for z=0 mm position

    • if the marks in the summed up images of different views for one camera

    coincide for z=0 mm position

    • if the marks in the summed up images of all views for all camera coincidefor z=0 mm position

    In case you use a 3D calibration plate you can check furthermore:

    • all of the above for the position of the second plane in case you use a 3Dcalibration plate

    • in case you use more than one camera you can check by how much awrong z position will move the corrected images apart. In detail: cor-recting for the position of the upper plane ( z=0) to make the marks of the upper plane coincide will produce ghost images for the marks in thelower plane (e.g. at z=1 mm) due to the perspective parallax. This givesyou a direct information of the 3D resolution of a stereoscopic system.Let’s say the ghost images are 6 pixel apart. Then the vector calculation(which can resolve 0.05 pixel shifts on the CCD images) will detect a

    true shift of 1 mm /6 pixel = x mm / 0.05 pixel ⇔ x = ca. 8 µmin z-direction in this experiment. You can increase this resolution byincreasing the angular separation of your system.

    Changing the selection boxed for camera, view and plane (if you have used a3D calibration plate) shows the corresponding corrected images for evaluation.

    The table Fit results to the right summarizes the most important t param-eter. For a more detailed overview of the t result you can click the buttonShow all t parameter... which opens either of the two following dialogswhich are described in detail in the section above - so please refer to the de-scriptions in step 7.

    47

  • 8/18/2019 ImagingTools_D72

    48/146

    2 Calibration wizard dialog

    2.5.9 Finish calibration

    When you are content with the achieved calibration press the Finish buttonin the tool bar (see image aside) to accept the calibration (image dewarpingfunction + pixel/mm scaling) which might then be written to your project.The following dialog opens :

    • Select the rst choice to open a new project with the new calibration

    leaving the current project untouched.

    • Select the second option to overwrite the calibration of the currently ac-tive project - be aware that previously recorded images and their derivedresults might not be consistent with results that will be calculated withthe new calibration.

    • Select the third choice to overwrite the calibration of the currently ac-tive project and scale all previous recordings present in the root level of your project to be consistent with the new calibration - be aware that re-sults that have been derived before the changed calibration might not beconsistent with results that will be calculated with the new calibration.

    48

  • 8/18/2019 ImagingTools_D72

    49/146

    2.5 Walkthrough : 2 cameras system (independent 2D+2D)

    • Select the fourth choice if you want to discard everything you have done inthe calibration wizard. Then the old calibration active when you enteredthe calibration wizard will be restored. Note that you might have to dothe whole calibration procedure again.

    The calibration wizard dialog will close and you return to the project manager.

    49

  • 8/18/2019 ImagingTools_D72

    50/146

    2 Calibration wizard dialog

    2.6 Walkthrough : 2 cameras system (mapped, e.g.stereo)

    2.6.1 Step 1 : Dene experimental setup

    To do this kind of calibration you should select the fth option - see leftscreenshot below.The list of available step then indicates that the total calibration process con-sists of eight steps - see right screenshot below:

    To proceed to the second step either press the next step button in the tool

    bar or press the second button in the list of available steps You are here:

    2.6.2 Step 2 : Dene coordinate system

    When you enter the second step the dialog looks like the following screenshot:

    In this step you dene your coordinate system and the number of views youprovide for your calibration plate in different places to calculate the imagedewarping function.

    On the right side in Coordinate system axis orientation you select if youwant a right handed coordinate system (z-axis orientated toward you when

    50

  • 8/18/2019 ImagingTools_D72

    51/146

    2.6 Walkthrough : 2 cameras system (mapped, e.g. stereo)

    you look at the images) or a left handed coordinate system (z-axis pointingaway from you).On the left side you specify the number of views you will provide for all cameras dened in this coordinate system ! For the N th view you have to provide imagesfor all involved cameras of the calibration plate in the same position. So eithertake images simultaneously later or make sure that the calibration plate willnot move while you take separate images for all cameras. Although in generalone view is enough to nd a dewarping function to correct all distortions inyour camera images providing several views makes the result more accurate.In any case the x

    −y

    −plane (and hence the z-axis ) is always dened by the

    orientation of calibration plate of the rst view.In case you want to provide several views you have to specify if they arecoplanar (that is aligned in parallel among them) and if they are placed atequidistant z- positions. Please be aware that some kind of mapping functionsrequire coplanar views. In case you have equidistant views you have to specifythe distance d z between two neighbor views.Below you will nd a table with the required and recommended number of views for your experiment. Depending on the combination of the dewarpingmapping function type, your calibration plate type (2D or 3D) and the number

    of mapped cameras in your coordinate system you have different limitationsand recommendations:

    System type Mapping model Required Recommendedfor dewarping of views of views

    camera mapped (2Dmeasurements - e.g.image stitching)

    polynomialor pinhole

    1 1

    camera mapped

    (stereo measurements- e.g. 3D vectors)

    polynomial 2 ≥2 views must be coplanar andequidistant

    camera mapped(stereo measurements- e.g. 3D vectors)

    pinhole model 1 ≥2 (with 2Dplates views should be coplanar andequidistant

    Limitations from your experiment might force you to make special choices:

    • You might be forced to use a 2D calibration plate because no 3D cali-bration plate is available (e.g. for a microscope).

    51

  • 8/18/2019 ImagingTools_D72

    52/146

    2 Calibration wizard dialog

    • Looking through a non planar glass window which adds non radial dis-tortions to your images might force you to use polynomial mapping asthe pinhole model does not work well in those conditions.

    • Stereo measurements (e.g. Stereo PIV) require a calibration for morethan one plane. So you would need a pinhole calibration or a polynomialcalibration using either a 3D calibration plate or two coplanar views of a 2D plate.

    • Volume measurements (e.g. StrainMaster 3D and SurfaceFlow) requirea calibration for more than just the z = 0 mm plane. So you either mustuse the pinhole model that by handles the mapping for every point inspace to the CCD chips. Or you need a polynomial mapping for at leasttwo (coplanar) views at different z-positions — better is using a highernumber of planes that cover the whole volume you want to measure.

    • the use of the self calibration wizard (available in PIV projects) requires

    the pinhole calibration. For more details please refer to the correspondingchapter about self calibration.

    The measurement itself in most Davis packages implies that the sample islocated at the z = 0 mm position. If you cannot place the calibration plate atthat position you can perform the calibration in front or behind that position.This can be done only for a pinhole calibration or for a polynomial calibrationwith two or more coplanar views. To use this feature please check the option

    rst view not at origin and specify the z-position of the rst view. Thecalibration process will then take this offset into account. In any case thecoordinate system is set up so that the calibration plate position of the rstview denes the x −y-plane orientation (and hence the z-axis ). To proceedto the third step either press the next step button in the tool bar or pressthe third button in the list of available steps You are here:

    2.6.3 Step 3 : Select used calibration plate

    When you enter the third step the dialog looks like the following screenshot:

    52

  • 8/18/2019 ImagingTools_D72

    53/146

    2.6 Walkthrough : 2 cameras system (mapped, e.g. stereo)

    In this step you specify which calibration plate you are using. If you use acalibration plate from LaVision it is enough to select the plate type labeledon the plate e.g. Type 10. This will set all plate parameters to the correctvalues (see rst screenshot above).In case you want to use your own calibration plate you have to provide a numberof parameters (see second screenshot above): On the left side in Calibrationplate used you dene the calibration type:

    • calibration plate contains marks in form of crosses or dots . Both blackmarks on white background and white marks on black background aresupported and identied automatically.

    • calibration plate has only 1 plane = type 2D or is a two level plate =type 3D .

    On the right side in Calibration plate parameters you dene several of itsparameters (dimension and sizes):

    • distance between neighbor marks in one plane in mm

    53

  • 8/18/2019 ImagingTools_D72

    54/146

    2 Calibration wizard dialog

    • size of a single marks in mm

    • distance dz from plane to plane in mm (for 3D plates only)

    For stereo camera systems or in case you map several cameras to a commoncoordinate system you might look from two different sides to the calibrationplate (and the experiment, e.g. the particles illuminated by a laser sheet inPIV). In case you do this you have to check the check box using both sidesof plate . In case you do so you have to add two more quantities:

    • The plate thickness from outer plane to outer plane

    • in case you have a 3D plate (with 2 planes build in on either side) youhave to specify if the groove on opposite sides are aligned (grooves on oneside meets groove on other side) or displaced (groove on one side meetsland on other side).

    This information is then used to calculate the dewarping function taking theextra shifts into account. To proceed to the fourth step either press the nextstep button in the tool bar or press the fourth button in the list of availablesteps You are here:

    2.6.4 Step 4 : Image acquisition

    When you enter the fourth step the dialog looks like either of the two followingscreenshots depending on whether the Maximize button has been pressed ornot — see images shown aside.

    In the fourth step you acquire the necessary images of the calibration plate forall cameras and all views - only then you are allowed to proceed to the nextsteps.

    54

  • 8/18/2019 ImagingTools_D72

    55/146

    2.6 Walkthrough : 2 cameras system (mapped, e.g. stereo)

    For the image acquisition you can take a new image directly from the camerasthat are currently connected to your system. To do this press the Take imageor the Grab button in the dialog.This takes one image (or in case of Grab continuously images until you pressthe stop button in the toolbar or hit the ESC key) of the cameras that areselected in the dialog for the specied view (check box on). For views thatalready contain non empty images the selection box entries are marked with(ok) . If a camera contains valid images for all views the selection box for theview selection becomes green. If all view entries of all coordinate systems aregreen then the next step button will be enabled. Pressing the button with

    the red cross will delete the camera image of the selected view.In the general device interface GDI to its right (only visible in the min-imized images, maximized dialog setting - see above) you can set up the ex-posure times, external trigger, (laser) light sources, step motor positions andother hardware settings important to your image acquisition.Changing the average value in the text box on the left to any other value than1 will result in the averaging of the specied number of images to improveimage quality due to poor lighting conditions. Please make sure that neitherthe camera nor the calibration sample is moving !

    Another option is to import one or more previously recorded les from yourhard disk by pressing the Load button. You can either load single images orwhole (Davis) sets. This opens a modal dialog that shows a preview of theimage in question (see screenshot below).

    Here you specify which of the image frames you want to import. For imagesoriginating from Davis you can leave the check box that follows unchecked andread out the default camera number that is stored in each image (and shownfor the current image). For imported bitmaps ( .bmp or .tif les) you haveto specify to which camera the image corresponds. If want to overwrite the

    55

  • 8/18/2019 ImagingTools_D72

    56/146

    2 Calibration wizard dialog

    stored camera number you can also specify another (wrong) camera number.The selection box will turn red (instead of green) to warn you that the programrecognized a discrepancy - so you should really know what you are doing.In case you want to load several images at once from an image set you needto specify which images of a set you want to import (start and end imagenumber and an increment) and specify the start view to which the images areadded. If during the import more than one image for a camera is found it willautomatically add it to the next view. If all views hold valid camera imagesthe import stops automatically.This is a the recommended way to import old calibration images from an old

    calibration.set created by Davis 6.2 or Davis 7.0 into the new format.To proceed to the fth step either press the next step button in the tool baror press the fth button in the list of available steps You are here:

    2.6.5 Step 5 : Mark denition

    When you enter the fth step the dialog looks like the following screen