0

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.

Thanks

Jav_Rock
  • 22,059
  • 20
  • 123
  • 164
Shamaila Tahir
  • 988
  • 2
  • 8
  • 17
  • What do you mean by "removing the background"? Can you post some example pictures, where you perform the process in gimp or something equivalent? – bjoernz Nov 19 '10 at 18:51
  • Yes, some example images would be useful. This may or may not be possible depending on the nature of the images. – Nick Udell Feb 04 '11 at 00:13

1 Answers1

0

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

pravs
  • 371
  • 1
  • 4
  • 14