extract edges from this image whitout lose the color of edges ?

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?".
diegomage
Posts: 205
Joined: 2017-03-08T10:12:28-07:00
Authentication code: 1151

extract edges from this image whitout lose the color of edges ?

Post by diegomage »

How i could extract edge from this images without lose the color of edges

Image


Please help me with this
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: extract edges from this image whitout lose the color of edges ?

Post by fmw42 »

Your image is black and white. What color do you want. If black use -morphology edgein diamond:1. If white use -morphology edgeout diamond:1
diegomage
Posts: 205
Joined: 2017-03-08T10:12:28-07:00
Authentication code: 1151

Re: extract edges from this image whitout lose the color of edges ?

Post by diegomage »

its not black and whit has various colors
diegomage
Posts: 205
Joined: 2017-03-08T10:12:28-07:00
Authentication code: 1151

Re: extract edges from this image whitout lose the color of edges ?

Post by diegomage »

#340002
#340001
#340003
#340004
diegomage
Posts: 205
Joined: 2017-03-08T10:12:28-07:00
Authentication code: 1151

Re: extract edges from this image whitout lose the color of edges ?

Post by diegomage »

I need all edges with this four color
diegomage
Posts: 205
Joined: 2017-03-08T10:12:28-07:00
Authentication code: 1151

Re: extract edges from this image whitout lose the color of edges ?

Post by diegomage »

i dont know how I use lat filter but I obtain black and white
diegomage
Posts: 205
Joined: 2017-03-08T10:12:28-07:00
Authentication code: 1151

Re: extract edges from this image whitout lose the color of edges ?

Post by diegomage »

seems like the same color but are differents
#340002
#340001
#340003
#340004
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: extract edges from this image whitout lose the color of edges ?

Post by fmw42 »

Use your edge image (black and white) as a mask to color the lines by -compose multiply with your original image

try

Code: Select all

convert ZrFne.png \
\( -clone 0 -morphology edge diamond:1 -threshold 0 \) \
-compose multiply -composite result.png
diegomage
Posts: 205
Joined: 2017-03-08T10:12:28-07:00
Authentication code: 1151

Re: extract edges from this image whitout lose the color of edges ?

Post by diegomage »

how i could use the mask Im trying but i dont know how

I use this

Code: Select all

convert ZrFne.png   -mask  result.png       -fuzz 70% -transparent black   +mask zzlibre
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: extract edges from this image whitout lose the color of edges ?

Post by fmw42 »

What mask? Why are you using -mask? What is it you want to do? Please explain in more detail.

See the top-most post in this forum "IMPORTANT: Please Read This FIRST Before Posting" at viewtopic.php?f=1&t=9620 regarding asking intelligent questions.
diegomage
Posts: 205
Joined: 2017-03-08T10:12:28-07:00
Authentication code: 1151

Re: extract edges from this image whitout lose the color of edges ?

Post by diegomage »

Image

this image have a four colors (ITS NOT BLACK AND WHITE )
diegomage
Posts: 205
Joined: 2017-03-08T10:12:28-07:00
Authentication code: 1151

Re: extract edges from this image whitout lose the color of edges ?

Post by diegomage »

Please sorry for not explain well
diegomage
Posts: 205
Joined: 2017-03-08T10:12:28-07:00
Authentication code: 1151

Re: extract edges from this image whitout lose the color of edges ?

Post by diegomage »

I see and another post that mask is not useful for extract edges
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: extract edges from this image whitout lose the color of edges ?

Post by fmw42 »

I still do not know what you want for a result, nor why you are trying to use result.png from my command as the image with -mask. -mask is not the same as using a mask in composite. The image you just provided is now different from the original image you posted. I am very confused about what image you want to start and what you want to have as a result.
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: extract edges from this image whitout lose the color of edges ?

Post by fmw42 »

Is this what you want?

Code: Select all

convert ZrFne.png -morphology edgeout diamond:1 result.png
or

Code: Select all

convert ZrFne.png -morphology edgeout diamond:1 -fill white -opaque black result2.png
or

Code: Select all

convert ZrFne.png \
\( -clone 0 -morphology edgeout diamond:1 -threshold 0 \) \
-compose multiply -composite -fill white -opaque black result3.png
Post Reply