OpenPIV / openpiv-c--qt

C++ with Qt frontend (superfast) version of OpenPIV
http://www.openpiv.net
GNU General Public License v3.0
20 stars 17 forks source link

Skipping Image Pairs on Import #11

Closed rschurch closed 5 years ago

rschurch commented 5 years ago

I am trying to import images from a folder, and when creating the image pairs openpiv-c--qt skips pairs. For example, it will create a pair for image 1 and 2, and then 3 and 4, but NOT 2 an 3. If the folder contains many images, more images are skipped. For example, a pair between image 1 and 2 will be formed, and then again between 5 and 6.

alexlib commented 5 years ago

thanks for reaching out @rschurch - could you please help to get more info about your installation? What is the C++, Qt, platform?

Thanks

rschurch commented 5 years ago

I am on a Dell XPS 15 with Ubuntu:

timdewhirst commented 5 years ago

@rschurch : would it be possible to add an example directory listing please; this will help to reproduce the issue.

rschurch commented 5 years ago

@alexlib, I attach a zip file with the test images. With this folder I got pairs:

but not

And as mentioned, with bigger folders the gaps between pairs seem to increase.

test2.zip

Thanks for your quick responses!

alexlib commented 5 years ago

I am on a Dell XPS 15 with Ubuntu:

  • gcc (Ubuntu 7.3.0-27ubuntu1~18.04) 7.3.0,
  • QMake version 2.01a; Using Qt version 4.8.7 in /usr/lib/x86_64-linux-gnu Does that help?

I'll also try to install on a virtual Ubuntu and see if I can reproduce it. Do you have your installation instructions maybe?

rschurch commented 5 years ago

I just followed the instructions that are on your page (https://github.com/OpenPIV/openpiv-c--qt#installations-instructions-for-general-linux)

I take it, the import works on other systems then?

timdewhirst commented 5 years ago

@rschurch from scanning the code (see importimages.cpp, ImportImages::autoConfig() around L153) I can see two heuristics: look for images with an a/b identifier, or look for a numbered sequence. In the case of a numbered sequence then the pairs are assumed to be e.g. (001, 002), (003, 004), ... which is what you describe.

There are then a few issues here: 1) the heuristic may not be working correctly for larger folders 2) the heuristic isn't what you want in this case (you want (001, 002), (002, 003), (003, 004), ...) 3) there is no way to override the heuristic

I'll have a think about this; I think the code will need some work.

rschurch commented 5 years ago

OK, thanks. I was not aware of the a/b heuristic. Maybe the ffmpeg to create the image sequence can be run two times then, to produce the a/b pairs. I will give that a try.

rschurch commented 5 years ago

Creating the image sequences with two passes of ffmpeg worked like a charm, so if the a/b heuristic (and maybe some example ffmpeg commads) was reflected in the getting_started.html there would not be any need for fixes in the code.

timdewhirst commented 5 years ago

Good to hear that solved your issue; I've updated the documentation. If you're happy feel free to close! Thanks!

alexlib commented 5 years ago

@timdewhirst thanks for taking care