Enhancement Tools

Distortion

The digiKam Distortion tool corrects an image for common lens distortions.

Barrel distortion is associated with wide angle, short focal length lenses. It causes the images to appear slightly spherical (curved outward) like a barrel. You can notice this when you have straight features close to the image’s peripheral sides. Pincushion distortion is the opposite defect and is associated with telephoto, long focal length lenses or underwater images. The images appear pinched (bent inward) toward the center. Pincushion distortion is often less noticeable than barrel distortion but are equally visible near the edges. This tool can easily eliminate these distortions without much visible loss in quality.

Nota

This tool only treats geometrical distortions. Chromatic aberrations will not be corrected by this tool. The Lens Auto Correction tool corrects both distortions and chromatic aberrations.

Le seguenti figure spiegano i tipi principali di distorsioni geometriche:

(1): distorsione a cuscinetto.

(2): Nessuna distorsione.

(3): distorsione a barilotto.

I tipi di distorsione geometrica

Nota

The geometrical corrections use 4th-order polynomial coefficients:

  • Il coefficiente di primo ordine cambia le dimensioni dell’immagine. Lo strumento lo chiama Ingrandimento.

  • Il coefficiente di secondo ordine riguarda la distorsione geometrica principale delle lenti, e può correggere la forma convessa o concava dell’immagine.

  • Il coefficiente di terzo ordine ha un effetto di arrotondamento simile, ma si livella verso i bordi. Questa correzione non è impiegata nello strumento.

  • The 4th-order coefficient corrects the far edges inversely to the 2nd-order rounding. Combining it with the 2nd-order correction can almost completely eliminate the geometrical distortions.

Lo strumento di distorsione dell’obiettivo dell’Editor delle immagini

Quattro cursori ti permettono di impostare il filtro di correzione della distorsione:

  • Principale: questo valore controlla la quantità di distorsione di secondo ordine. I valori negativi correggono le distorsioni a barilotto, mentre quelli positivi correggono le distorsioni a cuscinetto.

  • Bordo: questo valore controlla la quantità di distorsione di quarto ordine. Il controllo Bordo è più efficace ai bordi dell’immagine che al centro. Per la maggior parte degli obiettivi il parametro Bordo ha segno opposto al Principale.

  • Ingrandimento: questo valore riduce le dimensioni totali dell’immagine (correzione di primo ordine). Valori negativi rimpiccioliscono l’immagine, quelli positivi la ingrandiscono.

  • Brighten: this control adjusts the brightness in image corners (vignetting). Negative values decrease the brightness image corners, while positive values increase it.

To help you to choose the best filter settings, the tool provides a thumbnail preview of the distortion correction applied to a crossed mesh pattern. The values you apply to your image will be saved and tool will default to the same values the next time it is called.

Nota

The barrel-pincushion correction should be done before any crop or size changes (including perspective correction). In fact the Barrel-Pincushion corrections should be the very first step performed on the original image. If you crop the image and then use barrel correction the effect would be obviously wrong.

To help you find the best correction, the tool provides a vertical and horizontal guide. Move the mouse cursor in the image preview to display the dashed lines guide. Move the cursor to an important place in the image like the level of the sea or the edge of a building and press the left mouse button to freeze the position of the dashed lines. Now, adjust the barrel/pincushion correction to align with the guide.

Applying pincushion corrections can produce a black border in the corners of the image. You will need to cut out the corners with a crop tool available in the Image Editor menu Transform ‣ Crop or via the zoom slider of this dialog.

Barrel correction is enough for most images, however with some shots such as the front of buildings or paintings may also benefit from perspective correction to make all the angles 90 degrees. Note that when you hold your camera by hand you almost always introduce some kind of slight perspective distortion. See Perspective Adjustment for more information.

Correzione della vignettatura

Panoramica

The digiKam Vignetting Correction tool corrects image vignetting, which is the technical term for under-exposure in the corners.

Wide angle lenses, especially those used in medium and large format photography, frequently do not uniformly illuminate the entire sensor plane. Instead, they vignette (shade) the edges and corners of the image, substantially reducing the light reaching the corners of the sensor. Some telephoto lenses may also suffer from vignetting.

The traditional solution for vignetting is to attach a center filter to the lens. This is a neutral density filter with maximum density at the optical axis of the lens, clear at the periphery, with density varying inversely to the vignetting of the lens. A center filter has many advantages: not only does it automatically correct for full-frame images but, since it’s fixed to the front of the lens, it also compensates for the off-center vignetting which occurs when camera movements are employed for perspective or plane of focus adjustment.

But there are disadvantages as well. Many center filters require a 1.5 or 2 f-stop filter factor adjustment, which may in turn necessitate a slow shutter speed, especially since wide angle lenses, even with center filters, are best used at apertures of f/16 or smaller. This combination may make the shutter speed slow enough that hand-holding the camera is impossible, and motion blur becomes a problem when photographing moving objects.

With the wide exposure range of present-day film and the color (or grey-scale) depth of digital cameras or film scanners, it is possible to simulate the effect of a center filter by applying an equivalent transform to a raw image taken without the filter.

Usare lo strumento di correzione della vignettatura

I tipi di correzione della vignettatura

