Photoshop Cutout Filter Equivalent

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
User avatar
anthony
Posts: 8883
Joined: 2004-05-31T19:27:03-07:00
Authentication code: 8675308
Location: Brisbane, Australia

Post by anthony »

Can you describe what the cutout filter does? If we knew we may be able to give you an equivelent. We are not all photoshop uses. I myself use IM a lot, and only go to Gimp (not photoshop) if I really need to.
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
dognose
Posts: 265
Joined: 2005-03-08T22:16:37-07:00

Post by dognose »

Here's an example of photoshop cutout. It's just a way of reducing colors.

Image

I think I was about to do it before with IM, but I forget now.

Whenever I try to reduce the colors with "-colors #" the photo turns out bland.

I've also tried "-segment 1x2" with different degrees of success.

I've also tried gradient mapping:
" -blur 0x12 -fx intensity -normalize -size 1x9 gradient:lavender-navy -fx 'v.p{0,(1-G)*v.h}' "
but that only does it in a single tone, I'd want more realistic coloring.

Is there another coloring method that would produce this effect? I'd imagine it'd have to be combined with -blur or something to get the smooth lines.
User avatar
anthony
Posts: 8883
Joined: 2004-05-31T19:27:03-07:00
Authentication code: 8675308
Location: Brisbane, Australia

Post by anthony »

To reduce colors without the 'bland' dithering, also use +dither
I hope to be writing up this stuff in IM examples over the weekend
at the bottom of the 'Colors' Examples Pages.

You could also try -posterize and/or -map to remap colors to specific values.
As I said I hope to example all this soon.
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
dognose
Posts: 265
Joined: 2005-03-08T22:16:37-07:00

Post by dognose »

Cool, thanks anthony, that helps. I still have to use the blur factor, which tends to round out the edges. In the Cutout effect, the edges are more straight is seems.

The autotrace seems to produce something similar to cutout as well, but I end up w/ little white patches in between certain places on the image. Any idea on out fill in the colors better? Even still, it's a cool effect.

-d
User avatar
anthony
Posts: 8883
Joined: 2004-05-31T19:27:03-07:00
Authentication code: 8675308
Location: Brisbane, Australia

Post by anthony »

You can always use -map to specify the colors to replace. If you can define a good set it should work better than IM guessed (averaged) colors.

Over the weekend I wrote up the -map stuff...
http://www.cit.gu.edu.au/~anthony/graph ... #reduction

I have not done the -colors and it looks like -posterize is currently not doing anything. I am reporting that as a bug.
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
bigtable
Posts: 14
Joined: 2008-01-23T22:37:27-07:00

Re: Photoshop Cutout Filter Equivalent

Post by bigtable »

Hello ~ I too am looking for some advice to replicate the photoshop cutout filter. I realize this thread is pretty old but I was hoping to luck out and get some helpful hints. I spent the last four hours or so having a go at a variety of techniques listed at http://imagemagick.org/Usage/ with not too much luck replicating the PS filter.

I would imagine you and others hate it when people like me ask for photoshop-like filters! So forgive me if I've offended.

Anthony, you mention some follow-up docs regarding -colors and -maps but I cannot seem to locate them. Thanks for all you've done for the community.

Best regards,
Luke
User avatar
anthony
Posts: 8883
Joined: 2004-05-31T19:27:03-07:00
Authentication code: 8675308
Location: Brisbane, Australia

Re: Photoshop Cutout Filter Equivalent

Post by anthony »

-map is for reducing colors in an image to a fixed user defined set of colors. The replacement is a technique called Dithering .
-colors is similar but letting IM find the 'best' set of colors. This is a method knowns as Quantization

See IM examples, Quantization and Dithering
http://imagemagick.org/Usage/quantize/

Neither are filters.


If you can discover what a 'cutout' filter does, then we may be able to help you. But it may be better to start a new thread for that.
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
Bonzo
Posts: 2971
Joined: 2006-05-20T08:08:19-07:00
Location: Cambridge, England

Re: Photoshop Cutout Filter Equivalent

Post by Bonzo »

There is a site doing something similar: http://vectormagic.stanford.edu/

You can get some nice results from it:
Image
bigtable
Posts: 14
Joined: 2008-01-23T22:37:27-07:00

Re: Photoshop Cutout Filter Equivalent

Post by bigtable »

Anthony: thanks for the info -- I'm going to start a new thread per your suggestion and try to explain what the cutout filter does in IM proper terms. I think I'm close.

Bonzo: if the process at http://vectormagic.stanford.edu/ was available to use with my own equipment it would be without a doubt perfect for my application. Essentially, I'm attempting to do just that but I'm not concerned with an actual vector output. I just want to simulate it -- usually to the point where I reduce to four solid colors with a very light blurring on the edges.

Thanks to both of you -- I'm very grateful for your responses!

Luke
bigtable
Posts: 14
Joined: 2008-01-23T22:37:27-07:00

Re: Photoshop Cutout Filter Equivalent

Post by bigtable »

Bad form or not, I'll reply to my own email -- I answered my own questions.

Turns out that the -segment option is what I wanted.

I think I have a good workflow; off to read more about the CLI to see if I can combine some steps and speed things up.

Thank again!

Luke
djkprojects
Posts: 21
Joined: 2012-07-06T04:44:48-07:00
Authentication code: 13

Re: Photoshop Cutout Filter Equivalent

Post by djkprojects »

Hello,

I know it's an old post but still worth asking.

Have you ever managed to get Cutout result like in Photoshop ?

Thanks
Post Reply