Image background subtraction
I am working on a browser based application in which I will get an image. I will have to find the background and remove it if the background is simple. Like if the background is a solid color or gradient. I am considering two options -- 1) using html5 canvas 2) taking the image to the server and remove background using any good image API and get it back to the client.
My question is "Is it feasible to use canvas and manipulate pixels after a call to getImageData()? and is there any good algorithm to remove the background? I tried to search it but all I was able to find were some article to buy. I can implement the algorithm in java or javascript (if I use canvas). Also if I go for option2, take the image to the server and remove background with any good API, is there a java API which I can use?
Any help will be appreciated.
Th开发者_C百科anks
I am working on similar application. What i can think of is to use YCrCb or rgb2hsv conversion as it focus on intensity than color. More deatil can be found here
Take the help of getUserData() available in HTML5 and substitute RGBA information accordingly
精彩评论