Real Time Edge Detection in Flash
Over the last few weeks I've been working on some image processing in Flash. Heres the first post in what could be a series.
The program above shows 3 types of edge detection:
- Good approximation of Sobel
- A much better approximation of Sobel creating a gradient magnitude image
- Non Maxima Suppression
They vary in complexity, the basic sobel algorithm takes advantage of ActionScript 3's built in convolution filter and bitmapdata thresholding function (its not a true sobel edge but close).
The next option combines the two Sobel edges more precisely to create a Gradient Magnitude image. Each pixel is iterated over to combined using their absolute values.
For a tutorial of how to create the gradient magnitude image see this more recent post.
For non-maixima suppression
Non-maxima suppression creates 1 pixel thick edges very useful for other types of image processing (such as the Hough transform to find circles).
The code for the last two is based on an excellent tutorial on image processing here.
Thanks for reading.
Labels: flash, image processing

