1 |
afe |
1.1 |
|
2 |
|
|
The frame grabber saves the images to 640x482 pixel jpeg |
3 |
|
|
files with the name ``frame.<timestamp>.<level><a_or_b>.jpg''. |
4 |
|
|
|
5 |
|
|
<timestamp> is an integer that inicates the number of milliseconds |
6 |
|
|
since the operation system clock of the PC running the framegrabber, |
7 |
|
|
and is used to mark the time between frames. |
8 |
|
|
|
9 |
|
|
<level> is an integer indicating the vertical level of the tank at |
10 |
|
|
which the frame was grabbed. |
11 |
|
|
|
12 |
|
|
<a_or_b> marks wether the frame in the file is the first or second |
13 |
|
|
frame of the pair grabbed at a particular level. |
14 |
|
|
|
15 |
|
|
|
16 |
|
|
OBTAINING VELOCITY VECTOR FIELDS WITH PIV |
17 |
|
|
|
18 |
|
|
Once you have a collection of pairs of images, you can extract |
19 |
|
|
velocity fields from them. The current setup uses MatPIV 1.6.1 |
20 |
|
|
(see <http://www.math.uio.no/~jks/matpiv/>. You should look at the |
21 |
|
|
Online Tutorial, particularly "An example session". Yes, you have to |
22 |
|
|
do it the not so easy way. This entails establishing a coordinate |
23 |
|
|
system and masking out regions outside of the fluid flow you are |
24 |
|
|
trying to examine. |
25 |
|
|
|
26 |
|
|
In order to use MatPIV, you will need to be able to manually examine |
27 |
|
|
at least one of the images created by the frame grabber. In their raw |
28 |
|
|
state they may be too dark and have too little contrast to be useful, |
29 |
|
|
so you will have to use The Gimp or Image Magick to add contrast to |
30 |
|
|
one of them. Save it as the file ``masker.jpg''. |
31 |
|
|
|
32 |
|
|
To establish a coordinate system, you will have to use one of the MatPIV |
33 |
|
|
utilities to mark tagged points in the image field. To create these points, |
34 |
|
|
run the Perl script ``addcross.pl''. This uses Image Magick to add crosses to |
35 |
|
|
the image in ``masker.jpg'', saves the resulting image as ``worldco1.jpg'', and |
36 |
|
|
displays the same. You may have to manipulate the first couple of lines of |
37 |
|
|
``addcross.pl'' that determine the horizontal and vertical positioning of the |
38 |
|
|
crosses to get the desired result -- the goal is to have at least four crosses |
39 |
|
|
in the field of the particles you wish to include in the velocity field -- the |
40 |
|
|
parts that you later leave unmasked. |
41 |
|
|
|
42 |
|
|
In Matlab, enter the command definewoco(filename,'+'); , where filename is the |
43 |
|
|
image saved with the crosses, and follow the directions in the MatPIV |
44 |
|
|
documentation. You should enter the coordinates given in the addcross.pl |
45 |
|
|
script. The Matlab command mask('masker.jpg','worldco.mat'); will then let you mask out regions where no PIV is to be performed. These areas should include the outside of the tank, the center of the annulus, and the shadow of the laser. |