Comments (2)
Found a work around. Instead for sorting top to bottom first. Sort left to right first. This will sort all the countours form left to right such that first contour is 15a and 15th countour is 1a and 16th is 30a.
Then sort from top to bottom
# sort the question contours from left to right
questionCnts = contours.sort_contours(questionCnts)[0]
# sort the first 4 countours left to right
e = contours.sort_contours(questionCnts[0:240], method='top-to-bottom')[0]
cv2.drawContours(paper, questionCnts[0:16], -1, 255, -1)
It works but don't understand fully why? :)
from omr-scanner.
The problem is not resolved till now.
Now the contours are sorted as:
1A-> questionCnts[0]
1B-> questionCnts[1]
..
Now here is the twist
16A-> questionCnts[5]
questionCnts[104] will be .. that's right
37A
from omr-scanner.
Related Issues (15)
- System is not able to detect the largest contour. HOT 2
- Choose a correct bubble threshold. HOT 1
- Change the design of OMR. HOT 1
- Modularize Code
- Module should throw error.
- OMR scanned by camera not working properly. HOT 2
- Can we use it detect radio-groups on single line and multiple lines?
- Detection of unattempted answer should not be there.
- Handle the case when one or more bubbles are marked
- Information about the installation in the readme?
- Otsu Threshhold method is not working. HOT 1
- Finding contours in threshold image is not working HOT 1
- System Detecting D as potential bubble. HOT 1
- Need new function and algorithm to sort contours.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from omr-scanner.