Changes between Version 14 and Version 15 of Tutorial/CorrelationImageVelocimetryOptimisation


Ignore:
Timestamp:
Jan 28, 2015, 10:21:11 AM (10 years ago)
Author:
sommeria
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Tutorial/CorrelationImageVelocimetryOptimisation

    v14 v15  
    44To 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
    6 = Time interval =
     6== Time interval ==
    77The first parameter to adjust is the time interval between images, which should be sufficiently long to provide a displacement of a few pixels. The measurement precision is typically 0.2 pixel, so that a displacement of 4 pixels, as in the example, provides a relative precision of 5 %. A larger displacement would be preferable in terms of precision but may yield to poor image correlation and ’false vectors’. The choice of image pair is done in [!!ListPairCiv1].
    88
     
    4545
    4646== Civ2, Fix2 and Patch2 ==
    47 The Civ2 operation repeats the Civ1, but it uses the result of Patch1 as a prior estimate. Therefore while Civ1 is purely local, Civ2 restricts the research to a correlation maximum which is close to the values obtained for neighborhing vectors. 
     47The Civ2 operation repeats the Civ1, but it uses the result of Patch1 as a prior estimate. Therefore while Civ1 is purely local, Civ2 restricts the research to a correlation maximum which is close to the values obtained for neighborhing vectors.
    4848
    49 The parameter  '''[num_SearchBoxShift] '''therefore does not appear in the Civ2 panel, as it is given at each point by the result Patch1. The other parameters have the same meaning as for Civ1. The search box must be small enough to effectively reduce the research to the prior estimate. Take !CorrBoxSize +6 in each direction. Since it is the final result, you can optimise the grid by taking Dy=5. 
     49The parameter  '''[num_SearchBoxShift] '''therefore does not appear in the Civ2 panel, as it is given at each point by the result Patch1. The other parameters have the same meaning as for Civ1. The search box must be small enough to effectively reduce the research to the prior estimate. Take !CorrBoxSize +6 in each direction (providing a margin of 3 pixels on each side of the correlation box). Since it is the final result, you can optimise the grid by taking Dy=5.
    5050
    51 The parameter '''[deformation]''' (check box) improves the prior estimate by deforming the subimage taking into account the velocity gradients, so it can improve the processing in zones of strong shear or strong rotation, like vortex cores. It involves an interpolation of the sub-images to perform the deformation. 
     51The parameter '''[deformation]''' (check box) improves the prior estimate by deforming the subimage taking into account the velocity gradients, so it can improve the processing in zones of strong shear or strong rotation, like vortex cores. It involves an interpolation of the sub-images to perform the deformation.
    5252
    5353Fix2 and Patch2 act on the Civ2 results like Fix1 and Patch1 on the Civ1 results. Choose a smaller smoothing parameter [wiki:FieldSmooth !FieldSmooth]=2, to limitate systematic smoothing effects in the final result.
    5454
    55 Select the ’'''CIV2'''’ operation to improve the correlation results, using the information on local image deformation, provided by the previous knowledge on velocity spatial derivatives (calculated in patch1). Use a finer grid dx= dy=5 than for civ1. The spatial resolution can be slightly improved by decreasing the correlation box, using for instance Bx,By=(15,11). The shift of the search range is here given at each point by the prior estimate from Civ1, so that the search range can be optimized: choose [21,17] which provides a margin of 3 pixels on each side of the correlation box. Note that ’civ2’ corresponds to a new measurement from the images, the previous civ1 and patch1 operations being used only as an initial guess for the search of optimal correlations.
     55The final vorticity field can be observed in the following figure, in which the  vorticity roll up in the wake of the cylinder is clearly visible. A zoom  near a vortex shows the vorticity superposed with velocity vectors.
    5656
    57 == FIX2 and PATCH2 ==
    58 Then select ’'''FIX2'''’ and ’'''PATCH2'''’ with the default parameters.
    59 
    60 == Further Civ iterations ==
    61 The parameters of a CIV computation are stored in a xml file with extension ..!CivDoc.xml created in the directory containing the velocity files. These parameters can retrieved, opening this xml file with the browser of the GUI '''civ'''. Then the image file itself needs to be opened (the select again the check boxes for the operations beyond civ1 hidden by default).
    62 
    63 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.
    64 
    65 The following figure shows the final vorticity field, in which the vorticity roll up in the wake of the sphere is clearly visible. A zoom near a vortex shows the vorticity superposed with velocity vectors.
     57A cut of the velocity along a transverse line x=250, y from 0 to 300 (in pixel coordinates), provides a good representation of the strong velocity shear in the wake of the cylinder. This can be done by displaying the velocity field filter2, open set_object/line, choose ! ProjMode=inter_tps, Mesh=2 to get the profile with spline interpolation from filter2. Then select hold on on the GUI view_field and repeat the same cut with the field 'civ2', '''!!ProjMode'''='projection'. We can then compare the civ2 measurement points to the interpolation, showing some fluctuations are smoothed out but without widening of the strong shear zone. The result has been exported in figure **, using the menu bar tool '''[Export/extract figure] '''in '''view_field'''.  The typical precision can be estimated from the scattering of the points as +-0.1 px, with typically 5-10 pixels in spatial resolution.
    6658
    6759  [[Image(vort_civ3-2.jpg)]] [[Image(vort_vel_zoom.jpg)]]
     60 
     61= Other Example: =
     62== Further Civ iterations  ==
     63  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 '''[[https://servforge.legi.grenoble-inp.fr/projects/soft-uvmat/search?q=wiki%3ASubDirCiv SubDirCiv]1]'''. Select a new subdirectory name, for instance ’CIV3’ in the edit window '''[[https://servforge.legi.grenoble-inp.fr/projects/soft-uvmat/search?q=wiki%3ASubDirCiv SubDirCiv]2]'''. Further iterations could be similarly performed, but the improvement becomes negligible.