optical-mark-recognition

Fast and quick pixel matching algorithm

不羁岁月 提交于 2019-12-13 02:23:12
问题 I am stuck in a pixel matching algorithm for finding symbols in an image. I have two images of symbols that I intend to find in an image that has big resolution. Instead of a pixel by pixel matching algorithm, is there a fast algorithm that gives the same result as that of pixel matching algorithm. The result should be similar to: (percentage of pixel matched) divide by (total pixels). My problem is that I wish to find certain symbols in a 1 bit image. The symbol appear with exact similarity

Opencv not finding all contours

情到浓时终转凉″ 提交于 2019-12-11 03:47:28
问题 I'm trying to find the contours of this image, but the method findContours only returns 1 contour, the contour is highlighted in image 2 . I'm trying to find all external contours like these circles where the numbers are inside. What am i doing wrong? What can i do to accomplish it? image 1 image 2 Below is the relevant portion of my code. thresh = cv2.threshold(image, 0, 255, cv2.THRESH_BINARY_INV | cv2.THRESH_OTSU)[1] cnts = cv2.findContours(thresh.copy(), cv2.RETR_EXTERNAL, cv2.CHAIN