Mapping Central color to areas covered by edges
Mapping Central color to areas covered by edges
Hi Everyone,
I am working on some images and would like to create an effect using an edge representation/skeleton of an image based on un-similar (unique) colours in the original image.
After which I will like to superimpose this edge mask on the original image and color the individual areas, one color (as dictated by the average/central of the colors present) per area.
I would appreciate any point in the right direction.
Cheers!
Aigo.
I am working on some images and would like to create an effect using an edge representation/skeleton of an image based on un-similar (unique) colours in the original image.
After which I will like to superimpose this edge mask on the original image and color the individual areas, one color (as dictated by the average/central of the colors present) per area.
I would appreciate any point in the right direction.
Cheers!
Aigo.
Re: Mapping Central color to areas covered by edges
My IM version is 7.0.6-0 Q16 X86_64
-
- Posts: 12159
- Joined: 2010-01-23T23:01:33-07:00
- Authentication code: 1151
- Location: England, UK
Re: Mapping Central color to areas covered by edges
Edges and skeletons are two different effects.
Sample inputs and outputs might help us understand what you want.
Sample inputs and outputs might help us understand what you want.
snibgo's IM pages: im.snibgo.com
Re: Mapping Central color to areas covered by edges
Hi,
my bad.
what I aim to achieve is a skeleton-like mask of an image derived from the distribution of colours which can be used to create a representation of the original image but with one colour, for each area. Akin to the technique used in creating in cartoons I guess, where whole sections of an image is represented with a single colour.
Thanks!
my bad.
what I aim to achieve is a skeleton-like mask of an image derived from the distribution of colours which can be used to create a representation of the original image but with one colour, for each area. Akin to the technique used in creating in cartoons I guess, where whole sections of an image is represented with a single colour.
Thanks!
-
- Posts: 12159
- Joined: 2010-01-23T23:01:33-07:00
- Authentication code: 1151
- Location: England, UK
Re: Mapping Central color to areas covered by edges
That seems similar to:
Flat-colour cartoons
Partition boundary masks
Cartoon and texture
But perhaps not exactly the same?
Flat-colour cartoons
Partition boundary masks
Cartoon and texture
But perhaps not exactly the same?
snibgo's IM pages: im.snibgo.com
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: Mapping Central color to areas covered by edges
You have not said what OS you are using. If on Unix-like systems, see my kmeans script at the link below. Also for any OS, see IM -mean-shift. Examples of the latter are at viewtopic.php?f=4&t=25504
Re: Mapping Central color to areas covered by edges
Yeah I am on UNIX, and both the k-means and mean-shift helped me with the investigation.fmw42 wrote: ↑2017-08-01T18:21:02-07:00 You have not said what OS you are using. If on Unix-like systems, see my kmeans script at the link below. Also for any OS, see IM -mean-shift. Examples of the latter are at viewtopic.php?f=4&t=25504
And just as is mentioned on the site, they are quite slow for obvious reasons.
Thanks!
Re: Mapping Central color to areas covered by edges
Yeah, the partition boundary masks are exactly what I am looking for.snibgo wrote: ↑2017-08-01T16:17:28-07:00 That seems similar to:
Flat-colour cartoons
Partition boundary masks
Cartoon and texture
But perhaps not exactly the same?
Sadly, for a newbie to IM like myself the tutorials are not easy to follow plus they are bat files.
Is there an equivalent tutorial but for Unix Systems?
Or an inbuilt function in IM that can help me with this, I don't want to do much. Just have a decent boundary mask that I can superimpose on the original image to trace.
Thank you for you help so far.
Best!
Aigo.
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: Mapping Central color to areas covered by edges
Perhaps you can provide an example input image. You can post to some free hosting service such as dropbox.com and put your URL here.
Please always provide your IM version and platform when asking questions, since syntax may vary.
Please always provide your IM version and platform when asking questions, since syntax may vary.
Re: Mapping Central color to areas covered by edges
Hi there.
Sorry about that.
Here's the sample image https://drive.google.com/file/d/0B3sq7o ... sp=sharing
IM version is 7.0.6-0, Mac-OS Sierra
Thanks!
Aigo
Sorry about that.
Here's the sample image https://drive.google.com/file/d/0B3sq7o ... sp=sharing
IM version is 7.0.6-0, Mac-OS Sierra
Thanks!
Aigo
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: Mapping Central color to areas covered by edges
Code: Select all
convert faces.png -canny 0x1+10%+30% faces_canny.png
Or perhaps a combination of kmeans and canny edges.
Code: Select all
kmeans -n 10 -m 10 faces.png tmp.png
convert tmp.png \( +clone -canny 0x1+10%+30% -negate \) -compose multiply -composite faces_kmeans_canny.png
Or
Code: Select all
kmeans -n 10 -m 10 faces.png tmp.png
convert tmp.png \( +clone -canny 0x1+5%+10% -negate \) -compose multiply -composite faces_kmeans_canny2.png