Cinque cursori danno il controllo del filtro di correzione della vignettatura, e altri tre dell’esposizione dell’immagine risultante:

  • Amount: this option controls the degree of luminosity attenuation by the filter at its point of maximum attenuation. The default amount is 2.0, which corresponds to an optical filter with a 1 f-stop filter factor (equivalent to a factor of 2 reduction in luminosity). Increase the amount to compensate for a greater degree of vignetting; reduce it for less.

  • Feather: this option determines the rate at which the filter intensity falls off from the point of maximum attenuation toward the edges, expressed as a power factor. The default of 1 yields a linear reduction in filter amount with distance from the center. Power factors greater than 1.0 cause a faster fall-off (for example, a power of 2 causes the amount to decrease as the square of the distance from the center) and causes the effect of the filter to be concentrated near the center. Powers less than 1 spread out the amount of the filter toward the edges; a power of 0.5 causes the amount to fall as the square root of the distance from the center.

  • Radius: this option specifies the radius, as a multiple of the half diagonal measure of the image, at which the amount of the filter falls off to zero (or, in other words, becomes transparent). The default value of 1.0 specifies a filter which is transparent at its corners. A radius specification greater than 1 extends the effect of the center filter beyond the edges of the image, while a radius less than one limits the filter’s action to a region smaller than the image. When compensating for vignetting by lenses used with large format and some medium format cameras, the default radius factor of 1 is rarely correct! These lenses often «cover» an image circle substantially larger than the film to permit camera movements relative to the lens to control perspective and focus, and consequently have a vignetting pattern which extends well beyond the edges of the film, requiring a radius setting greater than 1 to simulate a center filter covering the entire image circle.

  • X offset and Y offset settings: these options move the center of the filter horizontally or vertically up to the border of the image by the specified percentage. A negative value for the X offset will shift the filter to the left while a positive value will shift it to the right. A negative value for the Y offset will move the filter up, and finally a positive value will move it down.

  • Add Vignetting: many photographs look flat because of a distracting background or another composition matter. While most of time you will want to remove vignetting, it is a fact that selective vignetting can improve the look of a photograph, drawing the eyes to the intended subject. As an artist you may choose this option. Ticking it will invert the filter, thus darkening the corners of a photograph.

The only way to be sure which settings of Amount, Feather, and Radius best compensate for the actual optical characteristics of a given lens is to expose a uniformly illuminated scene (for example, a grey card lit by diffuse light) and then measure any vignetting in the resulting image (for example with Adjust Level tool histogram position bar). Without such measurements, or specifications by the lens manufacturer giving the precise degree of vignetting at one or more working apertures, you may have to experiment with different settings to find those which work best for each of your lenses. To help you in this task, the tool dialog provides a thumbnail mask rendering applied to the image. Fortunately, the response of the human eye is logarithmic, not linear like most digital imaging sensors, so you needn’t precisely compensate for the actual vignetting to create images which viewers will perceive as uniformly illuminated.

Nota

If you need to re-adjust the exposure of the target image, use the Adjust Curve tool from Image Editor available under Color ‣ Adjust Curve menu entry.

Lo strumento di correzione della vignettatura in azione

This is an example of a vignetting correction applied to an image. The original image on the top shows vignetting in the corners, the corrected image on the bottom much less. The values used for this example are:

  • Densità = 2,6

  • Potenza = 0,9

  • Raggio = 1,1

Lo strumento antivignettatura dell’Editor delle immagini

Lens Auto-Correction

The digiKam Lens Auto-Correction tool can correct lens imperfections such as Distortion, Chromatic aberration, Vignetting, and Geometry, and do so automatically for hundreds of common lenses.

No lens is optically perfect. Even the most expensive lenses have their own unique imperfections. This tool corrects for those imperfections.

The Lens Auto-Correction Tool from the digiKam Image Editor

The Lens Auto-Correction tool uses lens data from the Lensfun library, an up-to-date database of hundreds of lenses and their characteristics. The tool also uses the Metadata from the image to find-out which lens was used for a particular image.

If the exact lens used to take the picture is available in the LensFun library, the tool will display (exact match found) in green. However if an exact match is not available, the tool will choose settings based on the closest match and display (partial match found) in orange. In this case, the user is allowed to select a different lens. If no match is found, the tool displays (no match found) in red.

Metadata with Match in the LensFun Database

Metadata with a Partial Match in the LensFun Database

Metadata with no Match in the LensFun Database

You can either enable or disable the helper Grid lines to visualize how the geometrical distortions are corrected on image.

Lo strumento di correzione automatica dell’obiettivo che visualizza la griglia di aiuto sulla tela

Select the corrections you want to apply. The corrections are immediately displayed in the image preview area to the left. As for all tools, the preview area can be configured by clicking on the preview comparison style icons in the status bar. When you are satisfied with the result press OK.

Hot Pixels

Panoramica

The digiKam Hot Pixels tool facilitates removing hot pixels from photographs taken with a digital camera.

La maggior parte delle fotocamere digitali produce immagini con diversi pixel difettosi colorati in modo brillante quando si utilizzano basse velocità di otturatore. Le immagini notturne possono venire rovinate da questi pixel. Esistono tre diversi tipi di pixel difettosi:

  • Stuck pixels: are pixels that always reads high or are always set to a maximum value on all exposures. This produces a bright pixel usually of red, blue or green color in the final image. A stuck pixel will occur regardless of shutter speed, aperture size or any other user settings. It will occur on a normal exposure and tends to be more obvious under bright conditions.

  • Dead pixels: are pixels that read zero or are always off on all exposures. This state produces a black pixel in the final image. Similar to stuck pixel, a dead pixel will occur regardless of shutter speed, aperture size or any other user settings.

  • Hot pixels: are pixels that read high (bright) on longer exposures as white, red, or green color. The longer the exposure time, the more visible hot pixels will become. These pixels will not be visible in bright conditions.

Nota che i pixel bloccati o morti si presentano nella stessa posizione per tutte le immagini. Se un pixel morto o bloccato si verifica in una posizione diversa, potrebbe trattarsi di un pixel bruciato.

I pixel bloccati, morti o bruciati sono un problema, in particolare quando si scatta in modalità RAW ad alta qualità, perché molte macchine fotografiche hanno una soppressione dei pixel bruciati incorporata che viene applicata automaticamente se viene usata la compressione JPEG (cioè nella maggior parte dei casi).

This tool can be used to fix the Hot pixels and Stuck Pixels on a photograph using a Black Frame subtraction method. digiKam does not have a manual editor for selecting Bad Pixels.

Creare le foto scure

