Next: Masking out regions of Up: The not so easy Previous: The not so easy   Contents

## Specifying the coordinate system

In this tutorial we will focus on the practical aspects of PIV and it's application to real experiments. Our first step to quantify the velocity fields from the images is to determine how large each pixel is in the images. We can do this by inserting a grid with points into the field of view and take an image of it with our camera. Such an image is shown in figure 2.2, which shows 10 points that are cm apart. We can now use the function definewoco.m to calculate how large a pixel is in the image and the orientation of our coordinate system.
In this example we will use the 6 dots'' in the image to define our coordinate system. In this specific case, the dots are rather large and have a flat peak. Therefore we will use a special option in definewoco that cross-correlates the image with a gaussian bell to emphasize the center of the peaks. The peaks in question are about 8 pixels in diameter, so we'll pass this information to definewoco.
>> definewoco('mpwoco.bmp','.');
default is 20). Type 0 here to get old behaviour of definewoco: 8
....calculating....this may take a few seconds.
...Done!
Now mark the crosses you whish to use as coordinate points
Press ENTER when finished!
Now you need to give the physical coordinates to each of the points specified!
-----------------------
Please enter the world coordinates for the white
circle  marked in the current figure (in square parenthesis): [-10 10]
Please enter the world coordinates for the white
circle  marked in the current figure (in square parenthesis): [-10 5]
Please enter the world coordinates for the white
circle  marked in the current figure (in square parenthesis): [0 10]
Please enter the world coordinates for the white
circle  marked in the current figure (in square parenthesis): [0 5]
Please enter the world coordinates for the white
circle  marked in the current figure (in square parenthesis): [10 5]
Please enter the world coordinates for the white
circle  marked in the current figure (in square parenthesis): [10 10]
Mapping function. (N)onlinear or (L)inear (N/n/L/l): l
Error (norm) = 0.019268
Save coordinate file....specify number >>
Coordinate mapping factors saved to file:  worldco


In another set of images (Demo 1) included with MatPIV (where the coordinate image file is called woco.bmp) the peaks are well defined and we would use the more standard approach

>> definewoco('woco.bmp','o');


Next: Masking out regions of Up: The not so easy Previous: The not so easy   Contents
Johan K. Sveen 2004-08-06