Hi guys,
thank you for OpenPIV it is a very useful piece of software!
I would like to process those images:
https://public.iscpif.fr/~reuillon/m1.jpg
https://public.iscpif.fr/~reuillon/m2.jpg
For that purpose I use this script (from the tutorial 1):
import openpiv.tools
import openpiv.process
import openpiv.scaling
frame_a = openpiv.tools.imread( 'm1.jpg' )
frame_b = openpiv.tools.imread( 'm2.jpg' )
u, v, sig2noise = openpiv.process.extended_search_area_piv( frame_a, frame_b, window_size=24, overlap=12, dt=0.02, search_area_size=64, sig2noise_method='peak2peak' )
x, y = openpiv.process.get_coordinates( image_size=frame_a.shape, window_size=24, overlap=12 )
u, v, mask = openpiv.validation.sig2noise_val( u, v, sig2noise, threshold = 1.3 )
u, v = openpiv.filters.replace_outliers( u, v, method='localmean', max_iter=10, kernel_size=2)
x, y, u, v = openpiv.scaling.uniform(x, y, u, v, scaling_factor = 96.52 )
openpiv.tools.save(x, y, u, v, mask, 'exp1_001.txt' )
openpiv.tools.display_vector_field('exp1_001.txt', scale=100, width=0.0025)
However I got this error message:
Traceback (most recent call last):
File "tutorial-part1.py", line 8, in
u, v, sig2noise = openpiv.process.extended_search_area_piv( frame_a, frame_b, window_size=24, overlap=12, dt=0.02, search_area_size=64, sig2noise_method='peak2peak' )
File "process.pyx", line 18, in openpiv.process.extended_search_area_piv (openpiv/src/process.c:1386)
ValueError: Buffer has wrong number of dimensions (expected 2, got 3)
I have also tried with B&W version of the images but I obtain the same error message.
Any idea what goes wrong?
Cheers,
Romain