apply_mask#
Apply mask on PIV data. It calls pivLib.apply_mask()
to treat the input PIV data, and save the results (masked PIV data) in the same files. See here for more details.
Syntax
python apply_mask.py piv_folder mask_dir
piv_folder: folder containing PIV data (csv sequence)
mask_dir: directory of a tif binary mask, of the same shape as raw images.
erode: number of pixels to erode from the True region (this makes the mask smaller, reducing boundary effect). Default to 32, a good value is the winsize of PIV.
Test
python apply_mask.py test_imagespply_mask test_imagespply_mask\A.tif
Edit
Nov 03, 2022 – Initial commit.
Dec 01, 2022 – Remove erosion step. Mask should be used as it is.
Dec 13, 2022 – Fix a bug.
Dec 19, 2022 – More accurate docstring.
Jan 05, 2023 – (i) Adapt myimagelib import style. (ii) Add screen info.
Feb 08, 2023 – Rewrite in function wrapper form, to make autodoc work properly. (autodoc import the script and execute it, so anything outside
if __name__=="__main__"
will be executed, causing problems)