Well this is going to be my first post on the subject without code 
FITC events are really well known in the world and presented in many countries. Unfortunately not in Russia yet…
For me this is the first large event to speak at. (first was Flash2000 in Antwerp – greetz to Mr. Henry) But I’ve to mention that I’m still in Visa getting process and who knows how it turns next Monday during my interview in US embassy (solved) 
In any case I’m more then sure that this particular event will be great! Just look at the speaker list. My personal flash hero is Yugo Nakamura who is inspiring thousands of people to try and learn Flash more then anyone/anything else! (still my personal thought)! I’ll be happy to see him in person.
Also there are several people like Mario Klingemann, Joa Ebert, Ralph Hauwert, Seb Lee-Delisle and others w/whom I speak often but never seen in person and this gonna be fun to talk to them in real life!
Fingers crossed – wish I can see you all soon!
Oh, and I almost forget about my session – “Recognize This! Seeing with Flash“! As you may guess this talk will be covering ASSURF project. I’m going to tell you a story of my journey from first working examples to smth completely new that is not presented yet!
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
Recently I was playing with face detection demos done using ported from OpenCV Marilena Lib by Ohtsuka Masakazu and optimized one by Mario Klingemann. I have an idea of using it with my ASSURF project but as far as ASSURF uses lots of CPU resources I cant merge it with Face detection. So I decided to revisit the implementation with more simple and fast solution. Taking into account the speed of Linked Lists and also using TDSI memory optimizer I was able to produce a lot more faster version. I also decided not to hardcode haar cascades XML files into the lib but allow to load it. Currently library supports simple Stump based cascades and Tree based. I wouldn’t recommend using Tree based cascades cause they are significantly slower. This is because we have to use recursion while analyzing image with Tree based cascades.
Update: Added Canny Edge Detector to skip low edged areas of image that result in some nice performance boost. (this will be added to repository soon)
You will find some usage info at wiki page
Download Library SWC
Try demo application (recognizing faces, eyes and mouth) (make sure that u are not using debug player)
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
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
The shortest blog post of mine.
I’ve received a mail from the Group Product Manager of Adobe Flash Player:
“I’m writing to you because the current name of the library misuses the Flash brand. As you know, Flash® is a well-known trademark of Adobe registered in many countries, and in order for us to protect it we need to be diligent about the proper use of the mark… etc.”
As you may understand Adobe asked me to change the Lib name. I’ve no chance to debate on the subject as far as they are right here and they do what they should do. So after not long conversation new name has been chosen ASSURF. (thanx to Mario Klingemann and Jon Howard for the idea)
So if you have any bookmarks update it:
ASSURF Wiki page
ASSURF SWC Lib development project
ASSURF usage examples project
As you may read in my Twitter last week I was experimenting with asynchronous PNG image encoding and saving. It is very easy task until you need to save a really large/huge image file (for print purpose or whatever). As far as Flash don’t have ability to compress/deflate ByteArrays in append way or simply partly we surely will crash flash player while compressing image data for image larger then 10.000×10.000 px.
Joa provided a link to a flashzlib by Ed McManus and that way the “sign” to use Alchemy to process compression via ZLIB.
But what was my surprise when I found that we easily can compile original ZLIB sources in alchemy and use it in our Alchemy projects without any changes! And that was possible since December 2008! Can you believe it? 
So I downloaded ZLIB sources and compile them in alchemy as the result I got static library I can append to any Alchemy project. All you need is to write wrapper C class to call functions in ZLIB and get the result back.
I also found brilliant optimized PNG class at wonderfl that used different filters for the image data. I’ve encapsulated that filters in my PNG encoder in both synchronous and asynchronous way. Alchemy is used only for the compress of image data all other operations done in Flash. It is also possible to compile PNGLIB for the Alchemy (as easy as ZLIB) but it will result in really huge *.swc file. So it is to you to decide.
See small demo app where you can encode large PNG files asynchronous with compress level and filter options.
You can find the package and usage example here
Direct PNGEncoder SWC Download
Well finally I got some time to finish Flash based demo application for the FluidSolver in 3D experiment project. This project is based on my previous fluid solver classes and heavily use Joa’s TDSI tool. This is my first try to implement this simulation if flash and decided to start from Alchemy based Memory usage approach. In plans to try Pixel Bender combined with Alchemy… All calculations made in Flash using ByteArray read/write with TDSI to handle data. Particle engine is based on dynamically growing/reducing LinkedList.
During building this demo I’ve lots of test versions, I’ve tried to use Processing to see the performance difference (you will find links to this screencasts later) also finally discovered the great power of GLSL in Java etc. Mostly because of my Processing results I decided to try Pixel Bender/Alchemy approach in near future. I truly belive it can be done faster in Flash.
Sources can be found in my Google repo at FluidSolver3D branch (be careful it is not well organized cause still in heavy development)
OK, here we have Flash demo application that supports different option changes via Right Click menu. You can choose live mode by selecting any local mp3 file to visualize or to switch to manual mode. There is also an option to turn on/off Sparkles on particles.
Fluids Solver in 3D demo application
See screencasted video on Akira Kiteshi – Pinball composition
Here is some Processing based demos:
Fluids 3D | Processing progress
Cube Fluids | fully GLSL based approach
Couple of days before I stumbled upon Andre Michelle Super Ellipse example. You can think – nothing special but it is like magic how fast it performs and deforming in different 3D shapes. Next thing after Super Ellipse is Super Shape. It is a lot more complex in computation and I thought Flash would stack with it. But after some test it turns to be possible.
You can find a lot more info on subject at Paul Bourke website.
I have created a demo application that shows basic usage of Super Shape class. Hype project was used for Sound Spectrum control and options adjustments upon sound change. This is a very dirty 3D rendering using built in Flash methods with very very primitive triangle Z sorting.
Here is the source for the class
Demo Application
Simple code example:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
| // create instance with resolution 24
var ss3d:SuperShape3d = new SuperShape3D(24);
// update shape by applying 2 Super Shapes parameters
ss3d.update(1.0, 1.0, 7.0, 0.2, 1.7, 1.7,
1.0, 1.0, 7.0, 0.2, 1.7, 1.7);
var proj:PerspectiveProjection = new PerspectiveProjection();
proj.fieldOfView = 75;
var matrix:Matrix3D = new Matrix3D();
matrix.appendScale(64, 64, 64);
matrix.appendTranslation( 0, 0, 128);
matrix.append(proj.toMatrix3D());
Utils3D.projectVectors(matrix, ss3d.wVerts, ss3d.projectedVerts, ss3d.uvts);
this.graphics.clear();
ss3d.draw(this.graphics, 1, 0x333333, 0); |