Closed romainreuillon closed 12 years ago
Thanks for your message. We fixed some of the things so you'll have now a working version for your case.
JPEG files are color (RGB), while PIV is not working on such images. It expects grayscale images. So we added an option to flatten (RGB to gray basically) the images.
In addition, we found some bugs, but one we cannot solve - the Cython version at the moment gives some strange result for your case. Please, use the following commands to get what we think is the right result for the given images.
import openpiv.tools import openpiv.process import openpiv.scaling
frame_a = openpiv.tools.imread( 'm1.jpg',flatten=True) frame_b = openpiv.tools.imread( 'm2.jpg',flatten=True)
u, v, sig2noise = openpiv.pyprocess.piv( frame_a, frame_b, window_size=24, overlap=12 , dt=0.02 , subpixel_method='gaussian', 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= 1, kernel_size=3)
x, y, u, v = openpiv.scaling.uniform(x, y, u, v, scaling_factor = 96.52 )
openpiv.tools.save(x, y, u, v, mask, 'm2.txt' )
openpiv.tools.display_vector_field('m2.txt', scale=50, width=0.0025)
What are those images?
Thank you for your help. It works now :) !!!!
Those images are hight frame rate movies of granular material which flows down a rough inclined tunnel.
Great. Glad we could help. If you need any further assistance, don't hesitate to ask. we're also open for collaboration calls in any topic related to flow visualization, imaging, velocimetry, etc. E.g. our 3D measurements systems: http://ptv.origo.ethz.ch
I'am a software engineer and I have never worked with image processing before. I was trying several PIV software to process experimental data for Laurence Girolami (a vulcanologist) in copy. She has hundreds of GB of movie to process for a scientific paper. May be you team would be interested in helping her ?
cheers, Romain
Le 20/12/2011 12:24, alexlib a écrit :
Great. Glad we could help. If you need any further assistance, don't hesitate to ask. we're also open for collaboration calls in any topic related to flow visualization, imaging, velocimetry, etc. E.g. our 3D measurements systems: http://ptv.origo.ethz.ch
Reply to this email directly or view it on GitHub: https://github.com/alexlib/openpiv-python/issues/26#issuecomment-3217597
Of course, on our old website we have some snapshots of PIV applied to volcanic activity, if it matters :) I'm available at alexlib@eng.tau.ac.il
Dear Alex,
I'm a colleague of Romain with who I talked about the PIV software. Indeed, I performed experiments of granular flows using a high-speed video camera. I have a lot of frames (of high quality) and need to analyze the data by using a PIV software or other similar software used in image processing. Romain said to me that you could be interested by a collaboration. It could very fruitful, but please could you explain what do you mean exactly by collaboration ? I have also different frames (of experiments in which I used different particles, for which the contrast is probably less good, while hopefully suffisant anyway). Perhaps, it could be great to make tests for different images and show me what you could extract (in term of velocity gradient, elocity fields, etc ...) from these pictures ?
Please, let me know what do you think about this ? Thanks for all, Very Best Wishes,
Laurence
2011/12/20 Romain Reuillon romain@reuillon.org
I'am a software engineer and I have never worked with image processing before. I was trying several PIV software to process experimental data for Laurence Girolami (a vulcanologist) in copy. She has hundreds of GB of movie to process for a scientific paper. May be you team would be interested in helping her ?
cheers, Romain
Le 20/12/2011 12:24, alexlib a crit :
Great. Glad we could help. If you need any further assistance, don't hesitate to ask. we're also open for collaboration calls in any topic related to flow visualization, imaging, velocimetry, etc. E.g. our 3D measurements systems: http://ptv.origo.ethz.ch
Reply to this email directly or view it on GitHub: https://github.com/alexlib/**openpiv-python/issues/26#** issuecomment-3217597https://github.com/alexlib/openpiv-python/issues/26#issuecomment-3217597
Hi Laurence,
First we probably need to move offline with this discussion. Please use my e-mail alexlib@eng.tau.ac.il. We've been working with a variety of groups on different topics in one or another mode of collaboration. Some groups are interested in developing their own expertise in PIV or related methods (e.g. PTV). We help with the software adoption as a favour, helping here and there and expect only the citation of our work and the website. This helps us to promote our voluntary work for the sake of open science. In some other cases we do more elaborated analysis and actually perform the analysis and then we'd probably discuss the option of the shared publication. There are of course also cases in which we just get paid for what we do. You are the one to choose which path is most suitable.
Technically speaking, you can post somewhere few short sets of the demo images, starting with the most interesting or challenging ones and I'll tell you what's possible. The main issue is typically to define as accurately as possible your objectives and parameters that you would like to obtain from the images (e.g. velocity of each particle or average in time or space velocity, derivatives, positions, accelerations, etc.).
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