RU2364937C1 - Method and device of noise filtering in video signals - Google Patents
Method and device of noise filtering in video signals Download PDFInfo
- Publication number
- RU2364937C1 RU2364937C1 RU2008120406/09A RU2008120406A RU2364937C1 RU 2364937 C1 RU2364937 C1 RU 2364937C1 RU 2008120406/09 A RU2008120406/09 A RU 2008120406/09A RU 2008120406 A RU2008120406 A RU 2008120406A RU 2364937 C1 RU2364937 C1 RU 2364937C1
- Authority
- RU
- Russia
- Prior art keywords
- pixel
- filtering
- noise
- input
- module
- Prior art date
Links
- 238000000034 method Methods 0.000 title claims abstract description 94
- 238000001914 filtration Methods 0.000 title claims abstract description 89
- 230000008569 process Effects 0.000 claims abstract description 17
- 230000006870 function Effects 0.000 claims description 13
- 238000012935 Averaging Methods 0.000 claims description 7
- 238000010606 normalization Methods 0.000 claims description 6
- 238000004364 calculation method Methods 0.000 claims description 5
- 238000012545 processing Methods 0.000 abstract description 13
- 230000000694 effects Effects 0.000 abstract description 5
- 230000009467 reduction Effects 0.000 abstract description 5
- 230000008030 elimination Effects 0.000 abstract description 4
- 238000003379 elimination reaction Methods 0.000 abstract description 4
- 239000000126 substance Substances 0.000 abstract 1
- 230000006835 compression Effects 0.000 description 5
- 238000007906 compression Methods 0.000 description 5
- 230000003628 erosive effect Effects 0.000 description 4
- 238000012216 screening Methods 0.000 description 4
- 239000000872 buffer Substances 0.000 description 3
- 238000004422 calculation algorithm Methods 0.000 description 3
- 230000008859 change Effects 0.000 description 3
- 238000012512 characterization method Methods 0.000 description 3
- 238000010586 diagram Methods 0.000 description 3
- 238000009499 grossing Methods 0.000 description 3
- 241000255925 Diptera Species 0.000 description 2
- QQEHDZXXCDSAFE-JBSAMAPISA-N [(3s,8r,9s,10r,13s,14s,17r)-17-acetyl-6-chloro-3-hydroxy-10,13-dimethyl-1,2,3,8,9,11,12,14,15,16-decahydrocyclopenta[a]phenanthren-17-yl] acetate Chemical compound C1=C(Cl)C2=C[C@@H](O)CC[C@]2(C)[C@@H]2[C@@H]1[C@@H]1CC[C@@](C(C)=O)(OC(=O)C)[C@@]1(C)CC2 QQEHDZXXCDSAFE-JBSAMAPISA-N 0.000 description 2
- 230000008901 benefit Effects 0.000 description 2
- 230000004048 modification Effects 0.000 description 2
- 238000012986 modification Methods 0.000 description 2
- 230000006978 adaptation Effects 0.000 description 1
- 230000003044 adaptive effect Effects 0.000 description 1
- 238000007792 addition Methods 0.000 description 1
- 238000004458 analytical method Methods 0.000 description 1
- 238000013459 approach Methods 0.000 description 1
- 230000001174 ascending effect Effects 0.000 description 1
- 238000000113 differential scanning calorimetry Methods 0.000 description 1
- 239000000284 extract Substances 0.000 description 1
- 230000006872 improvement Effects 0.000 description 1
- 230000014759 maintenance of location Effects 0.000 description 1
- 238000004519 manufacturing process Methods 0.000 description 1
- 239000000463 material Substances 0.000 description 1
- 239000011159 matrix material Substances 0.000 description 1
- 238000003672 processing method Methods 0.000 description 1
- 238000004088 simulation Methods 0.000 description 1
- 230000002123 temporal effect Effects 0.000 description 1
Images
Landscapes
- Picture Signal Circuits (AREA)
Abstract
Description
Заявляемое изобретение относится к области обработки видеоинформации, и, в частности, к способам пространственно-временного устранения шумов в видеопоследовательностях.The claimed invention relates to the field of video processing, and, in particular, to methods of spatio-temporal elimination of noise in video sequences.
В сильно сжатых видеопоследовательностях наблюдаются компрессионные артефакты, такие как блочный шум и «москитный» шум. Для цифрового телевидения критической проблемой является способность подавления артефактов эффективно и в режиме реального времени.In highly compressed video sequences, compression artifacts such as block noise and mosquito noise are observed. For digital television, the critical issue is the ability to suppress artifacts efficiently and in real time.
Датчики современных цифровых фотокамер (DSC) и видеокамер демонстрируют шумовые эффекты в процессе захвата фото- или видеоизображения. В случае матрицы RGB фильтр Байера привносит дополнительный шум. Известные из уровня техники способы фильтрования для DSC позволяют значительно повысить качество изображения. В случае видеокамеры обязательным требованием является функционирование способа в режиме реального времени. Другая проблема заключается в том, что для стабильного устранения шумов в видеопоследовательности необходимо учитывать информацию, содержащуюся в последовательно идущих кадрах. Обычно, это налагает высокие требования на оборудование, например требование наличия нескольких буферов кадров (фреймов). Известные технические решения в области устранения видеошумов использовали оценку движения для нахождения соответствующих блоков в соседних кадрах (фреймах).Sensors of modern digital cameras (DSC) and camcorders demonstrate noise effects during the capture of photo or video. In the case of an RGB matrix, a Bayer filter introduces extra noise. Prior art filtering methods for DSCs can significantly improve image quality. In the case of a video camera, a mandatory requirement is the operation of the method in real time. Another problem is that for stable elimination of noise in a video sequence, it is necessary to take into account the information contained in successive frames. Usually, this imposes high requirements on the equipment, for example, the requirement for several frame buffers (frames). Known technical solutions in the field of eliminating video noise used motion estimation to find the corresponding blocks in adjacent frames (frames).
Недавно разработанный фильтр нелокальных средних значений (NL-means), описанный в Европейской патентной заявке №1749278 [1], способен обойтись без выполнения процедуры оценки движения. Оригинальный способ NL-means заменяет зашумленный пиксель взвешенным средним числом пикселей с ближайшим окружением. Преимущество этого фильтра заключается в его способности обходиться без оценки движения в процессе фильтрования видео [4]. Получая тот же результат, что и другие известные решения [1], [4], этот способ требует значительных вычислительных ресурсов. Способ имеет ряд недостатков. В области с текстурой фильтр привносит некоторое размытие изображения, в то время как для плоских областей он работает хорошо. Поэтому для областей с текстурой необходима некоторая адаптация фильтра. Также некоторые проблемы возникают в процессе фильтрования видео с быстрым движением. В таких случаях расположенные по соседству элементы в смежных кадрах имеют различное содержание из-за движения. В результате фильтрованное изображение может быть размыто и может иметь призрачные (ghosting) артефакты. Требуется некоторая модификация способа для ускорения алгоритма и для более эффективной обработки областей с быстрым движением.The recently developed nonlocal mean filter (NL-means) described in European Patent Application No. 1749278 [1] is able to dispense with the motion estimation procedure. The original NL-means method replaces a noisy pixel with a weighted average of pixels with the nearest surroundings. The advantage of this filter is its ability to dispense with motion estimation during video filtering [4]. Getting the same result as other known solutions [1], [4], this method requires significant computing resources. The method has several disadvantages. In an area with a texture, the filter introduces some blurring of the image, while for flat areas it works well. Therefore, for texture regions, some filter adaptation is necessary. Also, some problems arise in the process of filtering video with fast motion. In such cases, adjacent elements in adjacent frames have different contents due to movement. As a result, the filtered image may be blurry and may have ghosting artifacts. Some modification of the method is required to speed up the algorithm and to more efficiently process areas with fast movement.
В техническом решении, предложенном в патентной заявке США No.20070133895In the technical solution proposed in US patent application No. 20070133895
[2], выполняют анализ дисперсии области. Этот способ определяет области с высокими частотами и области с низкими частотами. Для областей с низкими частотами используют обычный локальный линейный среднеквадратичный фильтр (LLMMSE). Для областей с высокой частотой используют фильтр, основанный на фильтрации изображения с помощью образов (то есть NL-means). Таким образом, указанный способ использует один из двух режимов в зависимости от характера изображения. Это обеспечивает лучшее сохранение текстуры и устраняет отмеченные в ранее упомянутом способе недостатки NL-means [1]. Однако описанный способ предназначен для фильтрования только изображений, и его применение к чередующимся кадрам видеопоследовательности может породить эффект мерцания, поскольку в нем не учитывается временной характер видеосигнала.[2] perform an analysis of the variance of the region. This method defines areas with high frequencies and areas with low frequencies. For low-frequency areas, use the conventional local linear RMS filter (LLMMSE). For areas with a high frequency, a filter based on image filtering using images (i.e. NL-means) is used. Thus, this method uses one of two modes depending on the nature of the image. This provides better texture retention and eliminates the disadvantages of NL-means noted in the previously mentioned method [1]. However, the described method is intended to filter only images, and its application to alternating frames of a video sequence can give rise to a flicker effect, since it does not take into account the temporal nature of the video signal.
Наиболее близким к заявляемому изобретению является техническое решение, описанное в докладе М.Mahmoudi and G.Sapiro "Fast Image and Video Denoising via Non-Local Means of Similar Neighborhoods", IEEE Signal Processing Letters, Dec.2005, Volume: 12, Issue: 12, page(s): 839-842 [3] и касающееся способа предварительной классификации блоков изображения и уменьшения влияния менее относящихся к делу устранения шумов областей данного пикселя. Основная идея, изложенная в докладе, заключается в ускорении первоначального алгоритма NL-means [1] путем введения фильтров, которые удаляют не относящиеся к делу окрестности из взвешенного усреднения. Эти фильтры основаны на локальных усредненных значениях градаций серого и градиентах, на предварительной классификации окружения и, таким образом, на сведении первоначальной квадратурной сложности к линейной и на снижении влияния менее относящихся к делу областей на снижение шума в данном пикселе. Упомянутый доклад выбран в качестве прототипа заявляемого изобретения.Closest to the claimed invention is a technical solution described in the report of M. Mahmoudi and G. Sapiro "Fast Image and Video Denoising via Non-Local Means of Similar Neighborhoods", IEEE Signal Processing Letters, Dec.2005, Volume: 12, Issue: 12, page (s): 839-842 [3] regarding a method for pre-classifying image blocks and reducing the effect of less relevant noise elimination regions of a given pixel. The main idea presented in the report is to accelerate the initial NL-means algorithm [1] by introducing filters that remove irrelevant neighborhoods from weighted averaging. These filters are based on local averaged grayscale values and gradients, on a preliminary classification of the environment and, thus, on reducing the initial quadrature complexity to linear and on reducing the effect of less relevant areas on noise reduction in a given pixel. The said report is selected as a prototype of the claimed invention.
К недостаткам прототипа [3] следует отнести следующее. Способ-прототип определяет, является ли данный пиксель надежным или нет путем установления факта того, что его параметры, а именно средние значения градации серого и градиенты, лежат в предопределенных диапазонах, т.е. параметры должны быть выше или ниже предопределенных порогов. Пороги не выбираются адаптивно, и для различных уровней шума необходимо вручную установить конкретные значения порогов. Методология установки порогов не ясна из источника [3].The disadvantages of the prototype [3] include the following. The prototype method determines whether a given pixel is reliable or not by establishing the fact that its parameters, namely average grayscale values and gradients, lie in predetermined ranges, i.e. parameters must be above or below predefined thresholds. Thresholds are not adaptively selected, and specific threshold values must be manually set for various noise levels. The methodology for setting thresholds is not clear from the source [3].
Задача, на решение которой направлено заявляемое изобретение, заключается в создании устройства и способа быстрого фильтрования шумов видеосигналов с устойчивостью к движению, которые обеспечивали бы высокое качество шумоподавления без привнесения искажений (артефактов).The problem to which the invention is directed, is to create a device and method for quickly filtering noise of video signals with resistance to movement, which would ensure high quality noise reduction without introducing distortion (artifacts).
Технический результат достигается за счет разработки способа и устройства для качественного ускоренного фильтрования шумов видеосигналов, при этом способ предусматривает повышенную устойчивость к движению и основан на определении локальной структуры и на нелокальном усреднении в соответствии с определенной структурой кадра и с использованием данных о текущем кадре и соседних кадрах и заключается в выполнении следующих операций:The technical result is achieved by developing a method and device for high-quality accelerated filtering of noise of video signals, the method provides increased resistance to movement and is based on determining the local structure and nonlocal averaging in accordance with a specific frame structure and using data on the current frame and adjacent frames and consists in performing the following operations:
- определяют локальную структуру изображения путем последовательного свертывания предопределенных шаблонов с соседними пикселями и путем отбора образцового шаблона RРс, который выдает наименьшую ошибку после свертывания,- determine the local structure of the image by sequentially folding predefined patterns with neighboring pixels and by selecting an exemplary template PP with that produces the smallest error after folding,
- выполняют пространственно-временную фильтрацию с помощью взвешенного усреднения значений пикселя в поисковом окне от опорного кадра, причем результат пространственно-временной фильтрации вычисляют следующим образом- perform spatial-temporal filtering by weighted averaging of the pixel values in the search window from the reference frame, and the result of spatial-temporal filtering is calculated as follows
где pixr(xr,yr,tr) обозначает опорный пиксель от опорного кадра tr=tc+t с координатами xr и yr,where pix r (x r , y r , t r ) denotes the reference pixel from the reference frame t r = t c + t with coordinates x r and y r ,
индекс р изменяется от до в направлении X,index p varies from before in the direction of X,
индекс s изменяется от до в направлении Y,index s varies from before in the direction of Y
индекс t изменяется от до в области времени,index t varies from before in the field of time
Т - число опорных кадров, вовлеченных в процесс фильтрования,T is the number of reference frames involved in the filtering process,
wf - вес опорного пикселя pixr(xr,yr,tr),w f is the weight of the reference pixel pix r (x r , y r , t r ),
нормирующий множитель вычисляют как ;the normalization factor is calculated as ;
- вес wf каждого опорного пикселя определяют следующим образом- the weight w f of each reference pixel is determined as follows
если образцовый шаблон RPc текущего пикселя совпадает с образцовым шаблоном опорного пикселя RPr, то опорный пиксель считают корректным. В противном случае, когда образцовые шаблоны текущего пикселя и опорного пикселя разные, считают, что опорный пиксель является некорректным и исключают его из процесса удаления шумов.if the model template RP c of the current pixel matches the model template of the reference pixel RP r , then the reference pixel is considered correct. Otherwise, when the reference patterns of the current pixel and the reference pixel are different, they consider that the reference pixel is incorrect and exclude it from the noise removal process.
- вес корректного опорного пикселя определяют как- the weight of the correct reference pixel is determined as
где σf=f(kf,σn) - параметр гауссиана для управления степенью фильтрования шума, при этом более высокие значения σf соответствуют более высокой степени фильтрования, а более низкие значения σf соответствуют более низкой степени фильтрования, функция f(kf,σn) описывает зависимость σf от двух параметров, а именно от коэффициента kf фильтрации, который регулирует степень фильтрования, и от коэффициента σn оценки шума,where σ f = f (k f , σ n ) is the Gaussian parameter for controlling the degree of noise filtering, while higher values of σ f correspond to a higher degree of filtering, and lower values of σ f correspond to a lower degree of filtering, the function f (k f , σ n ) describes the dependence of σ f on two parameters, namely, on the filtering coefficient k f , which controls the degree of filtering, and on the noise estimation coefficient σ n ,
- вес корректного опорного пикселя вычисляют, исходя из степени подобия между окрестностью пикселя в текущем кадре и опорной окрестностью в опорных кадрах, при этом функция d() для сравнения окрестности пикселя имеет следующий вид- the weight of the correct reference pixel is calculated based on the degree of similarity between the pixel neighborhood in the current frame and the reference neighborhood in the reference frames, while the function d () for comparing the pixel neighborhood has the following form
, ,
где pixc(xc, yc, tc) означает текущий пиксель из текущего кадра tc с координатами xс и yс,where pix c (x c , y c , t c ) means the current pixel from the current frame t c with coordinates x s and y s ,
pixr(xr,yr,tr) означает опорный пиксель из опорного кадра tr=tc+t с координатами xr и yr,pix r (x r , y r , t r ) means the reference pixel from the reference frame t r = t c + t with coordinates x r and y r ,
индекс i изменяется от до в направлении X,index i varies from before in the direction of X,
индекс j изменяется от до в направлении Y,index j varies from before in the direction of Y
σr - параметр гауссиана для управления весом пикселя относительно его положения по отношению к текущему положению пикселя, при этом внешние пиксели, расположенные в отдалении от центрального пикселя, обладают меньшим весом, чем внутренние пиксели, расположенные вблизи центрального пикселя и имеющие более высокий вес, при этом нормирующий множитель вычисляют как .σ r is the Gaussian parameter for controlling the weight of the pixel relative to its position relative to the current position of the pixel, while external pixels located far from the central pixel have less weight than internal pixels located near the central pixel and having a higher weight, at this normalization factor is calculated as .
При реализации заявляемого способа имеется возможность выбора оптимальных стратегий, например в некоторых случаях целесообразно принимать во внимание только Т последующих кадров, а в качестве поискового окна целесообразно использовать только область текущего кадра. Кроме того, в ряде случаев предпочтительно заменять значение текущего пикселя взвешенной суммой значений текущего пикселя и опорных пикселей из опорных кадров, а функцию f(kf,σn) определять как f(kf,σn)=kf·(σn+1).When implementing the proposed method, it is possible to select optimal strategies, for example, in some cases it is advisable to take into account only T subsequent frames, and as a search window it is advisable to use only the area of the current frame. In addition, in some cases, it is preferable to replace the value of the current pixel by the weighted sum of the values of the current pixel and reference pixels from the reference frames, and define the function f (k f , σ n ) as f (k f , σ n ) = k f · (σ n +1).
Что касается устройства для реализации способа, то оно состоит (см. Фиг.1) из блока 110 памяти, блока 120 оценки уровня шумов, в который входят модуль 121 оценки уровня шумов и регистр 122, блока 130 определения характеристик изображения, в который входят модуль 131 размытия, модуль 133 определения локальной структуры изображения и модули 132, 134 и 135 памяти, а также из блока 140 фильтрования, в который входят модуль 141 вычисления веса фильтра, модуль 142 применения фильтрования и модуль 143 памяти, при этом выход блока 110 подключен параллельно к входу блока 120 оценки уровня шумов, к входу блока 130 определения характеристик изображения и входу блока 140 фильтрования, при этом вход блока 120 оценки уровня шумов совпадает с входом модуля 121 оценки уровня шумов, выход которого подключен к входу модуля 122 регистра, выход которого, в свою очередь, подключен к первому входу блока 140 фильтрования; вход блока 130 определения характеристик изображения совпадает с входом модуля 131 размытия, выход которого подключен к входу модуля 132 памяти, выход которого подключен к первому входу модуля 133 определения локальной структуры изображения, при этом второй вход модуля 133 подключен к выходу модуля 134 памяти, а выход модуля 133 подключен к входу модуля 135 памяти; выход блока 130 определения характеристик изображения подключен ко второму входу блока 140 фильтрования, при этом оба входа блока 140 фильтрования совпадают с двумя входами модуля 141 вычисления веса фильтра, выход которого подключен к входу модуля 142 применения фильтрования, а выход модуля 142 применения фильтрования подключен к входу модуля 143 памяти.As for the device for implementing the method, it consists (see FIG. 1) of a memory unit 110, a noise level estimator 120, which includes a noise level estimator 121 and a register 122, an image characteristics determining unit 130, which includes a module 131 blur, module 133 for determining the local image structure and memory modules 132, 134 and 135, as well as from a filtering unit 140, which includes a filter weight calculation module 141, a filtering application module 142 and a memory module 143, while the output of block 110 is connected in parallel to the input of block 120 oce noise level indicator to the input of the image characteristics determining unit 130 and the input of the filtering unit 140, while the input of the noise level estimating unit 120 coincides with the input of the noise level estimating unit 121, the output of which is connected to the input of the register module 122, the output of which, in turn, connected to the first input of filtering unit 140; the input of the image characteristics determining unit 130 coincides with the input of the blur module 131, the output of which is connected to the input of the memory module 132, the output of which is connected to the first input of the local image structure determination module 133, while the second input of the module 133 is connected to the output of the memory module 134, and the output module 133 is connected to the input of memory module 135; the output of the image characteristics determining unit 130 is connected to the second input of the filtering unit 140, while both inputs of the filtering unit 140 coincide with two inputs of the filter weight calculation module 141, the output of which is connected to the input of the filtering application module 142, and the output of the filtering application module 142 is connected to the input module 143 memory.
Заявляемое изобретение ускоряет и улучшает качество фильтрации обычного NL-mean алгоритма [1] путем предварительной классификации блоков изображений и уменьшения влияния менее относящихся к делу областей в процессе устранения шумов в данном пикселе. Предварительное отсеивание ненадежных пикселей устраняет не относящиеся к делу окрестности из взвешенного усреднения, что приводит к лучшей фильтрации. В то же время, предварительное отсеивание ненадежных пикселей резко снижает требования к вычислительным ресурсам, позволяя сокращать продолжительность обработки данных на порядок. В отличие от прототипа [3], предварительная классификация блоков изображения осуществляется посредством свертывания участков изображения согласно предопределенными шаблонам (трафаретам), которые моделируют локальную структуру изображения. Шаблон, который обеспечивает наименьшую ошибку в процессе свертывания, принимается в качестве опорного шаблона, наилучшим образом описывающего структуру блока изображения. Заявляемое изобретение, в отличие от прототипа [3], не применяет никаких пороговых значений для предварительной классификации блоков изображения, поэтому заявляемый фильтр является более устойчивым к различным уровням шума, и его удобнее использовать из-за упрощенной настройки параметров фильтра.The claimed invention speeds up and improves the filtering quality of a conventional NL-mean algorithm [1] by preliminary classification of image blocks and reducing the influence of less relevant areas in the process of eliminating noise in a given pixel. Preliminary screening of unreliable pixels eliminates irrelevant neighborhoods from weighted averaging, which leads to better filtering. At the same time, preliminary screening of unreliable pixels dramatically reduces the requirements for computing resources, allowing you to reduce the processing time by an order of magnitude. Unlike the prototype [3], the preliminary classification of image blocks is carried out by folding sections of the image according to predefined patterns (stencils) that simulate the local structure of the image. The template that provides the smallest error in the folding process is adopted as the reference template that best describes the structure of the image block. The claimed invention, in contrast to the prototype [3], does not apply any threshold values for preliminary classification of image blocks, therefore, the claimed filter is more resistant to various noise levels, and it is more convenient to use because of the simplified filter settings.
Наряду с эффективной обработкой изображений и видеопоследовательностей заявляемый способ отличается тем, что не порождает артефактов. Он показывает хорошие результаты как при видеосъемке замедленных процессов, так и при съемке спортивных состязаний с быстрым движением. На Фиг.7 показан результат фильтрации видео с быстрым движением на основе известных способов [1] и [4] (Фиг.7.2) и с использованием заявляемого способа (Фиг.7.3). Как видно из Фиг.7.2, фильтр-прототип порождает «призрачные» артефакты около плеч теннисиста. Заявляемый способ лишен этого недостатка и функционирует в 9,75 раза быстрее.Along with efficient image processing and video sequences, the inventive method is different in that it does not generate artifacts. It shows good results both when shooting slow motion videos, and when shooting sports with fast movement. Figure 7 shows the result of filtering video with fast motion based on the known methods [1] and [4] (Fig. 7.2) and using the inventive method (Fig. 7.3). As can be seen from Fig. 7.2, the prototype filter generates “ghostly” artifacts near the tennis player’s shoulders. The inventive method is devoid of this drawback and operates 9.75 times faster.
Далее предпочтительный вариант реализации заявляемого способа излагается более подробно с привлечением графических материалов. Следует отметить, что этот вариант предлагается лишь в качестве иллюстрации, и возможны различные модификации и дополнения, не выходящие за пределы объема охраны согласно формуле изобретения.Further, the preferred embodiment of the proposed method is described in more detail with the involvement of graphic materials. It should be noted that this option is offered only as an illustration, and various modifications and additions are possible without going beyond the scope of protection according to the claims.
Фиг.1. Блок-схема аппарата для быстрого фильтрования шума видеосигнала согласно изобретению.Figure 1. A block diagram of an apparatus for quickly filtering video signal noise according to the invention.
Фиг.2. Блок-схема пошагового выполнения способа быстрого фильтрования шума видеосигнала согласно изобретению.Figure 2. A block diagram of a step-by-step implementation of a method for quickly filtering video noise according to the invention.
Фиг.3. Блок-схема способа для определения локальной структуры.Figure 3. A flowchart of a method for determining a local structure.
Фиг.4. Принцип фильтрования известными способами.Figure 4. The principle of filtering by known methods.
Фиг.5. Пример шаблонов, используемых для определения локальной структуры.Figure 5. An example of patterns used to define a local structure.
Фиг.6. Новый принцип фильтрования.6. New filtering principle.
Фиг.7.1. - Зашумленный видеокадр, 7.2. - Результат фильтрования известным способом [1], 7.3. - Результат фильтрования по заявляемому изобретению.Figure 7.1. - Noisy video frame, 7.2. - The result of filtering in a known manner [1], 7.3. - The filtering result of the claimed invention.
Фиг.8.1. - Видеокадр с артефактами сжатия, 8.2. - Результат фильтрования известным способом [1], 8.3. - Результат фильтрования по заявляемому изобретению.Figure 8.1. - A video frame with compression artifacts, 8.2. - The result of filtering in a known manner [1], 8.3. - The filtering result of the claimed invention.
Фиг.9.1. - Зашумленное фотоизображение, 9.2. - Результат фильтрования известным способом [1], 9.3. - Результат фильтрования по заявляемому изобретению.Figure 9.1. - Noisy photo, 9.2. - The result of filtering in a known manner [1], 9.3. - The filtering result of the claimed invention.
Фиг.1 представляет собой блок-схему, иллюстрирующую структуру устройства 100 для быстрого фильтрования шума видеосигналов, устойчивого к движению, согласно заявляемому изобретению. Устройство 100 включает в себя блок 110 памяти, блок 120 оценки шума, блок 130 определения характеристик изображения, блок 140 фильтрования.Figure 1 is a block diagram illustrating the structure of a device 100 for quickly filtering the noise of video signals that are resistant to movement, according to the claimed invention. The device 100 includes a memory unit 110, a noise estimation unit 120, an image characteristic determining unit 130, and a filtering unit 140.
Блок памяти 110 используют для хранения (записи) входных данных. Входные данные могут состоять из одного опорного кадра (или одного фотоизображения) или нескольких опорных видеокадров. Здесь и далее опорный кадр определяется как кадр (фрейм) видеопоследовательности, который используется для фильтрования текущего кадра. В предпочтительном варианте реализации заявляемого изобретения опорные кадры включают в себя текущий кадр и несколько смежных кадров. NumFrm означает число опорных кадров, вовлеченных в процесс фильтрования. Однако представляется возможным использовать только текущий кадр для фильтрования шума. Этот способ применяется для единичного изображения или когда необходимо ограничить продолжительность обработки. Число опорных кадров (NumFrm) может быть задано заранее или выбрано адаптивным способом при фильтровании видео. Число опорных кадров имеет сильное влияние на качество фильтрации. Чем больше опорных кадров вовлечено в процесс фильтрации, тем лучше результат подавления шума. Однако это ведет к увеличению продолжительности процесса обработки.A memory unit 110 is used for storing (recording) input data. The input data may consist of one reference frame (or one photo image) or several reference video frames. Hereinafter, a reference frame is defined as a frame (frame) of a video sequence that is used to filter the current frame. In a preferred embodiment of the claimed invention, reference frames include a current frame and several adjacent frames. NumFrm means the number of reference frames involved in the filtering process. However, it seems possible to use only the current frame to filter the noise. This method is used for a single image or when it is necessary to limit the processing time. The number of reference frames (NumFrm) can be predefined or selected in an adaptive way when filtering video. The number of reference frames has a strong influence on filtering quality. The more reference frames involved in the filtering process, the better the noise reduction result. However, this leads to an increase in the duration of the processing process.
Опорный видеокадр или фотоизображение представлены в цветовом пространстве «luma-chroma». Типичная модель, представляющая цветовое пространство luma-chroma, включает YCbCr, YUV, YIQ и т.д. Формулы для преобразования цветовой модели RGB в цветовую модель luma-chroma хорошо известны из уровня техники, поэтому здесь они не приводятся.The reference video frame or photo image is represented in the luma-chroma color space. A typical model representing the luma-chroma color space includes YCbCr, YUV, YIQ, etc. The formulas for converting the RGB color model to the luma-chroma color model are well known in the art, therefore, they are not given here.
Блок 120 оценки шума определяет уровень шумов (значение шумовой оценки) для каждого опорного кадра, сохраненного в блоке 110 памяти. При этом блок 120 оценки шумов включает в себя блок 121 оценки уровня шумов и регистр 122. Блок 121 оценки уровня шумов выполняет шумовую оценку, а результат сохраняется в регистре 122. Результатом шумовой оценки является число σn, способное представить шумовой уровень для отдельного видеокадра. В случае нескольких опорных кадров результат выражается множеством σn[NumFrm]. Множество σn[NumFrm] сохраняет результат оценки шума для каждого опорного кадра.The noise estimation unit 120 determines a noise level (noise estimation value) for each reference frame stored in the memory unit 110. In this case, the noise estimation unit 120 includes a noise level estimating unit 121 and a register 122. The noise level estimating unit 121 performs a noise estimation, and the result is stored in the register 122. The result of the noise estimation is the number σ n capable of representing the noise level for a separate video frame. In the case of several reference frames, the result is expressed by the set σ n [NumFrm]. The set σ n [NumFrm] stores the result of the noise estimate for each reference frame.
В отношении каждого опорного кадра блок 130 определения характеристик выделяет для каждого пикселя из окрестностей пикселя некоторые характерные признаки изображения, которые описывают локальную структуру изображения. Здесь, окрестности пикселя понимаются как участок изображения, включающий текущий пиксель и некоторые соседние пиксели. В предпочтительном варианте реализации заявляемого изобретения окрестности пикселя определены как прямоугольное окно с размером N×M, где N - высота окна, выраженная в пикселях, a M - ширина окна в пикселях. Определяемые характерные признаки включают номер наиболее подходящего шаблона, который является наилучшим приближением к локальной структуре изображения. Примеры шаблонов (где M=N=5), используемых для определения характеристик, представлены в Фиг.5. Предпочтительный вариант реализации заявляемого изобретения дает пример определяемых характеристик изображения. Другие характерные признаки изображения (например углы, линии) могут быть определены, или могут быть выполнены дополнительные операции над характерными признаками (например, логические и математические операции), однако это не затрагивает функцию блока 130 определения характеристик.With respect to each reference frame, the characterization unit 130 extracts for each pixel from the vicinity of the pixel some characteristic features of the image that describe the local structure of the image. Here, pixel neighborhoods are understood as a portion of an image including the current pixel and some neighboring pixels. In a preferred embodiment of the invention, the neighborhood of the pixel is defined as a rectangular window with a size of N × M, where N is the height of the window, expressed in pixels, and M is the width of the window in pixels. Identified characteristic features include the number of the most suitable template, which is the best approximation to the local image structure. Examples of patterns (where M = N = 5) used to characterize are presented in FIG. 5. A preferred embodiment of the claimed invention provides an example of detectable image characteristics. Other characteristic features of the image (for example, angles, lines) may be determined, or additional operations on characteristic features (for example, logical and mathematical operations) may be performed, however, this does not affect the function of the characterization unit 130.
Блок 130 определения характеристик в общем случае состоит из блока 131 размывания изображения, блока 132 памяти, блока 133 определения локальной структуры, блока 134 памяти и блока 135 памяти. Блок 131 размывания изображения размывает опорный видеокадр, обеспечивая сглаживание шума изображения и подготавливая изображение для эффективного определения локальной структуры изображения. В предпочтительном варианте реализации заявляемого изобретения используют двустороннее размывание изображения для предотвращения сглаживания резко очерченных контуров. Однако вполне возможно использование любых других способов размывания изображения, например, широко известного Гауссовского размывания изображения. Блок 132 памяти используют для того, чтобы записывать (сохранять) результат размывания изображения.The characterization unit 130 generally consists of an image erosion unit 131, a memory unit 132, a local structure determination unit 133, a memory unit 134, and a memory unit 135. The image erosion unit 131 blurs the reference video frame, smoothing the image noise and preparing the image for efficiently determining the local image structure. In a preferred embodiment of the invention, two-sided blurring is used to prevent smoothing of sharply defined contours. However, it is entirely possible to use any other image blurring method, for example, the widely known Gaussian image blurring. The memory unit 132 is used to record (store) the result of blurring the image.
С помощью блока 133 определения локальной структуры изображения анализируют изображение с целью выбора опорного шаблона окрестностей пикселя из базы данных шаблонов. База данных шаблонов хранится в блоке 134 памяти. Опорный шаблон - это такой шаблон, который на выходе дает наименьшее значение (ошибку) при свертывании с окрестностями пикселя. Блок 133 определения локальной структуры изображения применяет свертывание последовательно со всеми шаблонами, содержащимися в блоке 134 памяти, и затем выбирает в качестве опорного тот шаблон, который дает минимальную ошибку, и номер (индекс) этого шаблона сохраняется в блоке 135 памяти для каждого пикселя в данном изображении. В предпочтительном варианте реализации заявляемого изобретения номер шаблона - 9. Количество шаблонов может быть изменено в зависимости от ограничений на ресурсы, определенных изготовителем оборудования. Для недорогих устройств число шаблонов может быть уменьшено, а для высококачественных устройств оно может быть увеличено. Примеры шаблонов, используемых для свертывания, представлены на Фиг.5.Using block 133 to determine the local structure of the image, the image is analyzed to select a reference template of the neighborhood of the pixel from the database of templates. The template database is stored in block 134 memory. A reference template is a template that produces the smallest value (error) when minimized with pixel neighborhoods. Block 133 for determining the local image structure applies convolution sequentially with all the patterns contained in block 134 of the memory, and then selects as the reference one that gives the minimum error, and the number (index) of this pattern is stored in block 135 of the memory for each pixel in this image. In a preferred embodiment of the claimed invention, the template number is 9. The number of templates can be changed depending on the resource limits defined by the equipment manufacturer. For low-cost devices, the number of patterns can be reduced, and for high-end devices, it can be increased. Examples of patterns used for folding are shown in FIG. 5.
Блок 140 фильтрования отфильтровывает шум, присутствующий в кадре. Блок 140 фильтрования содержит, как правило, блок 141 вычисления веса фильтра, блок 142 применения фильтрования и блок 143 памяти. Блок 141 вычисления веса фильтра рассчитывает веса фильтра в соответствии со значением шумовой оценки, полученной от блока 120 оценки шумов, и с характеристиками, полученными из опорных кадров блоком 130 определения характеристик. Степень фильтрования подвержена изменениям в зависимости от уровня зашумленности изображения. После того как веса фильтра определены, с помощью блока 142 производят фильтрование шумов. После чего отфильтрованный кадр сохраняют в блоке 143 памяти.Block 140 filtering filters out the noise present in the frame. The filtering unit 140 typically comprises a filter weight calculating unit 141, a filtering application unit 142, and a memory unit 143. The filter weight calculating unit 141 calculates the filter weights in accordance with the noise estimate value obtained from the noise estimating unit 120 and with the characteristics obtained from the reference frames by the characteristic determining unit 130. The degree of filtering is subject to change depending on the level of image noise. After the filter weights are determined, noise filtering is performed using block 142. After that, the filtered frame is stored in the block 143 memory.
Рассмотрим поэтапное выполнение заявляемого способа со ссылками на Фиг.2. Сначала опорные кадры сохраняют в блоке 110 памяти (Шаг 1). Затем выполняют процедуру оценки шумов (Шаг 2). Процедура оценки шумов может быть различной. Примененный способ оценки шумов должен выдать значение σn установленных шумовых параметров кадра. Блок 121 оценки уровня шумов выполняет шумовую оценку, и результаты оценки сохраняются в регистре 122.Consider the phased implementation of the proposed method with reference to Figure 2. First, reference frames are stored in the memory unit 110 (Step 1). Then, the noise estimation procedure is performed (Step 2). The procedure for estimating noise may vary. The applied method for estimating noise should give the value of σ n the installed noise parameters of the frame. The noise level estimator 121 performs a noise estimation, and the estimation results are stored in a register 122.
Следующий шаг заключается в размывке опорных кадров (Шаг 3). Блок 131 размывания изображения размывает опорные кадры для сглаживания шумов изображения и подготовки кадров к правильному определению локальной структуры изображения. В предпочтительном варианте реализации заявляемого изобретения используют двустороннее размывание изображения (то есть размывание изображения через двусторонний фильтр), чтобы предотвратить сглаживание резких контуров. Двустороннее фильтрование известно из уровня техники, поэтому здесь этот процесс не описывается. Кроме того, возможно применение иных способов размывания изображения, например Гауссовское размывание изображения. Результат размывания изображения сохраняют в блоке 132 памяти. Этот результат включает T размытых кадров.The next step is to blur the reference frames (Step 3). The image erosion unit 131 blurs the reference frames to smooth the image noise and prepare the frames for the correct determination of the local image structure. In a preferred embodiment of the claimed invention, two-sided blurring of the image (i.e., blurring of the image through a two-sided filter) is used to prevent smoothing of sharp edges. Two-way filtering is known in the art, so this process is not described here. In addition, you can use other methods of blurring, for example, Gaussian blurring. The result of blurring the image is stored in block 132 of the memory. This result includes T blurry frames.
После размывания опорные кадры готовы для обработки блоком 133 определения локальной структуры с целью выявления характерных признаков (Шаг 4). Характерным признаком является номер (индекс) опорного шаблона из базы данных шаблонов, хранящейся в блоке 134 памяти. В дальнейшем под опорным шаблоном понимается такой шаблон, который обеспечивает наименьшее значение (ошибку) при свертывании с окрестностями пикселя.After erosion, the reference frames are ready for processing by the local structure determination unit 133 in order to identify characteristic features (Step 4). A characteristic feature is the number (index) of the reference template from the template database stored in the block 134 memory. In the future, a reference template is understood to mean a template that provides the smallest value (error) when collapsing with pixel neighborhoods.
На Фиг.3 способ определения локальной структуры изображения начинается с установления числа шаблонов NumOfPatt и структуры шаблонов (301). Примеры используемого шаблона приведены на Фиг.5. При этом счетчик шаблонов установлен на единицу (301). Счетчик шаблонов используется для того, чтобы присвоить шаблону номер (индекс) в базе данных шаблонов (блок 134 памяти).3, a method for determining a local image structure begins with establishing the number of NumOfPatt patterns and the pattern structure (301). Examples of the template used are shown in FIG. 5. In this case, the template counter is set to unit (301). The template counter is used to assign a number (index) to the template in the template database (memory block 134).
Затем на шаге (302) определяют окрестности текущего пикселя. После определения окрестностей пикселя способ определения локальной структуры осуществляют по замкнутому циклу (303-306). Способ последовательно выявляет шаблон с номером, соответствующим показанию счетчика из блока памяти (303), вычисляет свертывание окрестностей пикселя с выявленным шаблоном (304), увеличивает показание счетчика шаблонов (305) и вновь переходит к шагу (303), пока показания счетчика не превысят число шаблонов (306).Then, in step (302), the vicinity of the current pixel is determined. After determining the vicinity of the pixel, the method for determining the local structure is carried out in a closed loop (303-306). The method sequentially identifies a pattern with a number corresponding to the counter reading from the memory unit (303), calculates the folding of the pixel neighborhoods with the detected pattern (304), increases the pattern counter reading (305) and proceeds to step (303) until the counter reads more than templates (306).
Результат (output) свертывания окрестностей пикселя и шаблона сохраняют в множестве ConvOut [NumOfPatt] элементов данных (узлов) (блок 134 памяти). В дальнейшем узел PattNode понимается как элемент данных, который состоит из PattNum, номера (индекса) шаблона и PattConv, результата свертывания окрестностей пикселя с шаблоном. Процедура свертывания известна из уровня техники и не поясняется в настоящем описании.The result (output) of the convolution of the neighborhood of the pixel and the template is stored in the set ConvOut [NumOfPatt] of data elements (nodes) (block 134 memory). Hereinafter, the PattNode node is understood as a data element, which consists of PattNum, the number (index) of the template and PattConv, the result of folding the pixel neighborhoods with the template. The folding procedure is known in the art and is not explained in the present description.
После заполнения множества ConvOut соответствующими значениями с помощью определения локальной структуры устанавливают опорный шаблон для текущего пикселя (307). В предпочтительном варианте реализации заявляемого изобретения процедуру определения наилучшего опорного шаблона выполняют посредством сортировки множества ConvOut в порядке возрастания с помощью поискового ключа, равного PattConv, и отбора первого элемента в отсортированном множестве. Первый элемент в отсортированном множестве имеет наименьшую PattConv (ошибку или результат свертывания), поэтому его принимают в качестве опорного шаблона (модели) для окрестностей текущего пикселя. Установление опорного шаблона можно выполнить и иными способами, например, путем применения математических и логических операций к данным из множества ConvOut. Однако эти операции не изменят объема функций блока определения локальной структуры изображения (133).After filling the set of ConvOut with the appropriate values, using the definition of the local structure, a reference template for the current pixel is set (307). In a preferred embodiment of the claimed invention, the procedure for determining the best reference template is performed by sorting the ConvOut set in ascending order using the search key equal to PattConv and selecting the first element in the sorted set. The first element in the sorted set has the smallest PattConv (error or collapse result), so it is taken as a reference template (model) for the vicinity of the current pixel. Setting the reference template can be done in other ways, for example, by applying mathematical and logical operations to data from the set of ConvOut. However, these operations will not change the scope of functions of the unit for determining the local image structure (133).
Далее по тексту RefPattNum понимается как PattNum опорного шаблона. Заключительной операцией на шаге (308) определения локальной структуры является сохранение RefPattNum в множестве RefPattArray, которое находится в блоке 135 памяти. Далее по тексту множество RefPattArray [NumFrm] [FrmHeight × FrmWidth] понимается как множество, содержащее RefPattNum для каждого пикселя каждого опорного кадра. FrmHeigh - это высота опорных кадров в пикселях, а FrmWidth - ширина опорных кадров в пикселях. Процедура определения локальной структуры применяется в отношении каждого пикселя в опорных кадрах. После завершения процедуры определения локальной структуры в множестве RefPattArray (блок 135 памяти) сохраняют RtfPattNum для каждого пикселя кадра.Hereinafter, RefPattNum is understood as the PattNum reference template. The final operation in step (308) of determining the local structure is to store the RefPattNum in the RefPattArray set, which is located in the memory block 135. Further in the text, the set RefPattArray [NumFrm] [FrmHeight × FrmWidth] is understood as the set containing RefPattNum for each pixel of each reference frame. FrmHeigh is the height of the reference frames in pixels, and FrmWidth is the width of the reference frames in pixels. The procedure for determining the local structure is applied to each pixel in the reference frames. After the procedure for determining the local structure is completed, the RtfPattNum for each pixel of the frame is stored in the RefPattArray set (memory block 135).
Затем на шаге 5 вычисляют веса фильтра в соответствии с выявленными шумовыми параметрами σn[NumFrm] и опорными шаблонами окрестностей пикселя (RefPattArray). В первую очередь, необходимо определить переменные, которые нужны для описания способа вычисления весов фильтра. Далее по тексту в предпочтительном варианте реализации заявляемого изобретения под термином поисковое окно понимается прямоугольная пиксельная сетка с размером K×L, где K - высота окна в пикселях и L - ширина окна в пикселях. Прямоугольная форма окна выбрана для упрощения процесса изготовления устройства (например, FPGA) с жесткими требованиями к использованию памяти. Возможны и другие формы поискового окна, например, в виде шестиугольника. Далее по тексту опорный пиксель понимается, как пиксель, который расположен в поисковом окне (примеры таких пикселей обозначены крестиками на Фиг.6). Корректный опорный пиксель - это такой опорный пиксель, который имеет тот же RefPattNum, что и текущий пиксель.Then, in step 5, the filter weights are calculated in accordance with the detected noise parameters σ n [NumFrm] and reference pixel neighborhood patterns (RefPattArray). First of all, it is necessary to determine the variables that are needed to describe the method of calculating the filter weights. Hereinafter, in a preferred embodiment of the claimed invention, the term search window refers to a rectangular pixel grid with a size of K × L, where K is the height of the window in pixels and L is the width of the window in pixels. The rectangular shape of the window is chosen to simplify the manufacturing process of the device (for example, FPGA) with strict memory requirements. Other forms of the search box are possible, for example, in the form of a hexagon. Hereinafter, the reference pixel is understood as a pixel that is located in the search window (examples of such pixels are indicated by crosses in Fig.6). A valid reference pixel is a reference pixel that has the same RefPattNum as the current pixel.
Далее по тексту термин опорная окрестность понимается как участок изображения, который включает опорный пиксель и некоторые соседние пиксели (примеры таких участков показаны на Фиг.6 как квадраты с пикселем-крестиком в центре). Опорная окрестность должна иметь ту же форму и размеры как окрестность пикселя, поскольку они сравниваются по-пиксельно. В предпочтительном варианте реализации заявляемого изобретения опорная окрестность определена как прямоугольное окно с размерами N×M, где N - высота окна в пикселях, а M - ширина окна в пикселях.Hereinafter, the term reference neighborhood is understood as a portion of the image that includes a reference pixel and some neighboring pixels (examples of such sections are shown in Fig. 6 as squares with a cross-pixel in the center). The reference neighborhood must have the same shape and dimensions as the pixel neighborhood, since they are compared pixel by pixel. In a preferred embodiment of the claimed invention, the reference neighborhood is defined as a rectangular window with dimensions N × M, where N is the height of the window in pixels and M is the width of the window in pixels.
Процесс фильтрования начинают с вычисления веса для каждого опорного пикселя. После чего текущий пиксель заменяют взвешенным средним значением опорных пикселей. Сначала с помощью способа вычисления весов анализируют каждый опорный пиксель на предмет обнаружения, является ли этот опорный пиксель корректным опорным пикселем или нет. Если опорный пиксель является корректным, переходят к сравнению окрестностей пикселя с опорной окрестностью. На основе сравнения окрестностей вычисляют вес пикселя. Однако, если опорный пиксель не является корректным, его отбрасывают, и закрепленный за ним вес обозначают как 0. Заблаговременное отсеивание некорректных опорных пикселей ссылки без вычисления их веса является основным преимуществом заявляемого способа, устойчивого к движению фильтрования видеосигналов. Путем сравнения RefPattNum текущего пикселя с RefPattNum опорных пикселей можно прийти к заключению, подобны ли окрестности пикселя одна другой или нет. Если они не подобны, то есть имеют различные шаблоны, и, как следствие, различные RefPattNums, то нет необходимости вычислять вес опорного пикселя. В результате такого усовершенствования известных из уровня техники способов резко сокращается объем ненужных вычислений.The filtering process begins with calculating the weight for each reference pixel. After that, the current pixel is replaced by a weighted average of the reference pixels. First, using a weight calculation method, each reference pixel is analyzed for whether it is a valid reference pixel or not. If the reference pixel is correct, proceed to compare the neighborhoods of the pixel with the reference neighborhood. Based on the comparison of the neighborhoods, the pixel weight is calculated. However, if the reference pixel is not correct, it is discarded, and the weight assigned to it is designated as 0. Pre-screening of invalid reference reference pixels without calculating their weight is the main advantage of the proposed method, which is resistant to the movement of filtering video signals. By comparing the RefPattNum of the current pixel with the RefPattNum of the reference pixels, we can conclude whether the neighborhood of the pixel is similar to one another or not. If they are not similar, that is, they have different patterns, and, as a result, different RefPattNums, then there is no need to calculate the weight of the reference pixel. As a result of such an improvement in prior art methods, the amount of unnecessary computing is drastically reduced.
Заблаговременное отсеивание некорректных опорных пикселей без вычисления веса проиллюстрировано на Фиг.4 и Фиг.6, где Фиг.4 демонстрирует вычисления веса по ранее известным методикам. Для каждого опорного пикселя (примеры таких пикселей отмечены крестиками на Фиг.4) вычисляют вес. В отличие от аналогов, заявляемый способ предусматривает вычисление веса только корректных опорных пикселей (примеры таких пикселей отмечены косым крестиком на Фиг.6).Preliminary screening of incorrect reference pixels without calculating the weight is illustrated in Fig.4 and Fig.6, where Fig.4 shows the calculation of the weight according to previously known methods. For each reference pixel (examples of such pixels are indicated by crosses in FIG. 4), the weight is calculated. Unlike analogues, the inventive method provides for calculating the weight of only the correct reference pixels (examples of such pixels are indicated by an oblique cross in Fig.6).
Вес wf каждого опорного пикселя определяют следующим образомThe weight w f of each reference pixel is determined as follows
Вес корректного опорного пикселя определяют какThe weight of the correct reference pixel is defined as
где σf=f(kf,σn) - параметр гауссиана для управления степенью фильтрования шума, при этом более высокие значения σf соответствуют более высокой степени фильтрования, а более низкие значения σf соответствуют более низкой степени фильтрования, функция f(kf,σn) описывает зависимость σf от двух параметров, а именно от коэффициента kf фильтрации, который регулирует степень фильтрования, и от коэффициента σn оценки шума, который вычисляют на шаге 2. В предпочтительном варианте реализации способа функция f(kf,σn) определяется как f(kf,σn)=kf·(σn+1). Возможны и иные применения функции f(), при этом значение этой функции не меняется.where σ f = f (k f , σ n ) is the Gaussian parameter for controlling the degree of noise filtering, while higher values of σ f correspond to a higher degree of filtering, and lower values of σ f correspond to a lower degree of filtering, the function f (k f , σ n ) describes the dependence of σ f on two parameters, namely, on the filtering coefficient k f , which controls the degree of filtering, and on the noise estimation coefficient σ n , which is calculated in
Вес корректного опорного пикселя вычисляют, исходя из степени подобия между окрестностью пикселя в текущем кадре и опорной окрестностью в опорных кадрах, при этом функция d() для сравнения окрестности пикселя имеет следующий видThe weight of the correct reference pixel is calculated based on the degree of similarity between the neighborhood of the pixel in the current frame and the reference neighborhood in the reference frames, while the function d () for comparing the neighborhood of the pixel has the following form
, ,
где pixc(xc,yc,tc) означает текущий пиксель из текущего кадра tc с координатами xс и yc,where pix c (x c , y c , t c ) means the current pixel from the current frame t c with the coordinates x c and y c ,
pixr(xr,yr,tr) означает опорный пиксель из опорного кадра tr=tc+t с координатами xr и yr,pix r (x r , y r , t r ) means the reference pixel from the reference frame t r = t c + t with coordinates x r and y r ,
индекс i изменяется от до в направлении X,index i varies from before in the direction of X,
индекс j изменяется от до в направлении Y,index j varies from before in the direction of Y
σr - параметр гауссиана для управления весом пикселя относительно его положения по отношению к текущему положению пикселя, при этом внешние пиксели, расположенные в отдалении от центрального пикселя, обладают меньшим весом, чем внутренние пиксели, расположенные вблизи центрального пикселя и имеющие более высокий вес, при этом нормирующий множитель вычисляют как .σ r is the Gaussian parameter for controlling the weight of the pixel relative to its position relative to the current position of the pixel, while external pixels located far from the central pixel have less weight than internal pixels located near the central pixel and having a higher weight, at this normalization factor is calculated as .
Возможно применение и других видов d() для сравнения окрестностей пикселя.Other types of d () can also be used to compare pixel neighborhoods.
Следующий шаг (Шаг 6) заключается в фильтровании шума видеосигналов. После вычисления весов фильтрование осуществляют путем взвешенного суммирования опорных пикселей из опорных кадров и текущего кадра. Чем больше опорных кадров вовлечено в процесс фильтрации, тем лучше результат подавления шумов. Результат фильтрования вычисляется следующим образомThe next step (Step 6) is to filter the noise of the video signals. After calculating the weights, filtering is carried out by weighted summation of the reference pixels from the reference frames and the current frame. The more reference frames are involved in the filtering process, the better the noise reduction result. The filtering result is calculated as follows
, ,
где pixr(xr,yr,tr) обозначает опорный пиксель из опорного кадра tr=tc+t с координатами xt и yr,where pix r (x r , y r , t r ) denotes the reference pixel from the reference frame t r = t c + t with coordinates x t and y r ,
индекс p изменяется от до в направлении X,index p varies from before in the direction of X,
индекс s изменяется от до в направлении Y,index s varies from before in the direction of Y
индекс t изменяется от до в области времени,index t varies from before in the field of time
T - обозначает число опорных кадров, вовлеченных в процесс фильтрования (T=NumFrm),T - indicates the number of reference frames involved in the filtering process (T = NumFrm),
wf - вес опорного пикселя pixr(xr,yr,tr),w f is the weight of the reference pixel pix r (x r , y r , t r ),
Нормирующий множитель вычисляют как .The normalization factor is calculated as .
После выполнения взвешенного усреднения опорных пикселей результат сохраняют в выходном буфере (Шаг 7). Вышеупомянутую процедуру фильтрования шума повторяют в отношении всех пикселей кадра, и, наконец, в выходном буфере сохраняют отфильтрованный кадр.After performing weighted averaging of the reference pixels, the result is stored in the output buffer (Step 7). The above noise filtering procedure is repeated for all pixels of the frame, and finally, the filtered frame is stored in the output buffer.
Наряду с эффективной обработкой фотоизображений и видеопоследовательностей заявляемый способ не порождает артефактов. Фиг.7 показывает результат фильтрации видео с быстрым движением при использовании известного подхода (Фиг.7.2) и заявляемого способа (Фиг.7.3). Согласно Фиг.7.2 ранее известный фильтр по [1], [4] порождает призрачные (ghosting) артефакты около плеч теннисиста. Напротив, заявляемый способ демонстрирует фильтрование, устойчивое к движению. В отличие от аналогов, заявляемый способ устойчив к движению и не порождает артефактов. При этом заявляемый способ работает в 9,75 раз быстрее, чем ранее известный способ.Along with efficient processing of photo images and video sequences, the inventive method does not generate artifacts. Fig.7 shows the result of filtering video with fast motion when using the known approach (Fig.7.2) and the proposed method (Fig.7.3). According to Fig. 7.2, the previously known filter according to [1], [4] generates ghosting (ghosting) artifacts near the shoulders of a tennis player. On the contrary, the claimed method demonstrates filtering that is resistant to movement. Unlike analogues, the claimed method is resistant to movement and does not generate artifacts. Moreover, the inventive method works 9.75 times faster than the previously known method.
Заявляемый способ показывает хорошие результаты при обработке видеопоследовательностей с искажениями (артефактами) сжатия. Фиг.8 показывает результат фильтрования видео с артефактами сжатия на основе известных решений (Фиг.8.2) и на основе заявляемого способа (Фиг.8.3). Согласно Фиг.8.2 ранее известный фильтр порождает призрачные (ghosting) артефакты около плеч актера. В отличие от известного способа заявляемый способ демонстрирует фильтрование, устойчивое к движению, не порождая артефактов. В то же время заявляемый способ выполняется в 7,2 раза быстрее, чем известный способ.The inventive method shows good results when processing video sequences with distortion (artifacts) of compression. Fig. 8 shows the result of filtering video with compression artifacts based on known solutions (Fig. 8.2) and based on the proposed method (Fig. 8.3). According to Fig. 8.2, a previously known filter generates ghosting artifacts near the shoulders of the actor. Unlike the known method, the inventive method demonstrates filtering that is resistant to movement without generating artifacts. At the same time, the inventive method is performed 7.2 times faster than the known method.
Предлагаемый способ применим для обработки изображения в DSC. Фиг.9 показывает результат фильтрации фотоизображения с использованием известных ранее способов (Фиг.9(2)) и с помощью заявляемого способа (Фиг.9(3)). Для изображения, представленного на Фиг.9, заявляемый способ превышает по скорости известные способы в 5,25 раз.The proposed method is applicable for image processing in DSC. Fig.9 shows the result of filtering a photo using previously known methods (Fig.9 (2)) and using the proposed method (Fig.9 (3)). For the image presented in Fig.9, the inventive method exceeds the speed of known methods in 5.25 times.
В ходе моделирования размер поискового окна устанавливали как 11×11, а размер окрестности пикселя устанавливали как 5×5.During the simulation, the size of the search window was set to 11 × 11, and the size of the pixel neighborhood was set to 5 × 5.
Заявляемое изобретение может быть непосредственно применено в программном обеспечении фото- и видеокамер для устранения шумов, порождаемых датчиками камер. При применении заявляемого способа в областях, работающих с сильно компрессированным видеоизображениями, например, в телевидении с высоким разрешением и в мобильных устройствах, разумнее использовать заявляемое изобретение вместе с процедурой детектирования блочных и «москитных» шумов для более эффективного устранения компрессионных артефактов.The claimed invention can be directly applied in the software of photo and video cameras to eliminate the noise generated by camera sensors. When applying the proposed method in areas working with highly compressed video images, for example, in high-resolution television and in mobile devices, it is more reasonable to use the claimed invention together with the procedure for detecting block and "mosquito" noise to more effectively eliminate compression artifacts.
Источники информацииInformation sources
[1] EP patent application No.1749278, J.-M.Morel et al., "Image Data Processing Method by Reducing Image Noise, And Camera Integrating Means for Implementing Said Method".[1] EP patent application No.1749278, J.-M. Morel et al., "Image Data Processing Method by Reducing Image Noise, And Camera Integrating Means for Implementing Said Method".
[2] US patent application No. 20070133895, M.G.Kang et al., "Method for Filtering Image Noise Using Pattern Information".[2] US patent application No. 20070133895, M.G. Kang et al., "Method for Filtering Image Noise Using Pattern Information".
[3] M.Mahmoudi and G.Sapiro "Fast Image and Video Denoising via Non-Local Means of Similar Neighborhoods", IEEE Signal Processing Letters, Dec. 2005, Volume: 12, Issue: 12, page(s): 839-842, ISSN: 1070-9908.[3] M. Mahmoudi and G. Sapiro "Fast Image and Video Denoising via Non-Local Means of Similar Neighborhoods", IEEE Signal Processing Letters, Dec. 2005, Volume: 12, Issue: 12, page (s): 839-842, ISSN: 1070-9908.
[4] A.Buades, B.Coll, and J.M.Morel. “Denoising image sequences does not require motion estimation”. Technical Repott 2005-18, CMLA, ENS Cachan, 2005. htt://www.cmla.ens-cachan.fr/fileadmin/Documentation/Prepublcations/2005/CMLA/2005-18.pdf.[4] A. Buades, B. Coll, and J. M. Morel. “Denoising image sequences does not require motion estimation”. Technical Repott 2005-18, CMLA, ENS Cachan, 2005. Http: //www.cmla.ens-cachan.fr/fileadmin/Documentation/Prepublcations/2005/CMLA/2005-18.pdf.
Claims (6)
,
где pixr(xr,yr,tr) обозначает опорный пиксель от опорного кадра tr=tc+t с координатами xr и yr,
индекс р изменяется от до в направлении X,
индекс s изменяется от до в направлении Y,
индекс t изменяется от до в области времени,
Т - число опорных кадров, вовлеченных в процесс фильтрования,
wf - вес опорного пикселя pixr(xr,yr,tr),
нормирующий множитель вычисляют как ;
вес wf каждого опорного пикселя определяют следующим образом
если образцовый шаблон RPc текущего пикселя совпадает с образцовым шаблоном опорного пикселя RPr, то опорный пиксель считают корректным, в противном случае, когда образцовые шаблоны текущего пикселя и опорного пикселя разные, считают, что опорный пиксель является некорректным и исключают его из процесса удаления шумов;
вес корректного опорного пикселя определяют как
где σf=f(kf,σn) - параметр гауссиана для управления степенью фильтрования шума, при этом более высокие значения σf соответствуют более высокой степени фильтрования, а более низкие значения σf соответствуют более низкой степени фильтрования, функция f(kf,σn) описывает зависимость σf от двух параметров, а именно от коэффициента kf фильтрации, который регулирует степень фильтрования, и от коэффициента σn оценки шума,
вес корректного опорного пикселя вычисляют, исходя из степени подобия между окрестностью пикселя в текущем кадре и опорной окрестностью в опорных кадрах, при этом функция d () для сравнения окрестности пикселя имеет следующий вид
,
где pixc(xc,yc,tc) означает текущий пиксель из текущего кадра tc с координатами xc и
yc,
pixr(xr,yr,tr) означает опорный пиксель из опорного кадра tr=tc+t с координатами xr и yr,
индекс i изменяется от до в направлении X,
индекс j изменяется от до в направлении Y,
σr - параметр гауссиана для управления весом пикселя относительно его положения по отношению к текущему положению пикселя, при этом внешние пиксели, расположенные в отдалении от центрального пикселя, обладают меньшим весом, чем внутренние пиксели, расположенные вблизи центрального пикселя и имеющие более высокий вес, при этом нормирующий множитель вычисляют как ,1. A method of filtering noise of video signals, which is resistant to movement and based on the determination of the local structure and nonlocal averaging in accordance with a certain frame structure and using data on the current frame and neighboring frames, which consists in performing the following operations: determine the local image structure by sequentially folding predefined patterns with adjacent pixels and by selecting an exemplary pattern RP c that produces the smallest error after folding, perform spaces time-based filtering using weighted averaging of pixel values in the search window from the reference frame, and the result of space-time filtering is calculated as follows
,
where pix r (x r , y r , t r ) denotes the reference pixel from the reference frame t r = t c + t with coordinates x r and y r ,
index p varies from before in the direction of X,
index s varies from before in the direction of Y
index t varies from before in the field of time
T is the number of reference frames involved in the filtering process,
w f is the weight of the reference pixel pix r (x r , y r , t r ),
the normalization factor is calculated as ;
the weight w f of each reference pixel is determined as follows
if the model template RP c of the current pixel matches the model template of the reference pixel RP r , then the reference pixel is considered correct, otherwise, when the model patterns of the current pixel and the reference pixel are different, consider that the reference pixel is incorrect and exclude it from the noise removal process ;
the weight of the correct reference pixel is defined as
where σ f = f (k f , σ n ) is the Gaussian parameter for controlling the degree of noise filtering, while higher values of σ f correspond to a higher degree of filtering, and lower values of σ f correspond to a lower degree of filtering, the function f (k f , σ n ) describes the dependence of σ f on two parameters, namely, on the filtering coefficient k f , which controls the degree of filtering, and on the noise estimation coefficient σ n ,
the weight of the correct reference pixel is calculated based on the degree of similarity between the neighborhood of the pixel in the current frame and the reference neighborhood in the reference frames, while the function d () for comparing the pixel neighborhood has the following form
,
where pix c (x c , y c , t c ) means the current pixel from the current frame t c with coordinates x c and
y c
pix r (x r , y r , t r ) means the reference pixel from the reference frame t r = t c + t with coordinates x r and y r ,
index i varies from before in the direction of X,
index j varies from before in the direction of Y
σ r is the Gaussian parameter for controlling the weight of the pixel relative to its position relative to the current position of the pixel, while external pixels located far from the central pixel have a lower weight than internal pixels located near the central pixel and having a higher weight, at this normalization factor is calculated as ,
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
RU2008120406/09A RU2364937C1 (en) | 2008-05-23 | 2008-05-23 | Method and device of noise filtering in video signals |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
RU2008120406/09A RU2364937C1 (en) | 2008-05-23 | 2008-05-23 | Method and device of noise filtering in video signals |
Publications (1)
Publication Number | Publication Date |
---|---|
RU2364937C1 true RU2364937C1 (en) | 2009-08-20 |
Family
ID=41151367
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
RU2008120406/09A RU2364937C1 (en) | 2008-05-23 | 2008-05-23 | Method and device of noise filtering in video signals |
Country Status (1)
Country | Link |
---|---|
RU (1) | RU2364937C1 (en) |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US9326008B2 (en) | 2012-04-10 | 2016-04-26 | Google Inc. | Noise reduction for image sequences |
CN114519676A (en) * | 2022-02-15 | 2022-05-20 | 上海富瀚微电子股份有限公司 | Bayer format-based raw image denoising device and method |
CN116097297A (en) * | 2020-09-02 | 2023-05-09 | Oppo广东移动通信有限公司 | Method and electronic device for removing noise in an image |
CN118133053A (en) * | 2024-05-08 | 2024-06-04 | 山东瑞福锂业有限公司 | Industrial data collecting and processing system and method |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
RU2189700C2 (en) * | 1995-12-12 | 2002-09-20 | РКА Лайсенсинг Корпорейшн | Device for compression of videosignal presenting image and device for fixation of noise filtration in signal |
RU2215376C2 (en) * | 1997-07-16 | 2003-10-27 | Самсунг Электроникс Ко., Лтд. | Method for adaptive signal filtering, adaptive signal filter, and computer-readable medium (alternatives) for saving their programs |
-
2008
- 2008-05-23 RU RU2008120406/09A patent/RU2364937C1/en not_active IP Right Cessation
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
RU2189700C2 (en) * | 1995-12-12 | 2002-09-20 | РКА Лайсенсинг Корпорейшн | Device for compression of videosignal presenting image and device for fixation of noise filtration in signal |
RU2215376C2 (en) * | 1997-07-16 | 2003-10-27 | Самсунг Электроникс Ко., Лтд. | Method for adaptive signal filtering, adaptive signal filter, and computer-readable medium (alternatives) for saving their programs |
Non-Patent Citations (2)
Title |
---|
A.BUADES, В.COLL, Denoising image sequences does not require motion estimation, Technical report 2005, CMLA, ENS Cachan, 2005. * |
BAHADIR K. et al, Multiframe Вlocking-Artifact Reduction for Transform-Coded Video, IEEE TRANSACTIONS ON CIRCUITS AND SYSTEMS FOR VIDEO TECHNOLOGY, v.12, №4, April 2002, c.276-282. Б.ЯНЕ, Цифровая обработка изображений. Техносфера. - М., 2007, с.305-327. * |
Cited By (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US9326008B2 (en) | 2012-04-10 | 2016-04-26 | Google Inc. | Noise reduction for image sequences |
RU2603529C2 (en) * | 2012-04-10 | 2016-11-27 | Гугл Инк. | Noise reduction for image sequences |
US10277919B2 (en) | 2012-04-10 | 2019-04-30 | Google Llc | Noise reduction for image sequences |
CN116097297A (en) * | 2020-09-02 | 2023-05-09 | Oppo广东移动通信有限公司 | Method and electronic device for removing noise in an image |
CN114519676A (en) * | 2022-02-15 | 2022-05-20 | 上海富瀚微电子股份有限公司 | Bayer format-based raw image denoising device and method |
CN118133053A (en) * | 2024-05-08 | 2024-06-04 | 山东瑞福锂业有限公司 | Industrial data collecting and processing system and method |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US10339643B2 (en) | Algorithm and device for image processing | |
CN101504765B (en) | Motion blur image sequence restoration method employing gradient amalgamation technology | |
CN102576454B (en) | Image deblurring using a spatial image prior | |
JP4423298B2 (en) | Text-like edge enhancement in digital images | |
JP4415188B2 (en) | Image shooting device | |
US8908989B2 (en) | Recursive conditional means image denoising | |
US20110285871A1 (en) | Image processing apparatus, image processing method, and computer-readable medium | |
CN107133923B (en) | A non-blind deblurring method for blurred images based on adaptive gradient sparse model | |
EP2816526B1 (en) | Filtering method and apparatus for recovering an anti-aliasing edge | |
CN104282003B (en) | Digital blurred image blind restoration method based on gradient screening | |
JP2009093323A (en) | Image processing device and program | |
CN102708550A (en) | Blind deblurring algorithm based on natural image statistic property | |
US11145032B2 (en) | Image processing apparatus, method and storage medium for reducing color noise and false color | |
US9014503B2 (en) | Noise-reduction method and apparatus | |
Teuber et al. | Nonlocal filters for removing multiplicative noise | |
KR101651889B1 (en) | Video quality enhancement device and method for extremely low-light video | |
CN116385307B (en) | Picture information filtering effect identification system | |
JP5147903B2 (en) | Image processing apparatus, image processing method, and program | |
RU2364937C1 (en) | Method and device of noise filtering in video signals | |
RU2383924C2 (en) | Method for adaptive increase of sharpness of digital photographs during printing | |
Kerouh et al. | Wavelet-based blind blur reduction | |
RU2405200C2 (en) | Method and device for fast noise filtration in digital images | |
Chen et al. | Blind restoration for nonuniform aerial images using nonlocal Retinex model and shearlet-based higher-order regularization | |
Weli et al. | Digital Image Noise Reduction Based on Proposed Smoothing and Sharpening Filters | |
Sadaka et al. | Efficient perceptual attentive super-resolution |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
MM4A | The patent is invalid due to non-payment of fees |
Effective date: 20200524 |