Changes between Version 21 and Version 22 of Tutorial/CorrelationImageVelocimetryOptimisation


Ignore:
Timestamp:
Jan 28, 2015, 8:05:16 PM (6 years ago)
Author:
sommeria
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Tutorial/CorrelationImageVelocimetryOptimisation

    v21 v22  
    1818To observe the influence of the search box, come back to the GUI civ_input, set '''[!CorrBoxSize]'''=[19 13] and '''[!SearchBoxSize]'''=[27 25] with '''[Shift]'''=0, and visualise the result with '''uvmat'''.  Many black vectors (F=-2) are obtained, showing that the search domain  is too small, so that the correlation maximum is constrained by the  limited search interval. Using  '''[!TestCiv1]''' , it can be seen that the correlation maximum is indeed at the edge of the Search box in the main flow with u$\simeq$4 (while a gap of 2 pixels is required to properly determine the maximum without edge effect).
    1919
    20 The parameter '''[num_!CorrSmooth]''' is used to fit the correlation data with a Gaussian function to obtain the maximum with sub-pixel precision. We generally keep the default value 1, while the value 2 should be more appropriate for larger particles (with wider correlation maximum). The quality of this feature can be tested by taking the image autocorrelation, selecting the option 'displacement' instead of 'PIV' in the menu '''[!ListCompareMode]''' of '''civ_input'''. Then run the civ1 computation with '''series'''. Visualise the velocity field with uvmat: it is very close to 0 as expected but the histogram of the error can be estimated with the Tool/rectangle.  The curve exported from view_field is shown in figure **, comparing '''[!CorrSmooth]'''=1 and 2'''. '''We see that the histogram is somewhat more narrow for '''[!CorrSmooth]'''=1, corresponding to a slightly better result, but the typical error of the order of 0.1 px in both cases. ''''''
     20The parameter '''[num_!CorrSmooth]''' is used to fit the correlation data with a Gaussian function to obtain the maximum with sub-pixel precision. We generally keep the default value 1, while the value 2 should be more appropriate for larger particles (with wider correlation maximum). The quality of this feature can be tested by taking the image autocorrelation, selecting the option 'displacement' instead of 'PIV' in the menu '''[!ListCompareMode]''' of '''civ_input'''. Then run the civ1 computation with '''series'''. Visualise the velocity field with uvmat: it is very close to 0 as expected but the histogram of the error can be estimated with the Tool/rectangle.  The curve exported from view_field is shown in figure **, comparing '''[!CorrSmooth]'''=1 and 2'''. '''We see that the histogram is somewhat more narrow for '''[!CorrSmooth]'''=1, corresponding to a slightly better result, but the typical error of the order of 0.1 px in both cases. '''''''''''
    2121
    2222The parameters '''[num_Dx]''' and '''[num_Dy] '''define the mesh of the measurement grid, in pixels. Reduce them to get more vectors, but keep in mind that the spatial resolution is anyway limited by the size of the correlation box, so that velocity vectors become redondant when the sub-images highly overlap those of the neighboring vector. Then the choice Dx=Dy=10, about half the correlation box, provides a good optimum.
     
    3838Now come back to the default value 10, and press the button '''[!TestPatch1]'''. This will perform patch calculations with a range of values for the smoothing parameters, and provide the rms difference between the filtered velocity field and the initial Civ1 field. This ranges from 0.12, '''[!FieldSmooth]'''=1, to more than 0.2 for '''[!FieldSmooth]'''=100. The value 0.15 for '''[!FieldSmooth]'''=10 is less that the expected error on the PIV, about 0.2 pixel.
    3939
    40 [[Image(41.png)]] 
     40[[Image(41.png)]]
    4141
    4242This test also provides the proportion of excluded vectors (marqued as false) by the criterion of the excessive difference between the Civ1 value and the filtered one, which is attributed to false vectors. The threshold (expressed in pixels) is given by the box '''[num_!!MaxDiff]'''. The result obtained  with the default value 1.5 is about 2 %, so that most vectors are preserved. Repeating the test  with a higher value, for instance 10, logically reduces the number of rejected vectors, but significantly increases the rms difference: the interpolation is perturbed by a few erratic vectors.
     
    6161  [[Image(vort_civ3-2.jpg)]] [[Image(vort_vel_zoom.jpg)]]
    6262
    63 = Other Example: =
    64 == Further Civ iterations ==
    65   The result can be improved again by performing a third civ iteration, civ3. For that purpose, select only the ’'''civ2'''’, ’'''fix2'''’ and ’'''patch2'''’ operations with the same parameters as previously. The previous result is now considered as ’'''civ1'''’, so set CIV as the subdirectory in the edit window '''[SubDirCiv1]'''. Select a new subdirectory name, for instance ’CIV3’ in the edit window '''[SubDirCiv2]'''. Further iterations could be similarly performed, but the improvement becomes negligible.
     63== Another Example ==
     64With the GUI uvmat open an image in ''/UVMAT_DEMO04_PIVchallenge_2001A/images'' taken from PIV challenge (ref web site  **). A short description of the experimental conditions is given in the file ''readme.txt'' in the folder of the images. It is said that the field of view is 170 x140 mm, so that, since the image size is 1280x1024 px, the scale is 7.4 px/cm. but no time Dt **. The flow is the vortex behind a wing with poor particle seeding in the core. 
     65
     66From uvmat select Run/PIV so the GUI civ_input pops up. With the option''' [wiki:ImportParam [!ImportParam]]''', import the parameters from the file ''Images.ref.civ/0_XML/A_1_1.xml'' and run the civ calculation. The result should look like the reference result ''Image.ref.civ_2/A_1_1-2.nc''. As expected form the dark spot at the vortex centre, the core is not properly resolved in civ1. The result is improved in civ2. 
     67
     68Let us improve again the result by a third civ iteration. This is launched in the GUI '''series/civ_series''', opening  the netcdf file result of the previous civ2 calculation instead of an image. The source image then automatically appears in the second line of the input table of '''series'''. ''''