Outils pour utilisateurs

Outils du site


issue158:krita

Ceci est une ancienne révision du document !


This series is aimed at learning to make something of the old photos in my possession, and others in the public domain due to their age. You, the reader, are welcome to tag along and, I hope, glean some small insight, and perhaps an idea or two from time to time. No promises are made as to quality of the content, or potential errors and omissions. I am a computer scientist, not a true artist or a professional of image restoration. So please take all this as a best effort, but with no firm guarantees — much as is the case of most open-source software.

In the previous part of this series, we worked on a photograph that had been digitized professionally by the laboratory when our negative film was developed, and presented to us on a CD. At times, however, we no longer have access to this laboratory, or even to the paper prints. In such cases, using a flatbed scanner to digitize the negatives may be a solution. However, it does have its drawbacks, as we will see today with a sample image from my library. This is a photograph that I took way back, on chemical 35mm negative film. The original paper prints have been lost in the mists of time, and all that remains is the film itself. This has been scanned using a flatbed scanner, and then converted to a positive. However, perhaps the film has not been stored in a very clean place, or the scanner itself had some dust inside it; the end result is that our image contains quite a lot of defects.

The dark splotches and lines are dust particles that reflected strongly in the scanner’s light source. Also, colors look rather washed out. In fact, when we load this image into Krita, we can observe that something rather unusual appears in the histogram.

We have not a continuous range in any of the primary colors, but rather spikes regularly spaced across the range. This indicates that the original was scanned using a very low color resolution: just a few bits was used to code each color. When we count the spikes, we see there are about 16 spikes for each primary color, indicating that colors were represented using a 4-bit integer for each color (so 12 bits in total). Compare this to a more usual 8 or 10-bit integer for each color, 24 to 30 bits in total for each pixel.

Before making any alterations to the image, I started by cloning the complete layer. By working only on the clone, I could always go back to the original, for reference or even to copy over and repair any major errors I may make.

The first action we would need to take is to remove the dark imperfections. To begin, I split the image in halves lengthwise, and will be working only on the right half. This is, so we can see how things progress by comparison with our control image to the left. To remove the dark bits, there are no half-measures we can take: we just need to paint over them in a color that is correct. Use the dipper tool to select a color from an unaffected part closeby, and then simply paint over the blemish with a standard brush or even an airbrush. I did need to use rather small sizes of brush, to paint only the splotch itself and not the surrounding area. With a bit of application, this is what I obtained. There are still some small blemishes, but nothing that stands out from a distance.

Readers familiar with image processing software may have come across tools that are usually labeled as “blenders” . The best way of describing their application is that they move around the colors already present in the image, as if we were working with fresh oil paint on a canvas. In some situations, they may be used to solve small defects in an image – such as a small wart on a fashion model’s otherwise perfect skin, one would imagine. However, they do not add any color, but simply move around what is already there. In this case, since the defects were very much darker than the surrounding image, the use of a blender would simply have ended up enlarging and spreading out the defect instead of disguising it, which is why I preferred not to use any of Krita’s available blenders.

To continue, I wanted to get rid of the brownish grain, especially visible in the vegetation on the background hills, and on the driveway surface. One tool I could have used is the Wave noise reducer we applied in previous parts of this series. Alternatively, I could have blurred the image slightly. But, any action applied to the complete image would have not only removed the grain, but also altered the shape and definition of any straight edges. These obviously need to be preserved, otherwise objects such as the vehicle will no longer seem sharp and in focus.

To solve this conundrum, I selected parts of the image that did not cross any edges and blurred them individually using “Filter”, “Blur”, then “Gaussian blur”. Then, I used one of Krita’s brushes, “Filter blur” (next page. top left), to selectively blur small areas near the edges of objects, but without affecting them. This brush, as usual, may be sized appropriately to alter one small area at a time. For my image, I used sizes 16 pixels down to 5, and applied the brush carefully in small touches.

When the blur was applied to the car’s body, it combined different shades of white to create a smoother finish – but without adding in any black from the windows. When applied to the railing, I chose a brush size that did not combine the iron railing with the surrounding green vegetation. The rear lights’ plastic lens colors have been smoothed out individually, without mixing their colors up.

So far, we have obtained an image that is clearer and looks much nicer than the original, Finally, I gave the colors a bit of a tweak using Krita’s “Filter”, “Adjust”, and “Color balance” tool, though selecting only the right half of the image to preserve the left for comparison. The end result is rather satisfying, if I do say so myself. Though not perfect, it is not too bad for a cheap photograph of the early 1990s, and a step up from the negative film’s sad state.

So far, in this series, we have been working on originals that started life as traditional photographs taken using negatives and a chemical process. In recent parts, we have centered on originals that have been digitized by some means. However, technology did progress over the years, and at one point during the mid 2000s, digital cameras became mainstream. Not all were created equal, and some of the earliest had sensors that lacked the quality we are used to today. This is clear in the images they produced, that can also benefit from some tweaking as we will see in the next part of the series. Until then, take care!

issue158/krita.1593605333.txt.gz · Dernière modification : 2020/07/01 14:08 de auntiee