WO2012136137A1 - 一种图像处理方法及装置 - Google Patents

一种图像处理方法及装置 Download PDF

Info

Publication number
WO2012136137A1
WO2012136137A1 PCT/CN2012/073512 CN2012073512W WO2012136137A1 WO 2012136137 A1 WO2012136137 A1 WO 2012136137A1 CN 2012073512 W CN2012073512 W CN 2012073512W WO 2012136137 A1 WO2012136137 A1 WO 2012136137A1
Authority
WO
WIPO (PCT)
Prior art keywords
processing
data block
pixel
macroblock
module
Prior art date
Application number
PCT/CN2012/073512
Other languages
English (en)
French (fr)
Inventor
王岩
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 中兴通讯股份有限公司
Publication of WO2012136137A1 publication Critical patent/WO2012136137A1/zh

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/70Denoising; Smoothing
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20021Dividing image into blocks, subimages or windows

Definitions

  • the present invention relates to the field of digital signal processing, and in particular, to an image processing method and apparatus. Background technique
  • the detail enhancement can compensate for the high frequency component loss from the visual effect to some extent.
  • the decompressed original video image often has high-frequency noise.
  • the general detail enhancement algorithm judges these noises into the details of the image, and enhances the noise while the detail enhancement processing, which impairs the image quality. Summary of the invention
  • the present invention provides an image processing method, including:
  • Each pixel P in the data block to be processed is subjected to the following deburring process:
  • the de-glitched pixel P in the data block to be processed and adjacent to the pixel P are processed by a laplace algorithm.
  • Edge enhancement processing is performed on 8 adjacent pixels.
  • the de-glitched pixel P in the data block to be processed and the 8 adjacent pixels adjacent to the pixel P are edge-enhanced in the following manner: filtering the pixel P and its adjacent 8 pixels,
  • the template coefficient for filtering the pixel P is 8
  • the template coefficient for filtering adjacent pixels of the pixel P is -1.
  • the present invention also provides an image processing method and an image processing apparatus, wherein the method comprises: a macroblock in any row of an image
  • the macroblock is processed based on the original data block of each macroblock, each macroblock includes N rows and N columns, and the original data block to be used for processing the macroblock includes N+2n rows and N+2n columns.
  • the last k column and the N+2n row in the i-th original data block participate in the processing of the i+1th macroblock as part of the i+1th original data block, where N, n, k, and i are positive Integer.
  • the step of the last k column and the N+2n row in the i th original data block participating in the processing of the i+1th macroblock as part of the i+1th original data block includes:
  • the data block to be moved of the first original data block used for processing the first macroblock is moved to a processing area, the macroblock includes N columns and N rows, and the original data block includes N+2n columns, N+2n In the row, the data block to be moved includes N+2n+2m columns and N+2n rows, where m and n are positive integers, where n is the number of data to be involved in processing each data, and 2m is the first time to move the original data. Data that is moved more when the block is satisfied to meet the "word" alignment requirement;
  • the first macroblock is processed based on the first original data block, and the data block obtained by each processing is stored in the first storage area so as to be aligned with the first side boundary of the first storage area.
  • the first storage area includes N+n columns and N+n rows;
  • the data of the "word" alignment requires more movement, starting from the second side boundary of the i-1th storage area, and moving forward from the second side boundary by 2m, the position of the column as the i-th storage area The starting position; until the row of macroblocks is processed.
  • the treatment includes a deburring treatment and an enhancement treatment.
  • An image processing apparatus includes a parameter configuration module, an interface control module, a processing module, a storage control module, and a storage module, wherein:
  • the parameter configuration module is configured to: configure parameters and initiate a startup command
  • the interface control module is configured to: after receiving the start command of the parameter configuration module, move the data block through the AHB, and after receiving the processing completion signal sent by the processing module, move the next data block through the AHB, and pass the data block when moving the data block.
  • the storage control module places the data block in the storage module, and sends a first indication signal to the processing module after the data block is placed;
  • the processing module is configured to: after receiving the first indication signal of the interface control module, process the data block in the storage module, and send a processing completion signal to the interface control module after the processing is completed;
  • the storage control module is configured to: control storage of data in the storage module;
  • the storage module is configured to: store data based on control of the storage control module.
  • the processing module includes a deburring processing module and an enhancement processing module, where: the deglitch processing module is configured to: after receiving the first indication signal of the interface control module, the data block in the storage module Performing a deburring process, and sending a deburring processing completion signal to the enhancement processing module after the processing is completed;
  • the enhancement processing module is configured to: after receiving the deburring processing completion signal sent by the deburring processing module, perform image enhancement processing on the data block in the storage module, and send the processing to the interface control module after the processing is completed. Complete the signal.
  • the processing module is further configured to: process the data block in the storage module in the following manner: when processing the macroblock of any row of the image, the macroblock is based on the original data block of each macroblock
  • each macroblock contains N rows and N columns
  • the original data block to be used for processing the macroblock includes N+2n rows, N+2n columns, the last k columns in the i-th original data block, and N+2n rows.
  • N, n, k, and i are positive integers.
  • the interface control module is further configured to: ⁇ move the data block in the following manner:
  • the data block moved for the first time includes N+2n+2m columns, where N is the number of columns included in the macroblock to be processed, and m and n are positive Integer, where n is the number of data to be processed for each data, and 2m is the data that is moved to meet the "word" alignment requirement when the original data block is moved for the first time; the number of pending data blocks to be moved is N. +n-2m+2m', where 2m' is the data that is moved more to meet the "word” alignment requirement when moving the original data block of the subsequent macroblock;
  • the storage control module is further configured to: control storage of data in the storage module in the following manner, and store the data block obtained each time in the first alignment with the first side boundary of the first storage area.
  • the first storage area includes an N+n column; when the storage i-th macro block is stored, the storage control module starts with a second side boundary of the i-1th storage area, and Moving forward from the second side boundary by 2 m, the position of the column serves as the starting position of the i-th storage area.
  • the video image is deburred first, and then the de-glitched result is subjected to edge detail detection based on the Laplacian algorithm.
  • the deburring process is to obtain the edge of the pixel by comparing the first derivative of the four directions around the pixel, and deburring the pixel in three directions of the non-edge.
  • the image detail enhancement process determines the magnitude of the detail enhancement based on the level of detail after the deburring process. This method avoids the unnatural influence on the edge of the large image of the picture while maintaining a strong enhancement effect on details such as subtitles.
  • 1 is a connection diagram of pixel points and adjacent pixel points for performing glitch preprocessing
  • Figure 2 is a schematic diagram of data block shifting
  • Figure 3 is a diagram showing the movement of the first macroblock and the first original data block
  • Figure 4 is a storage diagram of the first macroblock after deburring processing
  • FIG. 5 is a storage situation diagram after the first macroblock is enhanced
  • Figure 6 is a diagram showing the movement of the second macroblock and the second original data block
  • FIG. 7 is a diagram showing a storage situation after performing deburring and enhancement processing on the second macroblock;
  • Figure 8 is a diagram showing the movement of the third macroblock and the third original data block;
  • Figure 9 is a diagram showing the storage situation after deburring and enhancement processing of the third macroblock;
  • Fig. 10 is a diagram showing the movement of the fourth macroblock and the fourth original data block;
  • FIG 11 is a block diagram showing the structure of an image enhancement processing apparatus of Embodiment 3. Preferred embodiment of the invention
  • this embodiment describes the deburring and image enhancement process.
  • Each pixel P in the data block to be processed is subjected to the following deburring process:
  • Step 1 Find 8 adjacent pixels adjacent to the pixel P, and divide the 8 adjacent pixels into 4 groups, and two pixels in each group are in line with the pixel P;
  • Step 2 Calculate the pixel relationship between the pixel P and each group of pixels using the following formula:
  • P point is a pixel to be processed
  • 1-8 is an adjacent pixel of the P point
  • a group of pixels passing through a line with P Including pixel 1 and pixel 5
  • a group of pixels passing through a b-line with P includes pixel 2 and pixel 6
  • a group of pixels passing through a c-line with P includes pixel 3 and pixel 7, and a group of lines passing through d with P
  • the pixel includes a pixel 4 and a pixel 8.
  • the pixel values of the three pixels connected to each line be X, ⁇ , ⁇ respectively, that is, the value of one endpoint pixel on the line segment is X, the pixel value of the midpoint of the line segment is ⁇ , and the pixel value of the other endpoint of the line segment is ⁇ , then
  • the group pixel relationship value is 2 ⁇ - ⁇ - ⁇ .
  • the relationship value, bl is the second weight value of the pixel P
  • b2, b3, and b4 are the second weight values of the three sets of pixel relationship values, respectively;
  • the deburring process is to remove noise, and the maximum pixel relationship value is considered to be noise and therefore removed.
  • deburring processing steps are repeated until all the pixels in the data block to be processed are subjected to deburring, and thus the deburring processing is completed.
  • edge enhancement processing can also be performed on the to-be-processed data block:
  • step 4 the de-glitch-treated pixel P in the processed data block and the eight adjacent pixels adjacent to the pixel P are edge-enhanced by the laplace algorithm.
  • the filtered template coefficients are 8, -1 , -1 , -1 , -1 , -1 , -1 , -1 , -1 , -1 , -1 , -1 , -1 , -1 , -1 , -1 , wherein the template of the pixel P The coefficient is 8, and the template factor of adjacent pixels is -1.
  • the Laplacian enhancement algorithm is used to enhance the edges of the image, and the coefficients are selected by appropriate filters without making the enhanced effect feel unnatural.
  • the image detail enhancement based on the edge detection of the Laplacian algorithm is performed on the deburred result. While maintaining the enhancement effect on details, it avoids the unnatural effect of excessive enhancement on the edges of large images.
  • This embodiment describes how data blocks are moved and stored during the above-described deburring and image enhancement processing.
  • the image processing method provided in this embodiment can effectively save data transmission bandwidth.
  • the processing method includes:
  • the macroblock When processing a macroblock of any row of the image, the macroblock is processed based on the original data block of each macroblock, each macroblock includes N rows and N columns, and the original data block to be used for processing the macroblock includes N +2n rows, N+2n columns, the last k columns and N+2n rows in the i-th original data block are involved in the processing of the i+1th macroblock as part of the i+1th original data block, where N, n, k, and i are all positive integers.
  • the step of the last k column and the N+2n row in the ith original data block participating in the processing of the i+1th macroblock as part of the i+1th original data block includes:
  • the data block to be moved of the first original data block used for processing the first macroblock is moved to a processing area (ie, a storage area), the macro block includes N columns and N rows, and the original data block includes N+2n.
  • Column, N+2n row, the data block to be moved includes N+2n+2m columns, N+2n rows, m and n are positive integers, where n is the number of data to be involved in processing each data, 2m Data that is moved more to meet the "word" alignment requirement when moving the original data block for the first time;
  • the first macroblock is processed based on the first original data block, and the data block obtained by each processing is stored in the first storage area so as to be aligned with the first side boundary of the first storage area.
  • the first storage area includes N+n columns;
  • an AHB (Advanced High Performance Bus) interface and a memory are used for data transmission.
  • Use ⁇ to increase the versatility and independence of the device.
  • the device can be attached to the bus as a separate unit, and the modules can be bypassed individually without affecting the functionality of other modules.
  • the points at the edges of the image do not need to be enhanced.
  • the upper eight rows, the lower eight rows, the left eight columns, and the right eight columns of the image edge do not need to be processed, but The upper two rows, the next two rows, the left two columns, and the right two columns of the edge connected to the intermediate image need to participate in the calculation.
  • the macroblocks A1 and B1 in the figure are data blocks to be processed (only two macroblocks are shown in the figure due to the limitation of the drawing size). In this embodiment, the macroblock size is 16 ⁇ 16 as an example.
  • each data block is composed of 16 ⁇ 16 pixels. Because deburring processing and enhancement processing require the adjacent pixels of the pixel to be processed, to process the 16 ⁇ 16 macroblock, the pixel to be used for calculation is 20 ⁇ 20 (as shown in Figure 2). Blocks A2, B2). Specifically, a data block of 20 ⁇ 20 size is input, and after deburring preprocessing, a data block of 18 ⁇ 18 size is obtained, and after the enhancement processing, a processed data block of 16 ⁇ 16 size is obtained.
  • the size of each data transmission is 32 bits, and the address of the data transmission is required to be aligned in units of "word", and the data block of 20X20 size is not a data block whose address is word-aligned.
  • the two leftmost pixels c and d and the two pixels a and b outside A2 belong to the same word, and the two rightmost pixels are also the same as the two outside A2.
  • the pixels belong to the same word, so to process the macroblock A1, it is necessary to move the 24 ⁇ 20-sized data block A3 from the memory into the storage space.
  • the above method can also be used in other processes, that is, in other embodiments, one or more other processes can be used, and the value of n is determined according to the number of pixels that the corresponding process needs to participate in.
  • n is determined according to the number of pixels that the corresponding process needs to participate in.
  • the first macroblock When the macroblock of any row of the image is processed, the first macroblock is moved to the storage area. As shown in FIG. 3, in the embodiment, the size of the entire data storage area is 24 ⁇ 20, and the size of the first macroblock is 16 ⁇ 16.
  • the first original data block size required to process the macroblock is 20X20, and the first storage area of the first macroblock is N+n (18 in this embodiment) ⁇ N+n lines, starting from the entire data storage area.
  • the starting boundary is the starting point.
  • the first original data block is deburred to obtain a deburred data block having a size of 18 ⁇ 18, and the data obtained after the first processing (deburring) of the first original data block (18 ⁇ 18) ) is stored in the first storage area in alignment with the first side boundary of the first storage area, as shown in FIG. 4 . Then, the data block is subjected to the second processing (image enhancement), and the processed macroblock (16X16) is still stored in the first storage area in alignment with the first side boundary of the first storage area, as shown in FIG. 5. Shown.
  • the first storage area of the first macroblock is the N+n column starting from the entire storage area
  • the second storage area of the second macro block is from the N+n-2m
  • the column is the start, that is, A 2m' is moved forward from the second side boundary of the first storage area as a starting position.
  • the macroblock subjected to the first processing is stored in the second storage area in alignment with the first side boundary of the second storage area
  • the second processing image enhancement
  • the macroblock of the processing is also stored in the second storage area in alignment with the first side boundary of the second storage area.
  • the 10th to 15th columns in Figure 7 are the moved but unused data, which can participate in the calculation of the next macroblock.
  • the internal memory of a single memory area that is, the serial processing of the data stream is stored, so that the area of the RAM can be saved, as long as the design is processed before the next macroblock is read before the next macroblock is read. The result can be taken away.
  • the above method can still be used.
  • One implementation method is to still use a RAM, and the processed data is overlaid on the left side of the original storage area so that the last k column data can participate in the operation of the next macro block. Thereby achieving the purpose of less moving data.
  • the macroblock size is 16X16
  • the original data block size is 20X20
  • the 20X20 size data block is moved when the first macroblock is processed. After the first processing, the 18X18 size data block is obtained, and is placed on the left side of the original data block area.
  • the first storage area is the same as the first original data block area
  • Another implementation method is to use more than two RAMs, and the processed data can be placed in another RAM at this time, thereby achieving the purpose of less moving data, but this method increases the area of the RAM, which is disadvantageous for Miniaturization of products.
  • the embodiment provides an image enhancement processing device.
  • the method includes: a parameter configuration module, an interface control module, a processing module, a storage control module, and a storage module, where:
  • the parameter configuration module (AHB slave) is configured to configure a parameter and initiate a startup command;
  • the interface control module (EE-DMA master) is configured to move the data block by using a parameter after receiving the startup command of the parameter configuration module.
  • the processing completion signal sent by the processing module is received, the next data block is moved by the ,, and the data block is placed in the storage module by the storage control module when the data block is moved, and the processing module is sent to the processing module after the data block is placed.
  • the processing module is configured to: after receiving the first indication signal of the interface control module, process the data block in the storage module, and send a processing completion signal to the interface control module after the processing is completed;
  • the storage control module (EE_CTRL) is configured to control storage of data in the storage module; the storage module (OnChipRAM) is configured to store data based on control of the storage control module.
  • the parameters configured by the parameter configuration module include: the horizontal resolution of the image participating in the processing, the vertical resolution of the image participating in the processing, the storage address of the original image, the destination address of the processed image, and may further include: an enhanced intensity coefficient and/or Or the span of the image (the resolution of the entire image).
  • the above processing module includes a deburring processing module and an enhancement processing module, wherein:
  • the deburring processing module (EE-DEBURR) is configured to receive the interface control module After the first indication signal of the block, performing deburring processing on the data block in the storage module, and sending a deburring processing completion signal to the enhancement processing module after the processing is completed;
  • the enhancement processing module (EE_ENHANCE) is configured to perform image enhancement processing on the data block in the storage module after receiving the deburring processing completion signal sent by the deburring processing module, and after the processing is completed,
  • the interface control module sends a processing completion signal.
  • the device of the embodiment only one 24 ⁇ 20 size SRAM is set, and the data block read from the external memory is first stored in the SRAM, and the deburring processing module takes the data out of the SRAM and stores the processed result back to the SRAM.
  • the SRAM stores the data block after the deburring process
  • the enhancement processing module extracts the data after the deburring process from the SRAM, and after performing the enhancement processing, stores the data back into the SRAM, and finally
  • the device writes the enhanced 16 ⁇ 16 data block to the external memory through the AHB interface.
  • the processing module may process the data block in the storage module in the following manner:
  • the macroblock is based on the original data block of each macroblock.
  • each macroblock contains N rows and N columns, and the original data block to be used for processing the macroblock includes N+2n rows, N+2n columns, the last k columns in the i-th original data block, and N+2n rows.
  • the processing of the i+1th macroblock is performed as part of the i+1th original data block, where N, n, k, and i are all positive integers.
  • the interface control module and the storage control module in this embodiment may also use the method in Embodiment 2 to perform data movement, including:
  • the interface control module is configured to: move the data block in the following manner:
  • the first moved data block includes an N+2n+2m column, where N is the number of columns included in the macroblock to be processed, and m and n are positive integers, where n is The number of data to be involved in each data processing, 2m is the data that is moved more when the original data block is moved for the first time to meet the "word" alignment requirement;
  • the number of pending data blocks to be moved is N+n-2m+ 2m', where 2m' is the data that is moved more to meet the "word” alignment requirement when moving the original data block of the subsequent macroblock;
  • the storage control module is configured to control storage of data in the storage module in the following manner, and store the data block obtained in each processing in the first storage area in a manner aligned with the first side boundary of the first storage area.
  • the first storage area includes an N+n column; the storage control module starts with a second side boundary of the i-1th storage area when the i th macroblock is stored, and the The second side boundary is moved forward by 2 m, and the position of the column is taken as the starting position of the i-th storage area.
  • the video image is deburred first, and then the de-glitched result is subjected to edge detail detection based on the Laplacian algorithm.
  • the deburring process is to obtain the edge of the pixel by comparing the first derivative of the four directions around the pixel, and deburring the pixel in three directions of the non-edge.
  • the image detail enhancement process determines the magnitude of the detail enhancement based on the level of detail after the deburring process. This method avoids the unnatural influence on the edge of the large image of the picture while maintaining a strong enhancement effect on details such as subtitles.

