1

I'm working on a image processing project where i need to change the color of the object. For that i have performed a threshold operation and obtained object pixels as shown in the image. After that i have applied the various colors to object using setPixel method in c#. But this method destroy all the characteristics of the images. But actually i need something like the bottom images. I obtained the them by editing in Adobe Photoshop by changing hue and saturation. can you guys make any suggestions how do this. code example appreciated, thanks in advance.

Original Image

enter image description here

Threshold Image

enter image description here

Color Applied Image

enter image description here

Required Image

enter image description here enter image description here

Community
  • 1
  • 1

1 Answers1

0

Obtain the hue, saturation, and brightness of every pixel from the RGB values (RGB<->HSV). Then play with them, and convert the image back to RGB.

Community
  • 1
  • 1
Jacob
  • 34,255
  • 14
  • 110
  • 165