Hi i am begineer in openCV.. Please help me..How to compare two images placed in different folders using OpenCV? [closed]
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
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.