CN106920217A - The method and device of image flame detection - Google Patents

The method and device of image flame detection Download PDF

Info

Publication number
CN106920217A
CN106920217A CN201510996333.9A CN201510996333A CN106920217A CN 106920217 A CN106920217 A CN 106920217A CN 201510996333 A CN201510996333 A CN 201510996333A CN 106920217 A CN106920217 A CN 106920217A
Authority
CN
China
Prior art keywords
corrected
pixel value
phase point
pixel
correction
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.)
Granted
Application number
CN201510996333.9A
Other languages
Chinese (zh)
Other versions
CN106920217B (en
Inventor
朱洪波
张玉光
彭晓峰
王浩
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Spreadtrum Communications Shanghai Co Ltd
Original Assignee
Spreadtrum Communications Shanghai Co Ltd
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 Spreadtrum Communications Shanghai Co Ltd filed Critical Spreadtrum Communications Shanghai Co Ltd
Priority to CN201510996333.9A priority Critical patent/CN106920217B/en
Publication of CN106920217A publication Critical patent/CN106920217A/en
Application granted granted Critical
Publication of CN106920217B publication Critical patent/CN106920217B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/77Retouching; Inpainting; Scratch removal
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/10Image acquisition modality
    • G06T2207/10024Color image
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/30Subject of image; Context of image processing
    • G06T2207/30168Image quality inspection

Landscapes

  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Color Television Image Signal Generators (AREA)

Abstract

一种图像矫正的方法及装置,所述方法包括:获取原始图像中当前待矫正相位点的第一像素值;确定所述当前待矫正相位点对应的矫正倍数;将所述第一像素值与所述矫正倍数的乘积作为所述当前待矫正相位点的矫正像素值。上述方案可以提高获得正确输出图像的概率。

A method and device for image correction, the method comprising: acquiring a first pixel value of a current phase point to be corrected in an original image; determining a correction multiple corresponding to the current phase point to be corrected; combining the first pixel value with The product of the correction multiple is used as the corrected pixel value of the current phase point to be corrected. The above scheme can improve the probability of obtaining a correct output image.

Description

图像矫正的方法及装置Method and device for image correction

技术领域technical field

本发明涉及图像处理技术领域,特别是涉及一种图像矫正的方法及装置。The invention relates to the technical field of image processing, in particular to an image correction method and device.

背景技术Background technique

随着相机对焦技术的不断发展,对焦技术已由手动对焦发展到现在的自动对焦。自动对焦中有一种对焦方式称为相位对焦(Phase Detection AutoFocus,PDAF),为了实现相位对焦,某些图像像素点的输入光被遮挡一部分,这些像素点称为相位像素或相位点(本文中称为相位点),左半部分被遮挡的像素点称为左相位点,右半部被遮挡的像素点称为右相位点。With the continuous development of camera focus technology, focus technology has developed from manual focus to the current automatic focus. There is a focusing method in autofocus called Phase Detection AutoFocus (PDAF). In order to achieve phase focusing, the input light of some image pixels is partially blocked, and these pixels are called phase pixels or phase points (called phase points in this paper). is the phase point), the pixel that is blocked in the left half is called the left phase point, and the pixel that is blocked in the right half is called the right phase point.

相位对焦方式中,相位点的部分入射光线被遮挡,这会对最终的图像输出产生明显的影像,体现为相位点和其周围像素点偏暗或偏亮,或出现伪彩色。因此,需要对相位点的像素值进行矫正,以获得正确的输出图像。In the phase focusing method, part of the incident light at the phase point is blocked, which will produce obvious images in the final image output, which is reflected in the phase point and its surrounding pixels being darker or brighter, or false colors appear. Therefore, it is necessary to correct the pixel value of the phase point to obtain a correct output image.

现有矫正相位点像素值的方法中,通常是将该相位点作为坏点来矫正,使得该相位点的像素值几乎完全被丢掉,使得成像时用于计算的参考像素值数据较少,出错几率高,换言之,获得正确的输出图像的概率较低。In the existing method of correcting the pixel value of a phase point, the phase point is usually corrected as a bad point, so that the pixel value of the phase point is almost completely lost, so that the reference pixel value data used for calculation during imaging is less, and errors occur. The probability is high, in other words, the probability of getting the correct output image is low.

发明内容Contents of the invention

本发明解决的技术问题是提供一种图像矫正的方法及装置,以矫正相位点的像素值,从而提高获得正确输出图像的概率。The technical problem solved by the present invention is to provide an image correction method and device to correct the pixel value of the phase point, thereby increasing the probability of obtaining a correct output image.

为解决上述技术问题,本发明实施例提供一种图像矫正的方法,所述方法包括:In order to solve the above technical problems, an embodiment of the present invention provides an image correction method, the method comprising:

获取原始图像中当前待矫正相位点的第一像素值;Obtain the first pixel value of the current phase point to be corrected in the original image;

确定所述当前待矫正相位点对应的矫正倍数;Determine the correction multiple corresponding to the current phase point to be corrected;

将所述第一像素值与所述矫正倍数的乘积作为所述当前待矫正相位点的矫正像素值。The product of the first pixel value and the correction multiple is used as the corrected pixel value of the current phase point to be corrected.

可选地,所述矫正倍数通过以下方式确定:Optionally, the correction multiple is determined in the following manner:

让摄像头模组对指定场景成像,得到标定图像;Let the camera module image the specified scene to obtain the calibration image;

根据所述标定图像中与所述当前待矫正相位点具有同色滤镜的像素点的像素值,以及所述第一像素值计算所述矫正倍数。The correction factor is calculated according to the pixel value of the pixel having the same color filter as the current phase point to be corrected in the calibration image and the first pixel value.

可选地,所述指定场景为均匀光照下的平坦场景。Optionally, the specified scene is a flat scene under uniform illumination.

可选地,所述根据所述标定图像中与所述当前待矫正相位点具有同色滤镜的像素点的像素值,以及所述第一像素值计算所述矫正倍数,包括:Optionally, the calculating the correction multiple according to the pixel value of the pixel having the same color filter as the current phase point to be corrected in the calibration image and the first pixel value includes:

从所述标定图像中获取所述当前待矫正相位点的第二像素值;Acquiring the second pixel value of the current phase point to be corrected from the calibration image;

在所述当前待矫正相位点的第一邻域内,计算与所述当前待矫正相位点具有同色滤镜的像素点的像素值的平均值以作为第一平均值;In the first neighborhood of the current phase point to be corrected, calculate the average value of the pixel values of the pixels having the same color filter as the current phase point to be corrected as the first average value;

将所述第一平均值与所述第二像素值的商作为所述矫正倍数。The quotient of the first average value and the second pixel value is used as the correction factor.

可选地,所述图像矫正的方法还包括:Optionally, the image correction method also includes:

当所述当前待矫正相位点的滤镜颜色与第二邻域内同颜色通道的像素点的滤镜颜色不同时,参照所述第二邻域内所述同颜色通道的像素点的通道颜色与所述待矫正相位点的滤镜颜色的光谱相关性更新计算矫正像素值。When the filter color of the current phase point to be corrected is different from the filter color of the pixels of the same color channel in the second neighborhood, refer to the channel color of the pixels of the same color channel in the second neighborhood and the The spectral correlation of the filter color of the phase point to be corrected is updated to calculate the corrected pixel value.

