finding region in image and change color

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
ashwini
Posts: 10
Joined: 2012-01-30T05:55:49-07:00
Authentication code: 8675308
Contact:

finding region in image and change color

Post by ashwini »

hello.. thanks for viewing

case 1> i am trying to find out the region in an image .i refer t-shirt eg. done by masking i applied on following image:
this is earth.png
Image
1. convert earth.png -modulate 100,100,33.3 -colorspace HSL -channel Hue,Saturation -separate +channel ( -clone 1 -background none -fuzz 30% -transparent black ) -delete 1 -alpha extract -compose multiply -composite mask1.png

got output as foll. mask1.png
Image
then i done next step

2.convert mask1.png -negate mask2.png
Image

3convert earth.png -mask mask2.png -modulate 100,100,66.6 cearth.png
Image

can u help me to figure out what first command actually does ? as in girl in pink t shirt eg. ( -clone 0 -background none -fuzz 5% -transparent gray64 ) used because gray background present..as per my understanding . so i removed that line while applying to earth image then it gave mask i.e mask1.png
and got final image but it changing original img blue color which was not happen in t-shirt eg.
********************************************************************************************************************************************************************
case 2>

also if i want change suppose #304878 color region i.e blue color in earth image then i gave

convert earth.png -fuzz 25% -fill none +opaque #304878 maske1.png
Image

convert maske1.png -negate write_mask.png
Image then

convert earth.png -mask write_mask.png -modulate 100,100,133.3 +mask cearth_yellow.png
Image

i am expecting i this 2nd case the output should be blue region from earth.png turns into yellow as 133.3, but it turn to violet please help me to understand this..

thanks
Post Reply

Who is online

Users browsing this forum: Bing [Bot] and 5 guests