CN113643198B - Image processing method, device, electronic device and storage medium - Google Patents
Image processing method, device, electronic device and storage medium Download PDFInfo
- Publication number
- CN113643198B CN113643198B CN202110828277.3A CN202110828277A CN113643198B CN 113643198 B CN113643198 B CN 113643198B CN 202110828277 A CN202110828277 A CN 202110828277A CN 113643198 B CN113643198 B CN 113643198B
- Authority
- CN
- China
- Prior art keywords
- image block
- neighborhood
- pixel
- central
- distance
- Prior art date
- Legal status (The legal status 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 status listed.)
- Active
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T5/00—Image enhancement or restoration
- G06T5/70—Denoising; Smoothing
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F18/00—Pattern recognition
- G06F18/20—Analysing
- G06F18/22—Matching criteria, e.g. proximity measures
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/10—Segmentation; Edge detection
- G06T7/11—Region-based segmentation
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2207/00—Indexing scheme for image analysis or image enhancement
- G06T2207/20—Special algorithmic details
- G06T2207/20021—Dividing image into blocks, subimages or windows
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Physics & Mathematics (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Data Mining & Analysis (AREA)
- Bioinformatics & Computational Biology (AREA)
- Bioinformatics & Cheminformatics (AREA)
- Evolutionary Biology (AREA)
- Evolutionary Computation (AREA)
- Artificial Intelligence (AREA)
- General Engineering & Computer Science (AREA)
- Life Sciences & Earth Sciences (AREA)
- Image Processing (AREA)
Abstract
Description
技术领域Technical Field
本申请涉及图像处理技术领域,尤其涉及一种图像处理方法、装置、电子设备以存储介质。The present application relates to the field of image processing technology, and in particular to an image processing method, device, electronic device and storage medium.
背景技术Background technique
随着半导体芯片在数字图像处理技术上的不断发展,人们可以通过各种拍摄设备(例如:数码相机、手机等)进行拍摄,进而获得高分辨率的图片或视频。在各种拍摄设备中,主要采用的是互补金属氧化物半导体(Complementary Metal Oxide Semiconductor,CMOS)图像传感器获取高分辨率的图片或视频。With the continuous development of semiconductor chips in digital image processing technology, people can use various shooting devices (such as digital cameras, mobile phones, etc.) to shoot and obtain high-resolution pictures or videos. Among various shooting devices, complementary metal oxide semiconductor (CMOS) image sensors are mainly used to obtain high-resolution pictures or videos.
由于CMOS图像传感器先天的硬件限制,使得拍摄设备在很多场合拍摄的图片出现严重的亮度与色度噪声。为了提升图片的质量,一般来说,就是直接对拍摄设备内部的原始图片(即,Bayer图像)的噪声进行抑制。这样,就能够得到更高质量的图像。例如:采用非局域均值滤波方法(Non-Local Means,NLM)对Bayer图像进行降噪,以获得更高质量的图像。Due to the inherent hardware limitations of CMOS image sensors, the pictures taken by the camera in many cases have serious brightness and chromaticity noise. In order to improve the quality of the picture, generally speaking, the noise of the original picture (i.e., Bayer image) inside the camera is directly suppressed. In this way, a higher quality image can be obtained. For example, the non-local means filtering method (NLM) is used to reduce the noise of the Bayer image to obtain a higher quality image.
然而,现有的图像降噪算法的运算复杂度较大。相应的,通过专用集成电路(Application Specific Integrated Circuit,ASIC)实现时,对于ASIC的硬件要求也就较高,这无疑会增加ASIC的成本。However, the computational complexity of existing image noise reduction algorithms is relatively high. Accordingly, when implemented by an application specific integrated circuit (ASIC), the hardware requirements for the ASIC are relatively high, which will undoubtedly increase the cost of the ASIC.
发明内容Summary of the invention
本申请实施例的目的是提供一种图像处理方法、装置、电子设备以存储介质,以简化图像降噪的运算复杂度,从而降低ASIC的成本。The purpose of the embodiments of the present application is to provide an image processing method, device, electronic device, and storage medium to simplify the computational complexity of image denoising, thereby reducing the cost of ASIC.
为解决上述技术问题,本申请实施例提供如下技术方案:In order to solve the above technical problems, the embodiments of the present application provide the following technical solutions:
本申请第一方面提供一种图像处理方法,所述方法包括:获取图像的至少一个区域中的中心图像块和邻域图像块,所述邻域图像块与所述中心图像块相邻;计算所述邻域图像块与所述中心图像块的距离;从预设表中查找出所述距离对应的权重,并作为所述邻域图像块的权重,所述预设表用于表征不同距离与权重的对应关系;基于所述邻域图像块的权重、所述邻域图像块的像素值、所述中心图像块的权重以及所述中心图像块的像素值对所述中心图像块中的像素进行滤波处理。In a first aspect, the present application provides an image processing method, the method comprising: obtaining a central image block and a neighborhood image block in at least one area of an image, wherein the neighborhood image block is adjacent to the central image block; calculating the distance between the neighborhood image block and the central image block; finding out a weight corresponding to the distance from a preset table and using the weight as the weight of the neighborhood image block, wherein the preset table is used to characterize the correspondence between different distances and weights; and filtering pixels in the central image block based on the weight of the neighborhood image block, the pixel value of the neighborhood image block, the weight of the central image block, and the pixel value of the central image block.
本申请第二方面提供一种图像处理装置,所述装置包括:接收模块,用于获取图像的至少一个区域中的中心图像块和邻域图像块,所述邻域图像块与所述中心图像块相邻;计算模块,用于计算所述邻域图像块与所述中心图像块的距离;查找模块,用于从预设表中查找出所述距离对应的权重,并作为所述邻域图像块的权重,所述预设表用于表征不同距离与权重的对应关系;滤波模块,用于基于所述邻域图像块的权重、所述邻域图像块的像素值、所述中心图像块的权重以及所述中心图像块的像素值对所述中心图像块中的像素进行滤波处理。According to a second aspect of the present application, there is provided an image processing device, the device comprising: a receiving module, used to obtain a central image block and a neighborhood image block in at least one area of an image, wherein the neighborhood image block is adjacent to the central image block; a calculating module, used to calculate the distance between the neighborhood image block and the central image block; a searching module, used to find out a weight corresponding to the distance from a preset table and use it as the weight of the neighborhood image block, wherein the preset table is used to characterize the correspondence between different distances and weights; and a filtering module, used to filter pixels in the central image block based on the weight of the neighborhood image block, the pixel value of the neighborhood image block, the weight of the central image block and the pixel value of the central image block.
本申请第三方面提供一种电子设备,包括:处理器、存储器、总线;其中,所述处理器、所述存储器通过所述总线完成相互间的通信;所述处理器用于调用所述存储器中的程序指令,以执行第一方面中的方法。The third aspect of the present application provides an electronic device, comprising: a processor, a memory, and a bus; wherein the processor and the memory communicate with each other through the bus; and the processor is used to call program instructions in the memory to execute the method in the first aspect.
本申请第四方面提供一种计算机可读存储介质,包括:存储的程序;其中,在所述程序运行时控制所述存储介质所在设备执行第一方面中的方法。A fourth aspect of the present application provides a computer-readable storage medium, comprising: a stored program; wherein, when the program is executed, the device where the storage medium is located is controlled to execute the method in the first aspect.
相较于现有技术,本申请第一方面提供的图像处理方法,在获取到图像的至少一个区域中的中心图像块和邻域图像块后,计算邻域图像块与中心图像块的距离,进而基于邻域图像块与中心图像块的距离从预设表中查找出邻域图像块的权重,最后基于邻域图像块的权重、邻域图像块的像素值、中心图像块的权重以及中心图像块的像素值对中心图像块中的像素进行滤波处理。在基于各图像块之间的距离确定各图像块相应的权重时,放弃采用基于高斯函数逐个计算各图像块的权重,而采用查表的方式,从预设表中直接查找出各图像块的距离对应的权重。由于查表相比于函数的计算方式更为简单,因此,能够简化图像降噪计算的复杂度,进而降低硬件电路的成本。Compared with the prior art, the image processing method provided in the first aspect of the present application, after acquiring the central image block and the neighborhood image block in at least one area of the image, calculates the distance between the neighborhood image block and the central image block, and then finds the weight of the neighborhood image block from a preset table based on the distance between the neighborhood image block and the central image block, and finally filters the pixels in the central image block based on the weight of the neighborhood image block, the pixel value of the neighborhood image block, the weight of the central image block and the pixel value of the central image block. When determining the corresponding weight of each image block based on the distance between each image block, the weight of each image block is calculated one by one based on the Gaussian function, and a table lookup method is used to directly find the weight corresponding to the distance of each image block from the preset table. Since the table lookup is simpler than the function calculation method, it can simplify the complexity of the image denoising calculation, thereby reducing the cost of the hardware circuit.
本申请第二方面提供的图像处理装置、第三方面提供的电子设备、第四方面提供的计算机可读存储介质,与第一方面提供的图像处理方法具有相同或相似的有益效果。The image processing device provided in the second aspect, the electronic device provided in the third aspect, and the computer-readable storage medium provided in the fourth aspect of the present application have the same or similar beneficial effects as the image processing method provided in the first aspect.
附图说明BRIEF DESCRIPTION OF THE DRAWINGS
通过参考附图阅读下文的详细描述,本申请示例性实施方式的上述以及其他目的、特征和优点将变得易于理解。在附图中,以示例性而非限制性的方式示出了本申请的若干实施方式,相同或对应的标号表示相同或对应的部分,其中:By reading the detailed description below with reference to the accompanying drawings, the above and other purposes, features and advantages of the exemplary embodiments of the present application will become easy to understand. In the accompanying drawings, several embodiments of the present application are shown in an exemplary and non-limiting manner, and the same or corresponding reference numerals represent the same or corresponding parts, wherein:
图1为本申请实施例中图像处理方法的流程示意图一;FIG1 is a schematic diagram of a flow chart of an image processing method in an embodiment of the present application;
图2为本申请实施例中各图像块的示意图一;FIG2 is a schematic diagram 1 of each image block in an embodiment of the present application;
图3为本申请实施例中各图像块的示意图二;FIG3 is a second schematic diagram of each image block in an embodiment of the present application;
图4为本申请实施例中预设表的示意图一;FIG4 is a schematic diagram 1 of a preset table in an embodiment of the present application;
图5为本申请实施例中图像处理方法的流程示意图二;FIG5 is a second flow chart of the image processing method in an embodiment of the present application;
图6为本申请实施例中滑动窗口未完全位于图像内的示意图;FIG6 is a schematic diagram showing that the sliding window is not completely located within the image in an embodiment of the present application;
图7为本申请实施例中某一个邻域图像块与中心图像块的示意图;FIG7 is a schematic diagram of a neighborhood image block and a central image block in an embodiment of the present application;
图8为本申请实施例中几种像素位置模板的示意图一;FIG8 is a schematic diagram 1 of several pixel position templates in an embodiment of the present application;
图9为本申请实施例中预设表的示意图二;FIG9 is a second schematic diagram of a preset table in an embodiment of the present application;
图10为本申请实施例中各图像块的示意图三;FIG10 is a third schematic diagram of each image block in an embodiment of the present application;
图11为本申请实施例中各图像块的示意图四;FIG11 is a fourth schematic diagram of each image block in an embodiment of the present application;
图12为本申请实施例中几种像素位置模板的示意图二;FIG12 is a second schematic diagram of several pixel position templates in an embodiment of the present application;
图13为本申请实施例中图像处理装置的结构示意图一;FIG13 is a first structural diagram of an image processing device according to an embodiment of the present application;
图14为本申请实施例中图像处理装置的结构示意图二;FIG14 is a second structural diagram of the image processing device in an embodiment of the present application;
图15为本申请实施例中电子设备的结构示意图。FIG. 15 is a schematic diagram of the structure of an electronic device in an embodiment of the present application.
具体实施方式Detailed ways
下面将参照附图更详细地描述本申请的示例性实施方式。虽然附图中显示了本申请的示例性实施方式,然而应当理解,可以以各种形式实现本申请而不应被这里阐述的示例性实施方式所限制。相反,提供这些示例性实施方式是为了能够更透彻地理解本申请,并且能够将本申请的范围完整的传达给本领域的技术人员。The exemplary embodiments of the present application will be described in more detail below with reference to the accompanying drawings. Although the exemplary embodiments of the present application are shown in the accompanying drawings, it should be understood that the present application can be implemented in various forms and should not be limited by the exemplary embodiments set forth herein. On the contrary, these exemplary embodiments are provided in order to enable a more thorough understanding of the present application and to fully convey the scope of the present application to those skilled in the art.
需要注意的是,除非另有说明,本申请使用的技术术语或者科学术语应当为本申请所属领域技术人员所理解的通常意义。It should be noted that, unless otherwise specified, the technical terms or scientific terms used in this application should have the common meanings understood by technicians in the field to which this application belongs.
在现有技术中,当需要对图像进行降噪处理时,一般来说,都是采用图像降噪算法对图像进行处理,以获得高质量的图像。但是,图像降噪算法的运算过程复杂。并且,图像降噪算法最终需要依赖硬件电路实现。这样,就导致了需要较高性能的硬件电路才能够支持图像降噪算法对图像的降噪处理,从而增加了硬件电路的成本。In the prior art, when it is necessary to perform noise reduction processing on an image, generally, an image noise reduction algorithm is used to process the image to obtain a high-quality image. However, the operation process of the image noise reduction algorithm is complicated. Moreover, the image noise reduction algorithm ultimately needs to rely on hardware circuit implementation. As a result, a high-performance hardware circuit is required to support the image noise reduction processing of the image by the image noise reduction algorithm, thereby increasing the cost of the hardware circuit.
申请人经过大量研究发现,现有的图像降噪算法,尤其是NLM算法的运算过程复杂的原因在于:在计算图像中各图像块之间的距离时,采用的是欧氏距离。而欧式距离的计算较为繁琐,需要进行多次乘法运算,这无疑需要加强硬件电路的性能。以及,在基于各图像块之间的距离计算各图像块相应的权重时,采用的是高斯函数。而高斯函数涉及到指数的计算,这无疑也需要加强硬件电路的性能,这就导致了硬件电路成本的增加。After extensive research, the applicant discovered that the reason why the existing image denoising algorithms, especially the NLM algorithm, have a complicated operation process is that the Euclidean distance is used to calculate the distance between each image block in the image. The calculation of the Euclidean distance is relatively cumbersome and requires multiple multiplication operations, which undoubtedly requires the performance of the hardware circuit to be enhanced. In addition, when calculating the corresponding weight of each image block based on the distance between each image block, the Gaussian function is used. The Gaussian function involves the calculation of exponents, which undoubtedly also requires the performance of the hardware circuit to be enhanced, which leads to an increase in the cost of the hardware circuit.
有鉴于此,本申请实施例提供了一种图像处理方法,在基于各图像块之间的距离确定各图像块相应的权重时,并不是逐个采用高斯函数计算各图像块的权重,而是采用查表的方式,从表中查得各图像块对应的权重。在该表中,预先基于各种距离计算出相应的权重。在实际对图像进行降噪的过程中,当需要获取某一图像块对应的权重时,就可以从表中查得该图像块的距离对应的权重。由于查表相对于函数计算更为简单,因此,采用本申请实施例提供的图像处理方法,能够简化图像降噪计算的复杂度,进而降低硬件电路的成本。In view of this, an embodiment of the present application provides an image processing method. When determining the corresponding weight of each image block based on the distance between each image block, the weight of each image block is not calculated one by one using a Gaussian function, but a table lookup method is adopted to find the corresponding weight of each image block from the table. In the table, the corresponding weight is calculated in advance based on various distances. In the actual process of image denoising, when it is necessary to obtain the weight corresponding to a certain image block, the weight corresponding to the distance of the image block can be found from the table. Since table lookup is simpler than function calculation, the image processing method provided by the embodiment of the present application can simplify the complexity of image denoising calculation, thereby reducing the cost of hardware circuits.
这里需要说明的是,在实际应用中,本申请实施例提供的图像处理方法主要应用于Bayer图像的处理。当然,本申请实施例提供的图像处理方法还能够应用于其它图像的处理。对于其它图像的类型,此处不做限定。It should be noted that, in practical applications, the image processing method provided in the embodiment of the present application is mainly applied to the processing of Bayer images. Of course, the image processing method provided in the embodiment of the present application can also be applied to the processing of other images. The types of other images are not limited here.
接下来,详细对本申请实施例提供的图像处理方法进行说明。Next, the image processing method provided in the embodiment of the present application is described in detail.
图1为本申请实施例中图像处理方法的流程示意图一,参见图1所示,该方法可以包括:FIG. 1 is a flow chart of an image processing method in an embodiment of the present application. Referring to FIG. 1 , the method may include:
S101:获取图像的至少一个区域中的中心图像块和邻域图像块。S101: Acquire a central image block and a neighborhood image block in at least one region of an image.
其中,邻域图像块与中心图像块相邻。Among them, the neighborhood image block is adjacent to the central image block.
当需要对图像进行降噪处理时,首先,获取待处理的图像。然后,确定图像中的至少一个区域。由于对图像进行降噪处理时,并不是针对该图像的所有区域一起进行处理,而是划分成多个区域分别进行处理,因此,需要确定图像中的至少一个区域,以便针对每个区域分别进行处理。最后,获取至少一个区域中的中心图像块和邻域图像块。由于后续是针对每个区域分别进行处理,因此,还需要对每个区域进行划分,在划分后的每个区域中,都包含有多个图像块,即中心图像块和邻域图像块。When it is necessary to perform noise reduction processing on an image, first, obtain the image to be processed. Then, determine at least one area in the image. Since when performing noise reduction processing on an image, not all areas of the image are processed together, but it is divided into multiple areas and processed separately, it is necessary to determine at least one area in the image so that each area can be processed separately. Finally, obtain the central image block and the neighborhood image block in at least one area. Since each area is processed separately later, it is also necessary to divide each area, and each divided area contains multiple image blocks, namely the central image block and the neighborhood image block.
图2为本申请实施例中各图像块的示意图一,参见图2所示,在图像X中,采用滑动窗口确定区域Y1。该滑动窗口的大小为7×7,即区域Y1的大小也为7×7。在区域Y1中,按照3×3的大小,将区域Y1划成9个图像块,即图像块A0、A1、A2、A3、A4、A5、A6、A7、A8。其中,在水平方向以及垂直方向上相邻的图像块存在1个像素的重叠。在这里,图像块A4就是中心图像块,图像块A0、A1、A2、A3、A5、A6、A7、A8就是邻域图像块。获取各图像块,相当于是获取各图像块中各像素点的像素值,该像素值可以是灰度值。当然,该像素值也可以是红色(Red,R)、绿色(Green,G)、蓝色(Blue,B)通道对应的像素值。对于像素值的具体类别,此处不做限定。FIG2 is a schematic diagram of each image block in an embodiment of the present application. Referring to FIG2 , in image X, a sliding window is used to determine region Y 1 . The size of the sliding window is 7×7, that is, the size of region Y 1 is also 7×7. In region Y 1 , region Y 1 is divided into 9 image blocks according to a size of 3×3, namely, image blocks A 0 , A 1 , A 2 , A 3 , A 4 , A 5 , A 6 , A 7 , and A 8 . Among them, there is an overlap of 1 pixel between adjacent image blocks in the horizontal and vertical directions. Here, image block A 4 is the central image block, and image blocks A 0 , A 1 , A 2 , A 3 , A 5 , A 6 , A 7 , and A 8 are neighborhood image blocks. Acquiring each image block is equivalent to acquiring the pixel value of each pixel in each image block, and the pixel value may be a grayscale value. Of course, the pixel value may also be a pixel value corresponding to a red (Red, R), green (Green, G), or blue (Blue, B) channel. The specific category of the pixel value is not limited here.
在实际应用中,对于图像的一个区域内的中心图像块和邻域图像块的数量,中心图像块为1个,而邻域图像块可以是1个,也可以是多个。对于邻域图像块的数量,以及邻域图像块相对于中心图像块的位置,此处不做具体限定,可以根据实际需求进行设置。在图2中,邻域图像块A0、A1、A2、A3、A5、A6、A7、A8的数量就是8个,均匀分布于中心图像块A4的外侧。In practical applications, the number of central image blocks and neighborhood image blocks in an area of an image is 1, and the number of neighborhood image blocks can be 1 or more. The number of neighborhood image blocks and the position of the neighborhood image blocks relative to the central image block are not specifically limited here and can be set according to actual needs. In FIG2 , the number of neighborhood image blocks A 0 , A 1 , A 2 , A 3 , A 5 , A 6 , A 7 , and A 8 is 8, which are evenly distributed outside the central image block A 4 .
S102:计算邻域图像块与中心图像块的距离。S102: Calculate the distance between the neighborhood image block and the central image block.
也就是说,相当于计算邻域图像块中的像素值与中心图像块中的像素值的相似度。In other words, it is equivalent to calculating the similarity between the pixel values in the neighborhood image block and the pixel values in the central image block.
以计算某一个邻域图像块与中心图像块的相似度为例,由于邻域图像块和中心图像块中并不是仅存在一个像素点,而是存在多个像素点,因此,需要基于邻域图像块中各像素点与中心图像块中相应位置的像素点的相似度来确定邻域图像块与中心图像块的相似度。Taking the calculation of the similarity between a certain neighborhood image block and the central image block as an example, since there is not only one pixel point in the neighborhood image block and the central image block, but multiple pixels points, it is necessary to determine the similarity between the neighborhood image block and the central image block based on the similarity between each pixel point in the neighborhood image block and the pixel point at the corresponding position in the central image block.
图3为本申请实施例中各图像块的示意图二,参见图3所示,在计算邻域图像块A0与中心图像块A4的相似度时,邻域图像块A0中包含有9个像素点,即像素点q0、q1、q2、q3、q4、q5、q6、q7、q8,中心图像块A4中也包含有9个像素点,即像素点p0、p1、p2、p3、p4、p5、p6、p7、p8。因此,计算像素点q0与像素点p0的像素值的差值,计算像素点q1与像素点p1的像素值的差值,以此类推。将各差值的平方求和,再取平均数,就得到了邻域图像块A0与中心图像块A4的相似度,即邻域图像块A0与中心图像块A4的距离。计算邻域图像块A1、A2、A3、A5、A6、A7、A8与中心图像块邻A4的相似度的方法,与邻域图像块A0的计算方式相同,此处不再赘述。FIG3 is a second schematic diagram of each image block in the embodiment of the present application. Referring to FIG3 , when calculating the similarity between the neighborhood image block A0 and the central image block A4 , the neighborhood image block A0 includes 9 pixels, namely, pixels q0 , q1 , q2 , q3 , q4 , q5 , q6 , q7 , q8 , and the central image block A4 also includes 9 pixels, namely, pixels p0 , p1 , p2 , p3 , p4 , p5 , p6 , p7 , p8 . Therefore, the difference between the pixel values of pixel q0 and pixel p0 is calculated, the difference between the pixel values of pixel q1 and pixel p1 is calculated, and so on. By summing the squares of the differences and taking the average, we can get the similarity between the neighborhood image block A0 and the central image block A4 , that is, the distance between the neighborhood image block A0 and the central image block A4 . The method for calculating the similarity between the neighborhood image blocks A1 , A2 , A3 , A5 , A6 , A7 , A8 and the central image block A4 is the same as the calculation method of the neighborhood image block A0 , which will not be repeated here.
上述计算邻域图像块与中心图像块的距离采用的是欧式距离的平方的计算方式,具体计算公式如下式(1)所示:The distance between the neighborhood image block and the center image block is calculated by the square of the Euclidean distance. The specific calculation formula is shown in the following formula (1):
其中,d表示欧氏距离,p表示中心图像块,q表示邻域图像块,k表示图像块中的像素点。Among them, d represents the Euclidean distance, p represents the central image block, q represents the neighborhood image block, and k represents the pixel point in the image block.
当然,也可以采用其它的距离计算方式计算邻域图像块与中心图像块的距离。对于采用何种具体的距离计算方式计算邻域图像块与中心图像块的距离,此处不做限定。Of course, other distance calculation methods may also be used to calculate the distance between the neighborhood image block and the central image block. The specific distance calculation method used to calculate the distance between the neighborhood image block and the central image block is not limited here.
S103:从预设表中查找出距离对应的权重,并作为邻域图像块的权重。S103: Find out the weight corresponding to the distance from a preset table and use it as the weight of the neighborhood image block.
其中,预设表用于表征不同距离与权重的对应关系。The preset table is used to represent the corresponding relationship between different distances and weights.
计算邻域图像块与中心图像块的距离的根本目的在于确定邻域图像块相对于中心图像块的权重,因此,在计算出邻域图像块与中心图像块的距离后,需要根据邻域图像块与中心图像块的距离确定邻域图像块的权重。The fundamental purpose of calculating the distance between the neighborhood image block and the central image block is to determine the weight of the neighborhood image block relative to the central image block. Therefore, after calculating the distance between the neighborhood image block and the central image block, it is necessary to determine the weight of the neighborhood image block according to the distance between the neighborhood image block and the central image block.
在现有技术中,基于邻域图像块与中心图像块的距离,采用高斯函数,计算邻域图像块的权重。具体计算公式如下式(2)所示:In the prior art, based on the distance between the neighborhood image block and the central image block, a Gaussian function is used to calculate the weight of the neighborhood image block. The specific calculation formula is shown in the following formula (2):
其中,w表示权重,i表示邻域图像块,d表示邻域图像块与中心图像块的距离。σ表示噪声的标准差,对于不同的图像传感器,σ需要在不同照度下采用标准图像进行标定。也就是说,待处理的图像通过哪个图像传感器获得,上述公式中的σ就采用哪个图像传感器对应的σ。h表示滤波系数,与σ正相关,即h=kσ,k一般为(0.3,1)之间的一个系数。Among them, w represents the weight, i represents the neighborhood image block, and d represents the distance between the neighborhood image block and the center image block. σ represents the standard deviation of the noise. For different image sensors, σ needs to be calibrated using standard images under different illumination. In other words, the σ in the above formula uses the σ corresponding to the image sensor through which the image to be processed is obtained. h represents the filter coefficient, which is positively correlated with σ, that is, h = kσ, where k is generally a coefficient between (0.3, 1).
通过上述公式可知,邻域图像块与中心图像块的距离越小,邻域图像块相对于中心图像块的权重就越大。当邻域图像块与中心图像块的距离的平方小于或等于2σ2时,邻域图像块相对于中心图像块的权重就为1。而中心图像块对应的权重也是1。From the above formula, we can know that the smaller the distance between the neighborhood image block and the central image block, the greater the weight of the neighborhood image block relative to the central image block. When the square of the distance between the neighborhood image block and the central image block is less than or equal to 2σ 2 , the weight of the neighborhood image block relative to the central image block is 1. The weight corresponding to the central image block is also 1.
由于现有技术中基于邻域图像块与中心图像块的距离逐个计算邻域图像块相对于中心图像块的权重,包含有指数计算,计算过程复杂。因此,本申请实施例中不再逐个基于邻域图像块与中心图像块的距离进行邻域图像的权重的计算,而是直接在预先保存有各种距离对应的权重的预设表中查找邻域图像块与中心图像块的距离对应的权重,并作为邻域图像的权重。查表相比于指数计算,计算过程更加简单。Since the prior art calculates the weight of the neighboring image blocks relative to the central image block one by one based on the distance between the neighboring image blocks and the central image block, which includes exponential calculation, the calculation process is complicated. Therefore, in the embodiment of the present application, the weight of the neighboring image is no longer calculated one by one based on the distance between the neighboring image blocks and the central image block, but the weight corresponding to the distance between the neighboring image block and the central image block is directly searched in a preset table that pre-stores the weights corresponding to various distances, and used as the weight of the neighboring image. Compared with exponential calculation, the calculation process of table lookup is simpler.
图4为本申请实施例中预设表的示意图一,参见图4所示,在预设表中,存储有多个距离d1、d2、……、dn,与相应权重w1、w2、……、wn的对应关系。在获得邻域图像块与中心图像块的距离d2后,通过查找预设表,就能够获得邻域图像块的权重w2。避免了一次次的指数计算,简化了权重的计算过程。FIG4 is a schematic diagram of a preset table in an embodiment of the present application. Referring to FIG4 , the preset table stores a plurality of distances d 1 , d 2 , ..., d n , and corresponding weights w 1 , w 2 , ..., w n . After obtaining the distance d 2 between the neighborhood image block and the center image block, the weight w 2 of the neighborhood image block can be obtained by searching the preset table. This avoids repeated index calculations and simplifies the weight calculation process.
需要说明的是,预设表中各种距离对应的权重是预先计算好,并存储起来的。而通过距离计算权重可以采用现有的各种计算图像块权重的方式,例如:高斯函数等。此处对于权重的具体计算方式,不做限定。It should be noted that the weights corresponding to various distances in the preset table are pre-calculated and stored. The weights can be calculated by distance using various existing methods for calculating image block weights, such as Gaussian function, etc. The specific method for calculating the weights is not limited here.
S104:基于邻域图像块的权重、邻域图像块的像素值、中心图像块的权重以及中心图像块的像素值对中心图像块中的像素进行滤波处理。S104: Filtering the pixels in the central image block based on the weights of the neighboring image blocks, the pixel values of the neighboring image blocks, the weight of the central image block, and the pixel values of the central image block.
在获得邻域图像块相对于中心图像块的权重后,并结合邻域图像块的像素值,以及中心图像块的像素值和权重(一般都是1),通过加权平均的方式,就能够获得中心图像块中目标像素点的像素值,即实现了对目标像素点的滤波处理。具体计算公式如下式(3)所示:After obtaining the weight of the neighborhood image block relative to the central image block, and combining the pixel value of the neighborhood image block, as well as the pixel value and weight (generally 1) of the central image block, the pixel value of the target pixel in the central image block can be obtained by weighted averaging, that is, filtering of the target pixel is achieved. The specific calculation formula is shown in the following formula (3):
其中,u‘(An)表示滤波后的中心图像块的像素值,u(Ai)表示滤波前的中心图像块以及所有邻域图像块的像素值,wi表示中心图像块以及所有邻域图像块对应的权重。C=∑wi,为权重归一化值。Wherein, u'(A n ) represents the pixel value of the central image block after filtering, u(A i ) represents the pixel value of the central image block and all neighboring image blocks before filtering, and w i represents the weights corresponding to the central image block and all neighboring image blocks. C=∑w i is the weight normalization value.
由上述内容可知,本申请实施例提供的图像处理方法,在获取到图像的至少一个区域中的中心图像块和邻域图像块后,计算邻域图像块与中心图像块的距离,进而基于邻域图像块与中心图像块的距离从预设表中查找出邻域图像块的权重,最后基于邻域图像块的权重、邻域图像块的像素值、中心图像块的权重以及中心图像块的像素值对中心图像块中的像素进行滤波处理。在基于各图像块之间的距离确定各图像块相应的权重时,放弃采用基于高斯函数逐个计算各图像块的权重,而采用查表的方式,从预设表中直接查找出各图像块的距离对应的权重。由于查表相比于函数的计算方式更为简单,因此,能够简化图像降噪计算的复杂度,进而降低硬件电路的成本。As can be seen from the above content, the image processing method provided by the embodiment of the present application, after obtaining the central image block and the neighborhood image block in at least one area of the image, calculates the distance between the neighborhood image block and the central image block, and then finds the weight of the neighborhood image block from the preset table based on the distance between the neighborhood image block and the central image block, and finally filters the pixels in the central image block based on the weight of the neighborhood image block, the pixel value of the neighborhood image block, the weight of the central image block and the pixel value of the central image block. When determining the corresponding weight of each image block based on the distance between each image block, the weight of each image block is calculated one by one based on the Gaussian function, and a table lookup method is used to directly find the weight corresponding to the distance of each image block from the preset table. Since the table lookup is simpler than the function calculation method, it can simplify the complexity of the image denoising calculation, thereby reducing the cost of the hardware circuit.
进一步地,作为图1所示方法的细化和扩展,本申请实施例还提供了一种图像处理方法。图5为本申请实施例中图像处理方法的流程示意图二,参见图5所示,该方法可以包括:Further, as a refinement and extension of the method shown in FIG1 , the embodiment of the present application also provides an image processing method. FIG5 is a second flow chart of the image processing method in the embodiment of the present application. Referring to FIG5 , the method may include:
S501:确定图像的目标区域。S501: Determine a target area of an image.
在对图像进行降噪处理时,由于并不是直接对整个图像进行降噪处理,而是针对图像中的各个区域分别进行降噪处理,因此,首先需要在图像中确定出一个区域,以对该区域进行降噪处理。当对图像中所有的区域都进行完降噪处理时,图像的降噪处理就完成了。When performing noise reduction on an image, since noise reduction is not performed directly on the entire image, but on each area in the image, it is necessary to first determine an area in the image to perform noise reduction on the area. When noise reduction is completed on all areas in the image, the noise reduction of the image is completed.
具体可以采用滑动窗口的方式在图像中确定目标区域。仍参见图2所示,在图像X中,区域Y1就是采用滑动窗口确定的一个目标区域。当然,继续移动滑动窗口,还能够确定出区域Y2、Y3等。对于目标区域的具体数量,可以根据图像的尺寸以及滑动窗口的尺寸确定,只要确定出的所有目标区域能够覆盖图像即可。而为了能够既快速又全面地对图像进行处理,采用滑动窗口确定的各目标区域可以不重合。Specifically, the target area can be determined in the image by using a sliding window. Still referring to FIG. 2 , in the image X, area Y 1 is a target area determined by using a sliding window. Of course, by continuing to move the sliding window, areas Y 2 , Y 3 , etc. can also be determined. The specific number of target areas can be determined according to the size of the image and the size of the sliding window, as long as all the determined target areas can cover the image. In order to process the image quickly and comprehensively, the target areas determined by using the sliding window may not overlap.
而当需要进行滤波处理的像素位于图像边界时,也就是说,当待处理的像素位于滑动窗口的中心,而滑动窗口未完全位于图像上时,为了能够继续对滑动窗口内的图像进行降噪处理,可以根据整个图像对滑动窗口内缺失的图像进行填充,进而获得待处理的目标区域。When the pixels that need to be filtered are located at the boundary of the image, that is, when the pixels to be processed are located at the center of the sliding window, and the sliding window is not completely located on the image, in order to continue to perform noise reduction processing on the image in the sliding window, the missing image in the sliding window can be filled according to the entire image to obtain the target area to be processed.
图6为本申请实施例中滑动窗口未完全位于图像内的示意图,参见图6所示,滑动窗口601内的区域6011位于图像X内,而滑动窗口601内的区域6012没有位于图像X内。为了能够对滑动窗口601内的目标区域进行降噪处理,就需要将区域6012内缺失的图像进行填充。FIG6 is a schematic diagram of a sliding window that is not completely located in an image in an embodiment of the present application. Referring to FIG6 , an area 6011 in the sliding window 601 is located in the image X, while an area 6012 in the sliding window 601 is not located in the image X. In order to perform noise reduction processing on the target area in the sliding window 601, it is necessary to fill the missing image in the area 6012.
在实际应用中,可以采用镜像的方式对滑动窗口内未处于图像上的区域进行填充,即以滑动窗口内图像的边缘为翻转轴,将图像进行翻转,滑动窗口内缺失的部分就得到了填充。当然,还可以采用其它方式对滑动窗口内未处于图像上的区域进行填充。具体的填充方式,此处不做限定。In practical applications, the area in the sliding window that is not on the image can be filled in a mirroring manner, that is, the image is flipped with the edge of the image in the sliding window as the flip axis, and the missing part in the sliding window is filled. Of course, other methods can also be used to fill the area in the sliding window that is not on the image. The specific filling method is not limited here.
S502:获取目标区域中的中心图像块和邻域图像块。S502: Acquire a central image block and a neighborhood image block in the target area.
步骤S502与步骤S101的具体实现方式相同,此处不再赘述。The specific implementation method of step S502 is the same as that of step S101, which will not be repeated here.
S503:判断目标区域是否为纹理细节区域;若是,则执行S504;若否,可以认为目标区域为平坦区域,则执行S505。S503: Determine whether the target area is a texture detail area; if so, execute S504; if not, it can be considered that the target area is a flat area, and execute S505.
当然,在其他实施例中,也可以判断目标区域是否为平坦区域;若是,则执行S505;若否,可以认为目标区域为纹理细节区域,则执行S504。Of course, in other embodiments, it may also be determined whether the target area is a flat area; if so, S505 is executed; if not, the target area may be considered to be a texture detail area, and S504 is executed.
图像中不同类型的区域在进行去噪时的侧重点有所不同,对于纹理细节区域,在去噪的同时,更需要保留图像中的细节信息,因此,去噪强度不宜过大。而对于平坦区域,细节信息并不不多,因此,可以着重进行去噪。Different types of regions in the image have different emphases when denoising. For texture detail regions, it is more necessary to retain the detail information in the image while denoising, so the denoising intensity should not be too large. For flat regions, there is not much detail information, so denoising can be focused on.
在判断目标区域究竟属于平坦区域,还是属于纹理细节区域时,仍参见图2所示,具体步骤如下:When determining whether the target area is a flat area or a texture detail area, still referring to FIG. 2 , the specific steps are as follows:
步骤一:确定目标区域中的中心图像块A4、领域图像块A0、A1、A2、A3、A5、A6、A7、A8的像素值;Step 1: Determine the pixel values of the central image block A 4 and the area image blocks A 0 , A 1 , A 2 , A 3 , A 5 , A 6 , A 7 , and A 8 in the target area;
步骤二:在上述9个像素值中,选出最大像素值max_val和最小像素值min_val;Step 2: Select the maximum pixel value max_val and the minimum pixel value min_val from the above 9 pixel values;
步骤三:计算最大像素值max_val与最小像素值min_val的差值diff=max_val-min_val;Step 3: Calculate the difference between the maximum pixel value max_val and the minimum pixel value min_val, diff=max_val-min_val;
步骤四:将差值diff与预设值diff_threshold进行对比;若差值小于预设值,即diff<diff_threshold,则确定目标区域为平坦区域;若差值大于或等于预设值,即diff≥diff_threshold,则确定目标区域为纹理细节区域。Step 4: Compare the difference diff with the preset value diff_threshold; if the difference is less than the preset value, that is, diff<diff_threshold, the target area is determined to be a flat area; if the difference is greater than or equal to the preset value, that is, diff≥diff_threshold, the target area is determined to be a texture detail area.
上述判断目标区域类型的方式简单便捷。当然,还可以采用其它方式确定目标区域是属于平坦区域还是属于纹理细节区域,对于具体的判断方式,此处不做限定。The above method for determining the type of the target region is simple and convenient. Of course, other methods can also be used to determine whether the target region is a flat region or a texture detail region, and the specific determination method is not limited here.
在中心图像块中,并不会只包含一个像素点,一般会包含多个像素点。中心图像块中包含有多少个像素点,就存在有多少个中心像素点。同样的,在邻域图像块中,并不会只包含一个像素点,也会包含多个像素点,并且邻域图像块中像素点的数量和分布一般与中心图像块中的像素点相同。因此,邻域图像块中包含有多少个像素点,就存在有多少个邻域像素点。The central image block does not contain only one pixel, but generally contains multiple pixels. There are as many central pixels as there are pixels in the central image block. Similarly, the neighborhood image block does not contain only one pixel, but also contains multiple pixels, and the number and distribution of pixels in the neighborhood image block are generally the same as those in the central image block. Therefore, there are as many neighborhood pixels as there are pixels in the neighborhood image block.
S504:计算多个中心像素点与对应像素位置的邻域像素点的像素差。S504: Calculate pixel differences between a plurality of central pixels and neighboring pixels at corresponding pixel positions.
也就是说,当目标区域为纹理细节区域时,需要考虑到图像的细节保留。因此,在计算中心图像块与邻域图像块的距离时,需要计算中心图像块中每个中心像素点与邻域图像块中对应像素位置的邻域像素点的像素差。至于为何通过计算中心图像块中每个中心像素点与邻域图像块中对应像素位置的邻域像素点的像素差,进而在对中心图像块去噪时,能够保留中心图像块中的纹理细节信息,具体原因将在后文(切比雪夫公式之处)解释。That is to say, when the target area is a texture detail area, it is necessary to consider the image detail preservation. Therefore, when calculating the distance between the central image block and the neighboring image block, it is necessary to calculate the pixel difference between each central pixel point in the central image block and the neighboring pixel points at the corresponding pixel position in the neighboring image block. As for why the texture detail information in the central image block can be retained when the central image block is denoised by calculating the pixel difference between each central pixel point in the central image block and the neighboring pixel points at the corresponding pixel position in the neighboring image block, the specific reason will be explained later (in the Chebyshev formula).
图7为本申请实施例中某一个邻域图像块与中心图像块的示意图,参见图7所示,在该邻域图像块中,包含有9个像素点,分别是邻域像素点q0、q1、q2、q3、q4、q5、q6、q7、q8。在中心图像块中,包含有9个像素点,分别是中心像素点p0、p1、p2、p3、p4、p5、p6、p7、p8。在计算该邻域图像块与中心图像块的距离时,由于其所处的目标区域为纹理细节区域,因此,需要计算中心图像块中每个中心像素点与邻域图像块中对应像素位置的邻域像素点的像素差。即,计算p0-q0、p1-q1、p2-q2、p3-q3、p4-q4、p5-q5、p6-q6、p7-q7、p8-q8。FIG7 is a schematic diagram of a neighborhood image block and a central image block in an embodiment of the present application. Referring to FIG7 , in the neighborhood image block, there are 9 pixels, namely, neighborhood pixel points q 0 , q 1 , q 2 , q 3 , q 4 , q 5 , q 6 , q 7 , q 8 . In the central image block, there are 9 pixels, namely, center pixel points p 0 , p 1 , p 2 , p 3 , p 4 , p 5 , p 6 , p 7 , p 8 . When calculating the distance between the neighborhood image block and the central image block, since the target area in which the neighborhood image block is located is a texture detail area, it is necessary to calculate the pixel difference between each center pixel in the central image block and the neighborhood pixel at the corresponding pixel position in the neighborhood image block. That is, p 0 -q 0 , p 1 -q 1 , p 2 -q 2 , p 3 -q 3 , p 4 -q 4 , p 5 -q 5 , p 6 -q 6 , p 7 -q 7 , and p 8 -q 8 are calculated.
S505:计算N个中心像素点与对应像素位置的邻域像素点的像素差。S505: Calculate pixel differences between N central pixels and neighboring pixels at corresponding pixel positions.
其中,N的数值小于中心图像块中的中心像素点的总数量。The value of N is smaller than the total number of central pixels in the central image block.
也就是说,当目标区域为平坦区域时,可以无需过多的考虑图像的细节保留,重心可以侧重于去噪。因此,在计算中心图像块与邻域图像块的距离时,计算中心图像块中有限个中心像素点与邻域图像块中对应像素位置的邻域像素点的像素差即可。至于为何通过计算中心图像块中有限个中心像素点与邻域图像块中对应像素位置的邻域像素点的像素差,能够较好地对中心图像块进行去噪,具体原因将在后文(切比雪夫公式之处)解释。That is to say, when the target area is a flat area, there is no need to consider the image details too much, and the focus can be on denoising. Therefore, when calculating the distance between the central image block and the neighboring image block, it is sufficient to calculate the pixel difference between the finite number of central pixels in the central image block and the neighboring pixels at the corresponding pixel positions in the neighboring image blocks. As for why the central image block can be better denoised by calculating the pixel difference between the finite number of central pixels in the central image block and the neighboring pixels at the corresponding pixel positions in the neighboring image blocks, the specific reason will be explained later (in the Chebyshev formula).
仍参见图7所示,在计算邻域图像块与中心图像块的距离时,由于其所处的目标区域为平坦区域,因此,可以计算中心图像块中若干个中心像素点与邻域图像块中对应像素位置的邻域像素点的像素差即可。例如:计算p1-q1、p3-q3、p4-q4、p5-q5、p7-q7。Still referring to FIG. 7 , when calculating the distance between the neighborhood image block and the central image block, since the target area in which it is located is a flat area, the pixel difference between several central pixels in the central image block and the neighborhood pixels at the corresponding pixel positions in the neighborhood image block can be calculated. For example: calculate p 1 -q 1 , p 3 -q 3 , p 4 -q 4 , p 5 -q 5 , p 7 -q 7 .
具体从中心图像块中选择哪些中心像素点,可以有多种不同的选择,此处不做限定。There are many different options for selecting which central pixels to select from the central image block, which are not limited here.
图8为本申请实施例中几种像素位置模板的示意图一,参见图8所示,以图像块包含9个像素点,即3×3为例。在8a中,选择的是图像块中所有的像素点(阴影所在的像素点)都参与距离运算。8a适用于步骤S504。在8b和8c中,选择的是图像块中部分的像素点(阴影所在的像素点)参与距离运算。8b和8c适用于步骤S505。FIG8 is a schematic diagram of several pixel position templates in an embodiment of the present application. Referring to FIG8 , an image block containing 9 pixels, i.e., 3×3, is taken as an example. In 8a, all pixels in the image block (pixels where the shadows are located) are selected to participate in the distance calculation. 8a is applicable to step S504. In 8b and 8c, some pixels in the image block (pixels where the shadows are located) are selected to participate in the distance calculation. 8b and 8c are applicable to step S505.
当然,参与运算的部分像素点的位置不仅限于8b和8c,还可以是其它位置的组合,例如:四个顶角的像素点、第一列的3个像素点等。Of course, the positions of some of the pixels involved in the calculation are not limited to 8b and 8c, but may also be a combination of other positions, such as: pixels at four corners, 3 pixels in the first column, and so on.
S506:从至少一个中心像素点与对应像素位置的邻域像素点的像素差中确定出像素差最大的目标像素差,并将目标像素差作为邻域图像块与中心图像块的距离。S506: Determine a target pixel difference with the largest pixel difference from pixel differences between at least one central pixel point and neighboring pixel points at corresponding pixel positions, and use the target pixel difference as the distance between the neighboring image block and the central image block.
在现有技术中,采用的是欧氏距离计算邻域图像块与中心图像块的距离。而在欧式距离中,涉及到较多的乘法。例如:仍参见图2和图3所示,为了计算邻域图像块A0与中心图像块A4的距离,需要分别计算邻域像素点q0与中心像素点p0的欧式距离,计算邻域像素点q1与中心像素点p1的欧式距离,……,计算邻域像素点q8与中心像素点p8的欧式距离,这就涉及到了9次乘法运算。而在目标区域Y1中,一共有8个领域图像块,即邻域图像块A0、A1、A2、A3、A5、A6、A7、A8。这样,就总共涉及到了9×8=72次的乘法运算。这还仅仅只是计算图像X的一个区域中邻域图像块与中心图像块的距离,图像X中还有多个这样的区域,乘法的运算量可谓是巨大的。In the prior art, the Euclidean distance is used to calculate the distance between the neighborhood image block and the center image block. In the Euclidean distance, more multiplications are involved. For example, referring to Figures 2 and 3, in order to calculate the distance between the neighborhood image block A0 and the center image block A4 , it is necessary to calculate the Euclidean distance between the neighborhood pixel point q0 and the center pixel point p0 , the Euclidean distance between the neighborhood pixel point q1 and the center pixel point p1 , ..., the Euclidean distance between the neighborhood pixel point q8 and the center pixel point p8 , which involves 9 multiplication operations. In the target area Y1 , there are a total of 8 domain image blocks, namely, the neighborhood image blocks A0 , A1 , A2 , A3 , A5 , A6 , A7 , A8 . In this way, a total of 9×8=72 multiplication operations are involved. This is just calculating the distance between the neighborhood image block and the central image block in a region of image X. There are multiple such regions in image X, and the amount of multiplication operations is huge.
为了简化距离的运算量,在本申请实施例中,放弃使用欧式距离,而采用切比雪夫距离(Chebyshev Distance)来近似估计欧式距离。也就是说,从上述计算出的多个中心像素点与对应像素位置的邻域像素点的像素差中,选择出一个数值最大的像素差,作为邻域图像块与中心图像块的距离。具体计算公式如下式(4)所示:In order to simplify the distance calculation, in the embodiment of the present application, the Euclidean distance is abandoned and the Chebyshev distance is used to approximate the Euclidean distance. That is to say, from the pixel differences between the multiple central pixels and the neighboring pixels of the corresponding pixel positions calculated above, a pixel difference with the largest value is selected as the distance between the neighboring image block and the central image block. The specific calculation formula is shown in the following formula (4):
dChebyshev=maxk|pk-qk| (4)d Chebyshev = max k | p k - q k | (4)
其中,dChebyshev表示切比雪夫距离,即邻域图像块与中心图像块的距离。p表示中心图像块,q表示邻域图像块,k表示图像块中的像素点的序号。Where d Chebyshev represents the Chebyshev distance, that is, the distance between the neighborhood image block and the central image block. p represents the central image block, q represents the neighborhood image block, and k represents the sequence number of the pixel in the image block.
在这里,基于欧式距离与切比雪夫距离的计算公式,可以得出两者之间的关系如下式(5)所示:Here, based on the calculation formula of Euclidean distance and Chebyshev distance, the relationship between the two can be obtained as shown in the following formula (5):
其中,i表示图像块。Where i represents an image block.
假设噪声服从高斯分布,那么在图像的平坦区域,上述得到的9个像素差|pk-qk|中,大多数值都是远小于dChebyshev的,可以近似如下式(6)所示:Assuming that the noise follows a Gaussian distribution, in the flat area of the image, most of the values of the 9 pixel differences |p k -q k | obtained above are much smaller than d Chebyshev , which can be approximated as shown in the following equation (6):
也就是说,采用切比雪夫距离近似代替欧式距离,用以确定邻域图像块与中心图像块的距离,误差并不大,并不会降低去噪的精准性。In other words, the Chebyshev distance is used to approximate the Euclidean distance to determine the distance between the neighborhood image block and the central image block. The error is not large and does not reduce the accuracy of denoising.
并且,由切比雪夫距离的计算公式可知,图像块之间的距离取决于像素差最大的像素位置。而参与计算的像素越少,图像块距离取得较小值的机会就越大,得到的权重就会越大,进而降噪强度就更大一些。因此,可以在平坦区域内,选取图像块中的部分像素点进行距离运算,得到的图像块距离就会相对较小,相应的权重就会相对较大,进而达到较好的降噪效果。而在细节纹理区域内,则选取图像块中的全部像素点进行距离运算,得到的图像块距离就会相对较大,相应的权重就会相对较小,进而避免较大程度地降噪,以确保图像块中的纹理细节不丢失。可见,本申请实施例提供的图像处理方法,不仅能够降低计算的复杂度,进而降低硬件电路的成本,还能够在去噪与保留纹理信息之间取得平衡,进而得到更好的画质。Moreover, it can be known from the calculation formula of Chebyshev distance that the distance between image blocks depends on the pixel position with the largest pixel difference. The fewer pixels involved in the calculation, the greater the chance that the image block distance will obtain a smaller value, the larger the weight obtained, and the greater the noise reduction intensity. Therefore, in the flat area, some pixels in the image block can be selected for distance calculation, and the image block distance obtained will be relatively small, and the corresponding weight will be relatively large, thereby achieving a better noise reduction effect. In the detailed texture area, all pixels in the image block are selected for distance calculation, and the image block distance obtained will be relatively large, and the corresponding weight will be relatively small, thereby avoiding a large degree of noise reduction to ensure that the texture details in the image block are not lost. It can be seen that the image processing method provided by the embodiment of the present application can not only reduce the complexity of calculation, thereby reducing the cost of hardware circuits, but also can strike a balance between denoising and retaining texture information, thereby obtaining better image quality.
S507:基于邻域图像块与中心图像块的距离确定邻域图像块的索引号。S507: Determine the index number of the neighborhood image block based on the distance between the neighborhood image block and the central image block.
相比于欧式距离的平方,切比雪夫的距离的取值范围就要小很多,也就是说,切比雪夫距离的取值范围是有限的。因此,可以事先计算出所能够预见的所有的切比雪夫距离,进而分别计算各个切比雪夫距离对应的权重,以便于在得到邻域图像块与中心图像块的距离后,直接基于得到的距离获取相应的权重,以查找替代指数计算。Compared with the square of the Euclidean distance, the range of Chebyshev distance is much smaller, that is, the range of Chebyshev distance is limited. Therefore, all foreseeable Chebyshev distances can be calculated in advance, and then the weights corresponding to each Chebyshev distance can be calculated respectively, so that after obtaining the distance between the neighborhood image block and the central image block, the corresponding weight can be directly obtained based on the obtained distance to find the alternative index calculation.
而为了进一步减小预设表的长度,在预设表中,可以不保存距离与权重的对应关系,而是保存索引号与权重的对应关系。在得到邻域图像块与中心图像块的距离后,通过索引公式计算出距离对应的索引号,进而在预设表中根据索引号查找出距离对应的权重。In order to further reduce the length of the preset table, the corresponding relationship between the distance and the weight may not be saved in the preset table, but the corresponding relationship between the index number and the weight may be saved. After obtaining the distance between the neighborhood image block and the central image block, the index number corresponding to the distance is calculated by the index formula, and then the weight corresponding to the distance is found in the preset table according to the index number.
具体来说,在得到邻域图像块与中心图像块的距离后,首先,将邻域图像块与中心图像块的距离与预设距离相减,得到距离差。其中,预设距离基于获取图像数据的图像传感器的噪声标准差和用户输入的降噪强度确定。然后,按照预设位数右移距离差,得到邻域图像块的索引号,其中,预设位数基于噪声标准差和预设表的最大长度确定。索引公式具体可以如下式(7)所示:Specifically, after obtaining the distance between the neighborhood image block and the central image block, first, the distance between the neighborhood image block and the central image block is subtracted from the preset distance to obtain the distance difference. The preset distance is determined based on the noise standard deviation of the image sensor that acquires the image data and the noise reduction strength input by the user. Then, the distance difference is right-shifted according to the preset number of bits to obtain the index number of the neighborhood image block, wherein the preset number of bits is determined based on the noise standard deviation and the maximum length of the preset table. The index formula can be specifically shown as follows (7):
idx=(dChebyshev- dthr)>>rshift (7)idx=(d Chebyshev - d thr )>>rshift (7)
其中,idx表示索引号,dChebyshev表示切比雪夫距离, beta表示降噪强度,可以是用户输入的,用户通过输入beta,能够调整图像的降噪强度,σ表示噪声的标准差,>>rshift表示右移预设位数,这里右移的是像素值的位数,rshift是用来减小索引的取值范围的,可以根据噪声标准差和预设表的最大长度确定。Among them, idx represents the index number, d Chebyshev represents the Chebyshev distance, beta represents the noise reduction strength and can be input by the user. The user can adjust the noise reduction strength of the image by inputting beta. σ represents the standard deviation of the noise. >>rshift represents right shifting by a preset number of bits. Here, the bits of the pixel value are shifted right. rshift is used to reduce the value range of the index and can be determined based on the noise standard deviation and the maximum length of the preset table.
举例来说,假设dthr=110010,rshift=4。在确定dChebyshev=1100100后,根据索引公式,1100100-110010=110010,再将110010右移4位,得到11。11就是1100100对应的索引号。For example, assuming that d thr = 110010, rshift = 4. After determining that d Chebyshev = 1100100, according to the index formula, 1100100-110010=110010, 110010 is shifted right by 4 bits to obtain 11. 11 is the index number corresponding to 1100100.
S508:从预设表中查找出邻域图像块的索引号对应的权重。S508: Find out the weight corresponding to the index number of the neighborhood image block from a preset table.
图9为本申请实施例中预设表的示意图二,参见图9所示,在预设表中,保存有索引号idx1、idx2、……、idxn及其对应的权重w1、w2、……、wn。在获得邻域图像块的索引号idx2后,通过预设表,就能够查找出邻域图像块的权重为w2。FIG9 is a second schematic diagram of a preset table in an embodiment of the present application. Referring to FIG9 , the preset table stores index numbers idx 1 , idx 2 , ..., idx n and their corresponding weights w 1 , w 2 , ..., w n . After obtaining the index number idx 2 of the neighborhood image block, the weight of the neighborhood image block can be found to be w 2 through the preset table.
由于预设表中保存的索引号及其对应的权重是事先计算好的,因此,在对图像进行降噪处理之前,需要先准备好预设表中的各权重。权重的具体计算步骤如下:Since the index numbers and their corresponding weights saved in the preset table are calculated in advance, before performing noise reduction on the image, it is necessary to prepare the weights in the preset table. The specific steps for calculating the weights are as follows:
步骤一:采用高斯函数计算不同距离对应的初始权重。Step 1: Use Gaussian function to calculate the initial weights corresponding to different distances.
步骤二:基于用户输入的降噪强度调整初始权重,得到不同距离对应的权重,并存储在预设表中。Step 2: Adjust the initial weight based on the noise reduction strength input by the user, obtain the weights corresponding to different distances, and store them in a preset table.
实际上,在计算距离对应的权重时,上述步骤一和步骤二可以是同时进行的。即,将降噪强度引入高斯函数,进而通过引入降噪强度的高斯函数计算各距离对应的权重。具体计算公式如下式(8)所示:In fact, when calculating the weight corresponding to the distance, the above steps 1 and 2 can be performed simultaneously. That is, the noise reduction strength is introduced into the Gaussian function, and then the weight corresponding to each distance is calculated by introducing the Gaussian function of the noise reduction strength. The specific calculation formula is shown in the following formula (8):
其中,w表示权重,i表示邻域图像块,dChebyshev表示邻域图像块与中心图像块的切比雪夫距离,beta表示用户输入的降噪强度,σ表示噪声的标准差,h表示滤波系数。Where w represents the weight, i represents the neighborhood image block, d Chebyshev represents the Chebyshev distance between the neighborhood image block and the central image block, beta represents the noise reduction strength input by the user, σ represents the standard deviation of the noise, and h represents the filter coefficient.
S509:基于邻域图像块的权重、邻域图像块的像素值、中心图像块的权重以及中心图像块的像素值对中心图像块中的像素进行滤波处理。S509: Filtering the pixels in the central image block based on the weights of the neighboring image blocks, the pixel values of the neighboring image blocks, the weight of the central image block, and the pixel values of the central image block.
在获得各邻域图像块的权重后,结合各邻域图像块的像素值、中心图像块的权重(默认为1)以及中心图像块的像素值,采用加权平均的计算方式,就能够对中心图像块的中心像素点进行滤波处理了。具体的计算方式已在上述步骤S104中详细说明,此处不再赘述。After obtaining the weights of each neighborhood image block, the pixel values of each neighborhood image block, the weight of the center image block (default is 1) and the pixel value of the center image block are combined, and a weighted average calculation method is adopted to filter the center pixel of the center image block. The specific calculation method has been described in detail in the above step S104 and will not be repeated here.
以上都是针对中心图像块的中心像素点进行滤波处理进行说明的,即图3中的像素点p4。然而,本申请实施例提供的图像处理方法并不仅仅针对中心图像块的中心像素点进行滤波处理,也可以针对中心图像块内任意位置的像素点进行滤波处理,甚至可以针对中心图像块内的多个像素点同时进行滤波处理。整体的处理过程可以参见上述步骤S501-S509。下面仅对不同之处进行说明。The above are all explanations of filtering processing for the central pixel point of the central image block, that is, the pixel point p 4 in Figure 3. However, the image processing method provided in the embodiment of the present application does not only perform filtering processing on the central pixel point of the central image block, but can also perform filtering processing on the pixel point at any position in the central image block, and can even perform filtering processing on multiple pixel points in the central image block at the same time. The overall processing process can be referred to the above steps S501-S509. Only the differences are described below.
图10为本申请实施例中各图像块的示意图三,参见图10所示,滑动窗口的大小为7×6。在该滑动窗口内,包含有像素点A0、B0、A1、B1、A2、B2、A3、B3、A4、B4、A5、B5、A6、B6、A7、B7、A8、B8及其周围没有标出的像素点。FIG10 is a third schematic diagram of each image block in an embodiment of the present application. Referring to FIG10 , the size of the sliding window is 7×6. The sliding window includes pixel points A 0 , B 0 , A 1 , B 1 , A 2 , B 2 , A 3 , B 3 , A 4 , B 4 , A 5 , B 5 , A 6 , B 6 , A 7 , B 7 , A 8 , B 8 and surrounding unmarked pixel points.
图11为本申请实施例中各图像块的示意图四,参见图11所示,当需要将图10滑动窗口内的图像划分成3×3的图像块时,各图像块的大小就是2×3。其中,各图像块在水平方向上无重叠,在垂直方向上存有1个像素的重叠。这样,A0、B0及其上下的4个像素就组成了一个图像块,以此类推,一共9个图像块。在这里9个图像块中,A4、B4及其上下的4个像素组成的就是中心图像块,为了便于称呼,可以称之为中心图像块A4B4。相应的,前述的中心图像块A4并不仅仅指中心图像块中仅存在一个像素A4,还包括其周围的8个像素。而A0、B0及其上下的4个像素、A1、B1及其上下的4个像素、……、A8、B8及其上下的4个像素就组成了8个相应的邻域图像块。FIG11 is a schematic diagram of each image block in an embodiment of the present application. Referring to FIG11 , when the image in the sliding window of FIG10 needs to be divided into 3×3 image blocks, the size of each image block is 2×3. Among them, each image block has no overlap in the horizontal direction and has an overlap of 1 pixel in the vertical direction. In this way, A 0 , B 0 and the 4 pixels above and below it constitute an image block, and so on, a total of 9 image blocks. Among the 9 image blocks here, A 4 , B 4 and the 4 pixels above and below it constitute the central image block, which can be referred to as the central image block A 4 B 4 for convenience. Correspondingly, the aforementioned central image block A 4 does not only refer to the existence of only one pixel A 4 in the central image block, but also includes the 8 pixels around it. And A 0 , B 0 and the 4 pixels above and below it, A 1 , B 1 and the 4 pixels above and below it, ..., A 8 , B 8 and the 4 pixels above and below it constitute 8 corresponding neighborhood image blocks.
在该滑动窗口内,可以同时对A4和B4进行滤波处理。具体计算公式如下式(9)、(10)所示:In this sliding window, A 4 and B 4 can be filtered at the same time. The specific calculation formulas are shown in the following equations (9) and (10):
其中,u(A4)和u(B4)分别表示滤波后的A4和B4的像素值,Ai和Bi分别表示A4、B4的所有邻域图像块的像素值,wi表示所有邻域图像块相对于A4、B4的权重,Ai和Bi采用相同的权重,这样能够节省计算量,C=∑wi,为权重归一化值。Among them, u( A4 ) and u( B4 ) represent the pixel values of A4 and B4 after filtering respectively, Ai and Bi represent the pixel values of all neighborhood image blocks of A4 and B4 respectively, w i represents the weights of all neighborhood image blocks relative to A4 and B4 , Ai and Bi use the same weights, which can save calculation amount, C = ∑wi is the weight normalization value.
图12为本申请实施例中几种像素位置模板的示意图二,参加图12所示。由于图11中划分出的像素块不是3×3的图像块,而是2×3的图像块,因此,在确定出目标区域属于平坦区域后,在计算目标区域中邻域图像块与中心图像块的距离时,采用的像素位置模板就会稍有变化,但是计算思想不变,仍是采用图像块中的部分像素点参与距离运算。在12a中,选择的是图像块中所有的像素点(阴影所在的像素点)都参与距离运算。12a适用于细节纹理区域中图像块的距离计算。在12b和12c中,选择的是图像块中部分的像素点(阴影所在的像素点)参与距离运算。12b和12c适用于平坦区域中图像块的距离计算。FIG12 is a second schematic diagram of several pixel position templates in an embodiment of the present application, as shown in FIG12 . Since the pixel blocks divided in FIG11 are not 3×3 image blocks, but 2×3 image blocks, after determining that the target area belongs to a flat area, when calculating the distance between the neighborhood image block and the central image block in the target area, the pixel position template used will change slightly, but the calculation idea remains unchanged, and some pixels in the image block are still used to participate in the distance calculation. In 12a, all pixels in the image block (pixels where the shadow is located) are selected to participate in the distance calculation. 12a is suitable for distance calculation of image blocks in detail texture areas. In 12b and 12c, some pixels in the image block (pixels where the shadow is located) are selected to participate in the distance calculation. 12b and 12c are suitable for distance calculation of image blocks in flat areas.
基于同一发明构思,作为上述方法的实现,本申请实施例还提供了一种图像处理装置。图13为本申请实施例中图像处理装置的结构示意图一,参见图13所示,该装置可以包括:Based on the same inventive concept, as an implementation of the above method, the present application embodiment further provides an image processing device. FIG13 is a structural schematic diagram of an image processing device in an embodiment of the present application. Referring to FIG13 , the device may include:
接收模块1301,用于获取图像的至少一个区域中的中心图像块和邻域图像块,所述邻域图像块与所述中心图像块相邻。The receiving module 1301 is configured to obtain a central image block and a neighborhood image block in at least one region of an image, wherein the neighborhood image block is adjacent to the central image block.
计算模块1302,用于计算所述邻域图像块与所述中心图像块的距离。The calculation module 1302 is used to calculate the distance between the neighborhood image block and the central image block.
查找模块1303,用于从预设表中查找出所述距离对应的权重,并作为所述邻域图像块的权重,所述预设表用于表征不同距离与权重的对应关系。The search module 1303 is used to search for the weight corresponding to the distance from a preset table and use it as the weight of the neighborhood image block. The preset table is used to characterize the corresponding relationship between different distances and weights.
滤波模块1304,用于基于所述邻域图像块的权重、所述邻域图像块的像素值、所述中心图像块的权重以及所述中心图像块的像素值对所述中心图像块中的像素进行滤波处理。The filtering module 1304 is used to perform filtering processing on the pixels in the central image block based on the weights of the neighborhood image blocks, the pixel values of the neighborhood image blocks, the weight of the central image block, and the pixel values of the central image block.
进一步地,作为图13所示装置的细化和扩展,本申请实施例还提供了一种图像处理装置。图14为本申请实施例中图像处理装置的结构示意图二,参见图14所示,该装置可以包括:Further, as a refinement and extension of the device shown in FIG13, the embodiment of the present application further provides an image processing device. FIG14 is a second structural schematic diagram of the image processing device in the embodiment of the present application. Referring to FIG14, the device may include:
存储模块1401,包括:The storage module 1401 includes:
第一计算单元1401a,用于采用高斯函数计算不同距离对应的初始权重。The first calculation unit 1401a is used to calculate initial weights corresponding to different distances by using a Gaussian function.
存储单元1401b,用于基于用户输入的降噪强度调整所述初始权重,得到不同距离对应的权重,并存储在所述预设表中。The storage unit 1401b is used to adjust the initial weight based on the noise reduction strength input by the user, obtain weights corresponding to different distances, and store them in the preset table.
第一确定模块1402,包括:The first determining module 1402 includes:
滑窗单元1402a,用于在所述图像中采用滑动窗口确定目标区域。The sliding window unit 1402a is used to determine the target area in the image using a sliding window.
填充单元1402b,用于当所述目标区域不完全位于所述图像内时,基于所述图像对所述目标区域中位于所述图像外的区域进行填充,得到填充后的所述至少一个区域。The filling unit 1402b is used to fill the area of the target area outside the image based on the image when the target area is not completely located in the image, so as to obtain the at least one filled area.
接收模块1403,用于获取图像的至少一个区域中的中心图像块和邻域图像块,所述邻域图像块与所述中心图像块相邻。The receiving module 1403 is configured to obtain a central image block and a neighborhood image block in at least one region of an image, wherein the neighborhood image block is adjacent to the central image block.
所述中心图像块包括多个中心像素点,所述邻域图像块包括多个邻域像素点。The central image block includes a plurality of central pixel points, and the neighborhood image block includes a plurality of neighborhood pixel points.
第二确定模块1404,包括:The second determining module 1404 includes:
第一确定单元1404a,用于确定所述中心图像块的像素值和所述邻域图像块的像素值。The first determining unit 1404a is configured to determine the pixel value of the central image block and the pixel value of the neighborhood image block.
选择单元1404b,用于从所述中心图像块的像素值和所述邻域图像块的像素值中选择出最大像素值和最小像素值。The selection unit 1404b is used to select the maximum pixel value and the minimum pixel value from the pixel values of the central image block and the pixel values of the neighborhood image blocks.
第二计算单元1404c,用于计算所述最大像素值与所述最小像素值的差值。The second calculating unit 1404c is used to calculate the difference between the maximum pixel value and the minimum pixel value.
第二确定单元1404d,用于当所述差值小于预设值时,确定所述至少一个区域为平坦区域;当所述差值大于或等于预设值时,确定所述至少一个区域为细节纹理区域。The second determining unit 1404d is configured to determine that the at least one region is a flat region when the difference is less than a preset value; and to determine that the at least one region is a detail texture region when the difference is greater than or equal to the preset value.
计算模块1405,包括:The computing module 1405 includes:
第三计算单元1405a,用于计算至少一个中心像素点与对应像素位置的邻域像素点的像素差。The third calculation unit 1405a is used to calculate the pixel difference between at least one central pixel point and the neighboring pixel points at the corresponding pixel position.
所述第三计算单元1405a,具体用于当所述至少一个区域为平坦区域时,计算N个中心像素点与对应像素位置的邻域像素点的像素差,所述N的数值小于所述中心图像块中的中心像素点的总数量;当所述至少一个区域为纹理细节区域时,计算所述多个中心像素点与对应像素位置的邻域像素点的像素差。The third calculation unit 1405a is specifically used to calculate the pixel differences between N central pixels and the neighborhood pixels of the corresponding pixel positions when the at least one area is a flat area, and the value of N is less than the total number of central pixels in the central image block; when the at least one area is a texture detail area, calculate the pixel differences between the multiple central pixels and the neighborhood pixels of the corresponding pixel positions.
第三确定单元1405b,用于从所述至少一个中心像素点与对应像素位置的邻域像素点的像素差中确定出像素差最大的目标像素差,并将所述目标像素差作为所述邻域图像块与所述中心图像块的距离。The third determining unit 1405b is used to determine a target pixel difference with the largest pixel difference from the pixel differences between the at least one central pixel point and the neighborhood pixel points at the corresponding pixel position, and use the target pixel difference as the distance between the neighborhood image block and the central image block.
所述预设表中包含有多个索引号与权重的对应关系,所述预设表中的一个索引号对应至少一个距离。The preset table contains a correspondence between multiple index numbers and weights, and one index number in the preset table corresponds to at least one distance.
查找模块1406,包括:The search module 1406 includes:
第四确定单元1406a,用于基于所述邻域图像块与所述中心图像块的距离确定所述邻域图像块的索引号。The fourth determining unit 1406a is configured to determine the index number of the neighborhood image block based on the distance between the neighborhood image block and the central image block.
所述第四确定单元1406a,具体用于将所述邻域图像块与所述中心图像块的距离与预设距离相减,得到距离差,所述预设距离基于获取所述图像数据的图像传感器的噪声标准差和用户输入的降噪强度确定;按照预设位数右移所述距离差,得到所述邻域图像块的索引号,所述预设位数基于所述噪声标准差和所述预设表的最大长度确定。The fourth determination unit 1406a is specifically used to subtract the distance between the neighborhood image block and the central image block from a preset distance to obtain a distance difference, where the preset distance is determined based on the noise standard deviation of the image sensor that obtains the image data and the noise reduction strength input by the user; right-shift the distance difference according to a preset number of bits to obtain an index number of the neighborhood image block, where the preset number of bits is determined based on the noise standard deviation and the maximum length of the preset table.
查找单元1406b,用于从所述预设表中查找出所述邻域图像块的索引号对应的权重。The searching unit 1406b is used to search the preset table for the weight corresponding to the index number of the neighborhood image block.
滤波模块1407,用于基于所述邻域图像块的权重、所述邻域图像块的像素值、所述中心图像块的权重以及所述中心图像块的像素值对所述中心图像块中的像素进行滤波处理。The filtering module 1407 is used to perform filtering processing on the pixels in the central image block based on the weights of the neighborhood image blocks, the pixel values of the neighborhood image blocks, the weight of the central image block, and the pixel values of the central image block.
并且,图14中示出了各模块以及模块中各单元之间的信号流向。In addition, FIG14 shows the signal flows between the modules and the units in the modules.
这里需要指出的是,以上装置实施例的描述,与上述方法实施例的描述是类似的,具有同方法实施例相似的有益效果。对于本申请装置实施例中未披露的技术细节,请参照本申请方法实施例的描述而理解。It should be noted here that the description of the above device embodiment is similar to the description of the above method embodiment, and has similar beneficial effects as the method embodiment. For technical details not disclosed in the device embodiment of the present application, please refer to the description of the method embodiment of the present application for understanding.
基于同一发明构思,本申请实施例还提供了一种电子设备。图15为本申请实施例中电子设备的结构示意图,参见图15所示,该电子设备可以包括:处理器1501、存储器1502、总线1503;其中,处理器1501、存储器1502通过总线1503完成相互间的通信;处理器1501用于调用存储器1502中的程序指令,以执行上述一个或多个实施例中的方法。Based on the same inventive concept, the embodiment of the present application also provides an electronic device. FIG15 is a schematic diagram of the structure of an electronic device in the embodiment of the present application. Referring to FIG15 , the electronic device may include: a processor 1501, a memory 1502, and a bus 1503; wherein the processor 1501 and the memory 1502 communicate with each other through the bus 1503; the processor 1501 is used to call the program instructions in the memory 1502 to execute the method in one or more of the above embodiments.
这里需要指出的是,以上电子设备实施例的描述,与上述方法实施例的描述是类似的,具有同方法实施例相似的有益效果。对于本申请电子设备实施例中未披露的技术细节,请参照本申请方法实施例的描述而理解。It should be noted that the description of the above electronic device embodiment is similar to the description of the above method embodiment, and has similar beneficial effects as the method embodiment. For technical details not disclosed in the electronic device embodiment of this application, please refer to the description of the method embodiment of this application for understanding.
基于同一发明构思,本申请实施例还提供了一种计算机可读存储介质,该存储介质可以包括:存储的程序;其中,在程序运行时控制存储介质所在设备执行上述一个或多个实施例中的方法。Based on the same inventive concept, an embodiment of the present application further provides a computer-readable storage medium, which may include: a stored program; wherein, when the program is running, the device where the storage medium is located is controlled to execute the method in one or more of the above embodiments.
这里需要指出的是,以上存储介质实施例的描述,与上述方法实施例的描述是类似的,具有同方法实施例相似的有益效果。对于本申请存储介质实施例中未披露的技术细节,请参照本申请方法实施例的描述而理解。It should be noted here that the description of the above storage medium embodiment is similar to the description of the above method embodiment, and has similar beneficial effects as the method embodiment. For technical details not disclosed in the storage medium embodiment of the present application, please refer to the description of the method embodiment of the present application for understanding.
以上所述,仅为本申请的具体实施方式,但本申请的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本申请揭露的技术范围内,可轻易想到变化或替换,都应涵盖在本申请的保护范围之内。因此,本申请的保护范围应以所述权利要求的保护范围为准。The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.
Claims (9)
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202110828277.3A CN113643198B (en) | 2021-07-22 | 2021-07-22 | Image processing method, device, electronic device and storage medium |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202110828277.3A CN113643198B (en) | 2021-07-22 | 2021-07-22 | Image processing method, device, electronic device and storage medium |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| CN113643198A CN113643198A (en) | 2021-11-12 |
| CN113643198B true CN113643198B (en) | 2024-07-16 |
Family
ID=78417959
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN202110828277.3A Active CN113643198B (en) | 2021-07-22 | 2021-07-22 | Image processing method, device, electronic device and storage medium |
Country Status (1)
| Country | Link |
|---|---|
| CN (1) | CN113643198B (en) |
Families Citing this family (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN114066765B (en) * | 2021-11-23 | 2025-08-26 | 上海闻泰信息技术有限公司 | Image denoising method, device, electronic device, medium and program product |
| CN114723620A (en) * | 2022-03-01 | 2022-07-08 | 北京奕斯伟计算技术有限公司 | An image processing method, device, electronic device and storage medium |
| CN115439347A (en) * | 2022-08-11 | 2022-12-06 | 广东技术师范大学 | Image denoising system, method, device and storage medium |
| CN116630179B (en) * | 2023-04-20 | 2025-07-25 | 浙江大华技术股份有限公司 | Image enhancement method, device and storage medium |
Citations (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN112435156A (en) * | 2020-12-08 | 2021-03-02 | 烟台艾睿光电科技有限公司 | Image processing method, device, equipment and medium based on FPGA |
Family Cites Families (8)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US9262810B1 (en) * | 2014-09-03 | 2016-02-16 | Mitsubishi Electric Research Laboratories, Inc. | Image denoising using a library of functions |
| US9489720B2 (en) * | 2014-09-23 | 2016-11-08 | Intel Corporation | Non-local means image denoising with detail preservation using self-similarity driven blending |
| WO2018134128A1 (en) * | 2017-01-19 | 2018-07-26 | Telefonaktiebolaget Lm Ericsson (Publ) | Filtering of video data using a shared look-up table |
| CN111784605B (en) * | 2020-06-30 | 2024-01-26 | 珠海全志科技股份有限公司 | Image noise reduction method based on region guidance, computer device and computer readable storage medium |
| CN111861938B (en) * | 2020-07-30 | 2022-08-30 | 展讯通信(上海)有限公司 | Image denoising method and device, electronic equipment and readable storage medium |
| CN111882504B (en) * | 2020-08-05 | 2022-08-16 | 展讯通信(上海)有限公司 | Method and system for processing color noise in image, electronic device and storage medium |
| CN112508810A (en) * | 2020-11-30 | 2021-03-16 | 上海云从汇临人工智能科技有限公司 | Non-local mean blind image denoising method, system and device |
| CN112884667B (en) * | 2021-02-04 | 2021-10-01 | 湖南兴芯微电子科技有限公司 | Bayer domain noise reduction method and noise reduction system |
-
2021
- 2021-07-22 CN CN202110828277.3A patent/CN113643198B/en active Active
Patent Citations (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN112435156A (en) * | 2020-12-08 | 2021-03-02 | 烟台艾睿光电科技有限公司 | Image processing method, device, equipment and medium based on FPGA |
Also Published As
| Publication number | Publication date |
|---|---|
| CN113643198A (en) | 2021-11-12 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| CN113643198B (en) | Image processing method, device, electronic device and storage medium | |
| TWI557686B (en) | Method and device for correcting image color deviation | |
| US7844127B2 (en) | Edge mapping using panchromatic pixels | |
| US8723879B2 (en) | Techniques for reducing noise while preserving contrast in an image | |
| US7822285B2 (en) | Methods and systems for locally adaptive image processing filters | |
| US8274583B2 (en) | Radially-based chroma noise reduction for cameras | |
| US20080240602A1 (en) | Edge mapping incorporating panchromatic pixels | |
| JP5983373B2 (en) | Image processing apparatus, information processing method, and program | |
| CN101669142A (en) | Techniques for adjusting the effect of applying kernels to a signal to achieve a desired effect on the signal | |
| CN109727216B (en) | Image processing method, device, terminal equipment and storage medium | |
| CN113674189B (en) | Image processing method, apparatus, electronic device, and computer-readable storage medium | |
| CN112541868B (en) | Image processing method, device, computer equipment and storage medium | |
| CN112384945B (en) | Super resolution using natural hand-held motion applied to user equipment | |
| CN111383186A (en) | Image processing method and device and terminal equipment | |
| CN102202162A (en) | Image processing apparatus, image processing method and program | |
| CN113132695B (en) | Lens shading correction method and device and electronic equipment | |
| US20150365612A1 (en) | Image capture apparatus and image compensating method thereof | |
| WO2019210707A1 (en) | Image sharpness evaluation method, device and electronic device | |
| CN114584700B (en) | Focus marking method, marking device and electronic equipment | |
| CN111354058A (en) | An image coloring method, device, image acquisition device and readable storage medium | |
| WO2019196109A1 (en) | Method and apparatus for suppressing image pseudo-colour | |
| CN115170581A (en) | Portrait segmentation model generation method, portrait segmentation model and portrait segmentation method | |
| CN115564694A (en) | Image processing method and device, computer-readable storage medium, and electronic device | |
| CN113766203B (en) | Image white balance processing method | |
| CN111340714B (en) | Moire pattern processing method and device and electronic equipment |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| PB01 | Publication | ||
| PB01 | Publication | ||
| SE01 | Entry into force of request for substantive examination | ||
| SE01 | Entry into force of request for substantive examination | ||
| CB02 | Change of applicant information | ||
| CB02 | Change of applicant information |
Address after: Room 263, block B, science and technology innovation center, 128 Shuanglian Road, Haining Economic Development Zone, Haining City, Jiaxing City, Zhejiang Province, 314400 Applicant after: Haining yisiwei IC Design Co.,Ltd. Applicant after: Beijing ESWIN Computing Technology Co.,Ltd. Address before: Room 263, block B, science and technology innovation center, 128 Shuanglian Road, Haining Economic Development Zone, Haining City, Jiaxing City, Zhejiang Province, 314400 Applicant before: Haining yisiwei IC Design Co.,Ltd. Applicant before: Beijing yisiwei Computing Technology Co.,Ltd. |
|
| GR01 | Patent grant | ||
| GR01 | Patent grant | ||
| CB02 | Change of applicant information | ||
| CB02 | Change of applicant information |
Country or region after: China Address after: 314400 Building 1, Juanhu Science and Technology Innovation Park, No. 500 Shuiyueting East Road, Xiashi Street, Haining City, Jiaxing City, Zhejiang Province (self declared) Applicant after: Haining Yisiwei Computing Technology Co.,Ltd. Applicant after: Beijing ESWIN Computing Technology Co.,Ltd. Address before: Room 263, block B, science and technology innovation center, 128 Shuanglian Road, Haining Economic Development Zone, Haining City, Jiaxing City, Zhejiang Province, 314400 Applicant before: Haining yisiwei IC Design Co.,Ltd. Country or region before: China Applicant before: Beijing ESWIN Computing Technology Co.,Ltd. |