It is currently Tue Apr 23, 2024 8:10 pm


All times are UTC - 5 hours [ DST ]



Post new topic Reply to topic  [ 18 posts ] 
Author Message
 Post subject: Grayscale Conversion (B&W) Tutorial
PostPosted: Wed Nov 14, 2012 2:15 pm  (#1) 
Offline
GimpChat Member
User avatar

Joined: Jan 12, 2012
Posts: 178
Location: Mobile, AL USA
So, based on my own research/habits as well as input from some great folks here, I've started my attempt at tackling a description of all of the ways of converting an image to grayscale.

I'm hoping to list all the possible methods for grayscale conversion along with their relative strengths and weaknesses in an attempt to arrive at as tonally dense an image as possible to use as a basis for a final B&W image.

Overall, my workflow is similar to what Petteri Sulonen has described in his blog post on digital black and white.

Basically to first use whatever methods you can to achieve as tonally "dense" an image as possible (probably very flat and uninteresting image at this stage, but very full of detail and data).

Then to "print" this image by controlling contrasts and tones to produce your final vision of the intended B&W image.

Because the topic is so big, I've decided to write it up as separate posts. The first part is up where I have a look at what the standard "Desaturate" command does, and why. As always I'd love to hear what anyone thinks:

Getting Around in GIMP - Black and White Conversion (Part 1)
This first part of the tutorial mostly covers the built-in desaturating methods, and how they work.

Getting Around in GIMP - Black and White Conversion (Part 2)
This is mostly using the Channel Mixer, and some film approximation formulas.

Getting Around in GIMP - Black and White Conversion (Part 3)
This is about color decomposing an image to its constituent channels (and a Script-Fu for automatically generating all of the interesting B&W channels that may be of use).

Getting Around in GIMP - Black and White Conversion (Part 4)
Pseudogrey (thanks again Lyle!), c2g, and simple layer blending modes for controlling our conversions!

_________________
patdavid.net
Image
PIXLS.US F/OSS Photography


Last edited by patdavid on Fri Jan 11, 2013 10:30 am, edited 2 times in total.

Share on Facebook Share on Twitter Share on Orkut Share on Digg Share on MySpace Share on Delicious Share on Technorati
Top
 Post subject: Re: Grayscale Conversion (B&W) Tutorial
PostPosted: Wed Nov 14, 2012 3:05 pm  (#2) 
Offline
GimpChat Member
User avatar

Joined: Sep 24, 2010
Posts: 12516
Prime-junta's website is the best I've seen for b/w conversion info. I bookmarked this link several years ago Pat. Many cool ideas including the use of texture for grain (reason I found the site in the first place) can be gleaned from this site and I highly recommend folk view the site if you are interested in b/w conversions. Glad that you mentioned this site here in your post. I'll check your GIMP link later. :)

_________________
Lyle

Psalm 109:8

Image


Top
 Post subject: Re: Grayscale Conversion (B&W) Tutorial
PostPosted: Wed Nov 14, 2012 4:12 pm  (#3) 
Offline
Script Coder
User avatar

Joined: Oct 25, 2010
Posts: 4739
Marvelous as usual....

_________________
Image


Top
 Post subject: Re: Grayscale Conversion (B&W) Tutorial
PostPosted: Wed Nov 14, 2012 4:23 pm  (#4) 
Offline
GimpChat Member
User avatar

Joined: Jan 12, 2012
Posts: 178
Location: Mobile, AL USA
lylejk wrote:
Prime-junta's website is the best I've seen for b/w conversion info. I bookmarked this link several years ago Pat. Many cool ideas including the use of texture for grain (reason I found the site in the first place) can be gleaned from this site and I highly recommend folk view the site if you are interested in b/w conversions. Glad that you mentioned this site here in your post. I'll check your GIMP link later. :)


Absolutely agree with you here. In fact, I still use his grain map on any B&W images of mine regularly. I am hoping to do his original post justice by translating some things for GIMP users, but you'll clearly see the influence he had on me in approaching this work carefully with an eye on results. :)

_________________
patdavid.net
Image
PIXLS.US F/OSS Photography


Top
 Post subject: Re: Grayscale Conversion (B&W) Tutorial
PostPosted: Wed Nov 14, 2012 5:51 pm  (#5) 
Offline
Script Coder
User avatar

Joined: Oct 25, 2010
Posts: 4739
The experimenter in me tried the three methods on this rather synthetic image. What happens to the histogram is rather revealing.

Attachment:
Desaturate.png
Desaturate.png [ 77.14 KiB | Viewed 6535 times ]

_________________
Image


Top
 Post subject: Re: Grayscale Conversion (B&W) Tutorial
PostPosted: Wed Nov 14, 2012 9:21 pm  (#6) 
Offline
GimpChat Member
User avatar

Joined: Jan 12, 2012
Posts: 178
Location: Mobile, AL USA
ofnuts wrote:
The experimenter in me tried the three methods on this rather synthetic image. What happens to the histogram is rather revealing.


Yes, there is quite a precipitous drop off in the upper thirds of the histogram! Mostly expected due to the relative amount of green (and green+red) vs. everything else.

_________________
patdavid.net
Image
PIXLS.US F/OSS Photography


Top
 Post subject: Re: Grayscale Conversion (B&W) Tutorial
PostPosted: Tue Dec 11, 2012 1:37 pm  (#7) 
Offline
GimpChat Member
User avatar

Joined: Jan 12, 2012
Posts: 178
Location: Mobile, AL USA
As an attempt to keep from spamming new topics on this sub-forum, I'm just going to update this post with the new parts of the tutorial. See the first post for updates...

_________________
patdavid.net
Image
PIXLS.US F/OSS Photography


Top
 Post subject: Re: Grayscale Conversion (B&W) Tutorial
PostPosted: Thu Dec 20, 2012 4:41 am  (#8) 
Offline
Script Coder
User avatar

Joined: Jun 22, 2010
Posts: 1171
Location: Here and there
Pat,
just to make you aware, your decompose script in Part 3 uses a function (gimp-item-set-name) that is only available in 2.8.x and will not work on 2.6.x so you need to update the details on the registry to make it clear.

Kevin


Top
 Post subject: Re: Grayscale Conversion (B&W) Tutorial
PostPosted: Thu Dec 20, 2012 8:31 am  (#9) 
Offline
GimpChat Member

Joined: May 09, 2012
Posts: 914
Bonjour,

some advertising for me :oops: :

For a total extent of the decomposition of an image into grayscale you can use the filter "Grizou" of G'MIC. This is the only one I know who do this.
viewtopic.php?f=9&t=5895

You can experiment with the image "Desaturate.png" proposed by Ofnuts.

This filter renders images as black and white.

Another filter for black and white. : viewtopic.php?f=9&t=5991


Top
 Post subject: Re: Grayscale Conversion (B&W) Tutorial
PostPosted: Thu Dec 20, 2012 10:17 am  (#10) 
Offline
GimpChat Member
User avatar

Joined: Jan 12, 2012
Posts: 178
Location: Mobile, AL USA
paynekj wrote:
Pat,
just to make you aware, your decompose script in Part 3 uses a function (gimp-item-set-name) that is only available in 2.8.x and will not work on 2.6.x so you need to update the details on the registry to make it clear.

Kevin


Kevin,

Thank you for pointing that out (I forgot about the gimp-item api being new)! I've updated the registry page to only list 2.8...

I actually may go ahead and try editing the script to run against 2.6 as well.

_________________
patdavid.net
Image
PIXLS.US F/OSS Photography


Top
 Post subject: Re: Grayscale Conversion (B&W) Tutorial
PostPosted: Thu Dec 20, 2012 11:01 am  (#11) 
Offline
GimpChat Member

Joined: Apr 12, 2010
Posts: 5870
@patdavid

i left a comment to your decompose script in the registry but i fear he went as lost (or better disjointed from the topic :gaah )

I used often a similar decompose script and i agree with most of your selection of "useful" channels " that may contain good BW interpretation of colour image

except for what about CMYK

I very seldom find the only one you included ,K useful

While very often the C M and Y give surprisingly good results...
( from a artistic point of view )
if not directly as positive as negatives


The word negative and positive is not the most adapt here , let say that often look and would work as good BW negatives and so if inverted they give a interesting results

Gmic would allow to enlarge the number of "useful channels" because support much more image mode,
and basically in each image mode the channel corresponding to the ... Luminosity or Luminance or Lightness or Value or similar may be worth a look.

I didn't try much the Samj bw filter except to see that can give very nice results and much control but i don't know if uses a similar principle .

About filters i would like one that just allow to browse and confront the different channels and just select one or more to render.
..a bit as your script but with a preview

all RGB ,the (inverted) CYM of CYNK ,and for all others modes the correspondent of the Lightness channel ..a bit as your script but with a preview

_________________
My 3D Gallery on Deviantart http://photocomix2.deviantart.com/
Main gallery http://www.flickriver.com/photos/photocomix-mandala/
Mandala and simmetry http://www.flickriver.com/photos/photocomix_mandala/

Image

Mrs Wilbress


Top
 Post subject: Re: Grayscale Conversion (B&W) Tutorial
PostPosted: Thu Dec 20, 2012 11:25 am  (#12) 
Offline
GimpChat Member
User avatar

Joined: Jan 12, 2012
Posts: 178
Location: Mobile, AL USA
PhotoComix wrote:
@patdavid

i left a comment to your decompose script in the registry but i fear he went as lost (or better disjointed from the topic :gaah )

I used often a similar decompose script and i agree with most of your selection of "useful" channels " that may contain good BW interpretation of colour image

except for what about CMYK

I very seldom find the only one you included ,K useful

While very often the C M and Y give surprisingly good results...
( from a artistic point of view )
if not directly as positive as negatives


The word negative and positive is not the most adapt here , let say that often look and would work as good BW negatives and so if inverted they give a interesting results

Gmic would allow to enlarge the number of "useful channels" because support much more image mode,
and basically in each image mode the channel corresponding to the ... Luminosity or Luminance or Lightness or Value or similar may be worth a look.

I didn't try much the Samj bw filter except to see that can give very nice results and much control but i don't know if uses a similar principle .

About filters i would like one that just allow to browse and confront the different channels and just select one or more to render.
..a bit as your script but with a preview

all RGB ,the (inverted) CYM of CYNK ,and for all others modes the correspondent of the Lightness channel ..a bit as your script but with a preview


I only just saw your question on the registry this morning, sorry about that!

I answered you there, but I'll answer here to be complete.

I think the script decomposes to everything that you want already?

I didn't include the CMY from the CMYK decompose, because the resulting pure color channels were gross. :)

I did include the CMY channels from the CMY decompose, because those channels are much "cleaner" in their output. (Unless something is very wrong with my GIMP install?)

For example, here is the C channel from CMY decompose:
Attachment:
CMY-C.jpg
CMY-C.jpg [ 125.13 KiB | Viewed 1747 times ]


Here is the C channel from the CMYK decompose:
Attachment:
CMYK-C.jpg
CMYK-C.jpg [ 93.97 KiB | Viewed 1747 times ]


I can only guess that the removal of K from the C channel in the CMYK decompose has led to the nasty quantization artifacts I am seeing in the result?

Are you seeing something different if you decompose to CMYK?

_________________
patdavid.net
Image
PIXLS.US F/OSS Photography


Top
 Post subject: Re: Grayscale Conversion (B&W) Tutorial
PostPosted: Fri Jan 11, 2013 10:32 am  (#13) 
Offline
GimpChat Member
User avatar

Joined: Jan 12, 2012
Posts: 178
Location: Mobile, AL USA
Ok, finally got around to finishing part 4, in case anyone might be interested.

Pseudogrey (thanks again Lyle).
c2g - i've been using this for ages for a more contrasty layer (or a straight conversion if I crank the settings and leave it alone for a few hours).
Layer blending modes - simple conversions using a couple of layer modes (nothing too fancy).

_________________
patdavid.net
Image
PIXLS.US F/OSS Photography


Top
 Post subject: Re: Grayscale Conversion (B&W) Tutorial
PostPosted: Fri Jan 11, 2013 2:26 pm  (#14) 
Offline
GimpChat Member
User avatar

Joined: Sep 24, 2010
Posts: 12516
Now you need to do a tut on faking IR. Been experimenting with CMY decompose, inverting the C and then copying the Y to top layer and setting that result to Overlay. Still may requires some tweaking. :)

_________________
Lyle

Psalm 109:8

Image


Top
 Post subject: Re: Grayscale Conversion (B&W) Tutorial
PostPosted: Fri Jan 11, 2013 2:35 pm  (#15) 
Offline
GimpChat Member
User avatar

Joined: Sep 24, 2010
Posts: 12516
Example of the flow with some wavelet noise cleaning applied to the sky. :)


Attachments:
L1000042.JPG
L1000042.JPG [ 964.92 KiB | Viewed 1660 times ]
L1000042-CMY.JPG
L1000042-CMY.JPG [ 569.34 KiB | Viewed 1660 times ]

_________________
Lyle

Psalm 109:8

Image
Top
 Post subject: Re: Grayscale Conversion (B&W) Tutorial
PostPosted: Tue Jan 15, 2013 12:54 pm  (#16) 
Offline
GimpChat Member
User avatar

Joined: Jan 12, 2012
Posts: 178
Location: Mobile, AL USA
lylejk wrote:
Now you need to do a tut on faking IR. Been experimenting with CMY decompose, inverting the C and then copying the Y to top layer and setting that result to Overlay. Still may requires some tweaking. :)

This is actually a neat idea, and I'd love to spend some time on it later. I guess we'd first have to identify the spectral response of IR to understand better how the conversion should proceed... It may be something worth exploring here later this year.

_________________
patdavid.net
Image
PIXLS.US F/OSS Photography


Top
 Post subject: Re: Grayscale Conversion (B&W) Tutorial
PostPosted: Tue Jan 15, 2013 3:22 pm  (#17) 
Offline
GimpChat Member
User avatar

Joined: Sep 24, 2010
Posts: 12516
Like I said Pat; it's fake. You really can't 100% create IR from an image I don't believe, but I've ran across several folk that like faking them. The yellow channel overlay and some other blends work for me. Makes skies darker anyway and, if done right, you can still see the clouds. :)

_________________
Lyle

Psalm 109:8

Image


Top
 Post subject: Re: Grayscale Conversion (B&W) Tutorial
PostPosted: Tue Jan 15, 2013 4:20 pm  (#18) 
Offline
GimpChat Member
User avatar

Joined: Jan 12, 2012
Posts: 178
Location: Mobile, AL USA
Sure, I can see the appeal of trying to fake an IR image. (If I was more hardcore, and rich enough, I would mod my cameras for IR only for sure!).

What I mean is, we should be able to compile a reasonable cross section of IR responses for given objects, and might be able to apply them in a more realistic manner to fake the results. (Such as skies being very dark, while foliage tends to white, etc...). It might be a fun thing to work out! :)

_________________
patdavid.net
Image
PIXLS.US F/OSS Photography


Top
Post new topic Reply to topic  [ 18 posts ] 

All times are UTC - 5 hours [ DST ]


   Similar Topics   Replies 
No new posts A script solution requested: conversion from text-only pdf to ...

2

No new posts Dull colors in PDF export--RGB to CMYK conversion problem

10

No new posts Attachment(s) 76 Halftone Grayscale Brushes

29

No new posts Attachment(s) Restoring faded grayscale document

6

No new posts Attachment(s) 16-bit grayscale graylevels "65535 available tonal steps": where?

5



* Login  



Powered by phpBB3 © phpBB Group