可选地,所述参照第二邻域内所述同颜色通道的像素点的通道颜色与所述待矫正相位点的滤镜颜色的光谱相关性更新计算矫正像素值,包括:Optionally, updating and calculating the corrected pixel value with reference to the spectral correlation between the channel color of the pixel points of the same color channel in the second neighborhood and the filter color of the phase point to be corrected includes:

在所述当前待矫正相位点的第二邻域内,计算与所述当前待矫正相位点的颜色通道相同的像素点像素值的平均值,以作为第二平均值;In the second neighborhood of the current phase point to be corrected, calculate the average value of the pixel values of the pixels that are the same as the color channel of the current phase point to be corrected as the second average value;

在所述当前待矫正相位点的第二邻域内,计算与所述当前待矫正相位点的颜色滤镜相同的像素点的像素值的平均值,以作为第三平均值;In the second neighborhood of the current phase point to be corrected, calculate the average value of the pixel values of the pixel points with the same color filter as the current phase point to be corrected, as a third average value;

将所述第三平均值与所述第二平均值之差作为所述光谱相关性;using the difference between the third average value and the second average value as the spectral correlation;

将所述矫正像素值与所述光谱相关性做差,以更新所述矫正像素值。The corrected pixel value is subtracted from the spectral correlation to update the corrected pixel value.

可选地,所述图像矫正的方法,还包括:Optionally, the image correction method also includes:

将所述待矫正相位点的矫正像素值与所述第二邻域内具有相同颜色通道的像素点的像素值进行高斯滤波,并使用高斯滤波的结果更新所述矫正像素值。Gaussian filtering is performed on the corrected pixel value of the phase point to be corrected and the pixel values of the pixel points with the same color channel in the second neighborhood, and the corrected pixel value is updated using the result of Gaussian filtering.

可选地,所述原始图像为拜耳图像。Optionally, the original image is a Bayer image.

本发明实施例还提供一种图像矫正的装置,包括:An embodiment of the present invention also provides an image correction device, including:

第一像素值获取单元,适于获取原始图像中当前待矫正相位点的第一像素值;The first pixel value acquisition unit is adapted to acquire the first pixel value of the current phase point to be corrected in the original image;

矫正倍数确定单元,适于确定所述当前待矫正相位点对应的矫正倍数;A correction multiple determination unit, adapted to determine the correction multiple corresponding to the current phase point to be corrected;

矫正像素值计算单元,适于将所述第一像素值与所述矫正倍数的乘积作为所述当前待矫正相位点的矫正像素值。The corrected pixel value calculation unit is adapted to use the product of the first pixel value and the correction multiple as the corrected pixel value of the current phase point to be corrected.

可选地,所述矫正倍数确定单元,包括:Optionally, the correction multiple determination unit includes:

标定图像获取子单元,适于获取摄像头模组对指定场景成像后得到的标定图像;The calibration image acquisition subunit is adapted to acquire the calibration image obtained after the camera module images a specified scene;

矫正倍数计算子单元,适于根据所述标定图像中与所述当前待矫正相位点具有同色滤镜的像素点的像素值,以及所述第一像素值计算所述矫正倍数。The correction multiple calculation subunit is adapted to calculate the correction multiple according to the pixel value of the pixel in the calibration image having the same color filter as the current phase point to be corrected and the first pixel value.

可选地,所述指定场景为均匀光照下的平坦场景。Optionally, the specified scene is a flat scene under uniform illumination.

可选地,所述矫正倍数计算子单元,包括:Optionally, the correction multiple calculation subunit includes:

第二像素值获取模块,适于从所述标定图像中获取所述当前待矫正相位点的第二像素值;A second pixel value acquisition module, adapted to acquire the second pixel value of the current phase point to be corrected from the calibration image;

第一平均值计算子模块,适于在所述当前待矫正相位点的第一邻域内,计算与所述当前待矫正相位点具有同色滤镜的像素点的像素值的平均值以作为第一平均值;The first average value calculation sub-module is adapted to calculate the average value of the pixel values of the pixels having the same color filter as the current phase point to be corrected in the first neighborhood of the current phase point to be corrected as the first average value;

矫正倍数计算子模块,适于将所述第一平均值与所述第二像素值的商作为所述矫正倍数。The correction factor calculation sub-module is adapted to use the quotient of the first average value and the second pixel value as the correction factor.

可选地,所述图像矫正的装置,还包括:Optionally, the image correction device also includes:

矫正像素值修正单元,适于当所述当前待矫正相位点的滤镜颜色与第二邻域内同颜色通道的像素点的滤镜颜色不同时,参照所述第二邻域内所述同颜色通道的像素点的通道颜色与所述待矫正相位点的滤镜颜色的光谱相关性更新计算矫正像素值。The correction pixel value correction unit is adapted to refer to the same color channel in the second neighborhood when the filter color of the current phase point to be corrected is different from the filter color of the pixel points of the same color channel in the second neighborhood The spectral correlation between the channel color of the pixel point and the filter color of the phase point to be corrected is updated to calculate the corrected pixel value.

可选地,所述矫正像素值修正单元包括:Optionally, the corrected pixel value correction unit includes:

第二平均值计算子单元,适于在所述当前待矫正相位点的第二邻域内,计算与所述当前待矫正相位点的颜色通道相同的像素点像素值的平均值,以作为第二平均值;The second average value calculation subunit is adapted to calculate the average value of the pixel values of the pixels in the same color channel as the current phase point to be corrected in the second neighborhood of the current phase point to be corrected as the second average value;

第三平均值计算子单元,适于在所述当前待矫正相位点的第二邻域内,计算与所述当前待矫正相位点的颜色滤镜相同的像素点的像素值的平均值,以作为第三平均值;The third average calculation subunit is adapted to calculate the average value of the pixel values of the pixel points with the same color filter as the current phase point to be corrected in the second neighborhood of the current phase point to be corrected, as third average;

光谱相关性计算子单元,适于将所述第三平均值与所述第二平均值之差作为所述光谱相关性;a spectral correlation calculation subunit, adapted to use the difference between the third average value and the second average value as the spectral correlation;

矫正像素值修正子单元,适于将所述矫正像素值与所述光谱相关性做差,以更新所述矫正像素值。The corrected pixel value correction subunit is adapted to make a difference between the corrected pixel value and the spectral correlation, so as to update the corrected pixel value.

可选地,所述图像矫正的装置,还包括:Optionally, the image correction device also includes:

滤波单元,适于将所述待矫正相位的矫正像素值与所述第二领域内同颜色通道的像素点的像素值进行高斯滤波,并使用高斯滤波的结果更新所述矫正像素值。The filtering unit is adapted to perform Gaussian filtering on the corrected pixel value of the phase to be corrected and the pixel values of the same color channel in the second domain, and update the corrected pixel value using the Gaussian filtering result.

可选地,所述原始图像为拜耳图像。Optionally, the original image is a Bayer image.

与现有技术相比,本发明实施例的技术方案具有以下有益效果:Compared with the prior art, the technical solutions of the embodiments of the present invention have the following beneficial effects:

