MATLAB Answers


How to get a position (index(j)) of a loaded image?

Asked by levpa levpa on 14 Feb 2019
Latest activity Answered by Image Analyst
on 16 Feb 2019
I am new here and I need an advice. How can I get a position of the loaded image among other pictures in folder (number of index(j))?
I know how to load all images from folder - dir(). I also know how to calculate the number of pictures in a folder - N=lenght(). But now I would like to load/select the image from the folder, that will be the first in my for cycle (because for example the first 5 images are blurry - I want to start with image number 6=j, but this number is constantly changing and I do not want to change this number manually but by selecting the image).
It will looks like: for i= j:N ....
Sorry for my bad english.
I will be grateful for any help you can provide.


Every image has a specific name. This name tells the temperature that is captured. (like 105.jpg,110.jpg,140.jpg,145.jpg...).
so if you start the cycle at 110 then you expect to load image 110.jpg, then 140.jpg, then 145.jpg, etc.?
Yes. I want to load all the pictures except the first five (for example five, in another folder it can be the first three images etc). So in this case will "for cycle " start with number 6(=j which I am looking for)

Sign in to comment.

1 Answer

Answer by Image Analyst
on 16 Feb 2019
 Accepted Answer

You said "By displaying all of them and having the user click...."
Just list all your images in a listbox and have the user select whatever ones they want. See MAGIC


Sign in to comment.