Hi i am begineer in openCV.. Please help me..How to compare two images placed in different folders using OpenCV? [closed]

asked 2014-09-05 01:20:10 -0600

shw001 gravatar image

updated 2020-11-12 12:20:33 -0600

I have extracted frmaes from same video files twice and placed it in different folders and now i want to compare frames from both the folders to see whehter it is matching or not?

Code for extracting andplacing frames in folders are mentioned below:

import cv2

vidcap1 = cv2.VideoCapture('D://VideoAPIPOC//video1//poc.mp4')
success,image = vidcap1.read()

count=0;
while success:
    success,image = vidcap1.read()
    frame = cv2.imwrite("D://VideoAPIPOC//frame1//frame%d.bmp" % count, image)
    print frame
    if cv2.waitKey(10) == 27:
        break
    count +=1

vidcap2 = cv2.VideoCapture('D://VideoAPIPOC//video2//poc.mp4')
success,image = vidcap2.read()

count=0;
while success:
    success,image = vidcap2.read()
    frame = cv2.imwrite("D://VideoAPIPOC//frame2//frame%d.bmp" % count, image)
    print frame
    if cv2.waitKey(10) == 27:
        break
    count +=1
edit retag flag offensive reopen merge delete

Closed for the following reason question is not relevant or outdated by sturkmen
close date 2020-11-07 06:05:00.488839

Comments

4

while the meaning of "whether it is matching or not?" may be total obvious to you, it is not for us.

what do you mean exactly there ? object in pic1 detected in pic2 ? pixel-wise identity ? would a grayscale version of pic1 count as 'same' ? a rotated/scaled/distorted one ? please be more explicit here.

berak gravatar imageberak ( 2014-09-05 02:15:18 -0600 )edit