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
Threshold Image
Color Applied Image
Required Image