本发明实施例的技术方案通过获取原始图像中当前待矫正相位点的第一像素值,确定所述当前待矫正相位点对应的矫正倍数,将所述第一像素值与所述矫正倍数的乘积作为所述当前待矫正相位点的矫正像素值,从而可以在图像的后续处理过程中使用矫正后的相位点像素值来参与计算,进而避免现有技术中几乎丢掉相位点像素值的矫正方法造成的输出图像出错的问题,从而提高获得正确的输出图像的概率。The technical solution of the embodiment of the present invention obtains the first pixel value of the current phase point to be corrected in the original image, determines the correction multiple corresponding to the current phase point to be corrected, and calculates the product of the first pixel value and the correction multiple As the corrected pixel value of the current phase point to be corrected, the corrected phase point pixel value can be used to participate in the calculation in the subsequent processing of the image, thereby avoiding the correction method that almost loses the phase point pixel value in the prior art. The problem of the wrong output image, thereby improving the probability of obtaining the correct output image.

进一步地,本发明实施例的技术方案通过在当前待矫正相位点的滤镜颜色与第二邻域内同颜色通道的像素点的滤镜颜色不同时,参照所述第二邻域内所述同颜色通道的像素点的通道颜色与所述待矫正相位点的滤镜颜色的光谱相关性更新计算矫正像素值,使得矫正像素值的计算结果更加准确。Further, in the technical solution of the embodiment of the present invention, when the filter color of the current phase point to be corrected is different from the filter color of the pixel points of the same color channel in the second neighborhood, refer to the same color channel in the second neighborhood The spectral correlation between the channel color of the pixel point of the channel and the filter color of the phase point to be corrected is updated to calculate the corrected pixel value, so that the calculation result of the corrected pixel value is more accurate.

进一步地,本发明实施例的技术方案通过将所述待矫正相位点的矫正像素值与所述第二邻域内具有相同颜色通道的像素点的像素值进行高斯滤波,以更新所述矫正像素值,从而使得矫正后的相位点的像素值更加准确,从而提高获得正确输出图像的概率。Further, in the technical solution of the embodiment of the present invention, Gaussian filtering is performed on the corrected pixel value of the phase point to be corrected and the pixel value of the pixel point with the same color channel in the second neighborhood, so as to update the corrected pixel value , so that the pixel value of the corrected phase point is more accurate, thereby increasing the probability of obtaining a correct output image.

附图说明Description of drawings

图1是本发明实施例中的一种图像矫正的方法的流程图;Fig. 1 is a flow chart of a method for image correction in an embodiment of the present invention;

图2是本发明实施例中的另一种图像矫正的方法的流程图;Fig. 2 is a flowchart of another image correction method in an embodiment of the present invention;

图3A和图3B是本发明实施例中的当前待矫正相位点及其邻域5×7窗口的拜耳图像;3A and 3B are Bayer images of the current phase point to be corrected and its neighborhood 5×7 window in the embodiment of the present invention;

图4是本发明实施例中的一种图像矫正的装置的结构示意图;Fig. 4 is a schematic structural diagram of an image correction device in an embodiment of the present invention;

图5是图4中的一种矫正倍数确定单元的结构示意图;Fig. 5 is a schematic structural diagram of a correction multiple determination unit in Fig. 4;

图6是本发明实施例中的另一种图像矫正的装置的结构示意图。Fig. 6 is a schematic structural diagram of another image correction device in an embodiment of the present invention.

具体实施方式detailed description

如背景技术所言,现有矫正相位点像素值的方法中,通常是将该相位点作为坏点来矫正,使得该相位点的像素值几乎完全被丢掉,使得成像时用于计算的参考像素值数据较少,出错几率高,换言之,获得正确的输出图像的概率较低。As mentioned in the background technology, in the existing methods of correcting the pixel value of a phase point, the phase point is usually corrected as a bad point, so that the pixel value of the phase point is almost completely lost, so that the reference pixel used for calculation during imaging The value data is less, the chance of error is high, in other words, the probability of obtaining the correct output image is low.

本申请的发明人通过研究发现,对于相位点来说,其遮蔽物已经固定,其挡住的入射光比例恒定,则可以推测该相位点乘以某一个固定倍率就可以得到该相位点成像时该输出的像素值。因此,本发明实施例的技术方案通过获取原始图像中当前待矫正相位点的第一像素值,确定所述当前待矫正相位点对应的矫正倍数,将所述第一像素值与所述矫正倍数的乘积作为所述当前待矫正相位点的矫正像素值,从而可以在图像的后续处理过程中使用矫正后的相位点像素值来参与计算,进而避免现有技术中几乎丢掉相位点像素值的矫正方法造成的输出图像出错的问题,从而提高获得正确的输出图像的概率。The inventors of the present application have found through research that for a phase point, its occluder has been fixed, and the proportion of incident light blocked by it is constant, so it can be inferred that the phase point is multiplied by a certain fixed magnification to obtain the phase point imaging. The output pixel value. Therefore, the technical solution of the embodiment of the present invention obtains the first pixel value of the current phase point to be corrected in the original image, determines the correction multiple corresponding to the current phase point to be corrected, and compares the first pixel value with the correction multiple The product of is used as the corrected pixel value of the current phase point to be corrected, so that the corrected phase point pixel value can be used to participate in the calculation in the subsequent processing of the image, thereby avoiding the correction that almost loses the phase point pixel value in the prior art The problem of error in the output image caused by the method, thereby improving the probability of obtaining a correct output image.

为使本发明的上述目的、特征和有益效果能够更为明显易懂,下面结合附图对本发明的具体实施例做详细的说明。In order to make the above objects, features and beneficial effects of the present invention more comprehensible, specific embodiments of the present invention will be described in detail below in conjunction with the accompanying drawings.

图1是本发明实施例中的一种图像矫正的方法的流程图。下面参照图1所示对图像矫正的方法进行详细说明。Fig. 1 is a flowchart of an image correction method in an embodiment of the present invention. The method for image correction shown in FIG. 1 will be described in detail below.

步骤S101:获取原始图像中当前待矫正相位点的第一像素值。Step S101: Obtain the first pixel value of the current phase point to be corrected in the original image.

在具体实施中,所述原始图像为图像传感器捕捉到的光源信号转化为数字信号得到的图像,原始图像记录了图像传感器的原始信息,通常情况下相机内部的原始图像是拜耳(bayer)图像,一般后缀名为.raw,其中带有相位点的数值信息。当然,原始图像还可以是其他适当的格式,只要其中仍然保留有相位点的信息即可。In a specific implementation, the original image is an image obtained by converting the light source signal captured by the image sensor into a digital signal. The original image records the original information of the image sensor. Usually, the original image inside the camera is a Bayer image. The general suffix is .raw, which contains the numerical information of the phase point. Of course, the original image can also be in other appropriate formats, as long as the phase point information is still preserved therein.

步骤S102:确定所述当前待矫正相位点对应的矫正倍数。Step S102: Determine the correction multiple corresponding to the current phase point to be corrected.

