Skip to main content
main-content

Über dieses Buch

This book presents essential algorithms for the image processing pipeline of photo-printers and accompanying software tools, offering an exposition of multiple image enhancement algorithms, smart aspect-ratio changing techniques for borderless printing and approaches for non-standard printing modes. All the techniques described are content-adaptive and operate in an automatic mode thanks to machine learning reasoning or ingenious heuristics. The first part includes algorithms, for example, red-eye correction and compression artefacts reduction, that can be applied in any photo processing application, while the second part focuses specifically on printing devices, e.g. eco-friendly and anaglyph printing. The majority of the techniques presented have a low computational complexity because they were initially designed for integration in system-on-chip. The book reflects the authors’ practical experience in algorithm development for industrial R&D.

Inhaltsverzeichnis

Frontmatter

Chapter 1. Adaptive Global and Local Contrast Enhancement

Abstract
Brightness and contrast are very important characteristics of a photo. Images with exposure issues with low global and local contrast should be corrected before printing. The purpose of correction consists of making photos more pleasing to the observer. We consider techniques for automatic global contrast adjustment, improvement of dark and light areas of a photo, increasing local contrast for visibility enhancement, and dehazing. In addition, we apply modification of colour channels to preserve the saturation. Backlighting leads to poorly distinguishable details in shadow areas. Our approach to correction of the dark areas is based on contrast stretching and alpha-blending of the brightness of the initial image and estimated reflectance. We use a simple model of illumination for estimation of reflectance. Luminance is the outcome of filtering by a bilateral filter (BF). Reflectance is the ratio between the brightness of the initial image and estimation of the luminance. We train a regression model by the random forest technique for adaptive calculation of a correction parameter. Features for machine learning are extracted from a global brightness histogram. Also, we describe a method of visibility enhancement. The algorithm carries out locally adaptive tone mapping by means of a flexible S-shaped curve. We use a cubic Hermit spline as an S-shaped tone mapping function. The starting and ending points of the spline depend on global brightness contrast, whereas tangents depend on the local distribution of background and foreground pixels. Alteration of the tangents for adjacent areas is smoothed to avoid the formation of visible artefacts. The technique is applicable for the correction of images with fog and smoke as well as underwater photos.
Ilia V. Safonov, Ilya V. Kurilin, Michael N. Rychagov, Ekaterina V. Tolstaya

Chapter 2. Fusion of Photos Captured with Exposure Bracketing

Abstract
This chapter relates to an effective approach for creating attractive photo images of scenes having a high dynamic range using a set of photos captured with exposure bracketing. Usually details of dark parts of the scene are preserved in an over-exposed shot and details of brightly illuminated parts are visible in under-exposed photos. The proposed method allows preservation of those details by first constructing a gradient field, mapping it with special function, and then integrating it to restore the lightness values using a Poisson equation. The resulting image can be printed or displayed on conventional displays.
V. Ilia Safonov, V. Ilya Kurilin, N. Michael Rychagov, V. Ekaterina Tolstaya

Chapter 3. Image Enhancement Pipeline Based on EXIF Metadata

Abstract
The application of metadata from an EXIF-file for the estimation of the probability of defects existing in digital photos is considered. The following typical defects of photos are selected: exposure problems, noise, colour cast, blur, JPEG artefacts, and the presence of red eyes. An extensive database of photographs captured using ten different cameras was collected, and the influence of various EXIF-tags on the presence of defects analysed. An EXIF-based image enhancement pipeline is created which allows a reduction in the total time needed for automatic photo enhancement as a consequence of the estimation of the probability that several defects are present in the corrected photo. The optimisation of the image enhancement procedure is implemented by applying a specific classification based on the EXIF-tags contained in photographs, so that the number of cases for which a quality assessment is required is reduced.
Ilia V. Safonov, Ilya V. Kurilin, Michael N. Rychagov, Ekaterina V. Tolstaya

Chapter 4. Adaptive Sharpening

Abstract
Sharpness is an important attribute that contributes to the overall impression of photo quality. It is a complex task for a consumer to obtain an appropriate outcome by editing a photo on a computer, because it is impossible to estimate sharpness prior to printing. Our approach includes three key techniques: blind sharpness level estimation, local tone mapping, and boosting of local contrast. The sharpness metrics is based on an analysis of variations of histograms produced by high-pass filters while increasing the convolution kernel size. An array of sums of logarithms of such histograms characterizes the photo’s blurriness. We use machine learning for the selection of parameters for a given printing size and resolution. Local tone mapping decreases the length of the edge transition slope. An unsharp mask implemented via a bilateral filter boosts the local contrast. The stage does not produce a strong halo artefact as is typical for a traditional unsharp mask filter. The quality of the proposed approach was assessed by a survey of observers. According to the replies obtained, the proposed method enhances the majority of photos from a test set.
Ilia V. Safonov, Ilya V. Kurilin, Michael N. Rychagov, Ekaterina V. Tolstaya