Landscapes

  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Image Processing (AREA)

Abstract

图像处理方法及装置,可节约带宽,提高数据传输速度。所述方法包括:在对图像任一行的宏块进行处理时,基于每个宏块的原数据块对该宏块进行处理,每个宏块包含N行、N列,处理宏块需使用的原数据块包含N+2n行、N+2n列,第i个原数据块中的最后k列、N+2n行作为第i+1个原数据块的一部分参与第i+1个宏块的处理,其中N、n、k、i均为正整数。所述图像处理装置,包括参数配置模块、接口控制模块、处理模块、存储控制模块以及存储模块。本发明既实现了面积最优也实现了带宽最优,并且通过处理方法的改进,还大大改善了图像的显示效果。

Description

一种图像处理方法及装置
技术领域
本发明涉及数字信号处理领域, 特别涉及一种图像处理方法及装置。 背景技术
视频图像中由于有损压缩, 在解压后会造成高频分量的损失, 在画面上 反映为图像细节的模糊。 细节增强可以在一定程度上从视觉效果上弥补高频 的分量损失。
解压后的原始视频图像中, 往往带有高频噪声, 通常的细节增强算法会 将这些噪声判断成图像的细节部分, 在细节增强处理的同时也将噪声增强, 损害了图像的质量。 发明内容
本发明解决的一个技术问题是避免噪声干扰, 为此本发明提供了一种图 像处理方法, 包括:
对待处理数据块中的每个像素 P进行如下去毛刺处理:
查找与该像素 P相邻的 8个相邻像素, 将该 8个相邻像素分成 4组, 每 组中的两个像素与该像素 P位于一条直线上;
釆用 以下公式计算该像素 P 与每组像素的像素关系值:
|al*Y+a2*X+a3*Z|, 其中 Y为像素 P的像素值, X和 Z分别为组内两像素的 像素值, al为像素 P的第一权重值, a2和 a3分别为 X和 Z的第一权重值; 比较四组像素关系值, 去除最大的像素关系值, 根据剩余三组像素关系 值以及像素 P 的像素值计算去毛刺处理后的像素 P 的新像素值 P,: P,=bl*P+b2*Gl+b3*G2+b4*G3 , 其中, Gl、 G2、 G3分别为剩余三组的像素 关系值, bl为像素 P的第二权重值, b2、 b3、 b4分别为三组像素关系值的第 二权重值。
优选地, 所述 al=2, 所述 a2=a3=-l。 优选地, 所述 bl=32, 所述 b2=b3=b4=-l。
优选地, 对待处理数据块中的所有像素都进行了去毛刺处理后, 釆用拉 普拉斯 ( laplace )算法对待处理数据块中经过去毛刺处理后的像素 P以及与 该像素 P相邻的 8个相邻像素进行边沿增强处理。
优选地, 釆用以下方式对待处理数据块中经过去毛刺处理后的像素 P以 及与该像素 P相邻的 8个相邻像素进行边沿增强处理: 对像素 P与其相邻 8 个像素进行滤波, 其中对像素 P滤波的模板系数为 8, 对像素 P的相邻像素 滤波的模板系数为 -1。
本发明解决的另一个技术问题是节约带宽, 提高数据传输速度, 为此本 发明还提供了一种图像处理方法和一种图像处理装置, 其中所述方法包括: 在对图像任一行的宏块进行处理时, 基于每个宏块的原数据块对该宏块 进行处理,每个宏块包含 N行、 N列, 处理宏块需使用的原数据块包含 N+2n 行、 N+2n列, 第 i个原数据块中的最后 k列、 N+2n行作为第 i+1个原数据块 的一部分参与第 i+1个宏块的处理, 其中 N、 n、 k、 i均为正整数。
优选地, 所述第 i个原数据块中的最后 k列、 N+2n行作为第 i+1个原数 据块的一部分参与第 i+1个宏块的处理的步骤包括:
将处理第 1个宏块使用的第 1个原数据块的需搬移数据块搬移至处理区, 所述宏块包含 N列、 N行, 所述原数据块包含 N+2n列、 N+2n行, 所述需搬 移数据块包含 N+2n+2m列、 N+2n行, m和 n为正整数, 其中 n为对每个数 据处理时需参与的数据个数, 2m为首次搬移原数据块时为满足 "字"对齐要 求而多搬移的数据;
基于该第 1个原数据块对该第 1个宏块进行处理, 每次处理得到的数据 块以与第 1个存储区的第一侧边界对齐的方式存储在该第 1个存储区中, 所 述第 1个存储区包含 N+n列、 N+n行;
继续按序搬移待处理数据, 对第 i个宏块处理时, 搬移 N+n-2m+2m,列、
N+2n行数据, 所述第 i个原数据块中的最后 n列、 N+2n行, 以及第 i个原数 据块的需搬移数据块中的最后 2m列、 N+2n行, 作为第 i+1个原数据块的一 部分参与第 i+1个宏块的处理,其中 2m'为在搬移后续宏块的原数据块时为满 足 "字"对齐要求而多搬移的数据, 以第 i-1个存储区的第二侧边界为起始位 置,将从该第二侧边界前移 2m,列的位置作为第 i个存储区的起始位置; 直到 该行宏块处理完毕。
优选地, 所述 N=16, n=2, m=2, m'=l。
优选地, 所述处理包括去毛刺处理和增强处理。
本发明提供的一种图像处理装置, 包括参数配置模块、 接口控制模块、 处理模块、 存储控制模块以及存储模块, 其中:
所述参数配置模块设置为: 配置参数以及发起启动命令;
所述接口控制模块设置为: 在接收到参数配置模块的启动命令后, 通过 AHB搬移数据块, 以及在接收到处理模块发送的处理完成信号后通过 AHB 搬移下一数据块, 搬移数据块时通过存储控制模块将所述数据块放置于存储 模块中, 在数据块放置完成后向所述处理模块发送第一指示信号;
所述处理模块设置为: 在接收到所述接口控制模块的第一指示信号后, 对存储模块中的数据块进行处理, 在处理完成后向所述接口控制模块发送处 理完成信号;
所述存储控制模块设置为: 控制存储模块中数据的存储;
所述存储模块设置为: 基于所述存储控制模块的控制存储数据。
优选地, 所述处理模块包括去毛刺处理模块和增强处理模块, 其中: 所述去毛刺处理模块设置为: 在接收到所述接口控制模块的第一指示信 号后, 对存储模块中的数据块进行去毛刺处理, 在处理完成后向所述增强处 理模块发送去毛刺处理完成信号;
所述增强处理模块设置为: 在接收到所述去毛刺处理模块发送的去毛刺 处理完成信号后, 对存储模块中的数据块进行图像增强处理, 在处理完成后 向所述接口控制模块发送处理完成信号。
优选地, 所述处理模块还设置为: 釆用以下方式对存储模块中的数据块 进行处理: 在对图像任一行的宏块进行处理时, 基于每个宏块的原数据块对 该宏块进行处理, 每个宏块包含 N行、 N列, 处理宏块需使用的原数据块包 含 N+2n行、 N+2n列, 第 i个原数据块中的最后 k列、 N+2n行作为第 i+1个 原数据块的一部分参与第 i+1个宏块的处理, 其中 N、 n、 k、 i均为正整数。 优选地, 所述接口控制模块还设置为: 釆用以下方式搬移数据块: 首次 搬移的数据块包含 N+2n+2m列, 其中 N为待处理宏块包含的列数, m和 n 为正整数, 其中 n为对每个数据处理时需参与的数据个数, 2m为首次搬移原 数据块时为满足 "字" 对齐要求而多搬移的数据; 后续搬移的待处理数据块 列数为 N+n-2m+2m', 其中 2m'为在搬移后续宏块的原数据块时为满足 "字" 对齐要求而多搬移的数据;
所述存储控制模块还设置为:釆用以下方式控制存储模块中数据的存储, 将每次处理得到的数据块以与第 1个存储区的第一侧边界对齐的方式存储在 该第 1个存储区中, 所述第 1个存储区包含 N+n列; 所述存储控制模块在存 储第 i个宏块时, 以第 i-1个存储区的第二侧边界为起始位置, 将从该第二侧 边界前移 2m,列的位置作为第 i个存储区的起始位置。
釆用本发明实施例, 先对视频图像进行去毛刺处理, 再对去毛刺后的结 果进行基于拉普拉斯算法的边缘检测的图像细节增强。 去毛刺处理是通过比 较像素周围 4个方向的一阶导数得到像素所处边缘, 对非边缘的三个方向的 像素点进行去毛刺处理。 图像细节增强处理是在去毛刺处理之后, 根据细节 程度确定细节增强的幅度。 该方法在保持对细节如字幕等较强的增强效果的 同时, 避免了过度的增强对画面大块图像边缘产生的不自然影响。 附图概述
图 1为进行毛刺预处理的像素点与相邻像素点的连线图;
图 2为数据块搬移示意图;
图 3为第 1个宏块和第 1个原数据块的搬移情况图;
图 4为对第 1个宏块去毛刺处理后的存储情况图;
图 5为对第 1个宏块增强处理后的存储情况图;
图 6为第 2个宏块和第 2个原数据块的搬移情况图;
图 7为对第 2个宏块进行去毛刺以及增强处理后的存储情况图; 图 8为第 3个宏块和第 3个原数据块的搬移情况图;
图 9为对第 3个宏块进行去毛刺以及增强处理后的存储情况图; 图 10为第 4个宏块和第 4个原数据块的搬移情况图;
图 11为实施例 3图像增强处理装置的结构示意图。 本发明的较佳实施方式
下文中将结合附图对本发明的实施例进行详细说明。 需要说明的是, 在 不冲突的情况下, 本申请中的实施例及实施例中的特征可以相互任意组合。
实施例 1
为了避免过度的增强对画面大块图像边缘产生的不自然影响, 本实施例 描述去毛刺和图像增强过程。
对待处理数据块中的每个像素 P进行如下去毛刺处理:
步骤 1 , 查找与该像素 P相邻的 8个相邻像素, 将该 8个相邻像素分成 4 组, 每组中的两个像素与该像素 P位于一条直线上;
步骤 2 , 釆用以下公式计算该像素 P 与每组像素的像素关系值:
|al*Y+a2*X+a3*Z|, 其中 Y为像素 P的像素值, X和 Z分别为组内两像素的 像素值, al为像素 P的第一权重值, a2和 a3分别为 X和 Z的第一权重值; 例如,如图 1所示, P点为待处理的像素点, 1-8为该 P点的相邻像素点, 与 P同经过 a直线的一组像素包括像素 1和像素 5, 与 P同经过 b直线的一 组像素包括像素 2和像素 6 ,与 P同经过 c直线的一组像素包括像素 3和像素 7, 与 P同经过 d直线的一组像素包括像素 4和像素 8。
设每条线连接的三个像素点的像素值分别为 X、 Υ、 Ζ, 即线段上一个端 点像素值为 X, 线段中点像素值为 Υ, 线段另一端点像素值为 Ζ, 则该组像 素关系值为 2Υ-Χ-Ζ。 本实施例中 al=2, a2=a3=-l。
步骤 3 , 比较四组像素关系值, 去除最大的像素关系值, 根据剩余三组 像素关系值以及像素 P 的像素值计算毛刺处理后的像素 P 的像素值 P,: P,=bl*P+b2*Gl+b3*G2+b4*G3 , 其中, Gl、 G2、 G3分别为剩余三组的像素 关系值, bl为像素 P的第二权重值, b2、 b3、 b4分别为三组像素关系值的第 二权重值;
去毛刺处理是为了去除噪声, 该最大的像素关系值被认为是噪声, 因此 去除。
优选地 bl=32, b2=b3=b4=-l。
重复上述除毛刺处理步骤直到对待处理数据块中的所有像素都进行了去 毛刺处理, 至此, 去毛刺处理完成。
在对待处理数据块中的所有像素都进行了去毛刺处理后, 还可对该待处 理数据块执行以下边沿增强处理:
步骤 4, 釆用拉普拉斯 ( laplace )算法对待处理数据块中经过去毛刺处理 后的像素 P以及与该像素 P相邻的 8个相邻像素进行边沿增强处理。
具体通过对像素 P与其相邻 8个像素进行滤波,滤波的模板系数为 8, -1 , -1 , -1 , -1 , -1 , -1 , -1 , -1 , 其中像素 P的模板系数为 8, 相邻像素的模板系 数为 -1。 拉普拉斯增强算法用于增强图像边缘, 通过合适的滤波器选择系数, 不会使增强的效果感觉不自然。
通过先对视频图像进行去毛刺处理, 再对去毛刺后的结果进行基于拉普 拉斯算法的边缘检测的图像细节增强。 在保持对细节等增强效果的同时, 避 免了过度的增强对画面大块图像边缘产生的不自然影响。
实施例 2
本实施例描述数据块在经过上述去毛刺和图像增强处理时的如何进行搬 移和存储。 本实施例给出的图像处理方法, 可以有效节约数据传输带宽。
该处理方法包括:
在对图像任一行的宏块进行处理时, 基于每个宏块的原数据块对该宏块 进行处理,每个宏块包含 N行、 N列, 处理宏块需使用的原数据块包含 N+2n 行、 N+2n列, 第 i个原数据块中的最后 k列、 N+2n行作为第 i+1个原数据块 的一部分参与第 i+1个宏块的处理, 其中 N、 n、 k、 i均为正整数。
具体地, 上述第 i个原数据块中的最后 k列、 N+2n行作为第 i+1个原数 据块的一部分参与第 i+1个宏块的处理的步骤包括: 将处理第 1个宏块使用的第 1个原数据块的需搬移数据块搬移至处理区 (即存储区 ) , 所述宏块包含 N列、 N行, 所述原数据块包含 N+2n列、 N+2n 行, 所述需搬移数据块包含 N+2n+2m列、 N+2n行, m和 n为正整数, 其中 n为对每个数据处理时需参与的数据个数, 2m为首次搬移原数据块时为满足 "字" 对齐要求而多搬移的数据;
基于该第 1个原数据块对该第 1个宏块进行处理, 每次处理得到的数据 块以与第 1个存储区的第一侧边界对齐的方式存储在该第 1个存储区中, 所 述第 1个存储区包含 N+n列;
继续按序搬移待处理数据, 对第 i个宏块处理时, 搬移 N+n-2m+2m,列、 N+2n行数据, 所述第 i个原数据块中的最后 n列、 N+2n行, 以及第 i个原数 据块的需搬移数据块中的最后 2m列、 N+2n行, 作为第 i+1个原数据块的一 部分参与第 i+1个宏块的处理,其中 2m'为在搬移后续宏块的原数据块时为满 足 "字"对齐要求而多搬移的数据, 以第 i-1个存储区的第二侧边界为起始位 置,将从该第二侧边界前移 2m,列的位置作为第 i个存储区的起始位置; 直到 该行宏块处理完毕。
以上 m、 n、 m,均为正整数。 仂 ύ选地 N=16, n=2, m=2, m,=l。
下面结合具体应用对上述方法进行具体说明。
本实施例釆用 AHB ( Advanced High performance Bus , 高性能总线)接口 与存储器进行数据传输。釆用 ΑΗΒ可以提高装置的通用性和独立性。 装置可 以作为一个独立的主体挂在总线上, 模块可以被单独的绕过, 而不会影响其 他模块的功能。
通常图像边缘的点不需要进行增强处理。 为了保持数据块处理的单一性 (即避免出现需要特殊处理的宏块) , 在本实施例中, 图像边缘的上八行、 下八行、 左八列和右八列都不需要处理, 但与中间图像相连的边缘的上两行、 下两行、 左两列和右两列数据需要参与计算。 如图 2所示, 图中宏块 Al、 B1 为待处理的数据块(由于附图尺寸限制, 图中仅画出两个宏块) , 本实施例 中以宏块大小为 16X16为例进行说明,即每个数据块有 16X16个像素点组成。 因为去毛刺处理和增强处理都需要用到待处理像素点的相邻像素, 所以要处 理 16X16的宏块, 需要用到的参与计算的像素点为 20X20 (如图 2中的数据 块 A2、 B2 ) 。 具体地, 输入 20X20大小的数据块, 经过去毛刺预处理后, 得到 18X18大小的数据块, 再经过增强处理后, 就得到 16X16大小的处理后 数据块。
由于釆用 AHB接口传输数据, 每次传输数据的大小为 32bit, 要求数据 传输的地址要以 "字 (word ) " 为单位对齐, 而 20X20大小的数据块并不是 一个地址为 word对齐的数据块, 如图 2所示, 对于数据块 A2的每一行, 最 左边的两像素 c和 d与 A2外的两像素 a和 b属于同一个 word, 同理最右边 的两像素也与 A2外的两像素属于同一个 word, 因此要处理宏块 A1 , 则需要 从存储器中搬移 24X20大小的数据块 A3到存储空间中。
因此, 在上述步骤一中, 待处理宏块包含 16歹 16行。 由于需要进行 去毛刺和图像增强两种处理, 而每种处理都需要相邻像素的参与, 因此处理 该宏块需要的原数据块为 20列、 20行(n=2 ) 。 上述方法也可用于其他处理 过程中, 也就是说, 在其他实施例中, 也可以其他一种或几种处理, 则 n值 根据对应处理需要参与的像素数决定。 搬移原数据块时为满足 "字" 对齐要 求需要多搬移 2m列, 在本实施例中 m=2。
对图像任一行的宏块进行处理时, 首个宏块搬移至存储区中, 如图 3所 示, 在本实施例中整个数据存储区大小为 24X20, 第 1个宏块大小为 16X16, 为处理宏块需要的第 1个原数据块大小为 20X20, 第 1个宏块的第 1存储区 为 N+n (本实施例中为 18 )歹 N+n行, 从整个数据存储区的起始边界为起 始。对该第 1个原数据块进行去毛刺处理, 得到经过去毛刺处理后的数据块, 其大小为 18X18, 将对第 1个原数据块第 1次处理(去毛刺)后得到的数据 ( 18X18 )以与第 1存储区第一侧边界对齐的方式存储在第 1存储区中,如图 4所示。 然后对该数据块进行第 2次处理(图像增强) , 得到处理后的宏块 ( 16X16 ),仍然以与第 1存储区第一侧边界对齐的方式存储在第 1存储区中, 如图 5所示。
由于合理设置每个宏块的存储区, 且使处理后的数据以与存储区第一侧 边界对齐的方式存储, 尽可能少覆盖已搬移的数据, 减少下一次搬移的数据, 同时也避免搬移重复的数据, 进而节约带宽, 提高数据传输速度。
由于已经有 2m+n列、 N+2n行已经搬移但未覆盖的数据, 因此第 2次搬 移时, 仅需 ¾移 (N+2n ) - ( 2m+n ) +2m'= N+n-2m+2m,列、 N+2n行数据, 其中 2m'为在本次搬移时为满足 "字" 对齐要求而多搬移的数据。 在处理图 像中一行宏块的过程中, 除了首次搬移需要多搬移 2m列数据, 后续搬移时 均需多搬移 2m'列数据。 在本实施例中 m'=l。 如图 4所示, 图中的第 18-23 共 6列为已搬移但未使用的数据, 该些数据可以参与下一个宏块的计算。 那 么第 2次搬移时仅需 20-6=14列数据, 但为了满足 "字" 对齐要求, 需要再 多搬移 2列,因此第二次搬移时仅需搬移 16 X20大小的数据块,如图 6所示。 图 6中的第 2个原数据块中, 右侧的 6列数据块为第一次搬移时已经搬移过 来的, 第二次搬移时仅需搬移图 6左侧第 0-15共 16列数据。
第 1宏块的第 1存储区为以整个存储区为起始的 N+n列, 第 2个宏块的 第 2存储区为从第 N+n-2m,列为起始, 也就是说从第 1存储区的第二侧边界 前移 2m'列为起始位置。 如图 7所示, 经过第一次处理(去毛刺处理) 的宏 块以与第 2存储区第一侧边界对齐的方式存储在第 2存储区中, 同样, 经过 第二次处理(图像增强处理) 的宏块也以与第 2存储区第一侧边界对齐的方 式存储在第 2存储区中。 图 7中第 10-15共 6列为已搬移但未使用的数据, 该些数据可以参与下一个宏块的计算。第 3次搬移时同样仅需搬移 16 X20大 小的数据块, 如图 8所示。 对第 3个宏块进行两次处理后得到的数据如图 9 所示。 图中第 2-7共 6列为已搬移但未使用的数据, 该些数据可以参与下一 个宏块的计算。 第 4个宏块仅需搬移第 8-23共 16列数据, 如图 10所示, 此 时与第 1个宏块的放置位置相同。 重复上述搬移和处理的步骤, 直到该行宏 块处理完毕。
一方面,本实施例中,除每一行的第一个需要搬移的数据块为 24X20外, 后续只需要搬移 16X20大小的数据块即可。 有效节约了带宽。 另一方面, 本 实施例中釆用单个存储区内部循环即数据流串行处理的方式进行存储, 这样 可以节约 RAM的面积, 只要设计在下一个宏块读进之前将前一个宏块处理 后的结果取走即可。
在其他实施例中, 如果不釆用 AHB, 也就无需多搬移数据, 此时仍可釆 用上述方法。一种实现方法是仍然釆用一个 RAM, 将处理后的数据覆盖在原 存储区靠左侧的边界位置, 以使最后 k列数据可以参与下一个宏块的运算, 从而实现少搬移数据的目的。 例如, 宏块大小为 16X16 , 原数据块大小为 20X20, 处理第 1 个宏块时搬移 20X20 大小的数据块, 第一次处理后得到 18X18 大小的数据块, 置于原数据块区的左侧 (此时第一存储区同第一原数 据块区) , 右侧有两列未被覆盖的数据可以参与第 2个宏块的计算, 因此在 第 2次搬移时, 仅需搬移 20-2=18列、 20行的数据, 从而达到减少带宽的作 用。 另一种实现方法是, 釆用两个以上的 RAM, 此时可以将处理后的数据放 置于另一个 RAM中,从而达到少搬移数据的目的,但是这种方法增加了 RAM 的面积, 不利于产品的小型化。
实施例 3
本实施例提供一种图像增强处理装置, 如图 11所示, 包括: 参数配置模 块、 接口控制模块、 处理模块、 存储控制模块以及存储模块, 其中:
所述参数配置模块(AHB slave ) , 用于配置参数以及发起启动命令; 所述接口控制模块(EE— DMA master ) , 用于在接收到参数配置模块的 启动命令后,通过 ΑΗΒ搬移数据块, 以及在接收到处理模块发送的处理完成 信号后通过 ΑΗΒ搬移下一数据块,搬移数据块时通过存储控制模块将所述数 据块放置于存储模块中, 在数据块放置完成后向所述处理模块发送第一指示 信号;
所述处理模块, 用于在接收到所述接口控制模块的第一指示信号后, 对 存储模块中的数据块进行处理, 在处理完成后向所述接口控制模块发送处理 完成信号;
所述存储控制模块(EE— CTRL ) , 用于控制存储模块中数据的存储; 所述存储模块( OnChipRAM ) , 用于基于所述存储控制模块的控制存储 数据。
参数配置模块配置的参数包括: 参与处理的图像的水平分辨率、 参与处 理的图像的垂直分辨率、 原图像的存储地址, 处理后图像的目的地址, 此外 还可以包括: 增强的强度系数和 /或图像的跨度(整幅图像的分辨率) 。
上述处理模块包括去毛刺处理模块和增强处理模块, 其中:
所述去毛刺处理模块(EE— DEBURR ) , 用于在接收到所述接口控制模 块的第一指示信号后, 对存储模块中的数据块进行去毛刺处理, 在处理完成 后向所述增强处理模块发送去毛刺处理完成信号;
所述增强处理模块(EE— ENHANCE ) , 用于在接收到所述去毛刺处理模 块发送的去毛刺处理完成信号后,对存储模块中的数据块进行图像增强处理, 在处理完成后向所述接口控制模块发送处理完成信号。
在本实施例装置中只设置一个 24X20大小的 SRAM, 从外部存储器读取 的数据块首先存储到该 SRAM中,去毛刺处理模块将数据从 SRAM中取出处 理后,将处理的结果再存回 SRAM中,此时 SRAM中存储的是去毛刺处理后 的数据块, 增强处理模块再从该 SRAM中将去毛刺处理后的数据取出, 进行 完增强处理后, 再将数据存回 SRAM中, 最后该装置通过 AHB接口将增强 处理后的 16X16的数据块写到外部存储器中。
如实施例 2所述, 上述处理模块可釆用以下方式对存储模块中的数据块 进行处理: 在对图像任一行的宏块进行处理时, 基于每个宏块的原数据块对 该宏块进行处理, 每个宏块包含 N行、 N列, 处理宏块需使用的原数据块包 含 N+2n行、 N+2n列, 第 i个原数据块中的最后 k列、 N+2n行作为第 i+1个 原数据块的一部分参与第 i+1个宏块的处理, 其中 N、 n、 k、 i均为正整数。
本实施例中的接口控制模块以及存储控制模块也可釆用实施例 2中的方 法进行数据的搬移, 包括:
所述接口控制模块用于釆用以下方式搬移数据块: 首次搬移的数据块包 含 N+2n+2m列, 其中 N为待处理宏块包含的列数, m和 n为正整数, 其中 n 为对每个数据处理时需参与的数据个数, 2m为首次搬移原数据块时为满足 "字" 对齐要求而多搬移的数据; 后续搬移的待处理数据块列数为 N+n-2m+2m' , 其中 2m'为在搬移后续宏块的原数据块时为满足 "字" 对齐要 求而多搬移的数据;
所述存储控制模块用于釆用以下方式控制存储模块中数据的存储, 将每 次处理得到的数据块以与第 1个存储区的第一侧边界对齐的方式存储在该第 1个存储区中, 所述第 1个存储区包含 N+n列; 所述存储控制模块在存储第 i个宏块时, 以第 i-1个存储区的第二侧边界为起始位置, 将从该第二侧边界 前移 2m,列的位置作为第 i个存储区的起始位置。 综上所述, 本发明所提供实施例在系统和性能方面既实现了面积最优也 实现了带宽最优, 并且通过处理方法的改进, 还大大改善了图像的显示效果。
本领域普通技术人员可以理解上述方法中的全部或部分步骤可通过程序 来指令相关硬件完成, 所述程序可以存储于计算机可读存储介质中, 如只读 存储器、 磁盘或光盘等。 可选地, 上述实施例的全部或部分步骤也可以使用 一个或多个集成电路来实现。 相应地, 上述实施例中的各模块 /单元可以釆用 硬件的形式实现, 也可以釆用软件功能模块的形式实现。 本发明不限制于任 何特定形式的硬件和软件的结合。
当然, 本发明还可有其他多种实施例, 在不背离本发明精神及其实质的 但这些相应的改变和变形都应属于本发明所附的权利要求的保护范围。
工业实用性
釆用本发明实施例, 先对视频图像进行去毛刺处理, 再对去毛刺后的结 果进行基于拉普拉斯算法的边缘检测的图像细节增强。 去毛刺处理是通过比 较像素周围 4个方向的一阶导数得到像素所处边缘, 对非边缘的三个方向的 像素点进行去毛刺处理。 图像细节增强处理是在去毛刺处理之后, 根据细节 程度确定细节增强的幅度。 该方法在保持对细节如字幕等较强的增强效果的 同时, 避免了过度的增强对画面大块图像边缘产生的不自然影响。

