Converting Colour To Black And White

ian barber

Admin
Registered
Do you have any questions regarding converting the colour image to black and white ?

Use this section to ask or share techniques regardless of how trivial you may think they are.
 
i am wondering if there are folks here in this forum using GIMP GEGL's C2G software for converting color photos to b&w images ? this c2g tool appears to me like a very particular way of focally/locally pixel-by-pixel converting colors to gray-scale. i just never met anybody using it on a regular basis like me. i would love to start a serious discussion about the pros and contras of this method.
please, don't suggest photoshop and alike products as they are out of reach for me and not on my radar.
 
I use DxO PhotoLab in combination with its excellent FilmPack add-on. That gives me 38 B&W film renderings from some of the classic film brands. But it's not just about presets, as you can hand-tune any of them, in much the same way as you can adjust film development and printing.

It also includes a channel mixer; and a colour wheel, which allows me to adjust the colour saturation and luminance for eight colours, all of which work with a B&W conversion.

I particularly like the possibility of adding colour filters to better separate tones. Like this shot, processed with a red filter to bring out the cloud detail without having to use micro or fine contrast, which can wreck the smooth blue sky behind the clouds.

_JNA0011_2_DxO.jpg
 
Last edited:
There are so many methods and options of converting an image. I use several myself depending on the image: LR, Camera RAW, SilverEffexPro, DXO FilmPack, PS LAB, and a new technique I learned about a year ago, using the HSL slider in PS which produces remarkable results. As long as one realizes (and I'm sure most of you do), the image will not be complete by just converting it to BW. It's only the beginning step.
 
thank you both for your replies, Joanna and stevenz - very nice picture, Joanna !
you know in my question i try to focus mainly on one topic, a technicality, which is to compare local/focal vs global data processing methods, for example in this context of color to gray conversion. i myself worked for years in image processing and i am well aware about focal contrast nuances that may or may not deserve to be looked at or addressed or perhaps even enhanced via a given technique. that's why i am so intrigued by this relatively old algorithm implemented in the GIMP GEGL c2g code that does its enhancements locally but universally applied, carving out beautiful gray scale images that often reveal more detail than what desaturation techniques can offer.
i am aware that new software for photographic image processing make silently use of all kind of 'AI' driven solutions which come closer to the idea of locally or rather regionally altering signal intensities - though they begin, for my taste at least, to alter image content and hence create new realities which is not what i speak about here.
anyway, this is an old topic of mine and i am just trying to find the right club to advance with theses questions and answers and to do test comparisons. i tried such at the l-leica-forum but felt a bit left alone. perhaps i am just not aware of all the new goodies modern commercial software do offer ?
 
Regarding Joanna's comments: I have often thought that emulating glass filters before monochrome conversion was the way to go, probably because it mimics what we do with film. Unfortunately, Affinity Photo seems to ignore optical filter emulations during conversion which I have never been able to get to the bottom of. I know Ian B has some LUTs which act as optical filters but they always seem to give a comb filter response on the histogram (as do all LUTs), which doesn't feel optimal. I do use PAL/JPEG coefficients to "correct" luminance values which gives a more pleasing conversion in these eyes.

Regarding Pisti's comments: I am really not up to speed on local adjustments, although I would like to understand better. I am guessing you are talking about local contrast adjustments such as you might find in an HDR conversion but I am very unsure of my ground.
 
thank you, Glenn, for your comment : look, i just copied this sentence from the software author's website :
"Color to grayscale conversion, uses envelopes formed from spatial color differences to perform color-feature preserving grayscale spatial contrast enhancement." see also here.
what it means that importantly and crucially, like in a search light approach, the algorithm is applied on a pixel by pixel basis in the near (local) and more distant pixel neighbourhood. that's why it takes minutes to run the code on a single image, where pixel size and number of CPU cores determine run time.
i think it's a bit dry to speak here about all this - at some point it could make more sense to do a direct comparison between the various conversion techniques with a single test picture, a difficult standard photo in that sense, one that perhaps features a challenging optical scenario, best in RAW file format, DNG or similar.
earlier such comparisons i was involved in were not truly satisfying as not the same pre- and post-processing steps were applied, the processing pipelines differed not only for the various c2g techniques in question (that's what we were interested in) but also in other processing steps such as automatically applied sharpening in facial areas and other high-level gimmicks.
in any case, i am new to this forum and don't intend to bore folks to death with such technicalities right from the start - so, i am going to sieve a bit through older posts here and see what has been discussed in this area.
 
An interesting article thank you.

So the two techniques I describe above are both included here. The PAL/JPEG coefficients (Y = (0.3xR) + (0.59xG) + (0.11xB)) I mentioned are simply one of the ways of getting a luminance value and are taken from calculations made when colour TV was coming to the fore and monochrome TVs had to display the same signals naturally. Other conversion coefficients are used these days to match modern displays but the the technique is effectively the same and the visual results similar. The channel mixer technique is a simple extension of the method. I find Affinity Photo good in this respect because when the sliders are in the centre the image is simply desaturated. I discovered in my early days on the forum that PS applies coefficients by default during conversion and therefore operates differently.

Affinity Photo also has a tone mapping persona (used for HDR) with a 'local contrast' control, a spatial filter that looks at adjacent pixels to increase perceived contrast which sounds similar to C2G, and indeed gives similar visual results. I have never really got on with it because the results always look over-processed in these eyes and don't suit my style. They have a great initial impact on the viewer but quickly become tiring. I sometimes think that reducing the amount of tone compression and local contrast to a point where they are almost imperceptible might be a technique worth exploring, perhaps if combined with a blend mode change that includes some of the original image.

I would be interested to hear how you get on with C2G as it is quite possible that I am missing the point of how best to use this kind of filter.

If you wish to continue this conversation, it would be worth separating it off to its own thread. This particular thread is simply an introduction to this section of the forum. That way, interested readers will know where to find it.
 
Last edited:
i think it's a bit dry to speak here about all this - at some point it could make more sense to do a direct comparison between the various conversion techniques with a single test picture, a difficult standard photo in that sense, one that perhaps features a challenging optical scenario, best in RAW file format, DNG or similar.

In around 20 years of digital photography I have turned out stunning B&W prints without having ever resorted to all this ancient trickery. I do wonder why you are bothering, unless it's for purely research purposes, or do you think this will give you better prints?

There is so much more to B&W conversion than simply crunching the numbers. Which is why I leave it to the genii at DxO to provide tools that make it possible to turn out stunning images in minutes without ever leaving the RAW file.
 
thank you both for your attention, Joanna and Glenn - i will then start a separate thread for this topic of local vs global contrasts.

in any case, as a closing remark, i am trying to describe here what is a second and perhaps a deeper (psychological) reason for me for using the here introduced automated c2g tool : it's not that i hate manual work but i try to avoid randomness and uncertainty in my procedural pipeline for converting color to gray scale pixels at any given hour day or year. nor me nor my eyes nor brain nor mood offer the constant state necessary for reliably process a 'conventional' conversion of photos (with desaturation and such). surely each converted photo would differ due to my fiddling with sliders or numbers when i set at different hours of the day some random conversion parameters.

in contrast, shooting b&w film (or a monochrom digital camera) with a color filter is in this context a true 'static' pleasure as it leaves no room for randomness to the outcome: one click, and there we go, a picture with a fix distribution of signal intensity, nothing to change about (except perhaps for a final touch to contrast or luminosity). working with c2g a similar process : input is a color image, then we apply by button press the automated and c2g 'color filter' with some 'hardwired' run parameters, and out comes the monochromatic result. those very few c2g run options had been set much earlier, i hadn't must change my c2g numbers of [4096,32,16] for years ! just like with film there only remains a bit of post processing to do, adjusting contrasts or luminosity and such.

a friend of mine in the film industry even experimented with the very same technique and applied the c2g filter to 4D material, brief movies, i.e. a pianist playing on a keyboard - the result was appealing, interesting to say the least !

now, as we know, nothing is perfect, there are undesired uncontrolled effects with c2g too as this test picture shows... but that's another topic to speak about and corresponds with my first (technical) reason for using this c2g filter which is how it addresses local color contrasts for the computing of gray scale pixels.

with this i am stopping here and wish you a pleasant 'fin de semaine'.
 
There are so many methods and options of converting an image. I use several myself depending on the image: LR, Camera RAW, SilverEffexPro, DXO FilmPack, PS LAB, and a new technique I learned about a year ago, using the HSL slider in PS which produces remarkable results. As long as one realizes (and I'm sure most of you do), the image will not be complete by just converting it to BW. It's only the beginning step.
Do you have a link to the technique of using the HSL sliders?
 
thank you both for your attention, Joanna and Glenn - i will then start a separate thread for this topic of local vs global contrasts.

in any case, as a closing remark, i am trying to describe here what is a second and perhaps a deeper (psychological) reason for me for using the here introduced automated c2g tool : it's not that i hate manual work but i try to avoid randomness and uncertainty in my procedural pipeline for converting color to gray scale pixels at any given hour day or year. nor me nor my eyes nor brain nor mood offer the constant state necessary for reliably process a 'conventional' conversion of photos (with desaturation and such). surely each converted photo would differ due to my fiddling with sliders or numbers when i set at different hours of the day some random conversion parameters.

in contrast, shooting b&w film (or a monochrom digital camera) with a color filter is in this context a true 'static' pleasure as it leaves no room for randomness to the outcome: one click, and there we go, a picture with a fix distribution of signal intensity, nothing to change about (except perhaps for a final touch to contrast or luminosity). working with c2g a similar process : input is a color image, then we apply by button press the automated and c2g 'color filter' with some 'hardwired' run parameters, and out comes the monochromatic result. those very few c2g run options had been set much earlier, i hadn't must change my c2g numbers of [4096,32,16] for years ! just like with film there only remains a bit of post processing to do, adjusting contrasts or luminosity and such.

a friend of mine in the film industry even experimented with the very same technique and applied the c2g filter to 4D material, brief movies, i.e. a pianist playing on a keyboard - the result was appealing, interesting to say the least !

now, as we know, nothing is perfect, there are undesired uncontrolled effects with c2g too as this test picture shows... but that's another topic to speak about and corresponds with my first (technical) reason for using this c2g filter which is how it addresses local color contrasts for the computing of gray scale pixels.

with this i am stopping here and wish you a pleasant 'fin de semaine'.
Do I understand correctly that your interest is exclusively in AI software produced mono and specifically not in manual mono editing ?
 
Do I understand correctly that your interest is exclusively in AI software produced mono and specifically not in manual mono editing ?
that's very true : i try to avoid the manual local editing as much as possible (except for the obligatory global contrast and luminosity adjustments) - but i am (currently) no fan at all of any AI driven editing technique. perhaps i wasn't too clear about that earlier.
however i make use of a tool which is far from being 'AI' but instead uses a fairly old though clever algorithm to perform pixel-by-pixel local gray-scale signal adjustments based on the pixels regional color surroundings. i use GIMP's GEGL c2c software on a daily basis and invoke it by 'button press' or via CLI.
 
What are the commands when using the CLI
i work on unix machines and would typically run the code with something like this :
gegl infile -o outfile -- gegl:c2g radius=4096 samples=32 iterations=16
with my standard run variables [4096/32/16] for the 24MP photos my camera produces.
 
forgot to mention that the code is very compute intensive - and may take minutes on a larger matrix - or at times even longer ! having many CPU cores and enough RAM surely help...
 
I was wondering if this could be used in a BAT file for windows or Bash for MAC
i am not familiar with BAT on windows, but bash (or z-shell these days) commands or scripts on MAC surely would work. on linux, i use c2g via bash CLI or with GIMP's GUI. because i convert a big portion of my photos from color to grayscale the CLI approach is convenient. once i settled with those few run options i don't need to change things and just run the setup as a blackbox approach.
 
here a few more run-tips for GEGL's c2g software :
gegl --info gegl:c2g
enhance-shadows is not a bad option to run with :
enhance-shadows=True
i would love to exchange high-quality photos (RAW DNG files?) with interested folks and test kind of systematically pros and cons of the various c2g conversion techniques on the 'market'.
good luck! need to feed the family now. bye, pisti
 
Back
Top