The Black Frame subtraction method is the most accurate approach to the removal of «Hot Pixels» and «Stuck Pixels». First you have to create a «Black Frame» as a reference. This is easy to do. When you finish taking your long exposure shots, put a lens cap on the camera and take one «dark» image with the same exposure time as the prior images. This image will be all dark, but with close examination you will see that it has the Hot and Stuck Pixels (colored dots). These are positioned at the same places as on your previous shots.

Load this file into the tool using the Black Frame button. The tool will process the image, automatically detecting the Hot and Stuck Pixels. They will be highlighted in the control panel preview areas.

Avvertimento

If you use an old digital camera, it is important to re-shoot the Black Frame next time you are taking long exposure images to detect new Hot and Stuck Pixels on sensor defects.

Using the Hot Pixels Tool

Lo strumento Pixel bruciati dell’Editor delle immagini

At first, as explained in the previous section, you need to load a Black Frame corresponding to the image to correct. An automatic analysis of the Black Frame will run to find the bad pixels. Note that the tool will remember the previous Black Frame used in the last session, and that frame will be re-opened automatically in the next session.

The image panel and the original preview help you to pan within the image. The preview window shows the filter output using the current settings. Bad Pixels are highlighted in preview area.

Select an area to see bad pixels in the preview and the filtered result using one of the preview comparison types that display the same image region. Choose the best Filter method to compute the values used to fill in the bad pixels or pixel blocks. The available filters are:

  • Medio: viene presa la media dei pixel adiacenti al blocco di pixel. Il colore risultante viene assegnato a tutti i pixel del blocco. Per l’interpolazione monodimensionale, questa operazione viene eseguita separatamente a strisce orizzontali o verticali larghe un pixel.

  • Lineare: i pixel a una distanza di uno dal blocco di pixel vengono usati per calcolare una superficie bilineare (a due dimensioni), o un gruppo di curve lineari (a una dimensione), che viene poi utilizzata per assegnare i colori interpolati ai pixel nel blocco.

  • Quadratico: questo è il metodo predefinito di filtraggio. I pixel con una distanza di due o meno dal blocco di pixel sono usati per calcolare una superficie biquadratica (a due dimensioni), o un gruppo di curve quadratiche (a una dimensione), che viene poi usata per assegnare i colori interpolati ai pixel nel blocco.

  • Cubico: i pixel con una distanza di tre o meno dal blocco di pixel sono usati per calcolare un superficie bicubica (a due dimensioni), o un gruppo di curve cubiche (a una dimensione), che viene poi usata per assegnare i colori interpolati ai pixel nel blocco.

Local Contrast

The digiKam Local Contrast tool renders pseudo-HDR images.

There are multiple ways to render HDR images to improve photos containing under or overexposed areas. The usual approach is to take multiple shots with different exposures. digiKam’s Blend Stacked Images tool can then be used to combined the images into an HDR image. This works nicely but suffers from some limitation. For example, the approach only works with static subjects. But what if you want an HDR effect from a single image, including images taken of dynamic subjects?

The Local Contrast tool uses a Low Dynamic Range Tonemapping to improve the dynamic range of a photo by reducing its global contrast and increasing its local contrast. It does so by first generating a desaturated and blurred version of the photo. It then combines the RGB channels of the original photo with the desaturated blurred image using either a linear or power function. Sounds complicated? Don’t worry, the Local Contrast tool is rather straightforward to use, so you don’t have to understand all of its intricacies in order to achieve pleasing results.

Lo strumento Contrasto locale nell’Editor delle immagini

Open the photo you want in the Image editor and choose Enhance ‣ Local Contrast. The tool lets you apply up to four tonemapping operations called stages. Each Stage offers two parameters for you to tweak: Power and Blur. The former allows you to specify the desaturation level, while the latter lets you adjust the affected areas on the photo. To preview the result, hit the Try button. Once you are satisfied with the result, press OK to apply the process to the photo.

While the Local Contrast tool may sound like an easy way to fix photos, you should use it with care: sometimes it can do more damage than good, producing unnatural looking photos.

Riduzione del rumore

The digiKam Noise Reduction tool is a powerful tool for reducing image noise.

This tool provides selectable image filters to remove specks or other artifacts caused by junk such as dust or hair on the lens. It also can be used to remove sensor noise from the camera that may be caused by high ISO settings, as well as the so-called Moiré Patterns on scanned images from books or magazines.

If you want more information about what causes digital camera sensor noise, please take a look at this tutorial.

Lo strumento Riduzione del rumore dell’Editor delle immagini

The above screenshot shows a typical scene taken with a digital camera using a high sensitivity ISO setting. It shows grainy noise which can be reduced successfully with this tool.

Noise is most evident when zoomed in enough to see individual pixels. The re-sizeable image panel within the original preview helps you to pan within the image. Move the red rectangle around to select an area that will let you judge the optimal filter settings. Then switch to one of the preview comparison types that display the same image region, as illustrated in this screenshot.

The tool supports the following parameters:

  • Estimate Noise: automatically computes all noise reduction settings based on an analysis of the noise contained in the image. It is a good idea to turn this option on, and check the result. If the degree of noise reduction is insufficient or the filter damages the image, turn off this option, and adjust the Luminance, Chrominance Blue, and Chrominance Red settings manually.

  • Threshold: use the slider for coarse adjustment, and the spin control for fine adjustment. The threshold is the value below which everything is considered noise. This value should be set so that edges and details are clearly visible and noise is smoothed out. These settings exist for the Luminance, Chrominance Blue, and Chrominance Red channels. Simply adjust it and hit the Try button to see the results. (This tool does not automatically update the preview window when making manual adjustments.) Adjustment must be made carefully, because the gap between noisy, smooth, and blur is very small. Adjust it as carefully as you would adjust the focus of a camera.

  • Softness: use the slider for coarse adjustment, and the spin control for fine adjustment. The softness adjusts the level of the thresholding (soft as opposed to hard thresholding). The higher the softness the more noise remains in the image. These settings exist for the Luminance, Chrominance Blue, and Chrominance Red channels. Simply adjust it and hit the Try button to see the results. As for the Threshold settings, adjustment must be made carefully, because the gap between noisy, smooth, and blur is very small. Adjust it as carefully as you would adjust the focus of a camera.

  • Salva come e Carica: questi pulsanti sono usati per fare esattamente quello che descrivono. Qualsiasi parametro di riduzione dei disturbi che hai impostato può essere salvato in un file sul disco e caricato in seguito.

  • Try: applies the current tool settings to the preview image. The preview does not automatically update when manual adjustments are made.

  • Valori predefiniti: questo pulsante reimposta tutto ai valori predefiniti.