Claims

权 利 要 求 书
1、 一种图像处理方法, 包括:
对待处理数据块中的每个像素 P进行如下去毛刺处理:
查找与该像素 P相邻的 8个相邻像素, 将该 8个相邻像素分成 4组, 每 组中的两个像素与该像素 P位于一条直线上;
釆用 以下公式计算该像素 P 与每组像素的像素关系值: |al*Y+a2*X+a3*Z|, 其中 Y为像素 P的像素值, X和 Z分别为组内两像素的 像素值, al为像素 P的第一权重值, a2和 a3分别为 X和 Z的第一权重值; 比较四组像素关系值, 去除最大的像素关系值, 根据剩余三组像素关系 值以及像素 P 的像素值计算去毛刺处理后的像素 P 的新像素值 P,: P,=bl*P+b2*Gl+b3*G2+b4*G3 , 其中, Gl、 G2、 G3分别为剩余三组的像素 关系值, bl为像素 P的第二权重值, b2、 b3、 b4分别为三组像素关系值的第 二权重值。
2、 如权利要求 1所述的方法, 其中,
所述 al=2, 所述 a2=a3=-l。
3、 如权利要求 1所述的方法, 其中,
所述 bl=32, 所述 b2=b3=b4=-l。
4、 如权利要求 1或 2或 3所述的方法, 其中,
对待处理数据块中的所有像素都进行了去毛刺处理后, 釆用拉普拉斯 ( laplace )算法对待处理数据块中经过去毛刺处理后的像素 P以及与该像素 P 相邻的 8个相邻像素进行边沿增强处理。
5、 如权利要求 4所述的方法, 其中,
釆用以下方式对待处理数据块中经过去毛刺处理后的像素 P以及与该像 素 P相邻的 8个相邻像素进行边沿增强处理: 对像素 P与其相邻 8个像素进 行滤波, 其中对像素 P滤波的模板系数为 8, 对像素 P的相邻像素滤波的模 板系数为 -1。
6、 一种图像处理方法, 包括: 在对图像任一行的宏块进行处理时, 基于每个宏块的原数据块对该宏块 进行处理,每个宏块包含 N行、 N列, 处理宏块需使用的原数据块包含 N+2n 行、 N+2n列, 第 i个原数据块中的最后 k列、 N+2n行作为第 i+1个原数据块 的一部分参与第 i+1个宏块的处理, 其中 N、 n、 k、 i均为正整数。
7、 如权利要求 6所述的方法, 其中,
所述第 i个原数据块中的最后 k列、 N+2n行作为第 i+1个原数据块的一 部分参与第 i+1个宏块的处理的步骤包括:
将处理第 1个宏块使用的第 1个原数据块的需搬移数据块搬移至处理区, 所述宏块包含 N列、 N行, 所述原数据块包含 N+2n列、 N+2n行, 所述需搬 移数据块包含 N+2n+2m列、 N+2n行, m和 n为正整数, 其中 n为对每个数 据处理时需参与的数据个数, 2m为首次搬移原数据块时为满足 "字"对齐要 求而多搬移的数据;
基于该第 1个原数据块对该第 1个宏块进行处理, 每次处理得到的数据 块以与第 1个存储区的第一侧边界对齐的方式存储在该第 1个存储区中, 所 述第 1个存储区包含 N+n列、 N+n行;
继续按序搬移待处理数据, 对第 i个宏块处理时, 搬移 N+n-2m+2m,列、 N+2n行数据, 所述第 i个原数据块中的最后 n列、 N+2n行, 以及第 i个原数 据块的需搬移数据块中的最后 2m列、 N+2n行, 作为第 i+1个原数据块的一 部分参与第 i+1个宏块的处理,其中 2m'为在搬移后续宏块的原数据块时为满 足 "字"对齐要求而多搬移的数据, 以第 i-1个存储区的第二侧边界为起始位 置,将从该第二侧边界前移 2m,列的位置作为第 i个存储区的起始位置; 直到 该行宏块处理完毕。
8、 如权利要求 7所述的方法, 其中,
所述 N=16, n=2, m=2, m'=l 0
9、 如权利要求 6或 7或 8所述的方法, 其中,
所述处理包括去毛刺处理和增强处理。
10、 一种图像处理装置, 包括参数配置模块、 接口控制模块、 处理模块、 存储控制模块以及存储模块, 其中: 所述参数配置模块设置为: 配置参数以及发起启动命令;
所述接口控制模块设置为: 在接收到参数配置模块的启动命令后, 通过 高性能总线 (AHB )搬移数据块, 以及在接收到处理模块发送的处理完成信 号后通过 AHB搬移下一数据块,搬移数据块时通过存储控制模块将所述数据 块放置于存储模块中, 在数据块放置完成后向所述处理模块发送第一指示信 号;
所述处理模块设置为: 在接收到所述接口控制模块的第一指示信号后, 对存储模块中的数据块进行处理, 在处理完成后向所述接口控制模块发送处 理完成信号;
所述存储控制模块设置为: 控制存储模块中数据的存储;
所述存储模块设置为: 基于所述存储控制模块的控制存储数据。
11、 如权利要求 10所述的装置, 其中,
所述处理模块包括去毛刺处理模块和增强处理模块, 其中:
所述去毛刺处理模块设置为: 在接收到所述接口控制模块的第一指示信 号后, 对存储模块中的数据块进行去毛刺处理, 在处理完成后向所述增强处 理模块发送去毛刺处理完成信号;
所述增强处理模块设置为: 在接收到所述去毛刺处理模块发送的去毛刺 处理完成信号后, 对存储模块中的数据块进行图像增强处理, 在处理完成后 向所述接口控制模块发送处理完成信号。
12、 如权利要求 10所述的装置, 其中,
所述处理模块还设置为:釆用以下方式对存储模块中的数据块进行处理: 在对图像任一行的宏块进行处理时, 基于每个宏块的原数据块对该宏块进行 处理, 每个宏块包含 N行、 N列, 处理宏块需使用的原数据块包含 N+2n行、 N+2n列, 第 i个原数据块中的最后 k列、 N+2n行作为第 i+1个原数据块的一 部分参与第 i+1个宏块的处理, 其中 N、 n、 k、 i均为正整数。
13、 如权利要求 10或 12所述的装置, 其中,
所述接口控制模块还设置为: 釆用以下方式搬移数据块: 首次搬移的数 据块包含 N+2n+2m列, 其中 N为待处理宏块包含的列数, m和 n为正整数, n为对每个数据处理时需参与的数据个数, 2m为首次搬移原数据块时为满足 "字" 对齐要求而多搬移的数据; 后续搬移的待处理数据块列数为 N+n-2m+2m' , 其中 2m'为在搬移后续宏块的原数据块时为满足 "字" 对齐要 求而多搬移的数据;
所述存储控制模块还设置为:釆用以下方式控制存储模块中数据的存储, 将每次处理得到的数据块以与第 1个存储区的第一侧边界对齐的方式存储在 该第 1个存储区中, 所述第 1个存储区包含 N+n列; 所述存储控制模块在存 储第 i个宏块时, 以第 i-1个存储区的第二侧边界为起始位置, 将从该第二侧 边界前移 2m,列的位置作为第 i个存储区的起始位置。
PCT/CN2012/073512 2011-04-08 2012-04-05 一种图像处理方法及装置 WO2012136137A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201110088600.4A CN102222319B (zh) 2011-04-08 2011-04-08 一种图像处理方法及装置
CN201110088600.4 2011-04-08

