Image processing

Interpolating (hue) angles

Study 9 min.
In image processing, retouchers may want to apply a saturation boost on specific hues only. Typically, uniform saturation corrections follow a basic linear transfer function $sat_{out} = gain \cdot sat_{in}$, where $gain$ is a real positive constant. To target specific hues, we simply rewrite $sat_{out}(hue) = gain(hue) \cdot sat_{in}$ where $gain$ is then a function. The most common way to declare $gain$ is to provide users with 8 discrete saturation nodes for 8 evenly-spaced hues, and interpolate smoothly between nodes.
Lire la suite →

Open source and professional photography : lies and wishes

Opinion 8 min.
There is one thing you will find on the home page of pretty much any open source (call it libre or free if you will, those lines are blurred) image editing software : the promise that it is, somehow, suitable for professionals. Marketing has abused that word for decades, it is only natural that it should affect non-commercial and non-profit projects as well, just to try to buy some cheap credibility.
Lire la suite →

WebP is so great… except it's not

10 min.
I’m a responsible web designer, and as such, since WordPress (finally) accepts media uploads of image/webp MIME type and since all web browsers  newer than september 2020 (even Apple Safari \o/) can display it, I have been moving my photos library to WebP . After all, when you create content, the least you can do is to also provide the smoothest user experience around it. WebP falls close to magical: lookie those file weights !
Lire la suite →

The sRGB book of color

1 min.
This page is inspired by the Munsell book of color. It aims at showing the sRGB gamut volume (all the visible colors that can be encoded as sRGB triplets), projected into a perceptually uniform lightness/chroma space (using JzAzBz color space1), and sliced across hue planes. The sRGB space is the lowest common denominator of all general-audience screens, and is deemed fit to choose colors for GUI, logos and drawings that should sit correctly on any display.
Lire la suite →

Image processing does not kill people… and it's a shame

25 min.
Among the technical fields, quite a few have the potential to harm the public : the first that come to mind are medicine and civil engineering. Both have in common their scientific basis : studies, data, models and history form a corpus of knowledge and tools used by the practitioners to help making choices. However scientific their basis is, the practice remains an art or a craft. Indeed, while the state of the art provides models, data and methods, it is the practitioner’s responsibility to identify which model applies to the current circumstances, which tools are the best suited to the current situation, and which are the priorities that will make the best solution stand out of the reasonable ones.
Lire la suite →

Bilinear interpolation on images stored as Python Numpy ndarray

8 min.
If you are working in image processing and using Python as a prototyping script language to test algorithms, you might have noticed that all the libs providing fast image interpolation methods (to either sub-sample or over-sample) work in 8 bits unsigned integers (uint8). This is quite annoying if you are working with floating point images. PIL supports floating point interpolation , but only for one layer, thus forget about RGB, and scipy.
Lire la suite →

Derivating HDR-IPT direct and inverse transformations

53 min.
Following my work on the filmic tonemapping, several users have reported issues with very saturated blue areas (stage spotlights, bright skies) and red areas. The grail of image processing is being able to affect colors and brightness independantly. The big conundrum of tonemapping is raising luminance without affecting perceptual colors, and, by color, we mean hue and saturation/chroma. The problem is, once you lifted the luminance, you need to correct the saturation too, because it will look oversaturated.
Lire la suite →