Chapter 5. Removal of JPEG Artefacts

Abstract
The present chapter generally relates to a method for effective reduction of artefacts caused by lossy compression algorithms based on block-based Discreet Cosine Transform (DCT) coding, known as JPEG coding. The most common artefacts produced by this type of coding are blocking and ringing artefacts. To reduce the effect of coding artefacts caused by significant information loss, a variety of different algorithms and methods have been suggested. However, the majority of solutions propose to process all blocks in the image, even those blocks that are not affected by artefacts and this leads to an increase in processing time and required resources, as well as image over-blurring. Techniques for ringing artefact detection usually rely on an edge-detection step, a complicated and versatile procedure with unknown optimal parameters. In this paper, we describe very effective procedures for the detection of artefacts and their subsequent correction. This approach helps to save a notable amount of computational resources, since not all the blocks are involved in correction procedures. Detection steps are performed in the frequency domain, using only the DCT coefficients of an image. Numerous examples have been analysed and compared with the existent solutions, and the results prove the effectiveness of the proposed technique.
Ilia V. Safonov, Ilya V. Kurilin, Michael N. Rychagov, Ekaterina V. Tolstaya

Chapter 6. Descreening of Scanned Images

Abstract
Screen or halftone patterns are inherent to most of the images printed by electrophotographic, ink-jet printers and offset machines. When a halftoned image is scanned, a noisy effect called a Moiré pattern often appears on the scanned image. So, to avoid this, the screen should be suppressed before scanning or copying. There are plenty of methods for descreening or inverse halftoning of images. However, the algorithms each face the following dilemma: screen reduction and restoration of contone areas leads to blurring of sharp edges of text and graphics primitives, on the other hand insufficient smoothing keeps the screen and consequently the Moiré effect in halftoned areas. In this chapter, we depict two descreening algorithms intended for preservation of sharpness and contrast of sharp edges and for accurate restoration of continuous-tone areas. The quality of the approaches are evaluated by surveying observer’s opinions and numerical metrics. We consider referenced and blind quality measures. To be possible to apply the reference measure we propose an approach to simulate halftoned images.
Ilia V. Safonov, Ilya V. Kurilin, Michael N. Rychagov, Ekaterina V. Tolstaya

Chapter 7. Automatic Red Eye Correction

Abstract
The red eye artefact is an irritating defect in photos. The correction of red eyes during printing without user intervention is an important task. This chapter is devoted to a description of an efficient technique for automatic correction of red eyes. Initially we developed a method for a photo printer; however, our approach is applicable for any software and firmware. The algorithm is independent of face orientation and is capable of detecting paired red eyes as well as single red eyes. For the segmentation of roundish red regions, we applied colour information and thresholding in the domain of outcomes of four-directional edge-detection filters jointly. For classification of segmented regions, we built a cascade of classifiers: three simple classifiers eliminate obviously false areas, and after that an ensemble of decision trees created by an adaptive boosting algorithm performs detection of red-eye regions with good performance. A retouching stage includes desaturation, darkening, and blending with the initial image. In addition, we construct a sophisticated quality criterion of correction: we employ the Analytic Hierarchy Process for prioritization of the observer’s opinions about outcomes of detection and correction. The experimental results demonstrate good performance of the proposed algorithm in comparison with existing solutions.
Ilia V. Safonov, Ilya V. Kurilin, Michael N. Rychagov, Ekaterina V. Tolstaya

Chapter 8. Image Upscaling

Abstract
In this chapter, we describe two upscaling methods for photo printers. They are both based on constructing an edge map and interpolating known image values along the edges, preserving the edge structure, and avoiding the appearance of artefacts. The interpolation process is followed by a post-processing stage, where edges are emphasized using a specially designed tone-mapping curve. The second algorithm uses structure tensor analysis to distinguish edges from textured areas and to find local structure direction vectors. The vectors are quantized into six directions. Individual adaptive interpolation kernels are used for each direction. The new methods provide high-resolution images with sharper edges, with quality higher than that obtained by bilinear interpolation, and require less computation than higher order bi-cubic methods.
V. Ilia Safonov, V. Ilya Kurilin, N. Michael Rychagov, V. Ekaterina Tolstaya

Chapter 9. Changing the Aspect Ratio for Borderless Printing

