3
$\begingroup$

I want to replace color in an image from another color: For that sample image is below

sample image

I want to replace color such that it becomes

Resulted Image

I know it can be easily done in Photoshop but I am looking for an algorithm which can replace a particular region color with another color but texture and shades should be preserved. These image are only for example.

I have tried changing hue and maintaining saturation and brightness but it fails when I try to change image to white/Black and nearby colors

<style>
  img{
      -webkit-filter: hue-rotate(120deg);
  }
</style>
$\endgroup$
  • 1
    $\begingroup$ Welcome to DSP.SE! Can you post some images that show examples of how it fails? That might give us some insight into what else to suggest. $\endgroup$ – Peter K. Apr 4 '16 at 13:37
  • $\begingroup$ You can post your first code to get more answer. $\endgroup$ – Darleison Rodrigues Apr 4 '16 at 21:44
  • $\begingroup$ @OlliNiemitalo : Thanks! I thought he needed rep to post ANY images. Didn't realize there's a limit of two. $\endgroup$ – Peter K. Apr 6 '16 at 12:04
  • $\begingroup$ you can look here: google.com/… $\endgroup$ – Rosa Gronchi May 1 '16 at 18:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.