在具体实施中,矫正倍数是预先计算并存储的,每个待矫正相位点都有对应的矫正倍数,可以通过对应关系查找到预先存储的矫正倍数。其中,所述矫正倍数的计算可以由多种方法。In a specific implementation, the correction multiple is pre-calculated and stored, and each phase point to be corrected has a corresponding correction multiple, and the pre-stored correction multiple can be found through the corresponding relationship. Wherein, the correction multiple can be calculated by various methods.

步骤S103:将所述第一像素值与所述矫正倍数的乘积作为所述当前待矫正相位点的矫正像素值。Step S103: Use the product of the first pixel value and the correction factor as the corrected pixel value of the current phase point to be corrected.

所述矫正像素值即为所述待矫正相位点经矫正后的像素值。The corrected pixel value is the corrected pixel value of the phase point to be corrected.

在本发明的一实施例中,步骤S102中所述的矫正倍数可以通过以下方式确定:In an embodiment of the present invention, the correction multiple described in step S102 can be determined in the following manner:

让摄像头模组对指定场景成像,得到标定图像;Let the camera module image the specified scene to obtain the calibration image;

根据所述标定图像中与所述当前待矫正相位点具有同色滤镜的像素点的像素值,以及所述第一像素值计算所述矫正倍数。The correction factor is calculated according to the pixel value of the pixel having the same color filter as the current phase point to be corrected in the calibration image and the first pixel value.

在上述方法的一实例中,所述指定场景可以是均匀光照下的平坦场景。In an example of the above method, the specified scene may be a flat scene under uniform illumination.

在上述方法的一实例中,得到所述平坦场景下标定图像后,所述根据所述标定图像中与所述当前待矫正相位点具有同色滤镜的像素点的像素值,以及所述第一像素值计算所述矫正倍数,可以包括:In an example of the above method, after the calibration image in the flat scene is obtained, according to the pixel value of the pixel in the calibration image that has the same color filter as the current phase point to be corrected, and the first The pixel value is used to calculate the correction factor, which may include:

从所述标定图像中获取所述当前待矫正相位点的第二像素值;Acquiring the second pixel value of the current phase point to be corrected from the calibration image;

在所述当前待矫正相位点的第一邻域内,计算与所述当前待矫正相位点具有同色滤镜的像素点的像素值的平均值以作为第一平均值;In the first neighborhood of the current phase point to be corrected, calculate the average value of the pixel values of the pixels having the same color filter as the current phase point to be corrected as the first average value;

将所述第一平均值与所述第二像素值的商作为所述矫正倍数。The quotient of the first average value and the second pixel value is used as the correction factor.

在具体实施中,所述第一邻域的大小可以根据需要进行设置,在此不做限制。In a specific implementation, the size of the first neighborhood can be set as required, and there is no limitation here.

本实施例通过获取原始图像中当前待矫正相位点的第一像素值,确定所述当前待矫正相位点对应的矫正倍数,将所述第一像素值与所述矫正倍数的乘积作为所述当前待矫正相位点的矫正像素值,从而可以在图像的后续处理过程中使用矫正后的相位点像素值来参与计算,进而避免现有技术中几乎丢掉相位点像素值的矫正方法造成的输出图像出错的问题,从而提高获得正确的输出图像的概率。In this embodiment, by obtaining the first pixel value of the current phase point to be corrected in the original image, the correction multiple corresponding to the current phase point to be corrected is determined, and the product of the first pixel value and the correction multiple is used as the current The corrected pixel value of the phase point to be corrected, so that the corrected phase point pixel value can be used to participate in the calculation in the subsequent processing of the image, thereby avoiding the error in the output image caused by the correction method that almost loses the phase point pixel value in the prior art problem, thereby increasing the probability of obtaining the correct output image.

下面结合图2对本发明的另一实施例进行说明。Another embodiment of the present invention will be described below with reference to FIG. 2 .

图2是本发明实施例中的另一种图像矫正的方法的流程图。下面参照图2对所述图像矫正的方法进行详细说明。Fig. 2 is a flowchart of another image correction method in an embodiment of the present invention. The image correction method will be described in detail below with reference to FIG. 2 .

步骤S201:获取原始图像中当前待矫正相位点的第一像素值;Step S201: Obtain the first pixel value of the current phase point to be corrected in the original image;

步骤S202:确定所述当前待矫正相位点对应的矫正倍数;Step S202: Determine the correction multiple corresponding to the current phase point to be corrected;

步骤S203:将所述第一像素值与所述矫正倍数的乘积作为所述当前待矫正相位点的矫正像素值;Step S203: taking the product of the first pixel value and the correction multiple as the corrected pixel value of the current phase point to be corrected;

步骤S204:当所述当前待矫正相位点的滤镜颜色与第二邻域内同颜色通道的像素点的滤镜颜色不同时,参照所述第二邻域内所述同颜色通道的像素点的通道颜色与所述待矫正相位点的滤镜颜色的光谱相关性更新计算矫正像素值;Step S204: When the filter color of the current phase point to be corrected is different from the filter color of the pixels of the same color channel in the second neighborhood, refer to the channel of the pixels of the same color channel in the second neighborhood The spectral correlation between the color and the filter color of the phase point to be corrected is updated to calculate the corrected pixel value;

步骤S205:将所述待矫正相位点的矫正像素值与所述第二邻域内具有相同颜色通道的像素点的像素值进行高斯滤波,并使用高斯滤波的结果更新所述矫正像素值。Step S205: Perform Gaussian filtering on the corrected pixel value of the phase point to be corrected and the pixel values of the pixel points with the same color channel in the second neighborhood, and update the corrected pixel value using the Gaussian filtering result.

在本实施例中,步骤S201至步骤S203的说明请对应参照图1中步骤S101至步骤S103的描述,在此不再赘述。In this embodiment, for the description of step S201 to step S203, please refer to the description of step S101 to step S103 in FIG. 1 correspondingly, and details are not repeated here.

在步骤S204的具体实施中,可以通过以下方式更新计算所述矫正像素值:In the specific implementation of step S204, the corrected pixel value may be updated and calculated in the following manner:

在所述当前待矫正相位点的第二邻域内,计算与所述当前待矫正相位点的颜色通道相同的像素点像素值的平均值,以作为第二平均值;In the second neighborhood of the current phase point to be corrected, calculate the average value of the pixel values of the pixels that are the same as the color channel of the current phase point to be corrected as the second average value;

在所述当前待矫正相位点的第二邻域内,计算与所述当前待矫正相位点的颜色滤镜相同的像素点的像素值的平均值,以作为第三平均值;In the second neighborhood of the current phase point to be corrected, calculate the average value of the pixel values of the pixel points with the same color filter as the current phase point to be corrected, as a third average value;

将所述第三平均值与所述第二平均值之差作为所述光谱相关性;using the difference between the third average value and the second average value as the spectral correlation;

将所述矫正像素值与所述光谱相关性做差,以更新所述矫正像素值。The corrected pixel value is subtracted from the spectral correlation to update the corrected pixel value.

下面结合图3A和图3B对上述步骤S204的实施方式进行举例说明:The implementation manner of the above step S204 is illustrated below with reference to FIG. 3A and FIG. 3B :