Publications (1)

Publication Number Publication Date
WO2012136137A1 true WO2012136137A1 (zh) 2012-10-11

Family

ID=44778864

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2012/073512 WO2012136137A1 (zh) 2011-04-08 2012-04-05 一种图像处理方法及装置

Country Status (2)

Country Link
CN (1) CN102222319B (zh)
WO (1) WO2012136137A1 (zh)

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102222319B (zh) * 2011-04-08 2015-08-12 中兴通讯股份有限公司 一种图像处理方法及装置
CN102496148B (zh) * 2011-11-30 2013-07-03 哈尔滨工业大学 一种图像毛刺去除的方法
CN104289767B (zh) * 2014-09-10 2016-06-29 广州中国科学院先进技术研究所 一种基于图像检测的披锋去除系统和方法
CN106447594B (zh) * 2016-08-17 2020-06-05 北京集创北方科技股份有限公司 图像处理装置及其方法
CN106735912A (zh) * 2016-12-29 2017-05-31 苏州逸美德科技有限公司 一种去毛刺方法
CN112396559A (zh) * 2019-08-19 2021-02-23 王艳苓 直播画面定向美颜平台

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101005619A (zh) * 2006-12-25 2007-07-25 海信集团有限公司 一种环路滤波的方法
CN101170690A (zh) * 2007-11-21 2008-04-30 上海广电(集团)有限公司中央研究院 基于avs的环路滤波器的硬件装置及硬件实现方法
CN101635849A (zh) * 2008-07-24 2010-01-27 青岛海信信芯科技有限公司 一种环路滤波方法及环路滤波器
CN102222319A (zh) * 2011-04-08 2011-10-19 中兴通讯股份有限公司 一种图像处理方法及装置

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH09214783A (ja) * 1996-02-02 1997-08-15 Fuji Xerox Co Ltd 画像処理装置
CN100505832C (zh) * 2006-03-21 2009-06-24 中国科学院计算技术研究所 一种多模板混合滤波的图像去噪方法
CN101115195B (zh) * 2006-07-24 2010-08-18 同济大学 视频码流的宏块级耦合的解码和环路滤波方法和装置
CN100538738C (zh) * 2006-08-16 2009-09-09 华为技术有限公司 访问多区存储器中的多维数据块的方法、装置及系统
CN100581255C (zh) * 2006-11-30 2010-01-13 联合信源数字音视频技术(北京)有限公司 一种像素级环路滤波方法和滤波器
CN201222785Y (zh) * 2008-02-03 2009-04-15 深圳艾科创新微电子有限公司 一种高速h.264视频编解码滤波器结构
CN100573555C (zh) * 2008-04-02 2009-12-23 范九伦 一种基于模板的指纹图像细化方法

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101005619A (zh) * 2006-12-25 2007-07-25 海信集团有限公司 一种环路滤波的方法
CN101170690A (zh) * 2007-11-21 2008-04-30 上海广电(集团)有限公司中央研究院 基于avs的环路滤波器的硬件装置及硬件实现方法
CN101635849A (zh) * 2008-07-24 2010-01-27 青岛海信信芯科技有限公司 一种环路滤波方法及环路滤波器
CN102222319A (zh) * 2011-04-08 2011-10-19 中兴通讯股份有限公司 一种图像处理方法及装置

