Silver Efex Effect with Imagemagick?

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?".
Locked
buchert
Posts: 41
Joined: 2015-02-13T11:15:29-07:00
Authentication code: 6789

Silver Efex Effect with Imagemagick?

Post by buchert »

Is there a command I can use that will give me a result approximate to the Silver Efex effect?

Some Silver Efex examples:

Image

Image

User avatar
fmw42
Posts: 26383
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Silver Efex Effect with Imagemagick?

Post by fmw42 »

It is called -colorspace gray when used with a color image.

Code: Select all

convert image -colorspace gray result
or

Code: Select all

convert image -grayscale option result
See https://imagemagick.org/script/command- ... #intensity for choice of option

Or if on a Unix-like system, try my script, color2gray, at my link below.

snibgo
Posts: 13034
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: Silver Efex Effect with Imagemagick?

Post by snibgo »

The examples shown seem to have enhanced local contrast. There are many ways to do that with IM, for example "-unsharp" with a large sigma. See also examples at Maximise local contrast.
snibgo's IM pages: im.snibgo.com

User avatar
fmw42
Posts: 26383
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Silver Efex Effect with Imagemagick?

Post by fmw42 »

Please post example input and corresponding desired output images. What is your ImageMagick version and platform? The software you reference has a lot of controls to make different effects. What effect do you actually want? Please be more specific.

User avatar
fmw42
Posts: 26383
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Silver Efex Effect with Imagemagick?

Post by fmw42 »

Here is one emulation of local contrast using my space (spatially adaptive contrast enhancement) script. It runs only on Unix-like systems.

Input:
Image

Simple grayscale conversion:

Code: Select all

convert river_boat.png -colorspace gray river_boat_gray.png
Image

SPACE:

Code: Select all

convert river_boat.png -colorspace gray miff:- | space -c 2 -w 5 - river_boat_space_c2.png
Image

SPACE:

Code: Select all

convert river_boat.png -colorspace gray miff:- | space -c 2 -w 5 - river_boat_space_c2_w5.png
Image

buchert
Posts: 41
Joined: 2015-02-13T11:15:29-07:00
Authentication code: 6789

Re: Silver Efex Effect with Imagemagick?

Post by buchert »

Thanks for your help guys.

On the following two color images I tried -colorspace gray, along with various -intensity methods. But none of the results were to my liking.

Image

Image

I also tried Fred's Space script and didn't like the results either. EDIT: Actually I did like the result of Fred's space script (i mixed up the results, so got confused). This is the result of using his space script:

Image

This produced the result I want.

FYI G'Mic has a command called FreakyBW, which produces a pretty good result, thought not as good as Fred's space script:

Code: Select all

gmic *jpg -gimp_freaky_bw 90,20,0,0,0,0 -o output."$(date +"%Y%m%d.%H%M%S%3N")".jpg
Image

User avatar
fmw42
Posts: 26383
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Silver Efex Effect with Imagemagick?

Post by fmw42 »

You can adjust the arguments for -w and -g in my space script to get different effect strengths.

Locked