在GPUImage中实现简单的自适应阈值 [英] Implementing a Simple Adaptive Threshold in GPUImage

查看:169
本文介绍了在GPUImage中实现简单的自适应阈值的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在开发iPhone应用程序,以识别图片中的一些知名符号. 我基本上是在遵循这些教程 http://aishack.in/tutorials/sudoku -grabber-with-opencv-detection/ http://sudokugrab.blogspot.it/2009/07/how-does-it-all-work.html ,使用OpenCv进行模板匹配,使用GPUImage进行图像处理.

I'm developing an iPhone app to recognize some well known symbols from pictures. I'm basically following these tutorials http://aishack.in/tutorials/sudoku-grabber-with-opencv-detection/ and http://sudokugrab.blogspot.it/2009/07/how-does-it-all-work.html, using OpenCv for template matching and GPUImage for image processing.

当所有图像都具有相同的亮度水平时,我可以调整 GPUImageLuminanceThresholdFilter 的阈值,并且所有图像都可以平滑运行,但是,当然,我不能确定亮度.

When all images are with the same luminance level, I can adjust the threshold of GPUImageLuminanceThresholdFilter and all works smooth, but, of course, I can't be sure of the luminance.

因此,我需要一个简单的自适应阈值滤波器,就像那些教程中的那个一样,它可以计算每个像素周围区域的亮度.

So, I need a simple adaptive threshold filter, like the one in those tutorials, which calculate the luminance into the area surrounding each pixel.

GPUImageAdaptiveThresholdFilter 不符合我的需要,因为它可以检测并锐化边缘,而我需要增强符号.

The GPUImageAdaptiveThresholdFilter doesn't fit my needs, because it detects and sharps the edges, while I need to enhance the symbols.

如何实现这种过滤器?

推荐答案

令人敬畏的布拉德·拉森(Brad Larson)要求,在框模糊中添加模糊大小属性,并修改自适应阈值滤波器,使其按预期工作! 谢谢@BradLarson!

Asked to, the awesome Brad Larson added a blur size property to the box blur, and modified the adaptive threshold filter, so it works as expected! Thanx @BradLarson!

这篇关于在GPUImage中实现简单的自适应阈值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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