开发者

Image recognition via webcam - Augmented Reality with Flash

开发者_运维百科

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.


I would advice you to look into the FlashSurf kit:

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

Image recognition via webcam - Augmented Reality with Flash

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.


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