图3A和图3B示出了一种相位点及其邻域5×7窗口的bayer图像。图3A具体示出了该bayer图像中各像素点所处的颜色通道,R表示红色通道(R通道),G表示绿色通道(G通道),B表示蓝色通道(B通道),当前待矫正相位点o请见图3A中的阴影部分,图3B具体标识出了所述当前待矫正相位点o及其3×3邻域内的点a、b、c、d、e、f、g和h。Figures 3A and 3B show a bayer image of a 5x7 window of a phase point and its neighborhood. Figure 3A specifically shows the color channel of each pixel in the bayer image, R indicates the red channel (R channel), G indicates the green channel (G channel), and B indicates the blue channel (B channel), which is currently to be corrected Please refer to the shaded part in Figure 3A for the phase point o, and Figure 3B specifically identifies the current phase point o to be corrected and the points a, b, c, d, e, f, g, and h in its 3×3 neighborhood .

请对照图3A和图3B,所述当前待矫正相位点o处于G通道,其3×3邻域内同处于G通道的还有a、b、c和d点,图中e点和f点处于R通道,g点和h点处于B通道。Please compare Figure 3A and Figure 3B, the current phase point o to be corrected is in the G channel, and there are also points a, b, c and d in the G channel in its 3×3 neighborhood, and points e and f in the figure are at R channel, g point and h point are in B channel.

本实施例的所述第二邻域为所述当前待矫正相位点o的3×3邻域,通常情况下,在像素点盖上的滤镜颜色与该像素点的通道颜色相同,但相位点上覆盖的滤镜颜色可能与相位点所述的通道颜色不同。对照图3A和图3B所示,a、b、c和d点的滤镜颜色与通道颜色相同,均为红色,而此时相位点的滤镜颜色可能为其他颜色,本例中假设为蓝色。这时,可参照所述第二邻域内所述同颜色通道的像素点的通道颜色与所述待矫正相位点的滤镜颜色的光谱相关性来更新计算矫正像素值。The second neighborhood in this embodiment is the 3×3 neighborhood of the current phase point o to be corrected. Usually, the filter color on the pixel point cover is the same as the channel color of the pixel point, but the phase The filter color overlaid on the point may be different from the channel color described by the phase point. As shown in Figure 3A and Figure 3B, the filter colors of points a, b, c, and d are the same as the channel colors, all of which are red, while the filter colors of the phase points may be other colors at this time, assuming blue in this example color. At this time, the corrected pixel value may be updated and calculated with reference to the spectral correlation between the channel color of the pixel points of the same color channel in the second neighborhood and the filter color of the phase point to be corrected.

具体地,在所述当前待矫正相位点o的3×3邻域内,计算与所述当前待矫正相位点o的颜色通道相同的像素点(a、b、c和d点)的像素值的平均值,以作为第二平均值m;Specifically, within the 3×3 neighborhood of the current phase point o to be corrected, calculate the pixel values of the pixel points (points a, b, c, and d) that are the same as the color channel of the current phase point o to be corrected Average value, as the second average value m;

在所述当前待矫正相位点o的3×3邻域内,计算与所述当前待矫正相位点o的滤镜颜色蓝色相同的像素点(e和f点)的像素值的平均值,以作为第三平均值n;In the 3×3 neighborhood of the current phase point o to be corrected, calculate the average value of the pixel values of the pixel points (points e and f) identical to the filter color blue of the current phase point o to be corrected, to as the third average n;

将所述第三平均值与所述第二平均值之差n-m作为所述光谱相关性r;Using the difference n-m between the third average value and the second average value as the spectral correlation r;

假设经步骤S203计算得到的矫正像素值为T,则将所述矫正像素值T与所述光谱相关性r做差,使用T-r更新所述矫正像素值T。Assuming that the corrected pixel value calculated in step S203 is T, the corrected pixel value T is subtracted from the spectral correlation r, and the corrected pixel value T is updated using T-r.

请继续参照图3B,在步骤S205的具体实施中,将所述待矫正相位点o的矫正像素值与所述第二邻域内具有相同颜色通道的像素点(a、b、c和d点)的像素值进行高斯滤波,并使用高斯滤波的结果更新所述矫正像素值。Please continue to refer to FIG. 3B. In the specific implementation of step S205, the corrected pixel value of the phase point o to be corrected is compared with the pixel points (points a, b, c, and d) having the same color channel in the second neighborhood. Gaussian filtering is performed on the pixel values, and the corrected pixel values are updated using the Gaussian filtering results.

需要指出的是,请参照图1,在经过步骤S103得到所述矫正像素值后,也可以使用本实施例中的步骤S204所述的方法进行滤波,以更新步骤S103得到的矫正像素值。It should be pointed out that referring to FIG. 1 , after obtaining the corrected pixel value in step S103 , the method described in step S204 in this embodiment may also be used for filtering to update the corrected pixel value obtained in step S103 .

本实施例通过获取原始图像中当前待矫正相位点的第一像素值,确定所述当前待矫正相位点对应的矫正倍数,将所述第一像素值与所述矫正倍数的乘积作为所述当前待矫正相位点的矫正像素值,从而可以在图像的后续处理过程中使用矫正后的相位点像素值来参与计算,进而避免现有技术中几乎丢掉相位点像素值的矫正方法造成的输出图像出错的问题,从而提高获得正确的输出图像的概率。In this embodiment, by obtaining the first pixel value of the current phase point to be corrected in the original image, the correction multiple corresponding to the current phase point to be corrected is determined, and the product of the first pixel value and the correction multiple is used as the current The corrected pixel value of the phase point to be corrected, so that the corrected phase point pixel value can be used to participate in the calculation in the subsequent processing of the image, thereby avoiding the error in the output image caused by the correction method that almost loses the phase point pixel value in the prior art problem, thereby increasing the probability of obtaining the correct output image.

进一步地,本实施例通过在当前待矫正相位点的滤镜颜色与第二邻域内同颜色通道的像素点的滤镜颜色不同时,参照所述第二邻域内所述同颜色通道的像素点的通道颜色与所述待矫正相位点的滤镜颜色的光谱相关性更新计算矫正像素值,使得矫正像素值的计算结果更加准确。Further, in this embodiment, when the filter color of the current phase point to be corrected is different from the filter color of the pixel points of the same color channel in the second neighborhood, refer to the pixel points of the same color channel in the second neighborhood The spectral correlation between the channel color of the channel color and the filter color of the phase point to be corrected is updated to calculate the corrected pixel value, so that the calculation result of the corrected pixel value is more accurate.

进一步地,本实施例通过将所述待矫正相位点的矫正像素值与所述第二邻域内具有相同颜色通道的像素点的像素值进行高斯滤波,以更新所述矫正像素值,从而使得矫正后的相位点的像素值更加准确,从而提高获得正确输出图像的概率。Further, in this embodiment, Gaussian filtering is performed on the corrected pixel value of the phase point to be corrected and the pixel value of the pixel point with the same color channel in the second neighborhood to update the corrected pixel value, so that the corrected The pixel values of the final phase points are more accurate, thereby increasing the probability of obtaining a correct output image.

下面结合图4和图5对本发明实施例中的图像矫正的方法对应的装置做进一步详细的介绍。The device corresponding to the image correction method in the embodiment of the present invention will be further described in detail below with reference to FIG. 4 and FIG. 5 .

