c# - Change Color For Parts of an Image -


i trying find solution allow me change color parts of image.

for example lets picture of chair. chair can have different frame or cushion colors. intend let users select frame or cushion , update image. can upload 1 chair image.

any idea appreciated!

detecting parts of image modified

detecting objects on images programatically not simplet thing ;). suppose 1 of solutions problem suggested collin o'dell in comment question. suggested use few images manually separated parts of image want recolor. then, can compose final image few different layers.

however, can keep main image objects , manually make additional images, keep masks of objects (i.e. white pixels in places object is). can check pixels should recolored. allow paint directly on 1 image , avoid compositing.

calculating color

when want recolor photograph, want able keep shading effects etc. rather covering same solid color. in order achieve this, can use hsv color space instead of rgb. use method should:

  • read pixel's color (in rgb)
  • recalculate hsv
  • change hue value of color desired color shade
  • recaluclate modified color rgb
  • set new color of pixel

for more information hsv color space can here: http://en.wikipedia.org/wiki/hsl_and_hsv.


Comments

Popular posts from this blog

delphi - How to convert bitmaps to video? -

jasper reports - Fixed header in Excel using JasperReports -

python - ('The SQL contains 0 parameter markers, but 50 parameters were supplied', 'HY000') or TypeError: 'tuple' object is not callable -