Blur

The digiKam Blur tool is used to blur or soften an image.

Sometimes an image is too sharp for your purposes. The solution is to blur it a bit: fortunately blurring an image is much easier than sharpening it. Select the Blur Tool with the Enhance ‣ Blur menu entry and experiment with the Smoothness level. The preview window shows the effect of the operation on your photograph.

Lo strumento Sfoca dell’Editor delle immagini

Restoration

The digiKam Restoration tool is an advanced tool for reducing artifacts in photographs.

This fantastic restoration filter is a public domain tool developed to remove lots of unwanted stuff from your images. It is well adapted to deal with degraded images suffering from Gaussian noise, film grain, scratches or compression artifacts and local degradations usually encountered in digital (original or digitized) images. The smoothing used by the tool is applied along the image features, thus preserving the most meaningful image content.

Lo strumento Restauro dell’Editor delle immagini

The tool comes with several presets as starting points and to simplify restoration. The preset settings available are listed below:

  • None: Sets most common default filter settings not optimized for any particular purpose.

  • Reduce Uniform Noise: Optimum settings for reducing image noise due to sensors.

  • Reduce JPEG Artifacts: JPEG’s compression is not perfect, in fact for some types of images it is far from it. As a lossy compression algorithm, there are some compression «artifacts» - slight defects showing in the decompressed image. This setting aims at reducing these artifacts.

  • Riduci la trama: ottimizzata per rimuovere artefatti da schemi di scansione, di digitalizzazione o Moiré.

If you want to set filter parameters for finer adjustments, use the General and Advanced Settings tabs:

Impostazioni delle preimpostazioni dello strumento Restauro dell’Editor delle immagini

  • Detail Preservation [0, 1]: this controls the preservation of features in the image. A low value forces an equal smoothing across the image, whereas bigger values preferably smooth the homogeneous regions, leaving sharper details. A value of 0.9 does a good job of preserving details so that no sharpening is required afterwards. Note that Detail Preservation setting must be always less than the Anisotropy setting.

  • Anisotropy alpha [0, 1]: a low value smooths equally in all directions, whereas a value close to 1 smooths in one direction only. If you have film grain or CCD kind of noise a high value will result in wave-like pattern, whereas JPEG artifacts are suited for values close to 1.

  • Smoothing [0, 500]: this sets the maximum overall smoothing factor, while Detail Preservation defines the relative smoothing. Set this value based on the noise levels in the image.

  • Regularity [0, 100]: this parameter is concerned with the uniformity of the smoothing. Imagine the smoothing process as a combing of the image. Then the Regularity would correspond to the size of the comb. The bigger this value, the more even the overall smoothing will be. This term is required when there is a lot of noise in the image, making it difficult to estimate the local features in the scene. Setting a Regularity value higher than 3 produces an interesting “van Gogh” turbulence effect.

  • Iterazioni del filtro: il numero di volte che sarà applicato l’algoritmo di sfocatura. In genere basta 1 o 2 volte.

Le impostazioni avanzate dello strumento Restauro dell’Editor delle immagini

  • Angular Step [5, 90]: angular integration of the anisotropy alpha. If alpha is chosen small, the Angular Step should also be chosen small. But beware that small angles result in long runs! So choose a value as large as you can accept.

  • Passo integrale [0,1, 10]: larghezza del passo di integrazione spaziale, in pixel. Dovrebbe rimanere inferiore a 1 (smussatura sub-pixel) e non andare mai oltre 2.

  • Usa interpolazione lineare: il guadagno in termini di qualità se selezioni questa opzione è solo marginale, e perdi un fattore di 2 in termini di velocità. Raccomandiamo di lasciarla inattiva.

Save As and Load buttons are used to do just that. Any Photograph Restoration filter settings that you have set can be saved to the files in a text file and reloaded later.

Avvertimento

Photograph restoration is comparatively fast given what it is doing, but it can take a long time to run and cause high CPU load. You may always abort computation by pressing the Abort button during preview rendering.

Red Eye

The digiKam Red Eye tool is a red eye removal tool. Red eyes are caused when a camera flash is used to take photographs of people. The red is the reflection from the back of the eye which can be seen because the pupil cannot react quickly enough to the flash. By the way, the red eye effect is less likely with a separate flash because of the different viewing angles of the flash and the lens. You can correct some of the worst effects of Red Eye by:

