The base class for the piv process is called Direct Piv.
piv.direct_piv.
DirectPIV
(image_a, image_b, window_size=32, search_size=32, distance=16)[source]¶Class for the initial Piv.
The images are error checked and padded if needed. After initialization a GridSpec is set and a grid is created. It creates an object of the GridSpec for the images. By calling the function
piv.direct_piv.DirectPIV.
correlate_frames
()¶the correlation is calculated. As a result of the process the velocities are set as attributes of the class.
Initialization of the class.
Parameters: |
|
---|
In order to make sure that the images used have to correct type and layout and are set, the functions
DirectPIV.
_check_images
(img_a, img_b)[source]¶Function for checking weather the images have the correct type (float64/double). The shape and strides are compared as well.
DirectPIV.
_set_images
(img_a, img_b)[source]¶Set the correlation images of the PIV algorithm.
If the window_size and search_size differ, the second image needs to be padded with zeros. :param img_a: first image :param img_b: second image
are used.
The initialization requires a grid to be set. Therefore a function creates the grid according to the GridSpec.
After all the initialization is done the correlation can be performed by calling the correlation function.
DirectPIV.
correlate_frames
(method='gaussian')[source]¶Correlation of all grid points, creating a velocity field.
Parameters: | method (str) – Method of the peak finding algorithm |
---|
The parameter of this function controls the algorithm of the peak finder. Read more about this in the documentation of the process module.
If an explicitly two dimensional peak finder is needed, a function which handles this is also included.
DirectPIV.
correlate_frames_2D
()[source]¶Correlation function for two dimensional peak finder algorithm.
These methods call an other method in order to extract the sub image needed for a step.