Selective Image Color

I have over 1 week reading about selectively changing the color of the image. This allows you to select a color from the color set, and then select the part of the image in which I want to change the color and apply the color change of the original color to the color of the color set.

eg. if I select the blue color in the color set and also select the red part of the image, I should be able to change the red color to blue in the whole image.

Another example. If I have an image with red apples and oranges, and if I select an apple in the image and blue in the color picket, then all apples should change color from red to blue.

I have some ideas, but of course I need something more specific in how to do this.

Thanks for reading

+1
source share
2 answers

As a starting point, consider clustering the colors of your image. If you do not know how many clusters you want, then you will need methods to determine whether to combine or not use the two specified clusters. For now, suppose we know this number. For example, given the following image on the left, I matched its colors with three clusters that have medium colors, as shown in the middle, and representing each cluster with its middle color gives the image on the right.

enter image description hereenter image description hereenter image description here

, . , ( ) - , , . () , "" . . , "" , . , 3x5. ( - ).

enter image description here

, , , . , , k- RGB . , , .

+1

, - , . , , , " ", "".

: , 0.0 1.0 ( , 1.0), , . , . " " " ", 1.0 . , 0.0. sorta borderline, . , , .

LAB A B .

, . . HSV. V-. S, modulo 360deg ( mod 256, S ) S , HSV, , HSV . S H L, RGB.

, . - , , :

output = (1-mask)*original + mask*transformed

, 0 0.0, 255 1.0, / .

0

All Articles