Abstract
In the case of borderless printing, some cropping or trimming of the image borders is necessary; that is, it is necessary to discard (not print) parts of the image. The reason for this is the nonconformity of the aspect ratios of the original image produced by the image capturing device and final hard copy. In the first part of the chapter, a smart trimming method is proposed as an effective tool for changing the original aspect ratio by eliminating strips from the top and bottom (and/or left and right) sides of the image. The word “smart” means that such trimming will not corrupt the main objects in the photo. In the second part of Chapter 9, an original approach for matching the aspect ratio of a digital photo for borderless printing by complementing it with fragments extracted from the same photo is described. This approach comprises analysis of side strips of the source photo to estimate the possibility of its building up without visible artefacts; complementing one or two opposite sides of the photo to match the desired aspect ratio; and additional processing of complements to make the resulting photo look more natural. The proposed algorithms can be applied to colour, greyscale, or sepia-effect photos.
Ilia V. Safonov, Ilya V. Kurilin, Michael N. Rychagov, Ekaterina V. Tolstaya

Chapter 10. Content-Aware Image Resizing

Abstract
The present chapter generally relates to content-aware image resizing and image inscribing into predetermined areas. The problem consists in transformation of the image to a new size with or without modification of the aspect ratio in a manner that retains the recognizability and proportions of the important features of the image. Closest solutions cover image cropping, image retargeting, seam carving, and some special image manipulations such as types of image retouching, as well as the standard image linear scaling, including downsampling and upsampling. The present approach provides a method for digital image retargeting by means of erasing or adding less significant image pixels. The retargeting approach can be easily used also to shrink images. However, for image enlargement there are some limitations such as stretching artefacts. A history map with relaxation is introduced to avoid such drawbacks and overcomes some known limits of retargeting. In the proposed approach, special methods are considered for the preservation of important objects. This leads to significant improvement of the resulting quality of retargeting. Retargeting applications for different devices such as display, copier, facsimile, and photo-printers are described as well.
IliaV. Safonov, IlyaV. Kurilin, MichaelN. Rychagov, EkaterinaV. Tolstaya

Chapter 11. Sketch for Eco-friendly Printing

Abstract
Reducing toner or ink consumption is an important function of modern printing devices. It has a positive ecological and economic impact. We describe a technique for converting bitmaps from print-jobs to pleasant colour sketches. Such sketches contain significantly fewer colour dots than the initial images. The approach serves to reduce toner consumption. Our algorithm is based on the use of an edge-detection filter for mask creation and multiplication of the initial image by the mask. In order to construct the mask, we use a Difference-of-Gaussian filter for the purpose of blending the initial image with its blurred copy, where the alpha-channel is a saliency map according to the Pre-attentive Human Vision model. An estimation of the percentage of saved toner as well as a survey of observers proves the effectiveness of the proposed technique for saving toner in eco-friendly printing mode.
Ilia V. Safonov, Ilya V. Kurilin, Michael N. Rychagov, Ekaterina V. Tolstaya

Chapter 12. Content-Based Image Orientation Recognition

Abstract
In this chapter, we describe a method for digital image orientation recognition. The method is based on classifier learning by a set of feature vectors extracted from images. Feature vectors are flip-invariant to effectively classify images into portrait-oriented and landscape-oriented photos. A new texture feature is proposed based on the observation that more textured areas are usually located in the lower part of the image. The proposed method could be effectively applied to index prints of photos (printing a set of miniatures of a large image collection).
Ilia V. Safonov, Ilya V. Kurilin, Michael N. Rychagov, Ekaterina V. Tolstaya

Chapter 13. Anaglyph Printing

Abstract
Stereo photography and modern digital colour printing provide users with the possibility of obtaining high-quality 3D anaglyph prints for education and entertainment purposes. However, one of the main challenges in reproducing printed stereo images is the need to match the colour characteristics of the stereo-glasses and printed colours, since errors in colour transmission lead to cross-talk interference and ghosting effects. This chapter is devoted to resolving the anaglyph colour adjustment problem to align the characteristics of the glasses and printer. The described technique makes it possible to print anaglyphs with colours adapted to given glasses and printer colours by means of special colour pattern analysis. The resulting printed images have a good quality that is confirmed by a user opinion survey. In accordance with the mentioned survey, the produced anaglyph images contain fewer artefacts and look better in comparison to conventional anaglyphs without adaptation.
Ilia V. Safonov, Ilya V. Kurilin, Michael N. Rychagov, Ekaterina V. Tolstaya

Chapter 14. Automatic Generation of Collage

Abstract
We describe algorithms for the automatic creation of collages from a collection of photos. The appeal of different forms of collage from the user’s viewpoint is discussed. We consider time- and camera-based photo selection procedures, including the estimation of the quality of the photographs. Collage generation involves arrangement of the photos on canvas and an application of seamless blending with elements of randomness.
Ilia V. Safonov, Ilya V. Kurilin, Michael N. Rychagov, Ekaterina V. Tolstaya
Weitere Informationen