Hi all. I’m a newbie and probably still don’t have the vocabulary down to best express what I’m after.
I’d like to exaggerate the edges of a portrait photo by taking a gradient_rgb, negating it, converting it to grayscale, darkening the dark bits, and making a layer of just those with a transparent background to place over an altered version of the original.
The first few bits are easy enough…
gmic image.jpg +fx_gradient2rgb 3,10,65,0,0,0,50,50 'negate[-1]' 'luminance[-1]' montage H
@zedlopez Welcome to the forum! With CLI, there are many ways to achieve your goal. Sticking with what you already have, I can think of two simple ways to proceed. Before that though, why don’t you use fx_gradient_norm instead? That would save you from having to use negate and luminance.
Method 1
Since gradient norm results in white gradient lines on black you just subtract that (make sure you normalize it first n 0,255 or the suitable range) from the original. After that you cut (clip) to the proper range c 0,255 or the suitable range.
Method 2
You will need to negate the gradient norm to be black gradient lines on white. normalize both images to 0,255 or each to the suitable range then ‘blend darken’.
Edit: I write “suitable range” because the blending or subtracting depends on where the two layers are in relation to each other. You will have to adjust to your taste and image content.
I didn’t want to bog down my question with other topics, but I’m ultimately going for an illustrated b&w look; this edge exaggeration I want to try is just one thing I have in mind, so it’s not a dealbreaker that it looks bad when applied to the original image.
I liked the soft glowy effect from fx_gradient2rgb and didn’t like the faint paisley-ish details from gradient_norm. I expect there’s an incredibly simple way to make the faint lines disappear, but I don’t know it yet…
I’ve been doing lots of experimentation with the gmic plugin (and cribbing from the commands in the verbose log output). But I want to stick to learning the gmic command-line-- I ultimately want to batch process a bunch of images.
Try searching the forum. There are plenty of threads on achieving an illustrated look and B&W processing. Sometimes like yours, the thread title doesn’t say spell it out but it is covered because we can get off topic in a good way. Also take a look at the Play Raw category. Often if the source image is a portrait you get to observe what people do when they take the illustrative approach.