how to classifying that is a single digit or multiple digit
I have an image that contain digits.
there are: 1, 153, 25, 50, 23, and 40
For every single digit, I have no problem with digit recognition. I can recognize there are 1, 1, 5, 3, 5, 0, 2, 5, 2, 3, 4, 0.
Now, I want to made them become 1, 153, 25, 50, 23, and 40.
My approach is, make the image become high blur, so the boundingbox of the digits is meet with the other digit's boundingbox. then extract the digit inside the huge boundingbox of multiple bounding box.
my expectation is like this
but, the reality is like this
1, 153, 25, 5, 0, and 2340
because,
the distance of 5 and 0 is too far
the distance 23 and 40 is too close
My question is, is there another approach for classifying those are single or multiple digit? If yes, how? :) Thank you very much :)
*sorry for my bad english
**I using opencv c++
The computation time of blurring then finding bounding boxes is large compared to this:
If you can pick out each of those digits then you must at least have a center point for each digit. I would further this by finding the width and height of each number along with the rotation. With this information I would apply a set of rules that correspond to how one would read the number.
These rules could work:
Considering problems like this I would prefer to use probabilities to order a set of possible solutions, so then your program could ask an operator or if it gets stuck assuming one thing it can go back and choose the next "best" one.
Hope this helps, I envy your digit recognition skills :)
I would suggest you not blur the image. Just extract the individual characters and their bounding boxes. You could then iteratively apply a euclidean distance threshold for their centroids to merge the bounding boxes together, one at a time. You could then model each number as a linked list and keep adding to the list on either side of an element by simple direction heuristics.
链接地址: http://www.djcxy.com/p/79646.html上一篇: 为什么在预处理中使用负像?
下一篇: 如何对单个数字或多个数字进行分类