` - Select Enhance ‣ Red Eye….

  • Set the preview mode to display the portion of the image with the eyes that need to be fixed.

  • A neural network engine parses the image contents to automatically localize eyes and the red pupils.

  • The Red Level setting adjusts the amount of red eye removal.

Rimozione degli occhi rossi dell’Editor delle immagini

Sharpen

The digiKam Sharpen tool provides three different tools for sharpening, each with unique advantages and disadvantages.

  • Simple Sharp is a traditional sharpening tool that is very fast and easy, but that may produce grainy images, particularly in dark areas.

  • Unsharp Mask works on the contrast of edges to make an image appear sharper, but it actually does not sharpen at all, but works by enhancing edges. It does a real good job at removing atmospheric haze. The algorithm was taken from the Gimp, and it is copyrighted by Winston Chang.

  • Refocus is probably the best of the three algorithms because it actually improves sharpness. It is a bit more involved in its application as it uses several adjustable parameters.

Out-of-focus photographs, as well as most digitized images, benefit from some sharpness correction. This is partly due to the digitizing process that must chop up a continuous scene into pixels with finite size and spacing, so elements thinner than the sampling frequency will be averaged together. Thus, sharp borders are rendered a little blurred. The same phenomenon appears when printing color dots on paper. High-resolution cameras need even more sharpening on a regular basis than consumer cameras.

Mentre alle immagini JPEG viene aumentata un po” la nitidezza con procedura interna della macchina fotografica, le immagini in formato RAW lo richiedono sempre durante il processo di elaborazione.

Some scanners apply a sharpen filter while scanning. It’s usually worthwhile to disable automatic sharpening so that you keep control over your image.

Regolazione della nitidezza

If the camera focus is not set perfectly or if the camera is moving when the image is taken the result is a blurred photograph. If there is a lot of blurring, you probably will not be able to do much about it with any technique. But you can often improve the image, if there is only a moderate amount of blurring. Many good SLR cameras apply less image processing to the images than simpler cameras (which tend to artificially increase the contrast to make the images look crisp). This kind of slight blur can be easily improved with tools.

In alcune situazioni, potresti riuscire a ottenere risultati utili aumentando la nitidezza di una fotografia utilizzando lo strumento Nitidezza, raggiungibile dalla voce del menu Migliora ‣Aumenta la nitidezza e l’opzione Aumenta la nitidezza dalle impostazioni Metodo.

Lo strumento Aumenta la nitidezza dell’Editor delle immagini

You should be careful with this though, because the results may not look very natural. Sharpening increases the apparent sharpness of edges in the photograph, but also amplifies noise. Generally, the most useful technique for sharpening a fuzzy photograph is the Refocus tool. You can access it with the Refocus option from Method setting. Look at Refocus for more information and a comparison of all the sharpening techniques.

Riduci la grana di una fotografia

When you take a photograph in low-light conditions or with a very fast exposure time, the camera does not get enough data to make good estimates of the true color at each pixel, and consequently the resulting photograph looks grainy. You can «smooth out» the graininess by blurring the image, but then you will also lose sharpness. Probably the best approach - if the graininess is not too bad - is to use the Noise Reduction tool, and you can access it by the Enhance ‣ Noise Reduction menu entry.

Sfocare una fotografia

A volte hai il problema opposto: un’immagine è troppo incisiva. La soluzione è di sfocarla un po”: fortunatamente sfocare un’immagine è molto più facile che aumentarne la nitidezza. Seleziona lo strumento di sfocatura dal menu Migliora ‣ Sfoca e gioca con il livello: la finestra di anteprima nella parte destra della finestra di dialogo mostra l’effetto dell’operazione sulla tua fotografia.

Il filtro di Maschera di contrasto

Nota

Il filtro Maschera di contrasto è un ottimo strumento per rimuovere l’offuscamento dalle fotografie.

Lo strumento Maschera di contrasto dell’Editor delle immagini

Il pannello dell’immagine e l’anteprima dell’originale ti aiutano a scorrere l’immagine. La finestra dell’anteprima mostra il risultato del filtro usando le impostazioni attuali.

Ci sono due parametri importanti, Raggio e Quantità. I valori predefiniti spesso funzionano piuttosto bene, quindi dovresti provare prima quelli. Aumentare il Raggio o la Quantità aumenta la forza dell’effetto. Non farti trasportare però: se rafforzi troppo la maschera di contrasto amplificherai i disturbi nell’immagine, e darai l’impressione che ci siano dei rilievi vicino ai bordi netti.

The Radius allows you to set how many pixels on either side of an edge that will be affected by sharpening. High resolution images allow higher radius. It is always best to sharpen an image at its final resolution.

The Amount control is the percentage of the difference between the original and the blur image that is added back into the original. It allows you to set the strength of the sharpening.

The Threshold control is threshold measured as a fraction of the maximum RGB value that needs to be exceeded to apply the sharpening. It allows you to set the minimum difference in pixel values that indicates an edge where sharpening should be applied. That way, you can protect areas of smooth tonal transition from sharpening, and avoid creation of facial blemishes, or artifacts in the sky or water surfaces.

Rimessa a fuoco di una fotografia

The Refocus tool uses a deconvolutional filter to refocus an image by enhancing sharpness. In plain language, this tool attempts to «refocus» an image by undoing the defocusing. This is better than just trying to sharpen a photograph. It employs a technique called Finite-Impulse-Response Wiener Filtering. While the traditional technique for sharpening images is to use unsharp masking, refocus generally produces better results. Start it from the Enhance ‣ Sharpen menu entry and the Refocus option.

The Refocus technique works differently from Unsharp Mask and is also unlike the Sharpen Filter which both increase the contrast of the edges of an image. Refocus rather reverses the process by which the image got blurred by the circular aperture of the camera. This method gives you as much of the original «in focus» image as possible. Refocus uses a very powerful deconvolutional algorithm that will reclaim the data that has been mixed up. In mathematical terms, blurring is usually the result of a convolution, so a deconvolution will reverse the process. This is exactly what Refocus is doing. Furthermore, the FIR filter technique allows the tool to remove much of the noise and granularity that often gets accentuated in the sharpening process with other sharpening filters.

Lo strumento Rimetti a fuoco dell’Editor delle immagini

Il pannello dell’immagine e l’anteprima dell’originale ti aiutano a scorrere l’immagine. La finestra dell’anteprima mostra il risultato del filtro usando le impostazioni attuali.

In most cases, image blurring by a camera can be modeled as convolution with a circular blur disc. But the refocus tool supports deblurring of two types of convolutional blurring:

  • The Circular convolution: this is the term used in this manual to describe the type of blurring that spreads each source point uniformly across a small disk with a fixed radius. (Not to be confused with the definition of circular convolution as used in time series analysis.)

  • The Gaussian convolution: this one is blurring that is mathematically based on the normal distribution, with its bell-shaped curve. Image blurring of this type is normally associated with software blurring. From a theoretical point of view the mathematical justification for using the Gaussian convolution is that when you a apply a large number of independent random convolutions the results will always approach a Gaussian convolution.

Lo strumento di rimessa a fuoco supporta sia la convoluzione circolare, sia quella gaussiana, più combinazioni di entrambe.

In practice, in most cases the Circular convolution works much better than the Gaussian convolution. The Gaussian convolution has a very long tail, so mathematically the result of the convolution also depends on source pixels at a large distance from the original source pixel. The FIR Wiener inverse of a Gaussian convolution in most cases is heavily influenced by source pixels at a large distance, and in most cases this produces undesirable results.

The deconvolution filter plug-in has the following parameters:

  • Nitidezza circolare: è il raggio del filtro di convoluzione circolare. È il parametro più importante per usare l’estensione. Per la maggior parte delle immagini il valore predefinito di 1 dovrebbe dare buoni risultati. Seleziona un valore più alto se la tua immagine è molto sfocata, ma attenzione a non produrre aloni.

  • Correlation: Increasing the Correlation may help reduce artifacts. The correlation can range from 0-1. Useful values are 0.5 and values close to 1, e.g. 0.95 and 0.99. Using a high value for the correlation will reduce the sharpening effect of the plug-in.

  • Noise filter: Increasing the Noise filter parameter helps to reduce artifacts. The Noise can range from 0-1 but values higher than 0.1 are rarely helpful. When the Noise value is too low, e.g. 0 the image quality will be horrible. A useful value is 0.03. Using a high value for the Noise will even blur the image further.

  • Gaussian Sharpness: This is the radius for the Gaussian convolution filter. Use this parameter when your blurring is Gaussian (mostly due to previous blur filtering). In most cases you should leave this parameter set to 0, because it causes nasty artifacts. When you use non-zero values you will probably also have to increase the Correlation and/or Noise filter parameters.

  • Dimensione della matrice: questo parametro determina la dimensione della matrice di trasformazione. Aumentare la dimensione della matrice potrebbe produrre risultati migliori, specialmente quando scegli valori elevati per la Nitidezza circolare o per quella gaussiana. Nota che l’estensione diverrà molto lenta quando selezioni un valore elevato per questo parametro. Nella maggior parte dei casi dovresti selezionare un valore tra 3 e 10.

  • Save As and Load: These buttons are used to do just that. Any Refocus parameters that you have set can be saved to a file and reloaded later.

  • Defaults: This button resets all settings to default values.

Sotto puoi vedere alcuni suggerimenti utili a lavorare con lo strumento di rimessa a fuoco:

  • it is best to perform all cropping, color and intensity curve corrections on the image before using this plug-in.

  • Otherwise use this plug-in before performing other operations on the image. The reason is that many operations on the image will leave boundaries that are not immediately visible but that will leave nasty artifacts after sharpening.

  • When you are scanning images and compressing them, e.g. to JPEG, you should apply the plug-in to the uncompressed image.

Confronto della rimessa a fuoco con altre tecniche

it is worth comparing Refocus with Simple Sharp and Unsharp Mask.

All types of sharpening work by applying a small convolution matrix that increases the difference between a source pixel and its immediate neighbors. FIR Wiener filtering is a more general technique because it allows a much larger neighborhood and better parameterizations. Sharpening only works when your images are very slightly blurred. Furthermore, for high values of the sharpening parameter the results frequently looks «noisy». With FIR Wiener filtering this noise can be greatly reduced by selecting higher values for the Correlation and Noise filter parameters.

Unsharp masking is another very popular image enhancement technique. From a mathematical point of view it is an ad hoc form of high-pass filter. The first step is to create a blurred copy of the source image. Then the difference between the source image and the blurred image is subtracted from the source image, hence the name unsharp masking. In fact, unsharp masking is more of a contrast enhancement on the important image features than a general approach to sharpening. It does not undo the blurring effects of diffraction caused by the camera’s finite aperture, as refocus does.

In generale, la maschera di contrasto produce risultati migliori della nitidezza. Ciò deriva probabilmente dal fatto che la maschera di contrasto utilizza un’area più ampia rispetto alla nitidezza.

From a theoretical point of view unsharp masking must always introduce artifacts. Even under optimal circumstances it can never completely undo the effect of blurring. But it has been proved that Wiener filtering is the optimal linear filter. In practice, the results of the FIR Wiener filter are always at least as good as those of unsharp masking. And the FIR Wiener filter is frequently better in restoring small details.

Below, you can see a comparison of different filters applied to a small unfocused image:

Immagine colorata sfocata originale da correggere. Questa immagine è stata scattata con una fotocamera analogica fissa. Il risultato della sfocatura deriva da luce insufficiente per l’obiettivo autofocus.

Immagine corretta utilizzando un semplice filtro di aumento della nitidezza. Il filtro è impostato a 80.

Immagine corretta utilizzando un filtro Maschera di contrasto. Le impostazioni sono: Raggio=50, Quantità=5 e Soglia=0.

Immagine corretta utilizzando un filtro Rimessa a fuoco. Le impostazioni sono: Nitidezza circolare=1,3, Correlazione=0,5, Filtro Rumore=0,020, Nitidezza gaussiana=0 e Dimensione matrice=5.

Nota

For more information about sharpening methods used in digital imagery, you can find a technical comparison at this url.

Healing Clone

The digiKam Healing Clone tool copies pixel colors from a specific portion of the image, and pastes them into another portion of the image using a brush, then applies smoothing. This helps fix artifacts in images, like unwanted spots on someone’s face that can be replaced with more clear skin from a nearby region of the face.

The tool settings view on the right side provides a toolbar with 5 buttons. From left to right:

  • Scegli punto sorgente.

  • Selezione del poligono con lazo.

  • Sposta immagine.

  • Annulla l’operazione clona.

  • Rifai l’operazione clona.

Below the toolbar, two sliders allow you to adjust the clone tool properties. The Brush Radius slider adjusts the size of the cloned area. A radius of 0 has no effect. Values of 1 and above set the brush radius that controls the size of the regions that are copied from the image.

The Radius Blur slider controls the smoothing/mixing effect applied to the data cloned onto the canvas. A percent of 0 has no effect. Values above 0 represents the radius of circle that is used to mix the source color that is mixed into the destination color. This mixing is applied radially i.e. the inner part of the brush radius is totally from the source and the percentage of source vs destination decreases linearly until the outer radius of the circle is 100% destination.

Lo strumento Riparazione clone dell’Editor delle immagini per rimuovere gli artefatti non desiderati

To select the source of image to clone, press S, or the Source selection button from the toolbar on the top of settings view. The cursor will change to a cross-hair symbol. Click on the location where you will start cloning from. The tool then switches to a circular brush. Move the brush to another location and click and drag to clone.

Video del Riparazione clone dell’Editor delle immagini che corregge un artefatto con lo strumento Spot

The tool also provide a Lasso and Polygon selector for the healing clone operations. You can either press L or the Lasso selector button from the toolbar on the top of settings view. The cursor will change to a pen shape, and you can select discrete points as you like. The polygon edges will be drawn, you just need to press and move your mouse to complete the selection area. You don’t have to draw all the region at one time. The polygon will close itself if you press L again. Pressing Esc while in the process of drawing the lasso polygon will cancel the lasso operation.

Now the tool will only clone inside the selected region, cloning outside will be ignored, unless you press L again or Esc to deactivate the lasso mode. Once you do that, you can clone anywhere in the screen as usual. Here is a screenshot of a lasso polygon selection, and a large portion of the image cloned inside this lasso portion. Of course pressing L or Esc again will remove the lasso boundary, keeping the cloned pixels in place, as expected.

Video del Riparazione clone dell’Editor delle immagini che corregge un’area che usa il lazo

Puoi annullare e rifare le operazioni utilizzando i pulsanti dalla barra degli strumenti in cima alla vista delle impostazioni. Allo strumento sono assegnate due scorciatoie: Ctrl+Z per annullare e Ctrl+Maiusc+Z per rifare. Puoi annullare e rifare le operazioni senza limiti.

Strumento G’MIC-Qt

G’MIC-Qt is 3rd-party image editing tool provided as a plug-in. It is named G’MIC for GREYC’s Magic for Image Computing, an open-source image processing framework. The full list of G’MIC features is long and cannot be detailed here as it comes with over 500 interesting functions to explore. It comes with filters for changing colors, creating patterns, adding artistic touches, repairing inconsistencies in pictures, rendering shapes, and much more. The plugin is highly customizable, with the ability to set favorites and even add your own filters.

G’MIC-Qt is not included in the digiKam source code. Rather, it is a 3rd-party plugin included in binary distributions of digiKam, as the Windows, macOS, and Linux bundles. It can be started from the Enhance ‣ G’MIC-Qt menu entry or use the icons accessible from the Tools tab in the Right sidebar. G’MIC-Qt can be used like other filters, the main difference is that instead of opening a specific filter tab on the right sidebar, it opens up a window where you can pick through any of the pre-defined filters.

Lo strumento G’MIC-Qt dell’Editor delle immagini che esegue il filtro Artistico/Bokeh

Di seguito l’elenco delle categorie dei filtri disponibili:

  • About: these entries are not filters, but just show different information about G’MIC-Qt on the settings view. The About/Download External Data entry allows you to load new filter definitions from the internet.

  • Array and tiles: this filter collection transforms photos into toys, puzzles, maps, and decorative shapes.

Lo strumento G’MIC-Qt dell’Editor delle immagini che esegue il filtro Array-and-Tiles/Puzzle

  • Artistic: this filter collection applies a number of traditional effects that transform a photograph into a drawing or painting.

Lo strumento G’MIC-Qt dell’Editor delle immagini che esegue il filtro Artistico/Rodilius

  • Black and White: this filter collection is dedicated to processing images in gray-scale style, including converting to gray-scale, the inverse process of colorizing an image, reducing the color map, or simulating fusain drawing.

Lo strumento G’MIC-Qt dell’Editor delle immagini che esegue il filtro Black-and-White/Colorize

  • Colors: questa raccolta di filtri consente all’utente di definire le funzioni di trasformazione che operano in spazi dei colori differenti, applicare LUT, miscelare/regolare i canali o correggere i toni tramite analisi dei contenuti.

Lo strumento G’MIC-Qt dell’Editor delle immagini che esegue il filtro Colors/Mixer-Lab

  • Contours: questa raccolta di filtri applica le trasformazioni locali adiacenti dei pixel sull’intera fotografia.

Lo strumento G’MIC-Qt dell’Editor delle immagini che esegue il filtro Contours/Super-Pixel

  • Deformations: questa raccolta di filtri applica distorsioni fisiche alla fotografia.

Lo strumento G’MIC-Qt dell’Editor delle immagini che esegue il filtro Deformations/Drop Water

  • Degradations: questa raccolta di filtri riproduce alterazioni fotografiche, quali sfocatura, rumore, sgranatura e aberrazioni dell’obiettivo.

Lo strumento G’MIC-Qt dell’Editor delle immagini che esegue il filtro Degradations/Chromatic-Aberrations

  • Details: questa raccolta di filtri migliora i dettagli nelle tue foto con moltissimi algoritmi di miglioramento multi-scala per dare risalto ai dettagli e ai colori di diverse dimensioni nelle foto.

Lo strumento G’MIC-Qt dell’Editor delle immagini che esegue il filtro Details/Mighty

  • Frames: un’altra raccolta di filtri artistici studiata per decorare le fotografie con ornamenti.

Lo strumento G’MIC-Qt dell’Editor delle immagini che esegue il filtro Frames/Droste

  • Frequencies: questa raccolta di filtri si basa sull’analisi delle trasformate di Fourier.

    Lo strumento G’MIC-Qt dell’Editor delle immagini che esegue il filtro requencies/Bandpass

  • Layers: questa raccolta di filtri funziona sui livelli o sui contenuti da esportare in livelli separati. Dato che i livelli non sono supportati dall’Editor delle immagini, l’uso di questi filtri è limitato.

    Lo strumento G’MIC-Qt dell’Editor delle immagini che esegue il filtro Layers/Tiles-to-Layers

  • Lights and Shadows: questa raccolta di filtri consente di regolare il contenuto sottoesposto o sovraesposto di una fotografia. È anche possibile aggiustare l’immagine con una sorgente di luce aggiuntiva.

    Lo strumento G’MIC-Qt dell’Editor delle immagini che esegue il filtro Lights-and-Shadows/Pop-Shadows

  • Patterns: questa raccolta di filtri è un gruppo di metodi di generazione ricorsiva delle immagini che può produrre forme geometriche interessanti e originali.

    Lo strumento G’MIC-Qt dell’Editor delle immagini che esegue il filtro Patterns/Halftone

  • Renderings: this filter collection superimposes artificially-generated forms based on mathematical solutions.

Lo strumento G’MIC-Qt dell’Editor delle immagini che esegue il filtro Rendering/Lightning

  • Repair: questa raccolta di filtri include algoritmi avanzati di supporto per la rimozione di rumori/errori/oggetti/artefatti/compressione nelle immagini. Questa tipologia di filtro tenta di correggere sfide piuttosto difficili che hanno impegnato diverse generazioni di ricercatori dell’elaborazione delle immagini digitali.

    Lo strumento G’MIC-Qt dell’Editor delle immagini che esegue il filtro Repair/Denoise basato su rete neurali convoluzionali

  • Sequences: questa raccolta di filtri genera animazione da foto.

    Lo strumento G’MIC-Qt dell’Editor delle immagini che esegue il filtro Sequences/3D_Image-Object

  • Silhouettes: questa raccolta di filtri sovrappone le forme come le impronte di animali, le icone, le forme naturali, ecc.

    Lo strumento G’MIC-Qt dell’Editor delle immagini che esegue il filtro Silhouettes/Nature/Barnsley-Fern

  • Stereoscopic 3D: questa raccolta di filtri rende le fotografie in rilievo.

    Lo strumento G’MIC-Qt dell’Editor delle immagini che esegue il filtro Stereoscopic-3D/Stereo-Image Filter

  • Testing: questa raccolta di filtri raggruppa tutti gli strumenti in fase di sviluppo. Attenzione: questi filtri possono essere instabili e restituire effetti strani.

  • Various: questa raccolta di filtri raggruppa quegli strumenti che non possono essere collocati in altre categorie. È presente un editor di codice G’MIC per creare e provare i nuovi filtri.

    Lo strumento G’MIC-Qt dell’Editor delle immagini che esegue il filtro Various/Custom-Code

La disposizione predefinita di G’MIC-Qt è piuttosto semplice (può essere modificata nella finestra di dialogo Impostazioni di G’MIC-Qt). Di seguito la descrizione di ciascun pannello:

  • On the left, there is the preview. With some filters, the whole image is displayed, and with other filters it will be shown at a 100% crop detail, depending on the kind of effect to be activated.

  • In the middle, there is the useful search bar at the top, with a list of groups of effects below. Each group can be opened with a double click or by clicking the small arrow to the left of the name.

  • On the right would appear the settings of the selected filter, if we had selected one below. To confirm changes, there are the Apply and the Ok buttons. The Cancel button stops all current processing and returns to the Image Editor.

You can search a filter using their groups, but the fastest way to find them is to use the Search bar at the top of the list. If the filter categories look a bit daunting, it’s possible to add the most used filters to a favorites list and to apply a color tag using the filters tree-view context menu. On the bottom, the Add Fave button allows appending an entry in the first section named Faves on the list.

La vista ad albero dei filtri dello strumento G’MIC-Qt dell’Editor delle immagini e il menu contestuale dei preferiti

The following behaviors are supported by most of the G’MIC-Qt filters:

  • When you render the filter on whole data from the Image Editor by pressing the Apply or Ok buttons, the processing time can be quite long, especially with many megapixel images. A Progress Bar on the bottom of the G’MIC-Qt dialog will indicate the computation progress.

La barra di avanzamento dello strumento G’MIC-Qt dell’Editor delle immagini

  • Se un filtro possiede molte impostazioni dei parametri, alcune potrebbero non essere visibili; usa la barra di scorrimento per accedere alle altre impostazioni. È anche possibile allargare la finestra di dialogo di G’MIC-Qt, se necessario, o passare alla modalità Schermo intero col pulsante presente in basso.

  • Depending on the filter, some parameters can require many iterations on the image which increases processing time. Adjust the settings carefully, as the times can increase exponentially before seeing any result.

  • L’anteprima del filtro può essere regolata per confrontare i risultati prima e dopo l’applicazione dell’effetto. Le impostazioni Tipo di anteprima sono disponibili nel panello dei parametri.

Le impostazioni del tipo di anteprima dello strumento G’MIC-Qt dell’Editor delle immagini dal filtro Colors/Color-Blindness

The Settings button on the bottom left will show the G’MIC-Qt configuration dialog with three tabs:

  • The Interface tab is used to customize the G’MIC-Qt interface, including the layout of the tool panes, the language to enable, the preview behavior, and the native dialog to use.

La scheda della finestra di dialogo Settings/Interface dello strumento G’MIC-Qt dell’Editor delle immagini

  • The Filter sources tab set up where to obtain filter updates and where to store them on your computer.

La scheda della finestra di dialogo Settings/Filter-Sources dello strumento G’MIC-Qt dell’Editor delle immagini

  • The cleverly-named Other tab adjusts other parameters, such as when to check for online updates, and the debug verbosity on the console which is useful for filter developers.

La scheda della finestra di dialogo Settings/Other dello strumento G’MIC-Qt dell’Editor delle immagini

We suggest you explore all the available effects in G’MIC-Qt, as you can find interesting artistic solutions for your photo. See this online review of all G’MIC-Qt filters for details.