图4是本发明实施例中的一种图像矫正的装置的结构示意图,请参照图4,所述图像矫正的装置40可以包括:Fig. 4 is a schematic structural diagram of an image correction device in an embodiment of the present invention, please refer to Fig. 4, the image correction device 40 may include:

第一像素值获取单元401,适于获取原始图像中当前待矫正相位点的第一像素值;The first pixel value acquiring unit 401 is adapted to acquire the first pixel value of the current phase point to be corrected in the original image;

矫正倍数确定单元402,适于确定所述当前待矫正相位点对应的矫正倍数;The correction multiple determination unit 402 is adapted to determine the correction multiple corresponding to the current phase point to be corrected;

矫正像素值计算单元403,适于将所述第一像素值与所述矫正倍数的乘积作为所述当前待矫正相位点的矫正像素值。The corrected pixel value calculation unit 403 is adapted to use the product of the first pixel value and the correction multiple as the corrected pixel value of the current phase point to be corrected.

在具体实施中,所述矫正倍数确定单元402可以包括标定图像成像子单元4021和矫正倍数计算子单元4022,请参照图5所示,图5示出了图4中所述的矫正倍数确定单元的一种结构示意图,具备图5中结构的所述矫正倍数确定单元402可以预先计算好所述矫正倍数。或者,在另一具体实施中,所述矫正倍数确定单元402也可以仅具备查找功能,从外部或内部的数据库、存储器等获取先前已经确定的矫正倍数。In a specific implementation, the correction multiple determination unit 402 may include a calibration image imaging subunit 4021 and a correction multiple calculation subunit 4022, please refer to FIG. 5 , which shows the correction multiple determination unit described in FIG. 4 A structural schematic diagram of FIG. 5 , the correction multiple determination unit 402 having the structure in FIG. 5 can pre-calculate the correction multiple. Or, in another specific implementation, the correction multiple determination unit 402 may also only have a search function, and acquire previously determined correction multiples from an external or internal database, memory, or the like.

所述标定图像获取子单元4021,适于获取在摄像头模组对指定场景成像得到的标定图像;The calibration image acquisition subunit 4021 is adapted to acquire a calibration image obtained by imaging a specified scene in the camera module;

所述矫正倍数计算子单元4022,适于根据所述标定图像中与所述当前待矫正相位点具有同色滤镜的像素点的像素值,以及所述第一像素值计算所述矫正倍数。The correction multiple calculation subunit 4022 is adapted to calculate the correction multiple according to the pixel value of the pixel in the calibration image having the same color filter as the current phase point to be corrected and the first pixel value.

在具体实施中,所述指定场景可以是均匀光照下的平坦场景。In a specific implementation, the specified scene may be a flat scene under uniform illumination.

在具体实施中,所述矫正倍数计算子单元4022,可以包括:In a specific implementation, the correction multiple calculation subunit 4022 may include:

第二像素值获取模块,适于从所述标定图像中获取所述当前待矫正相位点的第二像素值;A second pixel value acquisition module, adapted to acquire the second pixel value of the current phase point to be corrected from the calibration image;

第一平均值计算子模块,适于在所述当前待矫正相位点的第一邻域内,计算与所述当前待矫正相位点具有同色滤镜的像素点的像素值的平均值以作为第一平均值;The first average value calculation sub-module is adapted to calculate the average value of the pixel values of the pixels having the same color filter as the current phase point to be corrected in the first neighborhood of the current phase point to be corrected as the first average value;

矫正倍数计算子模块,适于将所述第一平均值与所述第二像素值的商作为所述矫正倍数。The correction factor calculation sub-module is adapted to use the quotient of the first average value and the second pixel value as the correction factor.

本实施例通过获取原始图像中当前待矫正相位点的第一像素值,确定所述当前待矫正相位点对应的矫正倍数,将所述第一像素值与所述矫正倍数的乘积作为所述当前待矫正相位点的矫正像素值,从而可以在图像的后续处理过程中使用矫正后的相位点像素值来参与计算,进而避免现有技术中几乎丢掉相位点像素值的矫正方法造成的输出图像出错的问题,从而提高获得正确的输出图像的概率。In this embodiment, by obtaining the first pixel value of the current phase point to be corrected in the original image, the correction multiple corresponding to the current phase point to be corrected is determined, and the product of the first pixel value and the correction multiple is used as the current The corrected pixel value of the phase point to be corrected, so that the corrected phase point pixel value can be used to participate in the calculation in the subsequent processing of the image, thereby avoiding the error in the output image caused by the correction method that almost loses the phase point pixel value in the prior art problem, thereby increasing the probability of obtaining the correct output image.

图6是本发明实施例中的一种图像矫正的装置的结构示意图,请参照图6,所述图像矫正的装置60可以包括:第一像素值获取单元601,矫正倍数确定单元602和矫正像素值计算单元603。Figure 6 is a schematic structural diagram of an image correction device in an embodiment of the present invention, please refer to Figure 6, the image correction device 60 may include: a first pixel value acquisition unit 601, a correction factor determination unit 602 and a correction pixel Value calculation unit 603.

其中,所述第一像素值获取单元601,矫正倍数确定单元602和矫正像素值计算单元603的描述请对应参照图4中所述第一像素值获取单元401,矫正倍数确定单元402和矫正像素值计算单元403的描述,在此不再赘述。Wherein, for the description of the first pixel value acquisition unit 601, the correction multiple determination unit 602 and the corrected pixel value calculation unit 603, please refer to the first pixel value acquisition unit 401, the correction multiple determination unit 402 and the corrected pixel value in FIG. The description of the value calculation unit 403 is omitted here.

本实施例的所述图像矫正的装置60还可以包括:矫正像素值修正单元604和滤波单元605。其中:The image correcting apparatus 60 of this embodiment may further include: a corrected pixel value modifying unit 604 and a filtering unit 605 . in:

所述矫正像素值修正单元604,适于在所述原始图像中,当所述当前待矫正相位点的滤镜颜色与第二邻域内同颜色通道的像素点的滤镜颜色不同时,参照所述第二邻域内所述同颜色通道的像素点的通道颜色与所述待矫正相位点的滤镜颜色的光谱相关性更新计算矫正像素值。The corrected pixel value correction unit 604 is adapted to refer to the original image when the filter color of the current phase point to be corrected is different from the filter color of the pixels of the same color channel in the second neighborhood. The spectral correlation between the channel color of the pixel points of the same color channel in the second neighborhood and the filter color of the phase point to be corrected is updated to calculate the corrected pixel value.

所述滤波单元605,适于将所述待矫正相位的矫正像素值与所述第二领域内同颜色通道的像素点的像素值进行高斯滤波,并使用高斯滤波的结果更新所述矫正像素值。The filtering unit 605 is adapted to perform Gaussian filtering on the corrected pixel value of the phase to be corrected and the pixel value of the pixel point of the same color channel in the second domain, and update the corrected pixel value using the result of Gaussian filtering .

在具体实施中,所述矫正像素值修正单元604可以包括:In a specific implementation, the corrected pixel value correction unit 604 may include:

