Changes between Version 11 and Version 12 of Tutorial/CorrelationImageVelocimetryOptimisation


Ignore:
Timestamp:
Jan 28, 2015, 12:06:57 AM (9 years ago)
Author:
sommeria
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Tutorial/CorrelationImageVelocimetryOptimisation

    v11 v12  
    22
    33= [wiki:Tutorial] / Correlation Image Velocimetry: optimisation of parameters =
    4 To improve the results from the previous tutorial, open again in the GUI '''series, '''and enter the file ''frame_1.png'' in ''UVMAT_DEMO01_pair/images. S''elect the ACTION 'civ_series' which opens the new GUI '''civ_input'''''''. You may import existing processing  parameters by pushing the button [[wiki:ImportParam !ImportParam]] at the top left of the GUI '''civ_input''': open the parameter file ''images.civ/0_XML/frame_1.xml'' in the browser, or fill the GUI by hand as follows.
     4To improve the results from the previous tutorial, open again in the GUI '''series, '''and enter the file ''frame_1.png'' in ''UVMAT_DEMO01_pair/images. S''elect the ACTION 'civ_series' which opens the new GUI '''civ_input'''''''. You may import existing processing  parameters by pushing the button [[wiki:ImportParam !ImportParam]] at the top left of the GUI '''civ_input''': open the parameter file ''images.civ/0_XML/frame_1.xml'' in the browser, or fill the GUI by hand as follows.
    55
    66= Time interval =
     
    88
    99== Parameters for Civ1 ==
    10 Once the image pair has been chosen, the next parameter is  the size of the correlation box in both directions ('''[num_!CorrBoxSize]_1]''' and '''_2'''),  expressed in pixels. A smaller box of course improves the spatial resolution but it involves less statistics and false vectors may result from holes in the particle seeding. The particles are densely packed in this example, so we can significantly reduce the size from the default value [25,25] to [19,13]  (in image pixels).  The use of a elongated box along ''x'' allows to optimize  the resolution in the direction ''y'', to deal with the transverse shear.
     10Once the image pair has been chosen, the next parameter is  the size of the correlation box in both directions ('''[num_!CorrBoxSize]_1]''' and '''_2'''),  expressed in pixels. A smaller box of course improves the spatial resolution but it involves less statistics and false vectors may result from holes in the particle seeding. The particles are densely packed in this example, so we can significantly reduce the size from the default value [25,25] to [19,13]  (in image pixels).  The use of a elongated box along ''x'' allows to optimize  the resolution in the direction ''y'', to deal with the transverse shear.
    1111
    12 The next parameters are  ('''[num_!SearchBoxSize_1]''' and '''_2''') and '''[num_SearchBoxShift_1]''', and '''_2''', which determine the box in which the sub-image of the first frame is allowed to move to match the second frame. This can be adjusted from a prior estimate of the extrema of each velocity  component (expressed in pixel displacement). Introduce   [min, max] =[ -2; 6] for ’u’ and [-3; 3] for ’v’, and  press the  button '''[Search Range]'''. The optimum search ranges and shifts (for the given correlation box) are  now displayed: [33 25] and [2 0] respectively.
     12The next parameters are  ('''[num_!SearchBoxSize_1]''' and '''_2''') and '''[num_SearchBoxShift_1]''', and '''_2''', which determine the box in which the sub-image of the first frame is allowed to move to match the second frame. This can be adjusted from a prior estimate of the extrema of each velocity  component (expressed in pixel displacement). Introduce   [min, max] =[ -2; 6] for ’u’ and [-3; 3] for ’v’, and  press the  button '''[Search Range]'''. The optimum search ranges and shifts (for the given correlation box) are  now displayed: [33 25] and [2 0] respectively.
    1313
    14 The PIV operation is conveniently visualised by pressing the button '''[!TestCiv1]''' in the GUI '''civ'''. Then the image appears in a new GUI '''view_field''',  in which the mouse motion displays the correlation function as a color map in a secondary window. The resulting vector is shown  as a line pointing to the correlation maximum. The corresponding  correlation and search boxes are shown in the image. 
     14The PIV operation is conveniently visualised by pressing the button '''[!TestCiv1]''' in the GUI '''civ'''. Then the image appears in a new GUI '''view_field''',  in which the mouse motion displays the correlation function as a color map in a secondary window. The resulting vector is shown  as a line pointing to the correlation maximum. The corresponding  correlation and search boxes are shown in the image.
    1515
    16 Unselect all operations except '''Civ1''' and validate the parameters by pressing '''[OK]'''. Then run 'civ_series' in the GUI '''series '''and look at the result by pressing '''[STATUS]''', and open the .nc result file.
     16Unselect all operations except '''Civ1''' and validate the parameters by pressing '''[OK]'''. Then run 'civ_series' in the GUI '''series '''and look at the result by pressing '''[STATUS]''', and open the ''.nc'' result file.
    1717
    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).
    19 
    20 of research of the expressed in pixels. For each velocity vector, the  correlation box is moved within the search box to optimise the image  correlation between the two sub-images inside the correlation box. To  allow for a displacement of d pixels, the search box size must exceed  the correlation box by at least d+2 on both sides, so 2d+4. A systematic  shift  can be also introduced to minimise the search area in the presence of a mean flow.
    2119
    2220The 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).
     
    3028
    3129== '''PATCH1''': ==
    32 Select the ’'''PATCH1'''’ operation, to interpolate the vectors on a regular grid and calculate spatial derivatives. Choose the default value 10 for the smoothing parameter '''[!FieldSmooth]'''. You can later try different values, the smoothing effect increasing with '''[!FieldSmooth]'''. Keep the default values for the other parameters.'''''''''''
     30Select the ’'''PATCH1'''’ operation, to interpolate the vectors and calculate spatial derivatives. First choose the default parameters, press OK, run the caluclation and visualise with uvmat. We observe that a few erratic vectors have been flagged as false (painted in magenta).
     31
     32Two fields can be visualised, as selected by the menu '''[!!VelType]''' in the upper part of '''uvmat''': the initial field 'civ1' and the smoothed one 'filter1', obtained by the spline interpolation/smoothing of PATCH1. Select the option 'blank' in the menu''' [! TransformName] '''(on the left side of uvmat), to observe fields as displacement in pixel units (not physical coordinates), which is the appropriate option to analyse PIV features.  The difference between the two fields can be directly visualized by selecting 'civ1' in the menu  '''[!!VelType]''' and 'filter1' in the menu  '''[! VelType_1] '''just below'''.''' Adjust the scale [num_!!VecScale] (value 10 for instance) to better see the difference. Projection on a line (as described in tutorial  can be useful to better evaluate the field values on a plot. This is rather small (0.1 px) and erratic, except possibly in the strong shear close to the cylinder''', '''so the smoothing properly reduces the noise without excessive perturbation of the velocity field itself.''' '''
     33
     34Choose the default value 10 for the smoothing parameter '''[!FieldSmooth]'''. You can later try different values, the smoothing effect increasing with '''[!FieldSmooth]'''. Keep the default values for the other parameters.'
    3335
    3436== '''CIV2:''' ==