Tag Archive for 'alchemy'

ASLSD – Line Segment Detector

ASLSD example

I found this detector very useful for one of my projects and decided to share the code.
You can find original implementation here. It is not like simple edge detectors but designed specially for line detection. As the result you got an array of {x, y} coordinates that represent all available line segments and this opens very large usage opportunities.

Try demo application
Download Library SWC
WIKI Page

ASFFT update

ASFFT project got some updates:

  • 1 dimensional FFT added
  • FFT Spectrum analyzer class added
  • updated methods that lets you work with FFT data via BitmapData object

Special thanx to Mario Klingemann for the help with the correction of setDataBitmapData and getDataBitmapData methods.

See Wiki page for more info on project

Demo of 1D FFT and FFTSpectrumAnalyzer usage
Pitch Shifter demo that uses FFT to transform sound data

Fast Fourier Transform for Flash

FFT simple usage example

There is smth new I would like to share with Flash community: ASFFT Project. Well project is too loud name as far as it is only small library that allows users to decompose images using Fast Fourier Transform in to Real and Imaginary parts. But if you dig more in to the title you will find lots of amazing possibilities it brings to you. The problem is that it is pretty slow and can’t be used on processing video frames for example but it is fast enough to do different image manipulations without freezing Flash Player.

The lib will contain 2 classes “FFT2D” and “FFT”. First one is to work with two dimensional data mostly presented as images. The second one is for streaming (or not) one dimensional data. Usually used in sound signal manipulations/transformation.
At this very moment only FFT2D class available. I will add one dimensional FFT class in near future.

Simple demo example of FFT usage
Project page at Google Code

FlashSURF Lib [initial release]

Flash SURF

Finally I finished all needed preparations for the first initial release of FlashSURF Lib. You’ve already seen some videos posted in twitter. Now I’m publishing all the sources to my google repo. I think this project has a lot of opportunities and I’m really waiting for the response from Flash Community with the advices, ideas, etc on how to improve or what to add and so on…
Currently it supports basic features extraction, matching them to provided reference image and estimating projection matrix between correspondences (Homography). This is the start point to try implement marker-less Augmented Reality or panorama building application or images searching etc. As you see there are tons of ideas in what direction to extend it and I hope you will share yours with me and others as I did. In this case we can end up with smth interesting and useful for everyone!

P.S.: This project is using Joa’s TDSI Tool!

Here you will find all the sources and small test application where I tried to describe the main features of the library.

And here is some videos and another reconstructed panorama:
Talking about FlashSURF at Flash2000 Event
My first tests of the library

Flash SURF

FluidSolverHD [Alchemy version]

FluidSolverHD [Alchemy version]

It was just a question of time for me to try rewriting FluidSolver Class to Alchemy one. It wasn’t very hard and I was waiting for really speed boosted version. As the result it is faster but not as much as I wanted ;) I’ve tried to include Particle engine inside Alchemy code but it turns out that rendering particles is not really easy task and costs a lot. I’ve also used Joa’s TDSI again but it is not really needed as far as we don’t have to write/read Alchemy memory a lot (you can un-comment this part in FluidSolverHD class). Anyway the main idea of the class is drawing colors of Fluids and in this part it works great. I’ve included old test application but with some rewritten methods. Without using particles (25.000) it runs 50-60 FPS using grid size 100×56 for solver iterations. It could be easily changed up to 150 in width and still have 40 FPS! (All this results are in non-debug Flash Player version)

You can launch preview application by clicking image above or this link. (please note: you will need Flash 10 to view it)
Sources could be found in my google repo.

Have fun!

Alchemy Canny Detector released

Well finally I’ve finished all needed methods to release Alchemy based version of Canny Edge Detector.
This version is a lot faster then Pixel Bender one. And it looks like it is more accurate in detecting edges.
I’ve used Joa’s TDSI tool to speed up writing/reading processes to/from Alchemy memory. That’s why I’ve included Joa’s Memory class. Sources already configured so that after building swf file it will be processed by TDSI tool.
But you also can switch it off (that will slow down application a little). In that case you have to set useTDSI property in CannyEdgeDetectorAlchemy class to false and you wont need to do post-processing with swf file.

All the files are available in my Google repo.