所述第二平均值计算子单元6041,适于在所述当前待矫正相位点的第二邻域内,计算与所述当前待矫正相位点的颜色通道相同的像素点像素值的平均值,以作为第二平均值;The second average value calculation subunit 6041 is adapted to calculate the average value of the pixel values of the pixels in the same color channel as the current phase point to be corrected in the second neighborhood of the current phase point to be corrected, so as to as the second average;

第三平均值计算子单元6042,适于在所述当前待矫正相位点的第二邻域内,计算与所述当前待矫正相位点的颜色滤镜相同的像素点的像素值的平均值,以作为第三平均值;The third average value calculation subunit 6042 is adapted to calculate the average value of the pixel values of the pixel points with the same color filter as the current phase point to be corrected in the second neighborhood of the current phase point to be corrected, so as to as the third average;

光谱相关性计算子单元6043,适于将所述第三平均值与所述第二平均值之差作为所述光谱相关性;The spectral correlation calculation subunit 6043 is adapted to use the difference between the third average value and the second average value as the spectral correlation;

矫正像素值修正子单元6044,适于将所述矫正像素值与所述光谱相关性做差,以更新所述矫正像素值。The corrected pixel value modifying subunit 6044 is adapted to make a difference between the corrected pixel value and the spectral correlation, so as to update the corrected pixel value.

本实施例通过获取原始图像中当前待矫正相位点的第一像素值,确定所述当前待矫正相位点对应的矫正倍数,将所述第一像素值与所述矫正倍数的乘积作为所述当前待矫正相位点的矫正像素值,从而可以在图像的后续处理过程中使用矫正后的相位点像素值来参与计算,进而避免现有技术中几乎丢掉相位点像素值的矫正方法造成的输出图像出错的问题,从而提高获得正确的输出图像的概率。In this embodiment, by obtaining the first pixel value of the current phase point to be corrected in the original image, the correction multiple corresponding to the current phase point to be corrected is determined, and the product of the first pixel value and the correction multiple is used as the current The corrected pixel value of the phase point to be corrected, so that the corrected phase point pixel value can be used to participate in the calculation in the subsequent processing of the image, thereby avoiding the error in the output image caused by the correction method that almost loses the phase point pixel value in the prior art problem, thereby increasing the probability of obtaining the correct output image.

进一步地,本实施例通过在当前待矫正相位点的滤镜颜色与第二邻域内同颜色通道的像素点的滤镜颜色不同时,参照所述第二邻域内所述同颜色通道的像素点的通道颜色与所述待矫正相位点的滤镜颜色的光谱相关性更新计算矫正像素值,使得矫正像素值的计算结果更加准确。Further, in this embodiment, when the filter color of the current phase point to be corrected is different from the filter color of the pixel points of the same color channel in the second neighborhood, refer to the pixel points of the same color channel in the second neighborhood The spectral correlation between the channel color of the channel color and the filter color of the phase point to be corrected is updated to calculate the corrected pixel value, so that the calculation result of the corrected pixel value is more accurate.

进一步地,本实施例通过将所述待矫正相位点的矫正像素值与所述第二邻域内具有相同颜色通道的像素点的像素值进行高斯滤波,以更新所述矫正像素值,从而使得矫正后的相位点的像素值更加准确,从而提高获得正确输出图像的概率。Further, in this embodiment, Gaussian filtering is performed on the corrected pixel value of the phase point to be corrected and the pixel value of the pixel point with the same color channel in the second neighborhood to update the corrected pixel value, so that the corrected The pixel values of the final phase points are more accurate, thereby increasing the probability of obtaining a correct output image.

本领域普通技术人员可以理解上述实施例的各种方法中的全部或部分步骤是可以通过程序来指令相关的硬件来完成,该程序可以存储于计算机可读存储介质中,存储介质可以包括:ROM、RAM、磁盘或光盘等。Those of ordinary skill in the art can understand that all or part of the steps in the various methods of the above-mentioned embodiments can be completed by instructing related hardware through a program, and the program can be stored in a computer-readable storage medium, and the storage medium can include: ROM , RAM, disk or CD, etc.

以上对本发明实施例的方法及系统做了详细的介绍,本发明并不限于此。任何本领域技术人员,在不脱离本发明的精神和范围内,均可作各种更动与修改,因此本发明的保护范围应当以权利要求所限定的范围为准。The method and system of the embodiment of the present invention have been introduced in detail above, and the present invention is not limited thereto. Any person skilled in the art can make various changes and modifications without departing from the spirit and scope of the present invention, so the protection scope of the present invention should be based on the scope defined in the claims.

Claims (16)

