Ask Your Question

shw001's profile - activity

2020-09-28 04:24:48 -0600 received badge  Notable Question (source)
2016-10-01 09:06:14 -0600 received badge  Popular Question (source)
2014-09-05 01:20:10 -0600 asked a question Hi i am begineer in openCV.. Please help me..How to compare two images placed in different folders using OpenCV?

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