Sunday, July 26, 2009

Computer Vision

Hey!

It's been a while since my last post, I was in a bunch of compromises and I decided to travel last two weekends to loose, my routine was mind sucking and talk to some great people I haven't met for some months and I must say that this quick chunking recharged my batteries.

I don't know why but I decided to take a break on the 3D Modeling but that I mentioned on the last posts, I think I crossed against a small project that I thought I could conclude on a single week but this project is taking more than that.

I'm using C# and AForge (computer vision library for C#) in order to do body tracking and collision with virtual objects in real-time video. I got stuck on some Asynchronous problems and Marshalling but I could move on the problem I'm getting now is a very understandable one: performance.

Imagine a 30 fps video file coming to you and you want to apply all filters on it. You have 33 ms per function to do everything before a new frame comes in (1 second = 1000 ms; time per function = 1000 ms / 30 = approx. 33 ms). I'm getting 222 ms per function, it won't be an easy job to do that in C# (I know C/C++ would be faster, but I would've to waste many time on UI and things like that and AForge provides lots of great functions and support that made me use C#).

I'm posting the current result of my processing, these images are completely test and won't be used on the final project, so just pay attention on the idea itself which is: remove the background and provide corner detection for future usage on collision detection.

This is the original image.

This is the image after background removal and corner detection. Unfortunately the corner detection still have to be worked - it is not detecting correctly due the brightness it uses to detect corners, so I have to decrease that a bit so the corners can be seen by the algorithm. Talking about that, if someone would like some directions on corner detection algorithm I'd recommend Susan Corners, which I'm using here (provided by AForge).

And that's it.
Next days I intend to finish this and resume the 3D Modeling book plus study more to the Master appliance test on Electrical Engineering.

See you,
Caio.

No comments:

Post a Comment