Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

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

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

cv2

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

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

+=1

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

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

+=1

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