Java- How to remove background color from an image -


first off new , coding. apologize in advance misleading.

i writing java program uses image input. have scanning each pixel width , height of image saving hsb in array , outputting percentage of each color in image. want omit background calculation. start off lets background white. there pixels in image not in background white though.

thank you,

oh, it's not simple hope.
cannot detect what's background , part of image pixel pixel. post see how remove 1 color layer of image. detecting if white pixel part of background or image?!
there multiple possible ways:

  • assuming background around , when (looking side center) color changes, end of "background". can check every row , column side center , keep record of "background" color ends.
  • or similar approach - if @ least @ 1 (of four) direction looking pixel side there no color changes (it goes white way side), part of background.
  • or take @ another post. can try working way up.

anyway - have create logic of detecting (i.e.) white pixels part of picture , part of background.
hope @ least gives bit more knowledge.


Comments

Popular posts from this blog

html - Styling progress bar with inline style -

java - Oracle Sql developer error: could not install some modules -

How to use autoclose brackets in Jupyter notebook? -