Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

omr sheet python stackoverflow

import cv2
import numpy as np

img=cv2.imread('test.png') #read image
gray = cv2.cvtColor(img, cv2.COLOR_BGR2GRAY) #turn image to gray
blur = cv2.GaussianBlur(gray,(3,3),0) #add blur
edges = cv2.Canny(blur,50,100) #find edges

contours, hierarchy = cv2.findContours(edges,cv2.RETR_EXTERNAL, cv2.CHAIN_APPROX_SIMPLE) #find contours
cv2.drawContours(img,contours,-1,(0,255,0),2) #draw contours
cv2.imshow('Contours in Green',img) #show contours in green

#Now you need to sort them out.
Comment

PREVIOUS NEXT
Code Example
Python :: creating a new DataFrame from itertuples, namedtuple using a series or list() 
Python :: urllib2 py 
Python :: primary neural network 
Python :: Kivy button on press call function with arguments 
Python :: the entire bee movie script but backwards 
Python :: superpixel 
Python :: python namedtuple typename 
Python :: get random vowel python 
Python :: python setattr function 
Python :: seeparate string without split function python 
Python :: tcs question 
Python :: python discover methods of object/module 
Python :: tkinter mouse loading cursor 
Python :: search number is complete or no python 
Python :: python pipe where 
Python :: odd or even checker 
Python :: Exception Type with except block: 
Python :: not mutable data type in python 
Python :: python structure like c 
Python :: keep calm and carry on memes 
Python :: how to sum 2 no.s in python 
Python :: python convert py to exe 
Python :: using progress bar with rich python 
Python :: python combine if statements 
Python :: pandas integer to date 
Python :: palindrome python 
Python :: for i in range python 
Python :: python serial port 
Python :: python list remove all elements 
Python :: python round function example 
ADD CONTENT
Topic
Content
Source link
Name
3+7 =