使用OpenCV的记分牌数字识别 [英] Scoreboard digit recognition using OpenCV

查看:310
本文介绍了使用OpenCV的记分牌数字识别的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图从一个典型的记分牌中提取数字,你会发现在高中的健身房。我有一个数字闹钟字体的每个数字,并已经设法透视正确,阈值,并提取给定的数字从视频供稿

I am trying to extract numbers from a typical scoreboard that you would find at a high school gym. I have each number in a digital "alarm clock" font and have managed to perspective correct, threshold and extract a given digit from the video feed

这里是我的模板输入示例

Here's a sample of my template input

我的问题是没有一个分类方法将准确地确定所有数字0-9。我已经尝试了几种方法

My problem is that no one classification method will accurately determine all digits 0-9. I have tried several methods

1)Tesseract OCR - 这个一直在4上混乱,经常返回奇怪的结果。只需使用命令行版本。如果我真的尝试用闹钟字体训练它,我每次都得到未知的字符。

1) Tesseract OCR - this one consistently messes up on 4 and frequently returns weird results. Just using the command line version. If I actually try to train it on an "alarm clock" font, I get unknown character every time.

2)k最近与OpenCV - 我搜索一个数据库模板图像(0-9),并查看哪个最近。我经常在3/1和7/1之间混淆。

2) kNearest with OpenCV - I search a database consisting of my template images (0-9) and see which one is nearest. I frequently get confusion between 3/1 and 7/1

3)cvMatchShapes - 这个很不好,通常不能区分两个数字对于每个输入数字

3) cvMatchShapes - this one is fairly bad, it usually can't tell the difference between 2 of the digits for each input digit

4)切线距离 - 这一个是最接近的,但输入和我的模板之间的最小切线距离结束映射7到1 每次

4) Tangent Distance - This one is the closest, but the smallest tangent distance between the input and my templates ends up mapping "7" to "1" every time

我真的很失去得到这样一个简单问题的分类算法。我觉得我已经清理了输入相当好,这是一个相当简单的情况下分类,但我不能得到任何可靠的,实际使用在实践中。任何想法,在哪里寻找分类算法,或如何正确使用它们将不胜感激。我不清理输入吗?一个更好的输入数据库呢?

I'm really at a loss to get a classification algorithm for such a simple problem. I feel I have cleaned up the input fairly well and it's a fairly simple case for classification but I can't get anything reliable enough to actually use in practice. Any ideas about where to look for classification algorithms, or how to use them correctly would be appreciated. Am I not cleaning up the input? What about a better input database? I don't know what else I'd use for input, each digit and template looks spot on at this point.

推荐答案

这不像emma或martin的建议那么简单,但是更加优雅,我认为更加健壮。

It is not as simple as emma's or martin suggestions, but is more elegant and, i think, more robust.

编辑

考虑到输入的宽/高比,您可以选择一些不同的小分辨率。喜欢3x4

Given the width/height ratio of your input, you may choose some different small resolution. Like 3x4

这篇关于使用OpenCV的记分牌数字识别的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