10-22-2024 07:31 AM
Hi everyone!
Thanks in advance for your help, because I am becoming crazy.
What I have is a folder with images named as: Image1, Image2, Image3... Image9900 .... I list the files that match "*.jpg" pattern, in order to read the images and analyse them. I've read some threads in this forum and try all the answers, add a cluster with the number and try to sort the array (does not work), use a stack to sort the strings, also does not work, when it arrives to 9 number it starts to list all the images that starts with 9.
how sth apparently easy can be so strange to implement. 😞
Just say that the windows explorer is sorting the files fine, and I cannot use time stamp because the images where adquired at 506 frames per second so some of them have the same time stamp I guess...
Thanks everyone for reading me !
Maite
Any help will be welcomed, thanks!!
10-22-2024 07:36 AM
Get the List of Filenames and apply an AlphaLogical sort
https://forums.ni.com/t5/Example-Code/AlphaLogical-Bubble-Sorting-Algorithm-in-LabVIEW/ta-p/3492488
10-22-2024 07:51 AM
Try to scan the image number and sort by number, see
10-22-2024 08:06 AM
10-24-2024 03:46 AM
Thanks for your answer, I tried Logical String Array Sort, but not this one, and this is actually working fine 🙂
It is quite slow and we are working with a huge number of images, but al least we can process the data in sequence, I will look for something faster I may have good luck, but if not we can continue working, thanks!!
10-24-2024 03:49 AM
Yep, I tried this as first idea but I do not know why this Sort1darray function it is not working fine, I checked the cluster, and it records the decimal numbers fine, but the function has problems sortening a big amount of images, some of them are right some are wrong.
But thanks anyway, It was a good idea!
10-24-2024 04:19 AM
Hi Tweezers,
@MagneticTweezers wrote:
but the function has problems sortening a big amount of images, some of them are right some are wrong.
It would help if you would provide examples for your message.
Which filenames are sorted "right", which ones are sorted "wrong"?
10-24-2024 07:19 AM
@MagneticTweezers wrote:It is quite slow
Hi, for your specific task, you can use this code. It is the fastest of all the options offered to you and does the job perfectly.