Ask Your Question

Revision history [back]

Change object color with the same range

Hi, I'm new, I have an application in android using opencv. I need to change the color of a object region and the ouput still have the same lightness (V channel) and constrast with the original image, it's mean the object region will have the new color from dark to light same as the input image. I have had detect the region need to change color (a mat of binary) using this solution https://github.com/opencv/opencv/blob/master/samples/android/color-blob-detection/src/org/opencv/samples/colorblobdetect/ColorBlobDetector.java. image description I will summary the solution: whrn user touch on the image I will create a rectangle 8x8 arround the user touch point then I calculate the mean of H,S,V chabbels of the rect and then I specify the range of each channel. In which pixel has the value of each channle in the range I will regconize to the same color with the touch point need to change color. Can anyone tell me the best way to apply the new color to the region I had detected. Thanks.

The example input imageimage description

the result after I detect the skin of the dog image description

Change object color with the same range

Hi, I'm new, I have an application in android using opencv. I need to change the color of a object region and the ouput still have the same lightness (V channel) and constrast with the original image, it's mean the object region will have the new color from dark to light same as the input image. I have had detect the region need to change color (a mat of binary) using this solution https://github.com/opencv/opencv/blob/master/samples/android/color-blob-detection/src/org/opencv/samples/colorblobdetect/ColorBlobDetector.java. image description

I will summary the solution: whrn when user touch on the image I will create a rectangle 8x8 arround the user touch point then I calculate the mean of H,S,V chabbels of the rect and then I specify the range of each channel. In which pixel has the value of each channle in the range I will regconize to the same same color with the touch point need to change color. color.
Can anyone tell me the best way to apply the new color to the region I had detected. Thanks.

The example input image
image description

the result after I detect the skin of the dog
image description

Change object color with the same range

Hi, I'm new, I have an application in android using opencv. I need to change the color of a object region and the ouput still have the same lightness (V channel) and constrast with the original image, it's mean the object region will have the new color from dark to light same as the input image. I have had detect the region need to change color (a mat of binary) using this solution https://github.com/opencv/opencv/blob/master/samples/android/color-blob-detection/src/org/opencv/samples/colorblobdetect/ColorBlobDetector.java.

I will summary the solution: when user touch on the image I will create a rectangle 8x8 arround the user touch point then I calculate the mean of H,S,V chabbels of the rect and then I specify the range of each channel. In which pixel has the value of each channle in the range I will regconize to the same color with the touch point need to change color.
Can anyone tell me the best way to apply the new color to the region I had detected. Thanks.

The example input image
image description

the result after I detect the skin of the dog
image description

Change object color with the same range

Hi, I'm new, I have an application in android using opencv. I need to change the color of a object region and the ouput still have the same lightness (V channel) and constrast contrast with the original image, it's mean the object region will have the new color from dark to light same as the input image. I have had detect the region need to change color (a mat of binary) using this solution https://github.com/opencv/opencv/blob/master/samples/android/color-blob-detection/src/org/opencv/samples/colorblobdetect/ColorBlobDetector.java.

I will summary the solution: when user touch on the image I will create a rectangle 8x8 arround the user touch point then I calculate the mean of H,S,V chabbels of the rect and then I specify the range of each channel. In which pixel has the value of each channle in the range I will regconize to the same color with the touch point need to change color.
Can anyone tell me the best way to apply the new color to the region I had detected. Thanks.

The example input image
image description

the result after I detect the skin of the dog
image description