What is optimal way of background removing with javaCV?

asked 2013-08-17 14:24:50 -0500

J-S gravatar image

0 down vote favorite

I'm looking for the most optimal way of extracting single color on background and replace it with some picture on the fly in JavaCV. I wrote very simple method reading pixel by pixel and replacing it if the color is green for example. This is very slow and even if I divided it into few threads it works dramatically slow. This must be done on live so I have to find out some other method. Perhaps I will have to add some watermark as well after background replacing, so the application must be quite fast.

Does anybody can help me finding right way of doing it ? I spend all day long trying to find other way of doing it, but.. all examples I have found doesn't work or maybe I do not know how to adopt them to my needs.

This guy (http://www.youtube.com/watch?v=WOEuE3D88b0) wrote that he is reading pixel by pixel - no way, or maybe he had very fast multi-core workstation. On my MacBook Pro 2.5 i5 it just doesn't work :(

Regards Jan

edit retag flag offensive close merge delete