Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

how to compare images in a group?

Asked by Sivakumaran Chandrasekaran on 3 Mar 2013

i have 10 images in a group. i have to compare 1st image with 2nd using correlation. then i have to compare 2nd image with 3rd image. then i have to compare 3rd image with 4th . similarly it goes on till 10. how to achieve this?

0 Comments

Sivakumaran Chandrasekaran

1 Answer

Answer by Image Analyst on 3 Mar 2013
Accepted answer
for k1 = 1 : 10
  for k2 = k1 : 10
    % Do the correlation
  end
end

2 Comments

Hi Image Analyst !! if its a matrix means, i can give the range from 1 to 10. myself having 10 images.. how can we mention that k=first image: tenth image

Image Analyst on 3 Mar 2013

Not sure what you mean. I can mention that because I did. Look at the first for loop statement where k1 goes from 1 to 10. Then inside your loop you just read in your two images (for k1 and k2) and do the correlation or whatever you want to do. See the FAQ: http://matlab.wikia.com/wiki/FAQ#How_can_I_process_a_sequence_of_files.3F

Image Analyst

Contact us