1. a kind of method of image flame detection, it is characterised in that including:
Obtain the first pixel value of current phase point to be corrected in original image;
Determine the corresponding correction multiple of the phase point currently to be corrected;
Using first pixel value and the product for correcting multiple as the strong of the current phase point to be corrected Positive pixel value.
2. the method for image flame detection according to claim 1, it is characterised in that the correction multiple passes through In the following manner determines:
Allow camera module to be imaged given scenario, obtain uncalibrated image;
According to the picture of the pixel with the current phase point to be corrected in the uncalibrated image with homochromy filter Element value, and correct multiple described in first calculated for pixel values.
3. the method for image flame detection according to claim 2, it is characterised in that the given scenario is equal Planar scene under even illumination.
4. the method for image flame detection according to claim 3, it is characterised in that described according to the demarcation There is the pixel value of the pixel of homochromy filter, Yi Jisuo in image with the current phase point to be corrected State and multiple is corrected described in the first calculated for pixel values, including:
The second pixel value of the current phase point to be corrected is obtained from the uncalibrated image;
In the first neighborhood of the current phase point to be corrected, calculate and have with the current phase point to be corrected There is the average value of pixel value of the pixel of homochromy filter as the first average value;
Using the business of first average value and second pixel value as the correction multiple.
5. the method for image flame detection according to claim 1, it is characterised in that also include:
When the pixel in the filter color and the second neighborhood of the current phase point to be corrected with Color Channel When filter color is different, with reference to the passage face of the pixel of the same Color Channel in second neighborhood Color updates with the spectral correlations of the filter color of the phase point to be corrected and calculates correction pixel value.
6. the method for image flame detection according to claim 5, it is characterised in that the neighborhood of the reference second The passage color of the pixel of the interior same Color Channel and the filter color of the phase point to be corrected Spectral correlations update and calculate correction pixel value, including:
In the second neighborhood of the current phase point to be corrected, calculate and the current phase point to be corrected The average value of Color Channel identical pixel pixel value, as the second average value;
In the second neighborhood of the current phase point to be corrected, calculate and the current phase point to be corrected The average value of the pixel value of the color filter identical pixel, as the 3rd average value;
Using the difference of the 3rd average value and second average value as the spectral correlations;
The correction pixel value is made the difference with the spectral correlations, to update the correction pixel value.
7. the method for the image flame detection according to claim 5 or 6, it is characterised in that also include:
To there is same color passage in correction pixel value and second neighborhood of the phase point to be corrected The pixel value of pixel carries out gaussian filtering, and uses the result renewal correction pixel of gaussian filtering Value.
8. the method for the image flame detection according to claim any one of 1-6, it is characterised in that described original Image is Bayer images.
9. a kind of device of image flame detection, it is characterised in that including:
First pixel value acquiring unit, is suitable to obtain the first pixel of current phase point to be corrected in original image Value;
Correction multiple determining unit, is adapted to determine that the corresponding correction multiple of the phase point currently to be corrected;
Correction pixel value calculating unit, be suitable to using first pixel value with it is described correction multiple product as The correction pixel value of the current phase point to be corrected.
10. the device of image flame detection according to claim 9, it is characterised in that the correction multiple determines Unit, including:
Uncalibrated image obtains subelement, is suitable to obtain the demarcation obtained after camera module is imaged given scenario Image;
Correction multiple computation subunit, be suitable to according in the uncalibrated image with the current phase point to be corrected The pixel value of the pixel with homochromy filter, and correct multiple described in first calculated for pixel values.
The device of 11. image flame detections according to claim 10, it is characterised in that the given scenario is equal Planar scene under even illumination.
The device of 12. image flame detections according to claim 11, it is characterised in that the correction multiple is calculated Subelement, including:
Second pixel value acquisition module, is suitable to obtain the current phase point to be corrected from the uncalibrated image The second pixel value;
First mean value calculation submodule, is suitable in the first neighborhood of the current phase point to be corrected, meter The average value of pixel value of the pixel that there is homochromy filter with the current phase point to be corrected is calculated to make It is the first average value;
Correction multiple calculating sub module, be suitable to using the business of first average value and second pixel value as The correction multiple.
The device of 13. image flame detections according to claim 9, it is characterised in that also include:
Correction pixel value modification unit, is suitable to the filter color when the current phase point to be corrected and the second neighbour When in domain with the filter color difference of the pixel of Color Channel, with reference to described same in second neighborhood The spectral correlation of the passage color of the pixel of Color Channel and the filter color of the phase point to be corrected Property update calculate correction pixel value.
The device of 14. image flame detections according to claim 13, it is characterised in that the correction pixel value is repaiied Positive unit includes:
Second mean value calculation subelement, is suitable in the second neighborhood of the current phase point to be corrected, meter The average value with the Color Channel identical pixel pixel value of the current phase point to be corrected is calculated, with As the second average value;
3rd mean value calculation subelement, is suitable in the second neighborhood of the current phase point to be corrected, meter The average value with the pixel value of the color filter identical pixel of the current phase point to be corrected is calculated, As the 3rd average value;
Spectral correlations computation subunit, is suitable to make the difference of the 3rd average value and second average value It is the spectral correlations;
Correction pixel value modification subelement, is suitable to make the difference the correction pixel value with the spectral correlations, To update the correction pixel value.
The device of 15. image flame detection according to claim 13 or 14, it is characterised in that also include:
Filter unit, is suitable to the correction pixel value of the phase to be corrected and same color in second field The pixel value of the pixel of passage carries out gaussian filtering, and described strong using the result renewal of gaussian filtering Positive pixel value.
The device of 16. image flame detection according to any one of claim 9-14, it is characterised in that the original Beginning image is Bayer images.
CN201510996333.9A 2015-12-25 2015-12-25 Method and device for image correction Active CN106920217B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510996333.9A CN106920217B (en) 2015-12-25 2015-12-25 Method and device for image correction

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510996333.9A CN106920217B (en) 2015-12-25 2015-12-25 Method and device for image correction

Publications (2)

Publication Number Publication Date
CN106920217A true CN106920217A (en) 2017-07-04
CN106920217B CN106920217B (en) 2020-06-02

Family

ID=59456405

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510996333.9A Active CN106920217B (en) 2015-12-25 2015-12-25 Method and device for image correction

Country Status (1)

Country Link
CN (1) CN106920217B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111340721A (en) * 2020-02-18 2020-06-26 国网电子商务有限公司 A pixel correction method, device, device and readable storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP1646007A2 (en) * 2004-10-08 2006-04-12 Samsung Electronics Co., Ltd. Apparatus and method of compressing dynamic range of image
JP2008113236A (en) * 2006-10-30 2008-05-15 Kyocera Corp Shading correction method and apparatus in imaging apparatus
CN101291437A (en) * 2007-01-26 2008-10-22 株式会社东芝 Solid-state image pickup device
CN102630021A (en) * 2011-02-07 2012-08-08 索尼公司 Signal processing device, signal processing method, imaging apparatus, and imaging processing method
US20140357999A1 (en) * 2013-05-29 2014-12-04 B-K Medical Aps Color flow ultrasound imaging

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP1646007A2 (en) * 2004-10-08 2006-04-12 Samsung Electronics Co., Ltd. Apparatus and method of compressing dynamic range of image
JP2008113236A (en) * 2006-10-30 2008-05-15 Kyocera Corp Shading correction method and apparatus in imaging apparatus
CN101291437A (en) * 2007-01-26 2008-10-22 株式会社东芝 Solid-state image pickup device
CN102630021A (en) * 2011-02-07 2012-08-08 索尼公司 Signal processing device, signal processing method, imaging apparatus, and imaging processing method
US20140357999A1 (en) * 2013-05-29 2014-12-04 B-K Medical Aps Color flow ultrasound imaging

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111340721A (en) * 2020-02-18 2020-06-26 国网电子商务有限公司 A pixel correction method, device, device and readable storage medium

Also Published As

Publication number Publication date
CN106920217B (en) 2020-06-02

Similar Documents

Publication Publication Date Title
US10997696B2 (en) Image processing method, apparatus and device
JP6928388B2 (en) Color matching across multiple sensors in optical system
US10805508B2 (en) Image processing method, and device
CN111353948B (en) Image noise reduction method, device and equipment
CN108632537B (en) Control method and device, imaging device, computer device, and readable storage medium
CN108055452B (en) Image processing method, device and equipment
JP5980294B2 (en) Data processing apparatus, imaging apparatus, and data processing method
CN113409221B (en) Image color matting method, system, computer equipment and storage medium
CN109068025B (en) Lens shadow correction method and system and electronic equipment
CN107704798B (en) Image blurring method, apparatus, computer-readable storage medium, and computer device
CN107395991B (en) Image synthesis method, image synthesis device, computer-readable storage medium and computer equipment
EP3834170B1 (en) Apparatus and methods for generating high dynamic range media, based on multi-stage compensation of motion
WO2019210707A1 (en) Image sharpness evaluation method, device and electronic device
CN107948617B (en) Image processing method, apparatus, computer-readable storage medium, and computer device
CN104823437A (en) Picture processing method and device
JP2021505086A (en) Image processing methods and image processing equipment, computer-readable storage media and computer equipment
CN111031256B (en) Image processing method, image processing device, storage medium and electronic equipment
JP7240181B2 (en) Video processing device and program
JP5899894B2 (en) Imaging apparatus, image processing apparatus, image processing program, and image processing method
CN107635124A (en) White balance processing method, device and equipment for face shooting
GB2460241A (en) Correction of optical lateral chromatic aberration
CN111160340B (en) A moving target detection method, device, storage medium and terminal equipment
CN108012133A (en) Image processing method, device, computer readable storage medium and computer equipment
CN106920217A (en) The method and device of image flame detection
US10198797B2 (en) Apparatus correcting shading without taking optical characteristics into consideration and method thereof

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
GR01 Patent grant
GR01 Patent grant