Also Published As

Publication number Publication date
CN102222319A (zh) 2011-10-19
CN102222319B (zh) 2015-08-12

Similar Documents

Publication Publication Date Title
WO2012136137A1 (zh) 一种图像处理方法及装置
TWI407800B (zh) 馬賽克影像的改良處理
US8514302B2 (en) Image processing equipment and digital camera that filter noise
CN101770636B (zh) 图像噪声去除方法及装置
JP5183664B2 (ja) ビデオ圧縮のためのデブロッキング装置及び方法
US9197812B2 (en) Image processing device, image processing method, and imaging apparatus
JP5253312B2 (ja) 動画像処理装置およびその動作方法
JPH08307870A (ja) ブロッキング効果除去回路
JP2008047038A (ja) 画像処理装置及び画像処理方法
JP5249111B2 (ja) 画像処理装置、方法、プログラム、及び撮像システム
KR100359208B1 (ko) 고속 디블럭킹 필터 장치
JP5203824B2 (ja) 画像処理装置及び撮像システム
JP5246045B2 (ja) 動画像処理装置およびそれを用いたビデオカメラ装置
JP4987364B2 (ja) ラインメモリ実装装置とテレビジョン受信装置
US8705884B2 (en) Image processing apparatus and method for controlling the same
Bailey et al. Advanced bayer demosaicing on FPGAs
TWI748597B (zh) 多路影像處理裝置及方法
WO2012083633A1 (zh) 视频滤波方法及装置
JP4180782B2 (ja) 画像縮小方法および装置並びに記録媒体
JPS6232579A (ja) 並列処理形処理装置
JP2011059911A (ja) 画像処理装置
Savić et al. Hardware realization of inverse subband transformer with minimum used resources
JP2003189305A (ja) 画像処理装置
JPH03174891A (ja) ブロック歪除去フィルタ
KR0143984B1 (ko) 유럽형 hdtv시스템의 블록화현상 제거회로

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 12768430

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 12768430

Country of ref document: EP

Kind code of ref document: A1