tags:

views:

106

answers:

2

Hello!

I have an image http://img831.imageshack.us/img831/2935/dotn.png which should be recognized via a webcam. So this image is the original which should be included into the swf. If a person show this image in the webcam, an overlay of a video should added and played (augmented reality).

How can I do this? I found FLARToolkit, but it is not possible because I need a black border which the original image does not has. Are there other libraries which have this functionality?

Best Regards.

+3  A: 

I would advice you to look into the FlashSurf kit:

http://blog.inspirit.ru/?p=386

alt text

It's a really amazing library for flash and actionscript. I haven't used this one myself, but other flash libraries from the same developer.

Aspelund
Yes, I already saw it, but it does not meet my requirements, because first the image has to be tracked at every start of the application. I have to implement a fixed image.
Tim
+1  A: 

I found a few resources - haven't tried either. Firstly there is the OpenCV port to AS3 called Marilena here. The site is in Japanese but if you click on the "English" link you'll find the address to their svn repo, and can check out the source. The project comes with a classifier that will detect certain predefined features in images. What I didn't find was the trainer for the classifier. If you can find how to train the classifier this should work.

That seems a bit of overkill though, since all you need to do is detect a green blob in the image, which is a lot simpler than detecting a face. For that purpose this blob detection algorithm should work just fine. You might need to do some tweaking to the code as it is looking for white pixels and you're blob is green. If you're application is being run in a controlled environment (the green is always green) then you shouldn't have too much problems with this. You might also want to make sure that the blob is somewhere in the middle of the image to avoid detecting blobs in the background and so on. Either way a bit of testing with different lighting conditions and different background should give quite nice results.

Matti