RU2383924C2 - Method for adaptive increase of sharpness of digital photographs during printing - Google Patents

Method for adaptive increase of sharpness of digital photographs during printing Download PDF

Info

Publication number
RU2383924C2
RU2383924C2 RU2007113703/09A RU2007113703A RU2383924C2 RU 2383924 C2 RU2383924 C2 RU 2383924C2 RU 2007113703/09 A RU2007113703/09 A RU 2007113703/09A RU 2007113703 A RU2007113703 A RU 2007113703A RU 2383924 C2 RU2383924 C2 RU 2383924C2
Authority
RU
Russia
Prior art keywords
image
sharpness
boundaries
filter
degree
Prior art date
Application number
RU2007113703/09A
Other languages
Russian (ru)
Other versions
RU2007113703A (en
Inventor
Илья Владимирович Сафонов (Ru)
Илья Владимирович Сафонов
Original Assignee
Корпорация "САМСУНГ ЭЛЕКТРОНИКС Ко., Лтд."
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Корпорация "САМСУНГ ЭЛЕКТРОНИКС Ко., Лтд." filed Critical Корпорация "САМСУНГ ЭЛЕКТРОНИКС Ко., Лтд."
Priority to RU2007113703/09A priority Critical patent/RU2383924C2/en
Publication of RU2007113703A publication Critical patent/RU2007113703A/en
Application granted granted Critical
Publication of RU2383924C2 publication Critical patent/RU2383924C2/en

Links

Images

Abstract

FIELD: physics; image processing.
SUBSTANCE: invention relates to digital image processing and specifically to methods for adaptive increase of sharpness of photographic prints. The method for adaptive increase of sharpness of digital photographs during printing involves changing the size of an image in accordance with the size of the photographic print and resolution of the printing device. Degree of sharpness of the digital photograph is evaluated. The length of transition on brightness jumps in the image brightness channel is reduced using parametres which depend on degree of sharpness. Local contrast in the image brightness channel is increased using parametres which depend on degree of sharpness and colour channels of the image are modified in order to prevent colour-hue and saturation error due to change of brightness on two previous stages.
EFFECT: higher degree of adaptability.
11 cl, 12 dwg

Description

Изобретение относится к области цифровой обработки изображений. Точнее относится к методам автоматического повышения резкости (четкости) фотоотпечатков.The invention relates to the field of digital image processing. More precisely, it relates to methods for automatically sharpening (sharpening) photo prints.

При съемке цифровыми камерами, камерами мобильных телефонов и видеокамерами значительное количество фотографий получается размытыми. Данный дефект ухудшает восприятие фотографий. К размытию фотографии в целом или отдельных ее регионов приводит одновременно много факторов, наиболее значимыми из которых являются следующие:When shooting with digital cameras, mobile phone cameras and camcorders, a significant number of photos are blurry. This defect affects the perception of photographs. Many factors simultaneously lead to blurring of a photograph as a whole or of its individual regions, the most significant of which are the following:

- ошибки фокусировки аппаратуры регистрации изображений (цифровых камер и т.д.);- focus errors of image recording equipment (digital cameras, etc.);

- тряска аппаратуры регистрации изображений;- shaking of equipment for recording images;

- перемещение объектов в кадре в процессе регистрации;- moving objects in the frame during the registration process;

- запотевание оптических элементов аппаратуры;- fogging of optical elements of equipment;

- низкочастотная фильтрация часто имеет место при сжатии, например при JPEG сжатии;- low-pass filtering often occurs during compression, for example, during JPEG compression;

- увеличение размеров фотографии;- increase the size of the photograph;

- низкочастотная фильтрация для подавления шумов и артефактов компрессии.- low-pass filtering to suppress noise and compression artifacts.

Часто несколько факторов влияют одновременно, и математическая модель размытия реальных фотографий очень сложна. Также необходимо отметить, что в ряде случаев на фотографиях намеренно размывают передний или задний план, например при съемке портретов. Подобное размытие является частью художественного замысла и не должно расцениваться как дефект.Often, several factors influence at the same time, and the mathematical model of blurring real photos is very complex. It should also be noted that in some cases, photographs intentionally blur the foreground or background, for example, when shooting portraits. Such blurring is part of the artistic design and should not be regarded as a defect.

В существующих патентах и публикациях адаптивность повышения резкости рассматривается с различных точек зрения:In existing patents and publications, sharpening adaptability is considered from various points of view:

- адаптивность к размеру фотоотпечатка, разрешению и частотно-контрастной характеристики устройства печати;- adaptability to the size of the photographic print, resolution and frequency-contrast characteristics of the printing device;

- адаптивность к уровню шумов в локальной области, в зависимости от характеристик в локальном окне выполняется либо повышение резкости, либо размытие;- adaptability to the noise level in the local area, depending on the characteristics in the local window, either sharpening or blurring is performed;

- адаптивность к определенным цветовым областям, таким как цвет кожи человека, синее небо, зеленая растительность;- adaptability to certain color areas, such as human skin color, blue sky, green vegetation;

- адаптивность к характеристикам зрения человека;- adaptability to the characteristics of human vision;

- адаптивность к различной степени размытия исходного изображения.- adaptability to varying degrees of blurring of the original image.

Выложенная заявка на патент США 2005/0089247 [1] предлагает применять фильтр нерезкого маскирования с выбором параметров фильтра в зависимости от разрешения печатающего устройства и размера отпечатка. Повышение резкости выполняется до масштабирования изображения до требуемого размера. Похожий подход как для устройств печати, так и для устройств отображения, был предложен в выложенной заявке на патент США 2004/0036923 [2]. В опубликованном патенте США 5696850 [3] описан адаптивный фильтр повышения резкости, параметры которого устанавливаются в зависимости от размера отпечатка и частотно-контрастной характеристики печатающего устройства, измеряемой с помощью специального калибровочного изображения. В выложенной заявке на патент США 2006/0077470 [4] для каждого разрешения печатающего устройства устанавливаются особые параметры фильтра повышения резкости.U.S. Patent Application Laid-Open No. 2005/0089247 [1] proposes using an unsharp masking filter with a choice of filter parameters depending on the resolution of the printing device and the size of the print. Sharpening is performed before the image is scaled to the desired size. A similar approach for both printing devices and display devices was proposed in US Patent Application Laid-Open No. 2004/0036923 [2]. US Pat. No. 5,696,850 [3] describes an adaptive sharpening filter, the parameters of which are set depending on the size of the print and the frequency-contrast characteristics of the printing device, measured using a special calibration image. U.S. Patent Application Laid-Open No. 2006/0077470 [4] sets specific sharpening filter parameters for each resolution of the printing device.

Множество публикаций и патентов посвящено описанию методов повышения резкости или размытия в зависимости от параметров в локальном окне изображения, например, выложенная заявка на патент США 2003/0026495 [5], опубликованный патент США 6980696 [6], выложенная заявка на патент США 2003/0081854 [7]. В более ранних патентах США 5038388 [8], 6965702 [9], 6891977 [10] описаны способы выбора параметров фильтра нерезкого маскирования в зависимости от оценки уровня шумов.Many publications and patents are devoted to describing methods for sharpening or blurring depending on the parameters in the local image window, for example, U.S. Patent Application Laid-Open 2003/0026495 [5], U.S. Patent Publication 6980696 [6], U.S. Patent Application Laid-open 2003/0081854 [7]. Earlier US patents 5,038,388 [8], 6,965,702 [9], 6,891,977 [10] describe methods for selecting the parameters of a blur filter depending on the noise level estimate.

В патенте США 6954549 [11] и в выложенной заявке на патент США 2002/0110282 [12] описан способ выбора параметров фильтра повышения резкости в зависимости от цветов областей кожи человека, синего неба и зеленой растительности. Выложенная заявка США 2006/0034512 [13] описывает систему для повышения резкости в области лица человека.US Pat. No. 6,954,549 [11] and U.S. Patent Application Laid-Open No. 2002/0110282 [12] describe a method for selecting sharpening filter parameters depending on the colors of human skin regions, blue sky and green vegetation. U.S. Patent Application Laid-Open No. 2006/0034512 [13] describes a system for sharpening a person’s face.

Статьи "Color image enhancement based on perceptual sharpening" R.Baldrich и другие (IEEE International Conference on Image Processing (ICIP-2003), 2003) [14] и "Adaptive edge enhancement using a neurodynamical model of visual attention" F.Gasparini (IEEE International conference on Image Processing, ICIP 2005) [15] предлагают выбирать параметры фильтра нерезкого маскирования на основе характеристик человеческого зрения. Подход в целом интересен, но слабо обоснован и недостаточно исследован. Большее практическое значение имеет способ, описанный в выложенной заявке на патент США 2006/0033844 [16]. Параметры фильтра нерезкого маскирования выбираются в зависимости от яркости фрагмента изображения и результатов высокочастотной фильтрации. Правило выбора параметров сформировано на предварительной стадии обучения, на которой анализировались ответы экспертов.The articles "Color image enhancement based on perceptual sharpening" by R. Baldrich et al (IEEE International Conference on Image Processing (ICIP-2003), 2003) [14] and "Adaptive edge enhancement using a neurodynamical model of visual attention" F. Gasparini ( IEEE International conference on Image Processing, ICIP 2005) [15] propose choosing blur filtering parameters based on the characteristics of human vision. The approach as a whole is interesting, but poorly substantiated and insufficiently studied. Of greater practical importance is the method described in the laid out application for US patent 2006/0033844 [16]. The parameters of the unsharp masking filter are selected depending on the brightness of the image fragment and the results of high-pass filtering. The rule for choosing parameters is formed at the preliminary stage of training, at which the answers of experts were analyzed.

Для адаптивного улучшения резкости изображений, имеющих различную степень размытия, необходимо предварительно оценить эту степень размытия или, наоборот, степень резкости исходного изображения. В патенте США 6097847 [17] описан способ повышения резкости с адаптивной оценкой резкости изображения, как суммы величин перепадов яркости на изображении.To adaptively sharpen images with various degrees of blur, you must first evaluate this degree of blur or, conversely, the degree of sharpness of the original image. In US patent 6097847 [17] describes a method of sharpening with an adaptive assessment of the sharpness of the image, as the sum of the values of the brightness differences in the image.

Основательный анализ различных способов автоматической оценки резкости изображений дается в статье "An Investigation of Perceived Sharpness and Sharpness Metrics", Buyue Zhang, Jan P.Allebach, Zygmunt Pizlo (Proceedings of SPIE-IS&T Electronic Imaging, SPIE Vol.5668, 2005) [18]. Авторы статьи предлагают 2 способа автоматической оценки резкости: Digital Sharpness Scale (DSS) и Average Edge Transition Slope (AETS). Для вычисления оценки резкости DSS для изображения в цветовом пространстве RGB выполняют следующие шаги.A thorough analysis of various methods for automatically assessing image sharpness is given in the article "An Investigation of Perceived Sharpness and Sharpness Metrics", Buyue Zhang, Jan P. Allebach, Zygmunt Pizlo (Proceedings of SPIE-IS & T Electronic Imaging, SPIE Vol.5668, 2005) [18 ]. The authors of the article offer 2 ways to automatically evaluate sharpness: Digital Sharpness Scale (DSS) and Average Edge Transition Slope (AETS). The following steps are performed to calculate the DSS sharpness estimate for an image in the RGB color space.

- Конвертируют изображение из цветовой системы RGB в YC.- Convert the image from the RGB color system to YC.

- Генерируют изображение границ Yedge путем фильтрации канала яркости Y Лапласианом-Гауссиана (LoG) с последующим поиском пересечений нулевого уровня (zero-crossing).- Generate an image of the Yedge boundaries by filtering the luminance channel Y by the Laplacian-Gaussian (LoG), followed by the search for zero-crossing.

- Вычисляют максимальное абсолютное значение разности в окне 5×5 точек изображения, причем центр окна находится на точке границы изображения Yedge, далее суммируют максимальные абсолютные значения разности для всех точек границ и усредняют данную сумму путем деления на общее количество точек границ.- Calculate the maximum absolute value of the difference in the window of 5 × 5 image points, with the center of the window located on the border point of the Yedge image, then summarize the maximum absolute values of the difference for all border points and average this amount by dividing by the total number of border points.

Вычисление оценки резкости AETS более сложное и требует существенно больших вычислительных затрат. Способ вычисления оценки резкости AETS состоит из следующих шагов.The calculation of the AETS sharpening estimate is more complicated and requires significantly greater computational overhead. The method for calculating the AETS sharpening estimate consists of the following steps.

- Утоньшают границы на изображении Yedge, которое получают точно так же, как в способе DSS.- Thin out the borders on the Yedge image, which is obtained in the same way as in the DSS method.

- Объединяют точки границ в связные области.- Merge boundary points into connected areas.

- Определяют направления фрагментов границ и вычисляют нормали к этим фрагментам.- Determine the direction of the fragments of the boundaries and calculate the normals to these fragments.

- Извлекают профили яркости вдоль нормалей к фрагментам границ.- Extract brightness profiles along the normals to the fragments of the boundaries.

- Вычисляют AETS из профилей яркости.- Calculate AETS from brightness profiles.

Экспериментальные результаты, приведенные в статье, показывают, что оба способа оценки резкости дают результаты, коррелирующие с восприятием резкости фотографий человеком. Однако абсолютное значение оценок сильно зависит от изображенного на фотографии. Таким образом, данные способы не применимы для оценки резкости произвольных фотографий.The experimental results presented in the article show that both methods of assessing sharpness give results that correlate with the perception of sharpness of photographs by a person. However, the absolute value of the ratings is highly dependent on the image. Thus, these methods are not applicable for assessing the sharpness of arbitrary photographs.

Исследователи из HP Labs в выложенной заявке США 2005/0244074 [19] и статье Doron Shaked, Ingeborg Tastl "Sharpness Measure: Towards Automatic Image Enhancement" (IEEE International Conference on Image Processing, 2005) [20] предложили эффективный с вычислительной точки зрения способ оценки резкости изображений. Данный способ основан на вычислении суммы отношений результатов фильтрации двумя одномерными БИХ фильтрами (ФВЧ и полосовым) конечных разностей соседних точек изображения. Фильтры применяются отдельно для строк и столбцов изображения. Данная оценка хорошо коррелирует с восприятием резкости человеком. Однако опубликованные результаты показывают зависимость оценки резкости от типа камеры, которой снималось изображение.Researchers from HP Labs in U.S. Patent Application Laid-Open 2005/0244074 [19] and Doron Shaked, Ingeborg Tastl's "Sharpness Measure: Towards Automatic Image Enhancement" (IEEE International Conference on Image Processing, 2005) [20] proposed a computationally efficient method image sharpness estimates. This method is based on calculating the sum of the relations of the filtering results by two one-dimensional IIR filters (HPF and bandpass) of the final differences of neighboring image points. Filters are applied separately for rows and columns of the image. This assessment correlates well with the perception of sharpness by a person. However, the published results show the dependence of the sharpness assessment on the type of camera that captured the image.

Другая группа исследователей из HP Labs предложила способ детектирования размытых фотографий. В выложенной заявке США 2006/0153471 [21] и опубликованном отчете HP Labs Technical Report "Detection of Out-Of-Focus Digital Photographs" Suk Hwan Lim, Jonathan Yen, Peng Wu (2005) [22] расширяется способ оценки резкости из [19] таким образом, что резкость оценивается локально для блока изображения, а не глобально для всего изображения. Несколько дополнительных параметров вычисляются по оценкам блоков. Эти параметры основаны на следующих предположениях.Another group of researchers from HP Labs proposed a method for detecting blurry photos. U.S. Application Laid-Open No. 2006/0153471 [21] and published HP Labs Technical Report "Detection of Out-Of-Focus Digital Photographs" by Suk Hwan Lim, Jonathan Yen, Peng Wu (2005) [22] extend the method for evaluating sharpness from [19 ] so that sharpness is evaluated locally for the image block, and not globally for the entire image. Several additional parameters are computed from the block estimates. These parameters are based on the following assumptions.

- Передний план всегда резкий, тогда как задний план может быть как резким, так и не резким.- The foreground is always sharp, while the background can be either sharp or not sharp.

- Передний план, вероятно, ближе к центру изображения.- The foreground is probably closer to the center of the image.

- Передний план обычно более светлый, чем задний.- The foreground is usually lighter than the foreground.

- Цвета переднего плана обычно более яркие и насыщенные, чем заднего.- Foreground colors are usually brighter and more saturated than the background.

- Площадь переднего плана достаточно велика.- The foreground area is large enough.

Отмечается, что эти предположения не всегда верны, особенно 3 и 4. Для детектирования размытых фотографий построен древовидный классификатор. Статья декларирует 90% правильно распознанных фотографий и 10% ошибок из 3000 фотографий, 350 из которых размыто.It is noted that these assumptions are not always true, especially 3 and 4. A tree-like classifier is built for detecting blurry photographs. The article declares 90% of correctly recognized photos and 10% of errors from 3000 photos, 350 of which are blurry.

Статья "Automatic Enhancement of Noisy Images Using Objective Evaluation of Image Quality" Fabrizio Russo (IMTC 2004 - Instrumentation and Measurement Technology Conference, 2004) [23] отмечает, что вид гистограмм границ различается для четких и размытых изображений. Статья предлагает использовать гистограмму границ для автоматического выбора параметров обработки. Границы получают в результате фильтрации фильтром Собеля.Fabrizio Russo (IMTC 2004 - Instrumentation and Measurement Technology Conference, 2004) [23] notes that the appearance of border histograms differs for clear and blurry images in the article “Automatic Enhancement of Noisy Images Using Objective Evaluation of Image Quality”. The article suggests using a histogram of borders for automatic selection of processing parameters. Borders are obtained by filtering with a Sobel filter.

Существует большое количество известных методов повышения резкости изображений, для которых не описан адаптивный подбор параметров. Все эти методы относятся либо к группе восстановления изображений либо к группе улучшения изображений. При восстановлении изображений сначала оценивают функцию рассеяния точки (ФРТ) или оптическую передаточную функцию (ОПФ), затем выполняют обращенную свертку изображения (deconvolution) с регуляризацией. Пример устранения размытия путем восстановления изображения посредством решения линейной инверсной некорректной задачи описан в патенте США 6879735 [24]. Как упоминалось выше, на формирование размытой фотографии одновременно влияют несколько факторов и построение математической модели размытого изображения, равно как оценка ФРТ или ОПФ, на практике являются сложными задачами.There are a large number of known methods for sharpening images for which adaptive parameter selection is not described. All these methods belong either to the image restoration group or to the image enhancement group. When restoring images, the point spread function (PSF) or optical transfer function (OPF) is first evaluated, then deconvolution is performed with regularization. An example of eliminating blur by reconstructing an image by solving a linear inverse incorrect problem is described in US Pat. No. 6,879,735 [24]. As mentioned above, the formation of a blurry photograph is simultaneously influenced by several factors and the construction of a mathematical model of a blurred image, as well as the estimation of PSF or OPF, are in practice difficult tasks.

Почти все методы улучшения изображений, направленные на повышение резкости, можно разделить на две группы:Almost all image enhancement methods aimed at sharpening can be divided into two groups:

- увеличивающие локальный контраст на границах перехода, т.е. диапазона изменения сигнала;- increasing local contrast at the transition boundaries, i.e. signal variation range;

- уменьшающие длину перехода.- reducing the length of the transition.

Методы первой группы увеличивают высокочастотные компоненты изображения. Наиболее известным методом данной группы является нерезкое маскирование (Unsharp mask): Ie=I+k×(I-Ib), где I - исходное изображение, Ib - результат фильтрации I фильтром нижних частот, k - коэффициент усиления величины перепада яркости на границе.The methods of the first group increase the high-frequency components of the image. The most famous method of this group is Unsharp mask: Ie = I + k × (I-Ib), where I is the original image, Ib is the result of filtering I with a low-pass filter, k is the gain of the magnitude of the brightness drop at the border.

Обычно в качестве ФНЧ используют свертку с Гауссианом. Нерезкое маскирование улучшает визуальное восприятие изображений путем увеличения локального контраста около перепадов яркости, т.е. границ, на изображении, однако традиционное нерезкое маскирование имеет следующие недостатки:Usually, a convolution with a Gaussian is used as the low-pass filter. Unsharp masking improves the visual perception of images by increasing the local contrast around brightness differences, i.e. borders, in the image, however, traditional blurry masking has the following disadvantages:

- усиление шумов и артефактов компрессии;- amplification of noise and compression artifacts;

- формирование ореолов вдоль границ, причем ореолы иногда достаточно широкие и хорошо заметны;- the formation of halos along the borders, with halos sometimes quite wide and well visible;

- неравномерное увеличение локального контраста в зависимости от величины перепада яркости на границе.- an uneven increase in local contrast depending on the magnitude of the difference in brightness at the border.

Большое количество патентов и публикаций описывает различные модификации фильтра нерезкого маскирования, например, патент США 6924839 [25], заявка на патент США 2005/0069216 [26], патент США 4794531 [27], патент США 5081692 [28].A large number of patents and publications describe various modifications of the blur filter, for example, US patent 6924839 [25], US patent application 2005/0069216 [26], US patent 4794531 [27], US patent 5081692 [28].

Способов для уменьшения длины перехода (т.е. диапазона изменения сигнала) описано значительно меньше. В отличие от способов повышения локального контраста данная группа способов позволяет повысить качество даже достаточно сильно размытых фотографий.There are much fewer ways to reduce the transition length (i.e., the signal variation range). Unlike methods for increasing local contrast, this group of methods allows you to improve the quality of even quite blurry photographs.

Подход, основанный на деформировании изображения, описан в статье "Enhancement by Image-Dependent Warping" N.Arad, C.Gotsman, IEEE Transactions on Image Processing, Vol.8, №8, 1999 [29]. Данный способ требует значительных вычислительных затрат. Кроме того, в способе не решена проблема с увеличением шумовых включений и артефактов компрессии.The image warping approach is described in the article “Enhancement by Image-Dependent Warping” by N. Arad, C. Gotsman, IEEE Transactions on Image Processing, Vol.8, No. 8, 1999 [29]. This method requires significant computational costs. In addition, the method does not solve the problem with an increase in noise inclusions and compression artifacts.

Большее практическое значение имеет повышение резкости с помощью морфологической фильтрации. В статье "Image sharpening by morphological filtering", G.M.Schavemaker, M.J.T.Reinders, J.J.Gerbrands, E.Backer, Pattern Recognition 33, 2000 [30], описан следующий морфологический фильтр:Of greater practical importance is sharpening using morphological filtration. The article "Image sharpening by morphological filtering", G.M. Schavemaker, M.J.T.Reinders, J.J. Gerbrands, E. Backer, Pattern Recognition 33, 2000 [30], describes the following morphological filter:

Figure 00000001
,
Figure 00000001
,

где (IΘB) - эрозия изображения I со структурным элементом В, (I⊕B) - наращение изображения I со структурным элементом В, (r, c) - координаты текущей точки изображения.where (IΘB) is the erosion of image I with structural element B, (I⊕B) is the extension of image I with structural element B, (r, c) is the coordinate of the current image point.

Необходимо отметить, что для полутонового изображения эрозия является минимальным фильтром, а наращение является максимальным фильтром. Половина перехода заменяется минимальным значением некоторой окрестности, а другая половина заменяется максимальным значением, таким образом, переход преобразуется в идеальную границу - ступеньку. Перепады яркости на изображении становятся абсолютно резкими, но такое изображение становится похожим на акварельный рисунок и выглядит ненатурально, так как большие области вдоль перепадов яркости имеют одинаковое значение цвета, что ненатурально для фотографий. Области шумовых выбросов расширяются.It should be noted that for a grayscale image, erosion is the minimum filter, and build-up is the maximum filter. Half of the transition is replaced by the minimum value of some neighborhood, and the other half is replaced by the maximum value, thus, the transition is converted to an ideal boundary - a step. The brightness differences in the image become absolutely sharp, but such an image becomes like a watercolor drawing and looks unnatural, since large areas along the brightness differences have the same color value, which is not natural for photos. The areas of noise emissions are expanding.

Логичным развитием способа повышения резкости с помощью морфологической фильтрации, в котором значения точек в области перехода заменяются на минимальное или максимальное по окрестности, стал способ локального преобразования уровней, в котором значения точек в области перехода заменяются на значения от минимального до максимального по функции, являющейся типичной для повышения глобального контраста изображения. Такой способ известен из заявки на патент США 2005/0249437 [31]. Он предназначен для повышения резкости не в общем случае, а только после увеличения размера изображения. Последовательность действий в данном способе следующая:The logical development of the method of sharpening using morphological filtering, in which the values of points in the transition region are replaced by the minimum or maximum in the neighborhood, has become a method of local level conversion in which the values of points in the transition region are replaced by values from the minimum to maximum in a function that is typical to enhance global image contrast. Such a method is known from US patent application 2005/0249437 [31]. It is intended to sharpen not in the general case, but only after increasing the image size. The sequence of actions in this method is as follows:

- ищут минимальное и максимальное значения в пределах локального окна, причем размер окна зависит от коэффициента увеличения изображения;- look for the minimum and maximum values within the local window, and the window size depends on the magnification factor of the image;

- нормализуют значение яркости точки изображения в диапазон [0, 1];- normalize the brightness value of the image point in the range [0, 1];

- с помощью функции преобразования уровней f(x) изменяют значение яркости;- using the level conversion function f (x) change the brightness value;

- масштабируют преобразованное значение яркости обратно в диапазон от минимального до максимального значений в окне.- scale the converted brightness value back to a range from minimum to maximum values in the window.

В заявке [31] используется следующая функция преобразования уровней:In the application [31] the following level conversion function is used:

Figure 00000002
Figure 00000002

В патенте США 6915024 [32] и заявке на патент США 2005/0169553 [33] предлагается применять локально функцию линейного контрастирования от минимума до максимума в окне. Способ предназначен для повышения резкости в общем случае, однако отмечается, что способ усиливает ряд артефактов, в частности "звон" вдоль резких границ (ringing), возникающий в результате компрессии с потерей информации.In US patent 6915024 [32] and application for US patent 2005/0169553 [33] proposes to apply locally the linear contrast function from minimum to maximum in the window. The method is intended to sharpen in the general case, however, it is noted that the method enhances a number of artifacts, in particular “ringing” along sharp boundaries (ringing) resulting from compression with loss of information.

Общим недостатком всех способов локального преобразования уровней является усиление шумов и артефактов компрессии. Также, если для изображения уже применялся один из методов повышения резкости, использующий повышение локального контраста, то увеличивается ширина ореола. Эти недостатки ограничивают применение способов локального преобразования уровней.A common drawback of all methods of local level conversion is the amplification of noise and compression artifacts. Also, if one of the sharpening methods using an increase in local contrast has already been used for the image, the width of the halo increases. These disadvantages limit the use of local level conversion methods.

Размытие является типичным и распространенным дефектом любительских фотографий. Автору не известны способы повышения резкости изображений, которые способны в автоматическом режиме улучшать все возможные типы фотографий от сильно размытых до резких, при этом учитывая размер фотоотпечатка и разрешение устройства печати. Существующие способы оценки степени резкости демонстрируют их значительную зависимость от изображенного на фотографии. Существующие способы повышения резкости имеют серьезные недостатки, такие как усиление шумов и артефактов компрессии, образование видимых ореолов вдоль резких перепадов.Blur is a typical and common defect of amateur photography. The author does not know how to sharpen images, which are able to automatically improve all possible types of photographs from very blurry to sharp, taking into account the size of the photo print and the resolution of the printing device. Existing methods for assessing the degree of sharpness demonstrate their significant dependence on the image. Existing sharpening methods have serious disadvantages, such as amplification of noise and compression artifacts, the formation of visible ghosting along sharp changes.

Почти все существующие способы повышения резкости либо увеличивают локальный контраст, либо уменьшают длину перехода, тогда как проведенные автором эксперименты показали, что рациональное сочетание обоих подходов способно обеспечить неочевидный эффект, значительно превосходящий результат простого сложения преимуществ каждого из известных способов. Отсутствие известных публикаций, в которых описываются комбинированные способы адаптивного повышения резкости цифровых фотографий в процессе печати, не позволило выделить прототип заявляемого изобретения.Almost all existing methods for sharpening either increase local contrast or reduce the transition length, while the experiments conducted by the author showed that a rational combination of both approaches can provide a non-obvious effect that significantly exceeds the result of simple addition of the advantages of each of the known methods. The absence of well-known publications that describe combined methods for adaptively sharpening digital photographs during printing did not allow us to single out a prototype of the claimed invention.

Задача, на решение которой направлено заявляемое изобретение, заключается в разработке рациональной комплексной методики использования сильных сторон (преимуществ) известных способов повышения резкости цифровых фотографий в процессе печати и придания этой методике более высокой степени адаптивности.The problem to which the invention is directed is to develop a rational integrated methodology for using the strengths (advantages) of known methods for sharpening digital photographs in the printing process and giving this technique a higher degree of adaptability.

Поставленная задача решена путем создания способа адаптивного повышения резкости цифровых фотографий в процессе печати, реализация которого состоит из следующей последовательности основных этапов:The problem is solved by creating a method for adaptively sharpening digital photographs in the printing process, the implementation of which consists of the following sequence of main steps:

- изменяют размер изображения в соответствии с размером фотоотпечатка и разрешением устройства печати;- change the image size in accordance with the size of the photo print and the resolution of the printing device;

- оценивают степень резкости цифровой фотографии;- evaluate the degree of sharpness of digital photography;

- уменьшают длину перехода на перепадах яркости;- reduce the length of the transition on the brightness differences;

- увеличивают локальный контраст;- increase local contrast;

- модифицируют цветовые каналы.- modify color channels.

Технический результат заключается в том, что заявляемый способ учитывает размер фотоотпечатка и разрешение устройства печати, а, кроме того, учитывает особенности человеческого зрения и обеспечивает пользователя инструкциями, позволяющими наиболее рационально выполнять все действия, направленные на повышение резкости изображения. Способ в автоматическом режиме способен оценивать степень резкости фотографии, причем зависимость от характера сюжета сцены на фотографии существенно меньше, чем у известных методов. К тому же, заявляемый способ позволяет анализировать как цветные, так и черно-белые цифровые фотографии, а также фотографии, снятые с эффектом "сепия".The technical result consists in the fact that the inventive method takes into account the size of the photographic print and the resolution of the printing device, and, in addition, takes into account the peculiarities of human vision and provides the user with instructions to most efficiently perform all actions aimed at sharpening the image. The method in automatic mode is able to assess the degree of sharpness of a photograph, and the dependence on the nature of the scene scene in the photograph is significantly less than that of known methods. In addition, the inventive method allows you to analyze both color and black and white digital photographs, as well as photographs taken with the effect of "sepia".

Для реализации заявляемого способа важно, чтобы была установлена зависимость между размерами фотоотпечатка, разрешения устройства печати и параметрами этапа оценки степени резкости, этапа уменьшения длины перехода и этапа увеличения локального контраста.To implement the proposed method, it is important that a relationship is established between the sizes of the photographic print, the resolution of the printing device and the parameters of the stage of assessing the degree of sharpness, the stage of reducing the transition length and the stage of increasing local contrast.

Для реализации заявляемого способа важно также, чтобы оценка степени резкости включала следующие этапы, на которых:To implement the proposed method, it is also important that the assessment of the degree of sharpness includes the following steps, in which:

- вычисляют гистограммы абсолютных значений изображений границ, где изображения границ получают в результате высокочастотной фильтрации с ядрами свертки различного размера;- calculate histograms of the absolute values of the boundary images, where the boundary images are obtained as a result of high-pass filtering with convolution kernels of various sizes;

- вычисляют интеграл логарифма гистограммы границ для каждой из гистограмм;- calculate the integral of the logarithm of the histogram of boundaries for each of the histograms;

- вычисляют из массива интегралов логарифма гистограммы границ признаки;- signs are calculated from the array of integrals of the logarithm of the histogram of the boundaries;

- принимают на основании признаков решение о степени резкости фотографии.- decide on the degree of sharpness of the photo based on the signs.

Для реализации заявляемого способа важно, чтобы изображения границ получали в результате свертки строк исходного изображения с ядрами [1 -1], [1 0 -1], [1 0 0 -1], [1 0 0 0 -1], [1 0 0 0 0 -1], [1 0 0 0 0 0 -1], [1 0 0 0 0 0 0 -1], [1 0 0 0 0 0 0 0 -1], [1 0 0 0 0 0 0 0 0 -1], [1 0 0 0 0 0 0 0 0 0 -1] и столбцов исходного изображения с транспонированными данными ядрами.To implement the proposed method, it is important that the images of the boundaries were obtained as a result of convolution of the lines of the original image with the kernels [1 -1], [1 0 -1], [1 0 0 -1], [1 0 0 0 -1], [1 0 0 0 0 -1], [1 0 0 0 0 0 -1], [1 0 0 0 0 0 0 -1], [1 0 0 0 0 0 0 0 -1], [1 0 0 0 0 0 0 0 0 -1], [1 0 0 0 0 0 0 0 0 0 0 -1] and columns of the original image with transposed data kernels.

Для реализации заявляемого способа важно, чтобы в процессе принятия решения о степени резкости фотографии вычисляли из массива интегралов логарифма гистограммы границ следующие признаки:To implement the proposed method, it is important that in the process of deciding on the degree of sharpness of the photograph, the following signs are calculated from the array of integrals of the logarithm of the histogram of boundaries:

- интеграл логарифма гистограммы границ, полученных фильтром с ядром свертки размера 2;- integral of the logarithm of the histogram of the boundaries obtained by a filter with a convolution kernel of size 2;

- разность интегралов логарифма гистограмм границ, полученных фильтрами с ядрами свертки размера 3 и 2;- the difference of the integrals of the logarithm of the histograms of the boundaries obtained by filters with convolution kernels of sizes 3 and 2;

- сумма интегралов логарифма гистограмм границ минус 5.- the sum of the integrals of the logarithm of the histograms of boundaries minus 5.

Для реализации заявляемого способа важно, чтобы в процессе принятия решения о степени резкости фотографии применяли классификатор, основанный на взвешенном голосовании комитета простых классификаторов.To implement the proposed method, it is important that in the process of deciding on the degree of sharpness of a photograph, a classifier is used, based on a weighted vote of a committee of simple classifiers.

Для реализации заявляемого способа важно, чтобы для уменьшения длины перехода на перепадах применяли нелинейный нерекурсивный фильтр, в котором новое значение точки изображения формируется в результате следующих этапов:To implement the proposed method, it is important that to reduce the transition length at the edges, a nonlinear non-recursive filter is used, in which a new value of the image point is formed as a result of the following steps:

- вычисляют пределы L и Н, как соответственно среднее среди первых 25% и последних 25% множества, упорядоченного в порядке возрастания и составленного из значений точек в пределах локального окна;- calculate the limits of L and H, respectively, the average among the first 25% and last 25% of the set, ordered in ascending order and made up of the values of the points within the local window;

- изменяют значения точек изображения вне диапазона [L, Н];- change the values of the image points outside the range [L, H];

- игнорируют точки изображения, если разница между Н и L меньше порога;- ignore image points if the difference between H and L is less than a threshold;

- нормализуют значения точки изображения из диапазона [L, H] в диапазон [0, 1];- normalize the values of the image point from the range [L, H] to the range [0, 1];

- преобразуют нормализованное значение с помощью функции преобразования уровней;- convert the normalized value using the level conversion function;

- масштабирование преобразованного значения обратно из диапазона [0, 1] в диапазон [L, Н].- scaling the converted value back from the range [0, 1] to the range [L, H].

Для реализации заявляемого способа важно, чтобы для увеличения локального контраста применяли модифицированный фильтр нерезкого маскирования:To implement the proposed method, it is important that, to increase the local contrast, a modified unsharp masking filter is used:

Figure 00000003
Figure 00000003

где I - исходное изображение, If - результат фильтрации билатеральным фильтром, k - коэффициент усиления локального контраста, Tusm - порог для уменьшения усиления шумов.where I is the original image, If is the filtering result with a bilateral filter, k is the local contrast gain, Tusm is the threshold for reducing noise amplification.

Для реализации заявляемого способа важно, чтобы в модифицированном фильтре нерезкого маскирования использовали билатеральный фильтр со стоп-функцией границ следующего вида:To implement the proposed method, it is important that a modified filter with a stop function of the boundaries of the following form be used in the modified filter of unsharp masking:

Figure 00000004
Figure 00000004

где параметры σR и µ управляют формой функции.where the parameters σ R and µ control the form of the function.

Для реализации заявляемого способа важно, чтобы в модифицированном фильтре нерезкого маскирования использовали билатеральный фильтр с плоским одномерным пространственным ядром.To implement the proposed method, it is important that in the modified filter unsharp masking used bilateral filter with a flat one-dimensional spatial core.

Для реализации заявляемого способа важно, чтобы в модифицированном фильтре нерезкого маскирования использовали билатеральный фильтр, в котором фильтрация нерекурсивно осуществляется сначала по строкам, а затем по столбцам изображения:To implement the proposed method, it is important that in the modified filter of unsharp masking use a bilateral filter, in which filtering is non-recursive, first by rows and then by image columns:

Figure 00000005
Figure 00000005

Figure 00000006
Figure 00000006

где (r,c) - координаты текущей точки изображения, I - исходное изображение, If - результат фильтрации, w - стоп-функция границ, S - размер пространственного ядра.where (r, c) are the coordinates of the current image point, I is the original image, I f is the filtering result, w is the stop function of the boundaries, S is the size of the spatial core.

Для реализации заявляемого способа важно, чтобы в модифицированном фильтре нерезкого маскирования использовали билатеральный фильтр, в котором фильтрация рекурсивно осуществляется сначала по строкам, а затем по столбцам изображения:To implement the proposed method, it is important that in the modified filter of unsharp masking use a bilateral filter, in which filtering is recursively performed first in rows and then in image columns:

Figure 00000007
Figure 00000007

Figure 00000008
Figure 00000008

Figure 00000009
Figure 00000009

где (r,c) - координаты текущей точки изображения, I - исходное изображение, If - результат фильтрации, w - стоп-функция границ, S - размер пространственного ядра.where (r, c) are the coordinates of the current image point, I is the original image, I f is the filtering result, w is the stop function of the boundaries, S is the size of the spatial core.

Таким образом, оценка резкости основана на анализе изменения вида гистограмм границ, где границы получают путем применения КИХ ФВЧ с различными размерами ядра свертки. Одномерные фильтры применяют для строк и столбцов изображения. Зависимость интегралов логарифма гистограммы границ от размера ядра фильтра характеризует резкость фотографии. Для повышения резкости последовательно уменьшают длину перехода (т.е. диапазона изменения сигнала) и повышают локальный контраст на краях перехода. Локальное преобразование уровней применяют для уменьшения длины перехода. Нерезкое маскирование с применением билатерального фильтра используют для повышения локального контраста.Thus, the sharpness assessment is based on the analysis of changes in the type of histograms of boundaries, where the boundaries are obtained by applying FIR HPFs with different sizes of the convolution kernel. One-dimensional filters are used for rows and columns of the image. The dependence of the integrals of the logarithm of the histogram of the boundaries on the size of the filter core characterizes the sharpness of the photograph. To increase the sharpness, the transition length (i.e., the signal variation range) is successively reduced and the local contrast at the transition edges is increased. Local level conversion is used to reduce the transition length. Unsharp masking using a bilateral filter is used to increase local contrast.

Для лучшего понимания существа заявляемого изобретения далее приводится его детальное описание с привлечением соответствующих графических материалов.For a better understanding of the essence of the claimed invention, its detailed description is given below with the involvement of appropriate graphic materials.

Фиг.1. Иллюстрация существующих способов повышения резкости (prior art).Figure 1. Illustration of existing sharpening methods (prior art).

Фиг.2. Иллюстрация предлагаемого способа повышения резкости.Figure 2. Illustration of the proposed sharpening method.

Фиг.3. Схема основных компонентов системы.Figure 3. Scheme of the main components of the system.

Фиг.4. Блок-схема метода.Figure 4. Flowchart of the method.

Фиг.5. Блок-схема оценки резкости изображения.Figure 5. Flow chart for evaluating image sharpness.

Фиг.6. Типичные графики интегралов логарифма гистограммы границ в зависимости от размера ядра фильтра для размытых и четких фотографий.6. Typical graphs of the integrals of the logarithm of the histogram of boundaries depending on the size of the filter core for blurry and clear photographs.

Фиг.7. Таблица с коэффициентами для классификатора для размера фотоотпечатка 10×15 см и разрешения печати 300 ppi.7. A table with coefficients for the classifier for the size of a photo print of 10 × 15 cm and a print resolution of 300 ppi.

Фиг.8. Таблица с параметрами повышения резкости в зависимости степени резкости изображения для размера фотоотпечатка 10×15 см и разрешения печати 300 ppi.Fig. 8. A table with sharpening options depending on the degree of sharpness of the image for a photo print size of 10 × 15 cm and a print resolution of 300 ppi.

Фиг.9. Блок-схема повышения резкости с помощью локального преобразования уровней.Fig.9. A sharpening flowchart using local level conversion.

Фиг.10. График кривой преобразования уровней.Figure 10. Graph of the level conversion curve.

Фиг.11. Графики различных стоп-функций границ.11. Graphs of various stop functions of borders.

Фиг.12. Пример обработки в автоматическом режиме.Fig. 12. An example of processing in automatic mode.

Резкость (иногда называемая четкостью) является одним из основных показателей, влияющих на качество напечатанной фотографии. Резкость (четкость) напечатанной фотографии определяется двумя взаимосвязанными факторами: пространственным разрешением печатающего устройства и длиной переходов на границах (длина участка, на котором происходит изменение яркости, которое и образует границу). Для управления резкостью фотографий необходимо учитывать размер фотоотпечатка и разрешение печати. Таким образом, на первом этапе необходимо изменить размер исходного изображения в соответствии с заданным размером фотоотпечатка и разрешением печати. Параметры способа для детектирования размытых фотографий различаются для каждой пары значений: размер фотоотпечатка и разрешение печати. Все численные константы, приведенные в данном описании, предназначены для анализа изображений, предназначенных для печати фотографий размера 10×15 см (4×6 дюймов) с разрешением печати 300 ppi (pixels per inch, пикселов на дюйм), однако специалисту ясно, что соответствующие данные для иных значений размера фотоотпечатка и разрешения могут быть получены аналогичным образом. Также отметим, что в данном описании мы для обозначения разрешения используем количество пикселов на дюйм (ppi), а не количество точек на дюйм (dpi), так как количество точек на дюйм в различных печатающих устройствах имеет различный смысл, и в ряде печатающих устройств пикселу цифрового изображения соответствует несколько точек в фотоотпечатке.Sharpness (sometimes called sharpness) is one of the main indicators that affect the quality of a printed photograph. The sharpness (sharpness) of a printed photograph is determined by two interrelated factors: the spatial resolution of the printing device and the length of the transitions at the borders (the length of the section where the brightness changes, which forms the border). To control the sharpness of photos, you must consider the size of the photo print and print resolution. Thus, at the first stage, it is necessary to resize the original image in accordance with the specified size of the photo print and print resolution. The parameters of the method for detecting blurry photographs differ for each pair of values: the size of the photo print and the print resolution. All numerical constants described in this description are intended for the analysis of images intended for printing photographs of size 10 × 15 cm (4 × 6 inches) with a print resolution of 300 ppi (pixels per inch, pixels per inch), however, it is clear to the specialist that the corresponding data for other print sizes and resolutions can be obtained in a similar way. Also note that in this description we use the number of pixels per inch (ppi) to indicate resolution, rather than the number of dots per inch (dpi), since the number of dots per inch in different printing devices has different meanings, and in a number of printing devices, a pixel A digital image corresponds to several points in a photo print.

Способ основан на следующих психофизических особенностях зрения человека:The method is based on the following psychophysical features of human vision:

- разрешающая способность: известно, что при рассматривании изображения с расстояния 30-40 мм глаз человека способен разрешать (различать) объекты размером 1/4-1/3 мм; для разрешения печати 300 ppi и размера фотоотпечатка 10×15 см это эквивалентно 3-4 пикселам, то есть граница на изображении будет восприниматься резкой, если длина перехода на границах будет менее 4-х пикселов;- resolution: it is known that when viewing images from a distance of 30-40 mm, the human eye is capable of resolving (distinguishing) objects of 1 / 4-1 / 3 mm in size; for a print resolution of 300 ppi and a photo print size of 10 × 15 cm, this is equivalent to 3-4 pixels, that is, the border on the image will be perceived sharp if the transition length at the borders is less than 4 pixels;

- зрение человека анизотропно: разрешающая способность по горизонтали и вертикали существенно выше, чем по диагонали;- human vision is anisotropic: the horizontal and vertical resolution is much higher than the diagonal;

- даже для достаточно четких фотографий небольшое увеличение локального контраста позитивно оценивается наблюдателем.- even for sufficiently clear photographs, a slight increase in local contrast is positively assessed by the observer.

Также способ основан на результатах предварительной подготовки: применяемый в способе классификатор обучен экспертом, который стремился не только повысить резкость фотографии, но и предотвратить увеличение уровня шумов и артефактов компрессии. Данный способ позволяет анализировать как цветные, так и черно-белые цифровые фотографии, а также фотографии, снятые с эффектом "сепия". В предпочтительном варианте изобретения изображение обрабатывается в цветовой системе YCbCr, которая описана в спецификации метода сжатия JPEG, однако специалисту ясно, что соответствующие константы и выражения могут быть конвертированы для других цветовых систем.The method is also based on the results of preliminary preparation: the classifier used in the method was trained by an expert who sought not only to sharpen the photograph, but also to prevent an increase in the level of noise and compression artifacts. This method allows you to analyze both color and black and white digital photographs, as well as photographs taken with the effect of "sepia". In a preferred embodiment of the invention, the image is processed in the YCbCr color system, which is described in the specification of the JPEG compression method, however, it is clear to one skilled in the art that the corresponding constants and expressions can be converted for other color systems.

Фиг.3 показывает схему взаимодействия компонентов системы, на которой реализуется данный способ. Работа системы управляется процессором 301, который выполняет программный код, записанный в оперативную память 302. Цифровая фотография передается в оперативную память 302 из устройства считывания карт памяти 305 или из устройства регистрации изображений (цифровая фотокамера, камерафон, камкордер) через порт USB 306 или через беспроводную сеть с помощью адаптера 307. Изображение корректируется и передается на устройство отображения 303 и устройство печати 304. Устройство печати 304 печатает скорректированное изображение. Обмен данными компонентов системы осуществляется по шине данных 308.Figure 3 shows a diagram of the interaction of the components of the system on which this method is implemented. The operation of the system is controlled by a processor 301, which executes program code recorded in RAM 302. A digital photo is transferred to RAM 302 from a memory card reader 305 or from an image recording device (digital camera, camera phone, camcorder) via a USB port 306 or wirelessly network using adapter 307. The image is corrected and transmitted to the display device 303 and the print device 304. The print device 304 prints the corrected image. The exchange of data of system components is carried out via data bus 308.

На Фиг.4 приведена блок-схема этапов работы способа. Способ адаптивного повышения резкости изображений имеет 5 основных этапов:Figure 4 shows a block diagram of the stages of the method. A method for adaptively sharpening images has 5 main steps:

- изменяют размер изображения в соответствии с размером фотоотпечатка и разрешением устройства печати (шаг 401);- change the image size in accordance with the size of the photo print and the resolution of the printing device (step 401);

- автоматически оценивают степень резкости изображения (шаг 402);- automatically assess the degree of sharpness of the image (step 402);

- уменьшают длину перехода на перепадах (шаг 403);- reduce the transition length on the edges (step 403);

- увеличивают локальный контраст (шаг 404);- increase local contrast (step 404);

- модифицируют каналы цветности (шаг 405).- modify the color channels (step 405).

На шагах 402-404 обрабатывается только канал яркости. Шаг 405 является не обязательным, он добавлен для предотвращения изменения цветности и насыщенности, но такие изменения возникают только при сильной коррекции.At steps 402-404, only the luminance channel is processed. Step 405 is optional, it is added to prevent changes in color and saturation, but such changes occur only with strong correction.

На Фиг.5 приведена блок-схема оценки резкости. На шаге 501 вычисляют гистограммы абсолютных значений границ, где границы получают путем высокочастотной фильтрации яркостного канала изображения или цветовых каналов КИХ фильтрами с ядрами свертки различного размера. В предпочтительном варианте изобретения выполняют свертку строк изображения с ядрами [1 -1], [1 0 -1], [1 0 0 -1], [1 0 0 0 -1], [1 0 0 0 0 -1], [1 0 0 0 0 0 -1], [1 0 0 0 0 0 0 -1], [1 0 0 0 0 0 0 0 -1], [1 0 0 0 0 0 0 0 0 -1], [1 0 0 0 0 0 0 0 0 0 -1] и свертку столбцов исходного изображения с транспонированными данными ядрами. Отметим, что в ряде случаев реализация может быть упрощена, так как вместо вычисления свертки можно вычислять конечные разности.Figure 5 shows a block diagram of the assessment of sharpness. At step 501, histograms of the absolute values of the boundaries are calculated, where the boundaries are obtained by high-frequency filtering of the image brightness channel or FIR color channels by filters with convolution kernels of various sizes. In a preferred embodiment of the invention, convolution of image lines with kernels [1 -1], [1 0 -1], [1 0 0 -1], [1 0 0 0 -1], [1 0 0 0 0 -1], [1 0 0 0 0 0 -1], [1 0 0 0 0 0 0 -1 -1], [1 0 0 0 0 0 0 0 0 -1], [1 0 0 0 0 0 0 0 0 0 -1], [1 0 0 0 0 0 0 0 0 0 -1] and convolution of the columns of the original image with transposed data kernels. Note that in some cases the implementation can be simplified, since instead of calculating the convolution, finite differences can be calculated.

В ходе экспериментов с различными способами оценки резкости и модельными изображениями, которые размывались фильтрами низких частот, было обнаружено, что вид гистограммы границ зависит от степени размытия изображения и параметров фильтра для получения границ. Пока размер ядра фильтра обнаружения границ (высокочастотного или полосового фильтров) меньше, чем размер ядра размытия, вид гистограммы границ изменяется значительно при увеличении размера ядра фильтра обнаружения границ. Если размер ядра фильтра обнаружения границ больше, чем размер ядра размытия, то вид гистограммы границ изменяется незначительно с увеличением размера ядра. Энтропия En характеризует равномерность гистограммы и отсутствие в ней резких пиков:During experiments with various methods for evaluating sharpness and model images that were blurred by low-pass filters, it was found that the appearance of the histogram of the boundaries depends on the degree of blurring of the image and the filter parameters to obtain the boundaries. As long as the size of the core of the border detection filter (high-pass or bandpass filters) is smaller than the size of the blur core, the shape of the histogram of the borders changes significantly with increasing size of the core of the border detection filter. If the size of the core of the boundary detection filter is larger than the size of the blur core, then the appearance of the histogram of the boundaries changes slightly with increasing size of the core. Entropy En characterizes the uniformity of the histogram and the absence of sharp peaks in it:

En=-∑HilogHi,En = -∑H i logH i ,

где Hi - значение i-го столбца гистограммы.where H i is the value of the i-th column of the histogram.

Энтропия гистограммы границ является оценкой резкости изображения, но ее значение сильно зависит от изображенного на фотографии. На шаге 502 по каждой из гистограмм, вычисленных на шаге 501, вычисляют интеграл логарифма гистограммы границ:The entropy of the histogram of the boundaries is an estimate of the sharpness of the image, but its value depends heavily on the image. In step 502, for each of the histograms calculated in step 501, the integral of the logarithm of the histogram of the boundaries is calculated:

Figure 00000010
Figure 00000010

где единица добавляется, чтобы избежать сингулярности, а логарифм берется по основанию 2.where the unit is added to avoid singularity, and the logarithm is taken at base 2.

Зависимость А от изображенного на фотографии значительно меньше, чем у En за счет нормирования на количество границ на изображении, причем наилучший результат достигается при нормировании отдельно для каждого столбца гистограммы, а не для энтропии в целом. Кроме того, А имеет простую геометрическую интерпретацию: А приблизительно равна площади под огибающей гистограммы в логарифмическом масштабе, то есть интегралу логарифма гистограммы границ.The dependence of A on the image in the photo is much smaller than that of En due to normalization by the number of borders in the image, and the best result is achieved by normalizing separately for each column of the histogram, and not for entropy as a whole. In addition, A has a simple geometric interpretation: A is approximately equal to the area under the histogram envelope on a logarithmic scale, that is, the integral of the logarithm of the histogram of boundaries.

Массив интегралов логарифма гистограммы границ A(S) характеризует резкость изображения, где S - размер ядра фильтра обнаружения границ минус единица. Для резких фотографий A(S) быстро растет для S=2 и иногда для S=3; для S>3 первая производная A(S) - почти константа. В противоположность резким фотографиям, для размытых A(S) увеличивается незначительно. Фиг.6 демонстрирует графики A(S) для резкой (а) и размытой (b) фотографий; на графиках А нормализована в диапазон [01].An array of integrals of the logarithm of the histogram of the boundaries A (S) characterizes the sharpness of the image, where S is the size of the core of the border detection filter minus one. For sharp photographs, A (S) grows rapidly for S = 2 and sometimes for S = 3; for S> 3, the first derivative A (S) is almost constant. In contrast to sharp photographs, for blurry A (S) increases slightly. 6 shows graphs A (S) for sharp (a) and blurry (b) photographs; on graphs A is normalized to the range [01].

На шаге 503 по массиву A(S) вычисляют следующие признаки:At step 503, the following attributes are calculated from the array A (S):

F1=An(2)-An(1) - разность интегралов логарифма гистограмм границ, полученных фильтрами с ядрами свертки размера 3 и 2, где массив {An} есть нормализованный в диапазон [0, 1] массив {А},F1 = An (2) -An (1) is the difference of the integrals of the logarithm of the histograms of the boundaries obtained by filters with convolution kernels of sizes 3 and 2, where the array {An} is the array {A} normalized to the range [0, 1],

Figure 00000011
- сумма нормализованных интегралов логарифма гистограмм границ минус 5,
Figure 00000011
- the sum of the normalized integrals of the logarithm of the histograms of boundaries minus 5,

F3=A(1) - интеграл логарифма гистограммы границ, полученных фильтром с ядром свертки размера 2,F3 = A (1) is the integral of the logarithm of the histogram of the boundaries obtained by a filter with a convolution kernel of size 2,

где An(i) есть A(i) нормализованные а диапазон [0, 1].where An (i) is A (i) normalized and the range is [0, 1].

На шаге 504 на основе результатов работы классификатора принимают решение о степени резкости фотографии. Применяют классификатор Gentle AdaBoost, основанный на взвешенном голосовании комитета простых классификаторов (см. J.Friedman, T.Hastie, R.Tibshirani. Additive logistic regression: A statistical view of boosting. The Annals of Statistics, 38(2):337-374, April 2000) [34]. Таблица на Фиг.7 содержит данные для построения классификатора a(i), Feature(i), Th(i) и b(i), полученные в результате обучения на выборке из 400 фотографий. Для оценки степени резкости фотографии используют следующий классификатор:At step 504, based on the results of the classifier, a decision is made on the degree of sharpness of the photograph. The Gentle AdaBoost classifier is used, based on a weighted vote of a committee of simple classifiers (see J. Friedman, T. Hastie, R. Tibshirani. Additive logistic regression: A statistical view of boosting. The Annals of Statistics, 38 (2): 337-374 , April 2000) [34]. The table in Fig. 7 contains data for constructing the classifier a (i), Feature (i), Th (i) and b (i) obtained as a result of training on a sample of 400 photographs. To assess the degree of sharpness of a photograph, the following classifier is used:

Figure 00000012
,
Figure 00000012
,

где wl(i) равно 1, если b(i)×Feature(i)>b(i)×Th(i), и равно 0 в противном случае, где a(i) - весовой коэффициент, находящийся в первом столбце и i-й строке таблицы с Фиг.4; Feature(i) - признак, находящийся во втором столбце и i-й строке таблицы; Th(i) - порог, находящийся в третьем столбце и i-й строке таблицы; b(i) - знаковый коэффициент, находящийся в четвертом столбце и i-й строке таблицы.where wl (i) is 1 if b (i) × Feature (i)> b (i) × Th (i), and 0 otherwise, where a (i) is the weight coefficient in the first column and i-th row of the table with Figure 4; Feature (i) - feature located in the second column and i-th row of the table; Th (i) is the threshold located in the third column and i-th row of the table; b (i) is the sign coefficient located in the fourth column and i-th row of the table.

В зависимости от значения U выбирается одна из 4-х степеней резкости фотографии: если U<0, то фотография считается сильно размытой, иначе если U<0.06, то фотография считается размытой, иначе если U<0.23, то фотография считается слегка размытой, иначе фотография считается резкой. Таблица на Фиг.8 содержит параметры 5 последующей обработки в зависимости от степени резкости.Depending on the value of U, one of the 4 degrees of sharpness of the photo is selected: if U <0, then the photo is considered to be very blurry, otherwise if U <0.06, then the photo is considered blurred, otherwise if U <0.23, then the photo is considered slightly blurred, otherwise A photograph is considered sharp. The table in Fig. 8 contains the parameters 5 of the subsequent processing depending on the degree of sharpness.

Локальное преобразование уровней является эффективным путем для уменьшения длины перехода на перепадах (границах), но ряд существенных недостатков известных вариантов локального преобразования уровней ограничивают их применение для улучшения фотографий в общем случае. В частности недостатки следующие:Local level conversion is an effective way to reduce the transition length at edges (borders), but a number of significant drawbacks of the known options for local level conversion limit their use for improving photos in the general case. In particular, the disadvantages are as follows:

- усиление шумов;- amplification of noise;

- усиление артефактов компрессии;- strengthening compression artifacts;

- расширение ореола вдоль сильных перепадов, если изображение ранее было подвергнуто операции повышения резкости.- the expansion of the halo along strong differences, if the image was previously subjected to sharpening operations.

Эти недостатки вызваны нормализацией значения точки изображения из диапазона от минимального до максимального значений в окрестности в диапазон [0, 1], тогда как именно минимальные и максимальные значения в окрестности вероятно относятся к шумам и/или артефактам. Для преодоления перечисленных недостатков предлагается осуществлять нормализацию из диапазона [L, Н] и осуществлять подавление значений вне данного диапазона, где L больше минимального значения в окрестности или равняется ему, Н меньше максимального значения в окрестности или равняется ему. Пределы L и Н с меньшей вероятностью соответствуют шумовым выбросам. Для вычисления пределов L и Н используется подход, похожий на нелинейные порядковые статистические фильтры. В предпочтительном варианте изобретения предел L равен среднему значению из первых 25% значений упорядоченного в порядке возрастания множества значений из окрестности точки изображения, а предел Н равен среднему значению из последних 25% значений упорядоченного в порядке возрастания множества значений из окрестности точки изображения:These disadvantages are caused by the normalization of the image point value from the range from the minimum to the maximum values in the neighborhood to the range [0, 1], while the minimum and maximum values in the neighborhood are likely to relate to noise and / or artifacts. To overcome these shortcomings, it is proposed to carry out normalization from the range [L, H] and suppress values outside this range, where L is greater than or equal to the minimum value in the neighborhood, N is less than or equal to the maximum value in the neighborhood. The limits L and H are less likely to correspond to noise emissions. To calculate the limits L and H, an approach similar to nonlinear ordinal statistical filters is used. In a preferred embodiment of the invention, the limit L is equal to the average of the first 25% of the values of the ascending order of the set of values from the vicinity of the image point, and the limit H is equal to the average value of the last 25% of the values of the order of ascending order of the values from the neighborhood of the image point:

Figure 00000013
Figure 00000014
Figure 00000013
Figure 00000014

где Se - множество значений точек изображения в локальном окне отсортированное в порядке возрастания, N - количество точек изображения в локальном окне.where Se is the set of values of image points in the local window sorted in ascending order, N is the number of image points in the local window.

Локальное окно перемещается по точкам изображения, изображение фильтруется нерекурсивно. Размер окна равен Ks×Ks; Ks=2RadiusLTM + 1, где RadiusLTM берется из таблицы на Фиг.8. Блок-схема локального преобразования уровней с упорядочиванием значений для текущей точки изображения Р(r, c) показана на Фиг.9. На шаге 901 вычисляют пределы L и Н, как среднее среди первых 25% и последних 25%, упорядоченного в порядке возрастания множества соответственно.The local window moves along the image points, the image is filtered non-recursively. Window size is Ks × Ks; Ks = 2RadiusLTM + 1, where RadiusLTM is taken from the table in Fig. 8. A block diagram of a local level conversion with ordering of values for the current image point P (r, c) is shown in FIG. 9. At step 901, the limits L and H are calculated as the average of the first 25% and last 25%, ordered in ascending order of the set, respectively.

Множество состоит из значений точек внутри локального окна. Значения точек Р(r,c) вне диапазона [L, Н] на шаге 902 изменяются на значения L или Н для подавления шумов: если Р(r,c)<L, то P(r,c)=L; если Р(r,c)>Н, то Р(r,с)=Н. Условие 903 служит для предотвращения усиления шумов: значения точек изображения не изменяют, если разница между Н и L меньше порога Tltm. Экспериментально выяснено, что хороший визуальный результат достигается, если Tltm зависит от размера локального окна: Tltm=100/Ks. Шаг 904 есть нормализация (масштабирование) из диапазона [L, Н] в диапазон [0, 1]:The set consists of the values of the points inside the local window. The values of the points P (r, c) outside the range [L, H] at step 902 are changed to the values of L or H to suppress noise: if P (r, c) <L, then P (r, c) = L; if P (r, c)> H, then P (r, c) = H. Condition 903 serves to prevent noise amplification: the values of the image points do not change if the difference between H and L is less than the threshold Tltm. It was experimentally found that a good visual result is achieved if Tltm depends on the size of the local window: Tltm = 100 / Ks. Step 904 is the normalization (scaling) from the range [L, H] to the range [0, 1]:

x=(Р(r,c)-L)/(Н-L).x = (P (r, c) -L) / (H-L).

Преобразование уровней осуществляется на шаге 905 с помощью функции f(x), показанной на Фиг.10. На шаге 906 выполняют обратное масштабирование преобразованного значения из диапазона [0, 1] в диапазон [L, Н]:The level conversion is performed in step 905 using the function f (x) shown in FIG. 10. In step 906, the converted value is scaled back from the range [0, 1] to the range [L, H]:

Pe(r, c)=L+f(x)×(H-L).Pe (r, c) = L + f (x) × (H-L).

Как отмечалось выше, даже для достаточно резких изображений небольшое увеличение локального контраста положительно оценивается наблюдателем. Наиболее известным способом увеличения локального контраста является фильтр нерезкого маскирования, который имеет ряд недостатков, в частности усиление шумов и артефактов компрессии, формирование хорошо заметного ореола вдоль сильных перепадов, неравномерное увеличение локального контраста в зависимости от величины перепада. Для преодоления перечисленных недостатков предлагается применять в фильтре нерезкого маскирования билатеральный фильтр (см. C.Tomasi, R.Manduchi "Bilateral Filtering for Gray and Color Images", Proc. IEEE conf. on Computer Vision, 1998 [35]) вместо Гауссиана. Классический билатеральный фильтр использует в качестве стоп-функций границ функцию Гаусса. Действительно, если использовать функцию Гаусса в качестве стоп-функций границ, то имеет место повышение резкости на слабых и средних перепадах. Локальный контраст для больших перепадов не изменяется. Предлагается применять стоп-функцию границ, которая с одной стороны похожа на функцию Гаусса, с другой стороны не так быстро стремится к нулю.As noted above, even for fairly sharp images, a slight increase in local contrast is positively evaluated by the observer. The most well-known method of increasing local contrast is an unsharp masking filter, which has several disadvantages, in particular, amplification of noise and compression artifacts, the formation of a clearly visible halo along strong differences, and an uneven increase in local contrast depending on the value of the difference. To overcome these shortcomings, it is proposed to use a bilateral filter in a blur filter (see C. Thomas, R. Manduchi "Bilateral Filtering for Gray and Color Images", Proc. IEEE conf. On Computer Vision, 1998 [35]) instead of Gaussian. The classical bilateral filter uses the Gauss function as stop functions of the boundaries. Indeed, if we use the Gauss function as stop functions of the boundaries, then there is an increase in sharpness at low and medium drops. Local contrast for large swings does not change. It is proposed to use the stop function of boundaries, which on the one hand is similar to the Gauss function, on the other hand, does not tend to zero so quickly.

Такой функцией является обобщенная функция El-Fallah-Ford:Such a function is the generalized El-Fallah-Ford function:

Figure 00000015
.
Figure 00000015
.

У El-Fallah-Ford µ=2, при µ=6 функция близка к Гауссиану. Изменение µ в диапазоне от 1 до 6 позволяет управлять степенью повышения резкости. На фиг.11 приведены графики w(x) для µ=2 и µ=6, а также Гауссиан для одинаковых значений σR. В предпочтительном варианте изобретения µ равняется 3.For El-Fallah-Ford, µ = 2, with µ = 6, the function is close to Gaussian. Changing µ in the range from 1 to 6 allows you to control the degree of sharpening. Figure 11 shows graphs w (x) for µ = 2 and µ = 6, as well as Gaussian for the same values of σ R. In a preferred embodiment of the invention, µ is 3.

Для увеличения локального контраста используется нерезкое маскирование следующего вида:To increase local contrast, unsharp masking of the following type is used:

Figure 00000003
Figure 00000003

где I - исходное изображение, If - результат фильтрации исходного изображения билатеральным фильтром, k - коэффициент усиления из таблицы с Фиг.8, Tusm - порог для уменьшения усиления шумов.where I is the original image, If is the result of filtering the original image with a bilateral filter, k is the gain from the table in Fig. 8, Tusm is the threshold for reducing noise amplification.

Предложенный способ делает изображение более резким, при этом ореол вдоль границ практически не заметен, увеличение локального контраста происходит независимо от величины перепада, шумы увеличиваются незначительно.The proposed method makes the image sharper, while the halo along the borders is practically not noticeable, the increase in local contrast occurs regardless of the difference, the noise increases slightly.

Целесообразно для фильтрации по пространству в билатеральном фильтре применить плоское одномерное ядро и фильтрацию проводить по строкам, затем по столбцам. По аналогии со сверткой и в соответствии с существующими публикациями будем называть такой фильтр сепарабельным, хотя его сепарабельность (разделимость) не доказана строго математически:It is advisable to filter by space in a bilateral filter using a flat one-dimensional core and filtering by rows, then by columns. By analogy with convolution and in accordance with existing publications, we will call such a filter separable, although its separability (separability) is not proved strictly mathematically:

Figure 00000016
Figure 00000016

Figure 00000006
Figure 00000006

где S размер ядра по пространству; S=2RadiusUSM + 1, где RadiusUSM выбирается из таблицы с Фиг.8.where S is the size of the core in space; S = 2RadiusUSM + 1, where RadiusUSM is selected from the table of FIG. 8.

Также возможно использование рекурсивного билатерального фильтра:It is also possible to use a recursive bilateral filter:

Figure 00000007
Figure 00000007

Figure 00000017
Figure 00000017

Figure 00000018
Figure 00000018

Фиг.12 демонстрирует пример улучшения изображения предложенным способом: а - исходная фотография; b - результат адаптивного повышения резкости.12 shows an example of image enhancement by the proposed method: a - original photo; b is the result of adaptive sharpening.

На заключительном этапе (шаг 405) модифицируют каналы цветности:At the final stage (step 405), color channels are modified:

Figure 00000019
Figure 00000019

Figure 00000020
Figure 00000020

Данные соотношения сохраняют постоянным соотношение между каналами RGB до и после коррекции, что предотвращает искажения цветового тона и насыщенности.These ratios keep the ratio between RGB channels constant before and after correction, which prevents color tone and saturation distortion.

Заявляемый способ предназначен для реализации в различных печатающих устройствах и в программном обеспечении для фотопечати. В частности, заявляемый способ может быть применен в фотопринтерах и МФУ с возможностью фотопечати, в фотокиосках и фотолабораториях для автоматического улучшения фотографий. Возможна реализация предложенного способа в устройствах отображения фотографий, например, в цифровых фоторамках.The inventive method is intended for implementation in various printing devices and in software for printing. In particular, the inventive method can be applied in photo printers and multifunction printers with photo printing capabilities, in photo kiosks and photo laboratories for automatic photo enhancement. It is possible to implement the proposed method in photo display devices, for example, in digital photo frames.

Хотя указанный выше вариант выполнения изобретения был изложен с целью иллюстрации, специалистам ясно, что возможны разные модификации, добавления и замены, не выходящие из объема и смысла настоящего изобретения, раскрытого в прилагаемой формуле изобретения.Although the above embodiment of the invention has been set forth to illustrate, it is clear to those skilled in the art that various modifications, additions and substitutions are possible without departing from the scope and meaning of the present invention disclosed in the attached claims.

Claims (11)

1. Способ адаптивного повышения резкости цифровых фотографий в процессе печати, включающего последовательное выполнение следующих этапов обработки изображения:
изменяют размер изображения в соответствии с размером фотоотпечатка и разрешением устройства печати;
оценивают степень резкости цифровой фотографии;
уменьшают длину перехода на перепадах яркости в канале яркости изображения, используя параметры, которые зависят от степени резкости;
увеличивают локальный контраст в канале яркости изображения, используя параметры, которые зависят от степени резкости;
модифицируют цветовые каналы изображения с целью предотвращения искажений цветового тона и насыщенности по причине изменения яркости на двух предыдущих этапах.
1. The method of adaptive sharpening of digital photographs in the printing process, comprising sequentially performing the following steps of image processing:
resize the image in accordance with the size of the photo print and the resolution of the printing device;
evaluate the sharpness of a digital photograph;
reduce the transition length on the brightness differences in the brightness channel of the image using parameters that depend on the degree of sharpness;
increase local contrast in the image brightness channel using parameters that depend on the degree of sharpness;
modify the color channels of the image in order to prevent distortion of the color tone and saturation due to changes in brightness in the previous two steps.
2. Способ по п.1, отличающийся тем, что оценку степени резкости осуществляют путем выполнения следующих операций:
вычисляют гистограммы абсолютных значений изображений границ, где изображения границ получают в результате высокочастотной фильтрации с ядрами свертки различного размера;
вычисляют интеграл логарифма гистограммы границ для каждой из гистограмм;
вычисляют из массива интегралов логарифма гистограммы границ признаки;
принимают на основании признаков решение о степени резкости фотографии;
2. The method according to claim 1, characterized in that the assessment of the degree of sharpness is carried out by performing the following operations:
histograms of absolute values of boundary images are calculated, where boundary images are obtained as a result of high-pass filtering with convolution kernels of various sizes;
calculate the integral of the logarithm of the histogram of the boundaries for each of the histograms;
calculate signs from the array of integrals of the logarithm of the histogram of the boundaries;
decide on the degree of sharpness of the photograph based on the signs;
3. Способ по п.2, отличающийся тем, что изображения границ получают в результате свертки строк исходного изображения с ядрами [1 -1], [1 0 -1], [1 0 0 -1], [1 0 0 0 -1], [1 0 0 0 0 -1], [1 0 0 0 0 0 -1], [1 0 0 0 0 0 0 -1], [1 0 0 0 0 0 0 0 -1], [1 0 0 0 0 0 0 0 0 -1], [1 0 0 0 0 0 0 0 0 0 -1] и столбцов исходного изображения с транспонированными данными ядрами.3. The method according to claim 2, characterized in that the images of the boundaries are obtained by convolution of the lines of the original image with the kernels [1 -1], [1 0 -1], [1 0 0 -1], [1 0 0 0 - 1], [1 0 0 0 0 -1], [1 0 0 0 0 0 0 -1], [1 0 0 0 0 0 0 -1], [1 0 0 0 0 0 0 0 0 -1], [ 1 0 0 0 0 0 0 0 0 0 -1], [1 0 0 0 0 0 0 0 0 0 0 -1] and columns of the original image with transposed data kernels. 4. Способ по п.2, отличающийся тем, что для принятия решения о степени резкости фотографии вычисляют из массива интегралов логарифма гистограммы границ следующие признаки:
интеграл логарифма гистограммы границ, полученных фильтром с ядром свертки размера 2:
F3=A(1);
разность интегралов логарифма гистограмм границ, полученных фильтрами с ядрами свертки размера 3 и 2:
F1=An(2)-An(1)
сумма интегралов логарифма гистограмм границ минус 5:
Figure 00000021
,
где An есть А нормализованные в диапазон [0, 1], А вычисляется для каждого изображения границ, получаемых как указано в п.3, путем интегрирования логарифма гистограммы Hi абсолютных значений изображений границ:
Figure 00000022
4. The method according to claim 2, characterized in that for deciding on the degree of sharpness of the photograph, the following signs are calculated from the array of integrals of the logarithm of the histogram of boundaries:
integral of the logarithm of the histogram of the boundaries obtained by a filter with a convolution kernel of size 2:
F3 = A (1);
the difference of the integrals of the logarithm of the histograms of boundaries obtained by filters with convolution kernels of sizes 3 and 2:
F1 = An (2) -An (1)
the sum of the integrals of the logarithm of the histograms of boundaries minus 5:
Figure 00000021
,
where An is A normalized to the range [0, 1], A is calculated for each image of the boundaries obtained as indicated in clause 3 by integrating the logarithm of the histogram H i of the absolute values of the images of the boundaries:
Figure 00000022
5. Способ по п.2, отличающийся тем, что для принятия решения о степени резкости фотографии применяют классификатор, основанный на взвешенном голосовании комитета простых классификаторов.5. The method according to claim 2, characterized in that to make a decision on the degree of sharpness of the photograph, a classifier is used based on a weighted vote of a committee of simple classifiers. 6. Способ по п.1, отличающийся тем, что для уменьшения длины перехода на перепадах применяют к каналу яркости изображения нелинейный нерекурсивный фильтр, в котором новое значение точки изображения формируют в результате выполнения следующих операций:
вычисляют пределы L и H, как соответственно среднее среди первых 25% и последних 25% множества, упорядоченного в порядке возрастания и составленного из значений точек в пределах локального окна;
изменяют значения точек изображения вне диапазона [L, Н], причем значение точки изменяют на L, если ее первоначальное значение меньше L, и значение точки изменяют на Н, если ее первоначальное значение больше Н;
игнорируют точки изображения, если разница между Н и L меньше порога;
нормализуют значения точки изображения Р(r, с) из диапазона [L, Н] в диапазон [0, 1]:
x=(P(r,c)-L)/(H-L);
преобразуют нормализованное значение с помощью функции преобразования уровней f(x);
масштабируют преобразованное значение обратно из диапазона [0, 1] в диапазон [L, H]:
Р(r,с)=L+f(x)×(H-L).
6. The method according to claim 1, characterized in that to reduce the transition length at the edges, a nonlinear non-recursive filter is applied to the image brightness channel, in which a new value of the image point is formed as a result of the following operations:
the limits of L and H are calculated, as, respectively, the average among the first 25% and last 25% of the set, ordered in ascending order and composed of the values of the points within the local window;
changing the values of the image points outside the range [L, H], wherein the value of the point is changed to L if its initial value is less than L, and the value of the point is changed to H if its initial value is greater than H;
ignore image points if the difference between H and L is less than a threshold;
normalize the values of the image point P (r, s) from the range [L, H] to the range [0, 1]:
x = (P (r, c) -L) / (HL);
transform the normalized value using the level conversion function f (x);
scale the converted value back from the range [0, 1] to the range [L, H]:
P (r, c) = L + f (x) × (HL).
7. Способ по п.1, отличающийся тем, что для увеличения локального контраста в канале яркости изображения применяют модифицированный фильтр нерезкого маскирования:
Figure 00000023

где I - исходное изображение, If - результат фильтрации билатеральным фильтром, k - коэффициент усиления локального контраста, Tusm - порог для уменьшения усиления шумов.
7. The method according to claim 1, characterized in that in order to increase the local contrast in the image brightness channel, a modified unsharp masking filter is used:
Figure 00000023

where I is the original image, If is the result of filtering with a bilateral filter, k is the local contrast gain, T usm is the threshold for reducing noise amplification.
8. Способ по п.7, отличающийся тем, что в модифицированном фильтре нерезкого маскирования используют билатеральный фильтр со стоп-функцией границ следующего вида:
Figure 00000024

где параметры σR и µ управляют формой функции.
8. The method according to claim 7, characterized in that in the modified filter unsharp masking use bilateral filter with a stop function of the boundaries of the following form:
Figure 00000024

where the parameters σ R and µ control the form of the function.
9. Способ по п.7, отличающийся тем, что в модифицированном фильтре нерезкого маскирования используют билатеральный фильтр с плоским одномерным пространственным ядром.9. The method according to claim 7, characterized in that in the modified filter unsharp masking use bilateral filter with a flat one-dimensional spatial core. 10. Способ по п.7, отличающийся тем, что в модифицированном фильтре нерезкого маскирования используют билатеральный фильтр, в котором фильтрация нерекурсивно осуществляется сначала по строкам, а затем по столбцам изображения:
Figure 00000025

Figure 00000026

где (r, c) - координаты текущей точки изображения, I - исходное изображение, If - результат фильтрации, w - стоп-функция границ, S - размер пространственного ядра.
10. The method according to claim 7, characterized in that the modified filter of unsharp masking uses a bilateral filter, in which filtering is non-recursive, first by rows and then by image columns:
Figure 00000025

Figure 00000026

where (r, c) are the coordinates of the current image point, I is the original image, I f is the filtering result, w is the stop function of the boundaries, S is the size of the spatial core.
11. Способ по п.7, отличающийся тем, что в модифицированном фильтре нерезкого маскирования используют билатеральный фильтр, в котором фильтрация рекурсивно осуществляется сначала по строкам, а затем по столбцам изображения:
Figure 00000027

Figure 00000028

Figure 00000029

где (r, с) - координаты текущей точки изображения, I - исходное изображение, If - результат фильтрации, w - стоп-функция границ, S - размер пространственного ядра.
11. The method according to claim 7, characterized in that in the modified filter of unsharp masking, a bilateral filter is used, in which filtering is recursively performed first by rows and then by image columns:
Figure 00000027

Figure 00000028

Figure 00000029

where (r, s) are the coordinates of the current image point, I is the original image, I f is the filtering result, w is the stop function of the boundaries, S is the size of the spatial core.
RU2007113703/09A 2007-04-12 2007-04-12 Method for adaptive increase of sharpness of digital photographs during printing RU2383924C2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
RU2007113703/09A RU2383924C2 (en) 2007-04-12 2007-04-12 Method for adaptive increase of sharpness of digital photographs during printing

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
RU2007113703/09A RU2383924C2 (en) 2007-04-12 2007-04-12 Method for adaptive increase of sharpness of digital photographs during printing

Publications (2)

Publication Number Publication Date
RU2007113703A RU2007113703A (en) 2008-10-27
RU2383924C2 true RU2383924C2 (en) 2010-03-10

Family

ID=42135397

Family Applications (1)

Application Number Title Priority Date Filing Date
RU2007113703/09A RU2383924C2 (en) 2007-04-12 2007-04-12 Method for adaptive increase of sharpness of digital photographs during printing

Country Status (1)

Country Link
RU (1) RU2383924C2 (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9747672B2 (en) 2013-10-09 2017-08-29 Canon Kabushiki Kaisha Image processing apparatus, image pickup apparatus, image processing method, and non-transitory computer-readable storage medium
RU2631521C2 (en) * 2013-10-09 2017-09-25 Кэнон Кабусики Кайся Image processing device, image shooting device, image processing method and permanent machine-readable medium
RU2656009C1 (en) * 2014-10-06 2018-05-30 Кэнон Кабусики Кайся Image processing device, image survey device, image processing method and continuous automated data medium

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9747672B2 (en) 2013-10-09 2017-08-29 Canon Kabushiki Kaisha Image processing apparatus, image pickup apparatus, image processing method, and non-transitory computer-readable storage medium
RU2631521C2 (en) * 2013-10-09 2017-09-25 Кэнон Кабусики Кайся Image processing device, image shooting device, image processing method and permanent machine-readable medium
RU2656009C1 (en) * 2014-10-06 2018-05-30 Кэнон Кабусики Кайся Image processing device, image survey device, image processing method and continuous automated data medium

Also Published As

Publication number Publication date
RU2007113703A (en) 2008-10-27

Similar Documents

Publication Publication Date Title
RU2400815C2 (en) Method of enhancing digital image quality
JP4087475B2 (en) Automatic cropping method for images
US7933454B2 (en) Class-based image enhancement system
US6373992B1 (en) Method and apparatus for image processing
US7522782B2 (en) Digital image denoising
EP1825420B1 (en) Automatically determining acceptability of a digital image
JP4423298B2 (en) Text-like edge enhancement in digital images
US7751641B2 (en) Method and system for digital image enhancement
US8594451B2 (en) Edge mapping incorporating panchromatic pixels
Safonov et al. Adaptive image processing algorithms for printing
US20060291741A1 (en) Image processing apparatus, image processing method, program, and recording medium therefor
JP2001005960A (en) Method and device for processing image
US20110285871A1 (en) Image processing apparatus, image processing method, and computer-readable medium
JP2002314817A (en) Method, device, program, and recording medium for locally changing sharpness of photographed image by using mask, and image reproducing device
JP2006050494A (en) Image photographing apparatus
WO2008137056A1 (en) Automatic image enhancement
US7430334B2 (en) Digital imaging systems, articles of manufacture, and digital image processing methods
CN111031241B (en) Image processing method and device, terminal and computer readable storage medium
CN111640077A (en) Simple and efficient fuzzy text picture sharpening processing method
US20050025380A1 (en) Digital image processing methods, digital image devices, and articles of manufacture
RU2383924C2 (en) Method for adaptive increase of sharpness of digital photographs during printing
Treece Real image denoising with a locally-adaptive bitonic filter
Han et al. Automatic illumination and color compensation using mean shift and sigma filter
Safonov et al. Adaptive sharpening of photos
Monod et al. An analysis and implementation of the hdr+ burst denoising method

Legal Events

Date Code Title Description
FA92 Acknowledgement of application withdrawn (lack of supplementary materials submitted)

Effective date: 20090303

FZ9A Application not withdrawn (correction of the notice of withdrawal)

Effective date: 20090812

PD4A Correction of name of patent owner
PC41 Official registration of the transfer of exclusive right

Effective date: 20170921

PD4A Correction of name of patent owner
MM4A The patent is invalid due to non-payment of fees

Effective date: 20200413