As I’ve mentioned in my previous post I was in search for better thresholding methods. Automated Thresholding (auto switch of threshold value using image histogram) is good but not enough for better pattern recognition and other stuff. All of you know know that next level is Adaptive Thresholding. Mario have shown this method in his post. But his adaptive method is not enough for our needs too! It uses slightly blurred image (extra compute time) and pass everything to pixel bender filter. The result is good but what if I tell you we can do better and faster! ![]()
I’ve searched a lot before I found an article on combining Wellner’s thresholding algorithm with integral image data for better results, specially for pattern recognition! This technique was discovered by Derek Bradley and Gerhard Roth. And the best news is that it can work really fast and accurate in pure AS3 without any blurred images and pixel bender stuff! Sure it can be adopted to run even faster if we move render code to pixel bender but I guess it will be up to users itself (truly it will save 3ms not much).
See demo application (you will need web camera and Flash 10 installed)
Get the source code
More screenshots:







well actually blurring IS computing local threshold and SAVES, not adds extra, computing time.
@makc I know it save a lot time on one hand but on other hand it adds time if you understand what i’m talking about.
p.s. see this for pixelbender-less implementation
@makc I’ve already seen Saqoosha experiments but it also uses blurred image for thresholding. The method i was talking about has no use of blur and comparison of bitmap objects. it takes one bitmap, computes integral data and use it to determinate thresholding values for each pixel
ouch!
in the third screenshot it seems that you can retrieve almost disappeared patterns that’s really promising
Excellent work !
Amazing job! it´s really good how it can detect patterns, really clean.