# Urgent Immediate Graduation Project Help Needed

Discussion in 'Programmer's Corner' started by badprogrammer, Jun 18, 2009.

Jun 18, 2009
3
0
Hi All,
I'm consider myself a beginner in the area of matlab and image processing.
I need a function to help me in comparing images with a video. Let me be more clear. I have 2 or 3 images and a video. I read the video with the function "aviread" and get it's frame number and with a for loop, i check every frame in the video. all i want to do, is to check whether if this image i have match any frame in the video or not.
Plz guys, anyone has an answer or a solution to my problem, plz send it to me ASAP. it's really very urgent.

2. ### Papabravo Expert

Feb 24, 2006
10,144
1,790
I don't have much experience in image processing, but it seems to me if you subtract one image from another you should get pretty close to 0 everywhere if the images are the same. If you take a surface integral of the result squared the closer the integral is to 0 the closer the images are to each other

3. ### n9352527 AAC Fanatic!

Oct 14, 2005
1,198
4
Have you considered image correlation? It is commonly used in image matching.

Jun 18, 2009
3
0
@ Papabravo
I think i first have to determine the frame of the video i should subtract my image from it. am i right?

5. ### Papabravo Expert

Feb 24, 2006
10,144
1,790
I was assuming that they would be the same size. If the fixed image is smaller than the video frame you would need to slide it around inside the larger image looking for a match. This could take prodigious amounts of time and memory. I wouldn't bet on being able to do it in real time. If the fixed image is larger than the videoo frame then you have to slide the video frame around in the fixed image looking for a match. Same problem -- sorry.

BTW I like the image correlation approach mentioned by n9352527, I think it may have some promise.

Jun 18, 2009
3
0
I know I'm asking too much, but can you be more specific in this correlation subject as i don't have much knowledge of matlab as i mentioned before. If you could provide more specific information about this correlation and and if you have any code that can help me, i would be really very grateful.

7. ### Papabravo Expert

Feb 24, 2006
10,144
1,790
Don't have any useful code. You should start with a search on "image correlation"

8. ### SigmaCeq Member

Jul 30, 2009
19
0
Also try the function corr2. It calculates a 2-dimensional correlation coefficient.