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
Post
by diegomage » 2017-03-19T22:04:31-07:00
How i could extract edge from this images without lose the color of edges
Please help me with this
fmw42
Posts: 25562 Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA
Post
by fmw42 » 2017-03-20T09:57:15-07:00
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
Post
by diegomage » 2017-03-20T09:58:22-07:00
its not black and whit has various colors
diegomage
Posts: 205 Joined: 2017-03-08T10:12:28-07:00
Authentication code: 1151
Post
by diegomage » 2017-03-20T09:59:53-07:00
#340002
#340001
#340003
#340004
diegomage
Posts: 205 Joined: 2017-03-08T10:12:28-07:00
Authentication code: 1151
Post
by diegomage » 2017-03-20T10:00:26-07:00
I need all edges with this four color
diegomage
Posts: 205 Joined: 2017-03-08T10:12:28-07:00
Authentication code: 1151
Post
by diegomage » 2017-03-20T10:01:28-07:00
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
Post
by diegomage » 2017-03-20T10:02:52-07:00
seems like the same color but are differents
#340002
#340001
#340003
#340004
fmw42
Posts: 25562 Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA
Post
by fmw42 » 2017-03-20T10:59:09-07:00
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
Post
by diegomage » 2017-03-20T11:08:06-07:00
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
fmw42
Posts: 25562 Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA
Post
by fmw42 » 2017-03-20T11:09:32-07:00
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
Post
by diegomage » 2017-03-20T11:15:50-07:00
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
Post
by diegomage » 2017-03-20T11:16:43-07:00
Please sorry for not explain well
diegomage
Posts: 205 Joined: 2017-03-08T10:12:28-07:00
Authentication code: 1151
Post
by diegomage » 2017-03-20T11:34:41-07:00
I see and another post that mask is not useful for extract edges
fmw42
Posts: 25562 Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA
Post
by fmw42 » 2017-03-20T11:38:49-07:00
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.
fmw42
Posts: 25562 Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA
Post
by fmw42 » 2017-03-20T11:58:02-07:00
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