WO2019019890A1 - Image processing method, computer equipment, and computer-readable storage medium - Google Patents
Image processing method, computer equipment, and computer-readable storage medium Download PDFInfo
- Publication number
- WO2019019890A1 WO2019019890A1 PCT/CN2018/094625 CN2018094625W WO2019019890A1 WO 2019019890 A1 WO2019019890 A1 WO 2019019890A1 CN 2018094625 W CN2018094625 W CN 2018094625W WO 2019019890 A1 WO2019019890 A1 WO 2019019890A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- transmittance
- obtaining
- atmospheric light
- defogging
- light value
- Prior art date
Links
- 238000003672 processing method Methods 0.000 title claims abstract description 27
- 238000002834 transmittance Methods 0.000 claims abstract description 131
- 238000012545 processing Methods 0.000 claims abstract description 54
- 238000000034 method Methods 0.000 claims description 57
- 230000008569 process Effects 0.000 claims description 38
- 230000009467 reduction Effects 0.000 claims description 7
- 238000004364 calculation method Methods 0.000 description 10
- 238000010586 diagram Methods 0.000 description 8
- 238000003384 imaging method Methods 0.000 description 7
- 238000004422 calculation algorithm Methods 0.000 description 5
- 230000006870 function Effects 0.000 description 3
- 238000003705 background correction Methods 0.000 description 2
- 238000001514 detection method Methods 0.000 description 2
- 230000000694 effects Effects 0.000 description 2
- 239000000284 extract Substances 0.000 description 2
- 230000005540 biological transmission Effects 0.000 description 1
- 239000000872 buffer Substances 0.000 description 1
- 238000004590 computer program Methods 0.000 description 1
- 238000012937 correction Methods 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 238000001914 filtration Methods 0.000 description 1
- 230000010354 integration Effects 0.000 description 1
- 239000011159 matrix material Substances 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T5/00—Image enhancement or restoration
- G06T5/73—Deblurring; Sharpening
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T5/00—Image enhancement or restoration
- G06T5/50—Image enhancement or restoration using two or more images, e.g. averaging or subtraction
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2207/00—Indexing scheme for image analysis or image enhancement
- G06T2207/10—Image acquisition modality
- G06T2207/10004—Still image; Photographic image
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2207/00—Indexing scheme for image analysis or image enhancement
- G06T2207/10—Image acquisition modality
- G06T2207/10024—Color image
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR 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/20212—Image combination
- G06T2207/20221—Image fusion; Image merging
Definitions
- the present application relates to the field of computer technology, and in particular, to an image processing method, a computer device, and a non-transitory computer readable storage medium.
- An image processing method, a computer device, and a non-transitory computer readable storage medium are provided in accordance with various embodiments of the present application.
- An image processing method comprising:
- the color image is subjected to a defogging process according to the atmospheric light value and the original transmittance.
- a computer device comprising a memory and a processor, the memory storing computer readable instructions, wherein when executed by the processor, the processor causes the processor to:
- the color image is subjected to a defogging process according to the atmospheric light value and the original transmittance.
- One or more non-transitory computer readable storage media containing computer executable instructions that, when executed by one or more processors, cause the processor to:
- the color image is subjected to a defogging process according to the atmospheric light value and the original transmittance.
- the black and white image and the color camera are used to capture the same scene to obtain the black and white image and the color image, and the maximum brightness value in the black and white image is obtained, and the maximum brightness value is taken as the atmospheric light value, and the calculation amount of the atmospheric light value is small, the speed is fast, and then according to the atmospheric light.
- the value obtains the original transmittance, and the color image is subjected to dehazing treatment according to the atmospheric light value and the original transmittance, thereby improving the defogging efficiency.
- FIG. 1 is an application environment diagram of an image processing method in an embodiment
- FIG. 2 is a flow chart of an image processing method in an embodiment
- FIG. 3 is a flow chart of an image processing method in another embodiment
- Figure 5 is a flow chart of an image processing method in another embodiment
- Figure 6 is a block diagram showing the structure of an image processing apparatus in an embodiment
- Figure 7 is a block diagram showing the structure of an image processing apparatus in another embodiment
- Figure 8 is a block diagram showing the structure of an image processing apparatus in another embodiment
- Figure 9 is a schematic illustration of an image processing circuit in one embodiment.
- first, second and the like may be used to describe various elements, but these elements are not limited by these terms. These terms are only used to distinguish one element from another.
- the first acquisition module may be referred to as a second acquisition module without departing from the scope of the present application, and similarly, the second acquisition module may be referred to as a first acquisition module. Both the first acquisition module and the second acquisition module are acquisition modules, but they are not the same acquisition module.
- FIG. 1 is a schematic diagram of an application environment of an image processing method in an embodiment.
- the application environment includes a mobile terminal 110 and a scene 120 with a black and white camera and a color camera.
- a black and white image is captured by the black and white camera on the mobile terminal 110 to obtain a black and white image, and then the same scene is captured by the color camera to obtain a color image, and the maximum brightness value is obtained according to the black and white image, and the maximum brightness value is taken as the atmospheric light value, and then according to the atmospheric light value.
- the original transmittance and the calculation of the atmospheric light value are small, and the color image is dehazed according to the atmospheric light value and the original transmittance, thereby improving the defogging efficiency.
- an image processing method includes:
- Operation 202 capturing a black and white image and a color image by capturing the same scene through a black and white camera and a color camera.
- a black and white camera refers to a camera for taking a black and white image.
- the color camera is a camera for taking color images.
- the mobile terminal can capture a black and white camera through a black and white camera, and then capture a color image through a color camera.
- the scene refers to the place to be photographed, such as the zoo, botanical garden, sky, coastline, etc., or where the person is.
- Operation 204 Acquire a maximum brightness value of a pixel point in the black and white image, and use the maximum brightness value as an atmospheric light value.
- the mobile terminal extracts the brightness values of the respective pixels in the black and white image, sorts the brightness values from small to large or from large to small, selects the maximum brightness value, and uses the maximum brightness value as the atmospheric light value.
- the mobile terminal can also directly compare the brightness values of the respective pixels to select the maximum brightness value.
- Operation 206 obtaining an original transmittance according to the atmospheric light value.
- the mobile terminal can calculate the original transmittance by using a dark primary color prior algorithm.
- Operation 208 performing a defogging process on the color image according to the atmospheric light value and the original transmittance.
- the color image may be subjected to a dehazing process by a primary color prior algorithm.
- the operation of defogging a color image based on a dark primary color prior algorithm includes:
- I(x) denotes a foggy image that needs to be defogged
- J(x) denotes a fog-free image obtained by dehazing the fogged image
- x denotes the spatial position of a pixel in the image
- t( x) is the original transmittance
- A is the atmospheric light value.
- the atmospheric light value can be obtained by calculation of black and white images, or by the correspondence between atmospheric light values and weather conditions and current time. Under normal circumstances, the mobile terminal can select the pixel of the maximum brightness value in the black and white image as an estimate of the atmospheric light value.
- the mobile terminal captures a black and white image through a black and white camera, and obtains a maximum brightness value in the black and white image, and uses the maximum brightness value as the atmospheric light value.
- A is a known value.
- J dark (x) represents a dark channel image
- J c (y) represents each color channel of the color image
- ⁇ (x) represents a window centered on the pixel x.
- the original transmittance By taking the atmospheric light value into the formula (3), the original transmittance can be obtained, and then the color image is taken as I(x), the atmospheric light value A and the original transmittance t(x) are taken into the formula (1).
- the black and white image is taken by the black and white camera to obtain the maximum brightness value in the black and white image
- the maximum brightness value is taken as the atmospheric light value
- the calculation amount of the atmospheric light value is small, the speed is fast, and the original transmission is obtained according to the atmospheric light value.
- a weight ⁇ between 0 and 1 can be introduced to adjust the original transmittance, and the final defogging parameter, that is, the transmittance expression, is as follows:
- I c (y) represents the three channels of the pixels R, G, and B of the preview image I(x); ⁇ is called the degree of defogging, and the smaller the ⁇ , the smaller the degree of defogging, and the larger the ⁇ is, The greater the degree of de-fogging.
- the mobile terminal uses equation (4) to obtain the transmittance according to the atmospheric light value and the degree of dehazing degree, and then takes the color image as I(x), the atmospheric light value A and the original transmittance t(x) into the formula (1).
- a color image J(x) after defogging can be obtained.
- the mobile terminal can set a threshold t 0 for the transmittance, then the scene without fog is:
- FIG. 3 is a flow chart of an image processing method in another embodiment. As shown in FIG. 3, an image processing method differs from the method of FIG. 2 in that different transmittances are used for different channels to remove fog, including:
- the same scene is captured by the black and white camera and the color camera to obtain a black and white image and a color image.
- Operation 304 Acquire a maximum brightness value of a pixel point in the black and white image, and use the maximum brightness value as an atmospheric light value.
- the mobile terminal extracts the brightness values of the respective pixels in the black and white image, sorts the brightness values from small to large or from large to small, selects the maximum brightness value, and uses the maximum brightness value as the atmospheric light value.
- Operation 306 obtaining an original transmittance according to the atmospheric light value.
- the original transmittance can be calculated by the dark primary color prior algorithm.
- Operation 308 obtaining a transmittance factor of each of the preset three channels of RGB.
- the transmittance of the three bands of RGB is ranked as follows: the red band has the highest transmittance, the green band is the second, and the blue band is the lowest; therefore, in the foggy area
- the processing strength of the mobile terminal for the three bands of RGB should be increased.
- the thicker the concentration of fog the greater the difference in the effect of fog on the three bands of RGB, and the greater the difference in processing intensity of the three bands of RGB for mobile terminals.
- the mobile terminal does not process the three bands of RGB.
- the mobile terminal based on the original transmittance, the mobile terminal introduces two adjustment coefficients, namely transmittance factors W G and W B . With these two coefficients, the mobile terminal can implement different defogging strengths for the RGB three bands.
- T R , T G , T B respectively represent the band transmittance for the three bands of RGB, and different transmittance values represent the processing of the three bands.
- the parameters a, b, c, and d can be taken according to actual conditions, for example, a can be 0.9, b can be 0.1, c can be 0.7, and d can be 0.3.
- Operation 310 obtaining a band transmittance of each of the three channels of RGB according to the transmittance factor and the original transmittance.
- the black and white image is taken by the black and white camera to obtain the maximum brightness value in the black and white image, and the maximum brightness value is taken as the atmospheric light value, and the calculation amount of the atmospheric light value is small, the speed is fast, and then the ambient light value is obtained.
- obtain the transmittance factor of RGB three channels obtain the band transmittance of each channel according to the transmittance factor adjustment and the original transmittance, and defogg the color image by using the band transmittance corresponding to each channel to prevent the image.
- the bluish color not only improves the efficiency of defogging, but also achieves true and natural color reproduction.
- Operation 404 obtaining a maximum brightness value of a pixel point in the black and white image, and using the maximum brightness value as an atmospheric light value.
- Operation 406 obtaining an original transmittance according to the atmospheric light value.
- Operation 410 performing a defogging process on the color image according to the dehazing degree factor, the atmospheric light value, and the original transmittance.
- the black and white image is taken by the black and white camera to obtain the maximum brightness value in the black and white image, and the maximum brightness value is taken as the atmospheric light value, and the calculation amount of the atmospheric light value is small, the speed is fast, and then the ambient light value is obtained.
- obtain the dehazing level obtain the corresponding defogging degree factor according to the defogging level, adjust the original transmittance according to the defogging degree factor to generate a new transmittance, which can be correspondingly according to the user's defogging demand. Fog to meet the needs of different users.
- FIG. 5 is a flow chart of an image processing method in another embodiment. As shown in FIG. 5, an image processing method includes:
- Operation 514 performing defogging processing on each of the RGB channels of the color image according to the atmospheric light value and the band transmittance of each of the RGB channels.
- the first obtaining module 604 is configured to acquire a maximum brightness value of a pixel point in the black and white image, and use the maximum brightness value as an atmospheric light value.
- the second obtaining module 606 is configured to obtain an original transmittance according to the atmospheric light value.
- the defogging processing module 608 is configured to perform a defogging process on the color image according to the atmospheric light value and the original transmittance.
- the fourth obtaining module 710 is configured to obtain a band transmittance of each of the three channels of the RGB according to the transmittance factor and the original transmittance.
- the defogging level acquisition module 808 is configured to acquire a defogging level after the obtaining the original transmittance according to the atmospheric light value.
Landscapes
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Image Processing (AREA)
- Studio Devices (AREA)
Abstract
An image processing method, comprising: photographing a same scene by means of a black and white camera and a color camera so as to acquire a black and white image and a color image; acquiring a highest brightness value for the pixels in the black and white image, and using the highest brightness value as an atmospheric light value; acquiring an original transmittance according to the atmospheric light value; performing de-fogging processing on the color image according to the atmospheric light value and the original transmittance.
Description
相关申请的交叉引用Cross-reference to related applications
本申请要求于2017年07月27日提交中国专利局、申请号为2017106262586、发明名称为“图像处理方法、装置、计算机设备和计算机可读存储介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application claims the priority of the Chinese Patent Application, filed on July 27, 2017, the Chinese Patent Application No. PCT Application No. PCT Application No. This is incorporated herein by reference.
本申请涉及计算机技术领域,特别是涉及一种图像处理方法、计算机设备和非易失性计算机可读存储介质。The present application relates to the field of computer technology, and in particular, to an image processing method, a computer device, and a non-transitory computer readable storage medium.
随着电子技术的迅速发展,各种电子设备带有摄像头,通过摄像头,用户可以随时随地的记录所看到的风景或自拍留影。受环境影响,拍摄的图像中常存在雾,降低了图像的质量。传统的去雾方法获取大气光值,计算复杂,去雾效率低。With the rapid development of electronic technology, various electronic devices have cameras. Through the camera, users can record the scenery or self-portraits they see at any time and any place. Due to the influence of the environment, fog is often present in the captured images, which reduces the quality of the image. The traditional defogging method obtains the atmospheric light value, the calculation is complicated, and the defogging efficiency is low.
发明内容Summary of the invention
根据本申请的各种实施例提供一种图像处理方法、计算机设备和非易失性计算机可读存储介质。An image processing method, a computer device, and a non-transitory computer readable storage medium are provided in accordance with various embodiments of the present application.
一种图像处理方法,包括:An image processing method comprising:
通过黑白摄像头和彩色摄像头拍摄同一场景获取黑白图像和彩色图像;Obtaining black and white images and color images by shooting the same scene through a black and white camera and a color camera;
获取所述黑白图像中像素点的最大亮度值,将所述最大亮度值作为大气光值;Obtaining a maximum brightness value of a pixel in the black and white image, and using the maximum brightness value as an atmospheric light value;
根据所述大气光值获取原始透射率;及Obtaining the original transmittance according to the atmospheric light value; and
根据所述大气光值和原始透射率对所述彩色图像进行去雾处理。The color image is subjected to a defogging process according to the atmospheric light value and the original transmittance.
一种计算机设备,包括存储器及处理器,所述存储器中储存有计算机可读指令,所述指令被所述处理器执行时,使得所述处理器执行以下操作:A computer device comprising a memory and a processor, the memory storing computer readable instructions, wherein when executed by the processor, the processor causes the processor to:
通过黑白摄像头和彩色摄像头拍摄同一场景获取黑白图像和彩色图像;Obtaining black and white images and color images by shooting the same scene through a black and white camera and a color camera;
获取所述黑白图像中像素点的最大亮度值,将所述最大亮度值作为大气光值;Obtaining a maximum brightness value of a pixel in the black and white image, and using the maximum brightness value as an atmospheric light value;
根据所述大气光值获取原始透射率;及Obtaining the original transmittance according to the atmospheric light value; and
根据所述大气光值和原始透射率对所述彩色图像进行去雾处理。The color image is subjected to a defogging process according to the atmospheric light value and the original transmittance.
一个或多个包含计算机可执行指令的非易失性计算机可读存储介质,当所述计算机可执行指令被一个或多个处理器执行时,使得所述处理器执行以下操作:One or more non-transitory computer readable storage media containing computer executable instructions that, when executed by one or more processors, cause the processor to:
通过黑白摄像头和彩色摄像头拍摄同一场景获取黑白图像和彩色图像;Obtaining black and white images and color images by shooting the same scene through a black and white camera and a color camera;
获取所述黑白图像中像素点的最大亮度值,将所述最大亮度值作为大气光值;Obtaining a maximum brightness value of a pixel in the black and white image, and using the maximum brightness value as an atmospheric light value;
根据所述大气光值获取原始透射率;及Obtaining the original transmittance according to the atmospheric light value; and
根据所述大气光值和原始透射率对所述彩色图像进行去雾处理。The color image is subjected to a defogging process according to the atmospheric light value and the original transmittance.
通过黑白摄像头和彩色摄像头拍摄同一场景获取黑白图像和彩色图像,获取黑白图像中的最大亮度值,将最大亮度值作为大气光值,得到大气光值的计算量小,速度快,再根据大气光值得到原始透射率,根据大气光值和原始透射率对彩色图像进行去雾处理,提高了去雾效率。The black and white image and the color camera are used to capture the same scene to obtain the black and white image and the color image, and the maximum brightness value in the black and white image is obtained, and the maximum brightness value is taken as the atmospheric light value, and the calculation amount of the atmospheric light value is small, the speed is fast, and then according to the atmospheric light. The value obtains the original transmittance, and the color image is subjected to dehazing treatment according to the atmospheric light value and the original transmittance, thereby improving the defogging efficiency.
本申请的一个或多个实施例的细节在下面的附图和描述中提出。本申请的其它特征、目的和优点将从说明书、附图以及权利要求书变得明显。Details of one or more embodiments of the present application are set forth in the accompanying drawings and description below. Other features, objects, and advantages of the invention will be apparent from the description and appended claims.
为了更清楚地说明本申请实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings used in the embodiments or the prior art description will be briefly described below. Obviously, the drawings in the following description are only It is a certain embodiment of the present application, and other drawings can be obtained according to the drawings without any creative work for those skilled in the art.
图1为一个实施例中图像处理方法的应用环境图;1 is an application environment diagram of an image processing method in an embodiment;
图2为一个实施例中图像处理方法的流程图;2 is a flow chart of an image processing method in an embodiment;
图3为另一个实施例中图像处理方法的流程图;3 is a flow chart of an image processing method in another embodiment;
图4为另一个实施例中图像处理方法的流程图;4 is a flow chart of an image processing method in another embodiment;
图5为另一个实施例中图像处理方法的流程图;Figure 5 is a flow chart of an image processing method in another embodiment;
图6为一个实施例中图像处理装置的结构框图;Figure 6 is a block diagram showing the structure of an image processing apparatus in an embodiment;
图7为另一个实施例中图像处理装置的结构框图;Figure 7 is a block diagram showing the structure of an image processing apparatus in another embodiment;
图8为另一个实施例中图像处理装置的结构框图;Figure 8 is a block diagram showing the structure of an image processing apparatus in another embodiment;
图9为一个实施例中图像处理电路的示意图。Figure 9 is a schematic illustration of an image processing circuit in one embodiment.
为了使本申请的目的、技术方案及优点更加清楚明白,以下结合附图及实施例,对本申请进行进一步详细说明。应当理解,此处所描述的具体实施例仅仅用以解释本申请,并不用于限定本申请。In order to make the objects, technical solutions, and advantages of the present application more comprehensible, the present application will be further described in detail below with reference to the accompanying drawings and embodiments. It is understood that the specific embodiments described herein are merely illustrative of the application and are not intended to be limiting.
可以理解,本申请所使用的术语“第一”、“第二”等可在本文中用于描述各种元件,但这些元件不受这些术语限制。这些术语仅用于将第一个元件与另一个元件区分。举例来说,在不脱离本申请的范围的情况下,可以将第一获取模块称为第二获取模块,且类似地,可将第二获取模块称为第一获取模块。第一获取模块和第二获取模块两者都是获取模块,但其不是同一获取模块。It will be understood that the terms "first", "second" and the like, as used herein, may be used to describe various elements, but these elements are not limited by these terms. These terms are only used to distinguish one element from another. For example, the first acquisition module may be referred to as a second acquisition module without departing from the scope of the present application, and similarly, the second acquisition module may be referred to as a first acquisition module. Both the first acquisition module and the second acquisition module are acquisition modules, but they are not the same acquisition module.
图1为一个实施例中图像处理方法的应用环境示意图。如图1所示,该应用环境包括带黑白摄像头和彩色摄像头的移动终端110和场景120。通过移动终端110上的黑白摄像头拍摄一场景120得到黑白图像,再通过彩色摄像头拍摄同一场景得到彩色图像,根据黑白图像获取最大亮度值,将最大亮度值作为大气光值,再根据大气光值得到原始透射率,大气光值计算量小,根据大气光值和原始透射率对彩色图像进行去雾处理,提高了去雾效率。FIG. 1 is a schematic diagram of an application environment of an image processing method in an embodiment. As shown in FIG. 1, the application environment includes a mobile terminal 110 and a scene 120 with a black and white camera and a color camera. A black and white image is captured by the black and white camera on the mobile terminal 110 to obtain a black and white image, and then the same scene is captured by the color camera to obtain a color image, and the maximum brightness value is obtained according to the black and white image, and the maximum brightness value is taken as the atmospheric light value, and then according to the atmospheric light value. The original transmittance and the calculation of the atmospheric light value are small, and the color image is dehazed according to the atmospheric light value and the original transmittance, thereby improving the defogging efficiency.
图2为一个实施例中图像处理方法的流程图。如图2所示,一种图像处理方法,包括:2 is a flow chart of an image processing method in one embodiment. As shown in FIG. 2, an image processing method includes:
操作202,通过黑白摄像头和彩色摄像头拍摄同一场景获取黑白图像和彩色图像。Operation 202, capturing a black and white image and a color image by capturing the same scene through a black and white camera and a color camera.
具体地,黑白摄像头是指用于拍摄黑白图像的摄像头。彩色摄像头是用于拍摄彩色图像的摄像头。对于同一场景,移动终端可以通过黑白摄像头拍摄获取黑白摄像头,再通过彩色摄像头拍摄获取彩色图像。场景是指所要拍摄的地方,如动物园、植物园、天空、海岸线等地方,或人所在的地方等。Specifically, a black and white camera refers to a camera for taking a black and white image. The color camera is a camera for taking color images. For the same scene, the mobile terminal can capture a black and white camera through a black and white camera, and then capture a color image through a color camera. The scene refers to the place to be photographed, such as the zoo, botanical garden, sky, coastline, etc., or where the person is.
操作204,获取所述黑白图像中像素点的最大亮度值,将所述最大亮度值作为大气光值。Operation 204: Acquire a maximum brightness value of a pixel point in the black and white image, and use the maximum brightness value as an atmospheric light value.
具体地,移动终端提取黑白图像中各个像素点的亮度值,将亮度值从小到大或从大到小进行排序,筛选出最大亮度值,将最大亮度值作为大气光值。移动终端也可以直接比较 各个像素点的亮度值,筛选出最大亮度值。Specifically, the mobile terminal extracts the brightness values of the respective pixels in the black and white image, sorts the brightness values from small to large or from large to small, selects the maximum brightness value, and uses the maximum brightness value as the atmospheric light value. The mobile terminal can also directly compare the brightness values of the respective pixels to select the maximum brightness value.
操作206,根据所述大气光值获取原始透射率。 Operation 206, obtaining an original transmittance according to the atmospheric light value.
具体地,获取到大气光值后,移动终端可通过暗原色先验算法计算得到原始透射率。Specifically, after acquiring the atmospheric light value, the mobile terminal can calculate the original transmittance by using a dark primary color prior algorithm.
操作208,根据所述大气光值和原始透射率对所述彩色图像进行去雾处理。 Operation 208, performing a defogging process on the color image according to the atmospheric light value and the original transmittance.
具体地,移动终端获取到大气光值和原始透射率后,可通过按原色先验算法对彩色图像进行去雾处理。Specifically, after the mobile terminal acquires the atmospheric light value and the original transmittance, the color image may be subjected to a dehazing process by a primary color prior algorithm.
基于暗原色先验算法对彩色图像进行去雾的操作包括:The operation of defogging a color image based on a dark primary color prior algorithm includes:
获取大气散射模型:Get the atmospheric scattering model:
I(x)=J(x)t(x)+A(1-t(x)) 公式(1)I(x)=J(x)t(x)+A(1-t(x)) Formula (1)
其中,I(x)表示需要进行去雾处理的含雾图像,J(x)表示对含雾图像进行去雾处理后得到的无雾图像,x表示图像中某一像素的空间位置,t(x)为原始透射率,A为大气光值。大气光值可通过黑白图像计算获取,也可通过大气光值与天气情况和当前时间的对应关系获取。在通常情况下,移动终端可选用黑白图像中最大亮度值的像素作为大气光值的估测。本实施例中,移动终端通过黑白摄像头拍摄黑白图像,获取黑白图像中最大亮度值,将最大亮度值作为大气光值。假设A为已知值,彩色图像中RGB(Red(红)、Green(绿)、Blue(蓝))三个通道中存在通道值很低的通道,且该通道值接近于零,则可以得到:Where I(x) denotes a foggy image that needs to be defogged, J(x) denotes a fog-free image obtained by dehazing the fogged image, and x denotes the spatial position of a pixel in the image, t( x) is the original transmittance and A is the atmospheric light value. The atmospheric light value can be obtained by calculation of black and white images, or by the correspondence between atmospheric light values and weather conditions and current time. Under normal circumstances, the mobile terminal can select the pixel of the maximum brightness value in the black and white image as an estimate of the atmospheric light value. In this embodiment, the mobile terminal captures a black and white image through a black and white camera, and obtains a maximum brightness value in the black and white image, and uses the maximum brightness value as the atmospheric light value. Suppose A is a known value. In a color image, there are channels with very low channel values in three channels of RGB (Red, Green, Blue), and the channel value is close to zero. :
公式(2)中,J
dark(x)表示暗通道图像,J
c(y)表示彩色图像的每个颜色通道,Ω(x)表示以像素x为中心的一个窗口。由公式(2)可以获取到原始透射率,即为:
In the formula (2), J dark (x) represents a dark channel image, J c (y) represents each color channel of the color image, and Ω (x) represents a window centered on the pixel x. The original transmittance can be obtained by equation (2), which is:
公式(3)中,
即为含雾图像在x领域的暗原色值。
In formula (3), This is the dark primary color value of the foggy image in the x field.
将大气光值带入公式(3)即可求取出原始透射率,再将彩色图像作为I(x),大气光值A和原始透射率t(x)带入公式(1)即可求取去雾后的彩色图像J(x)。By taking the atmospheric light value into the formula (3), the original transmittance can be obtained, and then the color image is taken as I(x), the atmospheric light value A and the original transmittance t(x) are taken into the formula (1). The color image J(x) after defogging.
本实施例中,通过黑白摄像头拍摄黑白图像,获取黑白图像中的最大亮度值,将最大亮度值作为大气光值,得到大气光值的计算量小,速度快,再根据大气光值得到原始透射 率,根据大气光值和原始透射率对同一场景拍摄的彩色图像进行去雾,提高了去雾效率。In this embodiment, the black and white image is taken by the black and white camera to obtain the maximum brightness value in the black and white image, and the maximum brightness value is taken as the atmospheric light value, and the calculation amount of the atmospheric light value is small, the speed is fast, and the original transmission is obtained according to the atmospheric light value. Rate, defogging the color image taken in the same scene according to the atmospheric light value and the original transmittance, improving the defogging efficiency.
在一个实施例中,可以引入一个0到1之间的权值ω对原始透射率进行调节,则最终求取的去雾参数即透射率表达式如下:In one embodiment, a weight ω between 0 and 1 can be introduced to adjust the original transmittance, and the final defogging parameter, that is, the transmittance expression, is as follows:
公式(4)中,I
c(y)代表预览图像I(x)的像素R、G、B三通道;ω称为去雾程度因子,ω越小表示去雾程度越小,ω越大表示去雾程度越大。
In the formula (4), I c (y) represents the three channels of the pixels R, G, and B of the preview image I(x); ω is called the degree of defogging, and the smaller the ω, the smaller the degree of defogging, and the larger the ω is, The greater the degree of de-fogging.
移动终端根据大气光值及去雾程度因子采用公式(4)求取透射率,再将彩色图像作为I(x),大气光值A和原始透射率t(x)带入公式(1)即可求取去雾后的彩色图像J(x)。The mobile terminal uses equation (4) to obtain the transmittance according to the atmospheric light value and the degree of dehazing degree, and then takes the color image as I(x), the atmospheric light value A and the original transmittance t(x) into the formula (1). A color image J(x) after defogging can be obtained.
此外,为了保证去雾效果,移动终端可以对透射率设定一个阈值t
0,那么无雾时景物为:
In addition, in order to ensure the defogging effect, the mobile terminal can set a threshold t 0 for the transmittance, then the scene without fog is:
图3为另一个实施例中图像处理方法的流程图。如图3所示,一种图像处理方法,与图2中方法的区别在于针对不同通道采用不同透射率去雾,包括:3 is a flow chart of an image processing method in another embodiment. As shown in FIG. 3, an image processing method differs from the method of FIG. 2 in that different transmittances are used for different channels to remove fog, including:
操作302,通过黑白摄像头和彩色摄像头拍摄同一场景获取黑白图像和彩色图像。In operation 302, the same scene is captured by the black and white camera and the color camera to obtain a black and white image and a color image.
操作304,获取所述黑白图像中像素点的最大亮度值,将所述最大亮度值作为大气光值。Operation 304: Acquire a maximum brightness value of a pixel point in the black and white image, and use the maximum brightness value as an atmospheric light value.
具体地,移动终端提取黑白图像中各个像素点的亮度值,将亮度值从小到大或从大到小进行排序,筛选出最大亮度值,将最大亮度值作为大气光值。Specifically, the mobile terminal extracts the brightness values of the respective pixels in the black and white image, sorts the brightness values from small to large or from large to small, selects the maximum brightness value, and uses the maximum brightness value as the atmospheric light value.
操作306,根据所述大气光值获取原始透射率。 Operation 306, obtaining an original transmittance according to the atmospheric light value.
具体地,移动终端获取到大气光值后,可通过暗原色先验算法计算得到原始透射率。Specifically, after the mobile terminal acquires the atmospheric light value, the original transmittance can be calculated by the dark primary color prior algorithm.
操作308,获取预设的RGB三个通道中每个通道的透射率因子。 Operation 308, obtaining a transmittance factor of each of the preset three channels of RGB.
对于相同浓度的雾,对红绿蓝三波段的影响程度是递增的,RGB三个波段的透射率排序为:红波段透射率最高,绿波段次之,蓝波段最低;因此在有雾的区域,移动终端对RGB三个波段的处理强度应该递增。For the fog of the same concentration, the degree of influence on the red, green and blue bands is increasing. The transmittance of the three bands of RGB is ranked as follows: the red band has the highest transmittance, the green band is the second, and the blue band is the lowest; therefore, in the foggy area The processing strength of the mobile terminal for the three bands of RGB should be increased.
雾的浓度越浓,雾对RGB三个波段的影响差异越大,移动终端对RGB三个波段的处理强度差异也应该越大。同时在没有雾的区域,移动终端对RGB三个波段都不做处理。The thicker the concentration of fog, the greater the difference in the effect of fog on the three bands of RGB, and the greater the difference in processing intensity of the three bands of RGB for mobile terminals. At the same time, in the area without fog, the mobile terminal does not process the three bands of RGB.
为此,基于原始透射率,移动终端引入两个调节系数即透射率因子W
G和W
B。利用这两个系数,移动终端可以对RGB三波段实施不同的去雾强度。
To this end, based on the original transmittance, the mobile terminal introduces two adjustment coefficients, namely transmittance factors W G and W B . With these two coefficients, the mobile terminal can implement different defogging strengths for the RGB three bands.
T∈[0,1];T
R=t
T∈[0,1];T R =t
W
G=(a+b*t)
2;T
G=W
G*t
W G = (a + b * t) 2 ; T G = W G * t
W
B=(c+d*t)
2;T
B=W
B*t
W B =(c+d*t) 2 ; T B =W B *t
其中,t是根据暗原色先验算法求取出来的原始透射率,T
R、T
G、T
B分别代表针对RGB三个波段的波段透射率,不同的透射率值代表对三个波段的处理强度不同。参数a、b、c、d可根据实际情况取值,例如a可为0.9,b可为0.1,c可为0.7,d可为0.3。
Where t is the original transmittance obtained from the dark primary color prior algorithm, T R , T G , T B respectively represent the band transmittance for the three bands of RGB, and different transmittance values represent the processing of the three bands. Different strengths. The parameters a, b, c, and d can be taken according to actual conditions, for example, a can be 0.9, b can be 0.1, c can be 0.7, and d can be 0.3.
操作310,根据所述透射率因子及所述原始透射率获取RGB三个通道中每个通道的波段透射率。 Operation 310, obtaining a band transmittance of each of the three channels of RGB according to the transmittance factor and the original transmittance.
移动终端根据透射率因子和原始透射率可得到RGB三个通道各自的波段透射率。The mobile terminal can obtain the respective band transmittances of the three channels of RGB according to the transmittance factor and the original transmittance.
操作312,根据所述大气光值和RGB各个通道的波段透射率对所述彩色图像的RGB各个通道进行去雾处理。 Operation 312, performing defogging processing on each of the RGB channels of the color image according to the atmospheric light value and the band transmittance of each of the RGB channels.
本实施例中图像处理方法,通过黑白摄像头拍摄黑白图像,获取黑白图像中的最大亮度值,将最大亮度值作为大气光值,得到大气光值的计算量小,速度快,再根据大气光值得到原始透射率,获取到RGB三通道的透射率因子,根据透射率因子调节及原始透射率得到各个通道的波段透射率,采用各个通道对应的波段透射率对彩色图像进行去雾处理,防止图像偏蓝,既提高了去雾效率,又实现了真实自然的色彩还原。In the image processing method of the embodiment, the black and white image is taken by the black and white camera to obtain the maximum brightness value in the black and white image, and the maximum brightness value is taken as the atmospheric light value, and the calculation amount of the atmospheric light value is small, the speed is fast, and then the ambient light value is obtained. To the original transmittance, obtain the transmittance factor of RGB three channels, obtain the band transmittance of each channel according to the transmittance factor adjustment and the original transmittance, and defogg the color image by using the band transmittance corresponding to each channel to prevent the image. The bluish color not only improves the efficiency of defogging, but also achieves true and natural color reproduction.
图4为另一个实施例中图像处理方法的流程图。如图4所示,一种图像处理方法,与图2中方法的区别在于,增加了去雾等级,包括:4 is a flow chart of an image processing method in another embodiment. As shown in FIG. 4, an image processing method differs from the method of FIG. 2 in that the defogging level is increased, including:
操作402,通过黑白摄像头和彩色摄像头拍摄同一场景获取黑白图像和彩色图像。 Operation 402, capturing a black and white image and a color image by capturing the same scene through a black and white camera and a color camera.
操作404,获取所述黑白图像中像素点的最大亮度值,将所述最大亮度值作为大气光值。 Operation 404, obtaining a maximum brightness value of a pixel point in the black and white image, and using the maximum brightness value as an atmospheric light value.
操作406,根据所述大气光值获取原始透射率。 Operation 406, obtaining an original transmittance according to the atmospheric light value.
操作408,获取去雾等级,根据所述去雾等级获取对应的去雾程度因子。 Operation 408, obtaining a defogging level, and obtaining a corresponding dehazing degree factor according to the defogging level.
在一个实施例中,移动终端可以预先设置不同的去雾等级与去雾程度因子之间的对应关系。例如,移动终端可以提供6个去雾等级以供选择,每个去雾等级对应不同的去雾程度因子,例如去雾等级为零级时,其去雾等级因子ω0=0.50;去雾等级为一级时,其去雾等级因子ω1=0.60,依次类推。移动终端可以根据去雾等级,查找预置的与去雾等级对应的去雾程度因子。In an embodiment, the mobile terminal may preset a correspondence between different defogging levels and a defogging degree factor. For example, the mobile terminal can provide 6 defogging levels for selection, and each defogging level corresponds to a different dehazing degree factor. For example, when the defogging level is zero, the defogging level factor ω0=0.50; the defogging level is At the first stage, the dehazing level factor ω1 = 0.60, and so on. The mobile terminal can search for a preset defogging degree factor corresponding to the defogging level according to the defogging level.
操作410,根据所述去雾程度因子、大气光值和原始透射率对所述彩色图像进行去雾处理。 Operation 410, performing a defogging process on the color image according to the dehazing degree factor, the atmospheric light value, and the original transmittance.
移动终端采用公式(4)来计算新的透射率,再根据新的透射率及大气光值对彩色图像进行去雾处理。The mobile terminal uses formula (4) to calculate the new transmittance, and then defogges the color image according to the new transmittance and the atmospheric light value.
本实施例中图像处理方法,通过黑白摄像头拍摄黑白图像,获取黑白图像中的最大亮度值,将最大亮度值作为大气光值,得到大气光值的计算量小,速度快,再根据大气光值得到原始透射率,获取去雾等级,根据去雾等级得到对应的去雾程度因子,根据去雾程度因子对原始透射率进行调节生成新的透射率,可根据用户的去雾需求进行相应的去雾,满足不同用户的需求。In the image processing method of the embodiment, the black and white image is taken by the black and white camera to obtain the maximum brightness value in the black and white image, and the maximum brightness value is taken as the atmospheric light value, and the calculation amount of the atmospheric light value is small, the speed is fast, and then the ambient light value is obtained. To the original transmittance, obtain the dehazing level, obtain the corresponding defogging degree factor according to the defogging level, adjust the original transmittance according to the defogging degree factor to generate a new transmittance, which can be correspondingly according to the user's defogging demand. Fog to meet the needs of different users.
图5为另一个实施例中图像处理方法的流程图。如图5所示,一种图像处理方法,包括:Figure 5 is a flow chart of an image processing method in another embodiment. As shown in FIG. 5, an image processing method includes:
操作502,通过黑白摄像头和彩色摄像头拍摄同一场景获取黑白图像和彩色图像。 Operation 502, capturing a black and white image and a color image by capturing the same scene through a black and white camera and a color camera.
操作504,获取所述黑白图像中像素点的最大亮度值,将所述最大亮度值作为大气光值。Operation 504: Acquire a maximum brightness value of a pixel point in the black and white image, and use the maximum brightness value as an atmospheric light value.
操作506,根据所述大气光值获取原始透射率。 Operation 506, obtaining an original transmittance according to the atmospheric light value.
操作508,获取去雾等级,根据所述去雾等级获取对应的去雾程度因子。At operation 508, a dehazing level is obtained, and a corresponding dehazing degree factor is obtained according to the defogging level.
操作510,获取预设的RGB三个通道中每个通道的透射率因子。Operation 510, obtaining a transmittance factor of each of the preset three channels of RGB.
操作512,根据所述透射率因子、去雾程度因子及所述原始透射率获取RGB三个通道中每个通道的波段透射率。 Operation 512, obtaining a band transmittance of each of the three channels of RGB according to the transmittance factor, the degree of dehazing factor, and the original transmittance.
操作514,根据所述大气光值和RGB各个通道的波段透射率对所述彩色图像的RGB各个通道进行去雾处理。 Operation 514, performing defogging processing on each of the RGB channels of the color image according to the atmospheric light value and the band transmittance of each of the RGB channels.
其中,操作508和510没有先后顺序。Therein, operations 508 and 510 have no order.
本实施例中图像处理方法,通过黑白摄像头拍摄黑白图像,获取黑白图像中的最大亮度值,将最大亮度值作为大气光值,得到大气光值的计算量小,速度快,再根据大气光值得到原始透射率,获取到RGB三通道的透射率因子,根据透射率因子调节及原始透射率得到各个通道的播放透射率,采用各个通道对应的波段透射率对彩色图像进行去雾处理,防止图像偏蓝,既提高了去雾效率,又实现了真实自然的色彩还原;也根据用户的去雾需求进行相应的去雾,满足不同用户的需求。In the image processing method of the embodiment, the black and white image is taken by the black and white camera to obtain the maximum brightness value in the black and white image, and the maximum brightness value is taken as the atmospheric light value, and the calculation amount of the atmospheric light value is small, the speed is fast, and then the ambient light value is obtained. To the original transmittance, obtain the transmittance factor of RGB three channels, obtain the transmittance of each channel according to the transmittance factor adjustment and the original transmittance, and defogg the color image by using the band transmittance corresponding to each channel to prevent the image. The bluish blue not only improves the defogging efficiency, but also realizes the true natural color reproduction; and also performs corresponding defogging according to the user's defogging demand to meet the needs of different users.
在一个实施例中,上述图像处理方法还包括:检测去雾处理后的彩色图像的噪点数量;当所述噪点数量大于预设阈值时,则对所述去雾处理后的彩色图像进行降噪处理。In an embodiment, the image processing method further includes: detecting a quantity of noise of the color image after the defogging process; and when the number of the noise is greater than a preset threshold, performing noise reduction on the color image after the defogging process deal with.
具体地,预设阈值可根据需要设定或根据历史统计值得到。移动终端通过对图像进行降噪,提高了图像的质量。Specifically, the preset threshold may be set as needed or according to historical statistics. The mobile terminal improves the quality of the image by reducing the noise of the image.
在一个实施例中,上述图像处理方法还包括:获取去雾处理后的彩色图像中各像素点的亮度值;当所述亮度值小于预设亮度值时,则调整所述亮度值为预设亮度值。In an embodiment, the image processing method further includes: obtaining a brightness value of each pixel in the color image after the defogging process; and when the brightness value is less than the preset brightness value, adjusting the brightness value as a preset Brightness value.
预设亮度值可为经验值,或根据需要设置。移动终端可以通过调整亮度值,提高去雾后图像的质量。The preset brightness value can be an empirical value or set as desired. The mobile terminal can improve the quality of the image after defogging by adjusting the brightness value.
本申请实施例的方法流程图中的各个操作按照箭头的指示依次显示,但是这些操作并不是必然按照箭头指示的顺序依次执行。除非本文中有明确的说明,这些操作的执行并没有严格的顺序限制,其可以以其他的顺序执行。而且,本申请实施例的方法流程图中的至少一部分操作可以包括多个子操作或者多个阶段,这些子操作或者阶段并不必然是在同一时刻执行完成,而是可以在不同的时刻执行,其执行顺序也不必然是依次进行,而是可以与其他操作或者其他操作的子操作或者阶段的至少一部分轮流或者交替地执行。The operations in the flowchart of the method of the embodiment of the present application are sequentially displayed in accordance with the indication of the arrows, but the operations are not necessarily performed in the order indicated by the arrows. Except as explicitly stated herein, the execution of these operations is not strictly limited, and may be performed in other sequences. Moreover, at least a part of the operations in the method flowchart of the embodiment of the present application may include multiple sub-operations or multiple stages, which are not necessarily performed at the same time, but may be executed at different times. The order of execution is not necessarily performed sequentially, but may be performed alternately or alternately with at least a portion of the sub-operations or phases of other operations or other operations.
图6为一个实施例中图像处理装置的结构框图。如图6所示,一种图像处理装置600,包括图像采集模块602、第一获取模块604、第二获取模块606、去雾处理模块608。其中:Fig. 6 is a block diagram showing the structure of an image processing apparatus in an embodiment. As shown in FIG. 6 , an image processing apparatus 600 includes an image acquisition module 602 , a first acquisition module 604 , a second acquisition module 606 , and a defogging processing module 608 . among them:
图像采集模块602用于通过黑白摄像头和彩色摄像头拍摄同一场景获取黑白图像和彩色图像。The image acquisition module 602 is configured to capture a black and white image and a color image by capturing the same scene through a black and white camera and a color camera.
第一获取模块604用于获取所述黑白图像中像素点的最大亮度值,将所述最大亮度值作为大气光值。The first obtaining module 604 is configured to acquire a maximum brightness value of a pixel point in the black and white image, and use the maximum brightness value as an atmospheric light value.
第二获取模块606用于根据所述大气光值获取原始透射率。The second obtaining module 606 is configured to obtain an original transmittance according to the atmospheric light value.
去雾处理模块608用于根据所述大气光值和原始透射率对所述彩色图像进行去雾处理。The defogging processing module 608 is configured to perform a defogging process on the color image according to the atmospheric light value and the original transmittance.
本实施例中图像处理装置,通过黑白摄像头拍摄黑白图像,获取黑白图像中的最大亮度值,将最大亮度值作为大气光值,得到大气光值的计算量小,速度快,再根据大气光值得到原始透射率,根据大气光值和原始透射率对同一场景拍摄的彩色图像进行去雾,提高了去雾效率。In the image processing apparatus of the embodiment, the black and white image is captured by the black and white camera, and the maximum brightness value in the black and white image is obtained, and the maximum brightness value is used as the atmospheric light value, and the calculation amount of the atmospheric light value is small, the speed is fast, and then the ambient light value is obtained. By the original transmittance, the color image taken by the same scene is defogged according to the atmospheric light value and the original transmittance, and the defogging efficiency is improved.
图7为另一个实施例中图像处理装置的结构框图。如图7所示,一种图像处理装置700,包括图像采集模块702、第一获取模块704、第二获取模块706、第三获取模块708、第四获取模块710、去雾处理模块712。其中:图像采集模块702、第一获取模块704、第二获取模块706与图6中对应的模块具有相同的作用。Fig. 7 is a block diagram showing the structure of an image processing apparatus in another embodiment. As shown in FIG. 7 , an image processing apparatus 700 includes an image acquisition module 702 , a first acquisition module 704 , a second acquisition module 706 , a third acquisition module 708 , a fourth acquisition module 710 , and a defogging processing module 712 . The image acquisition module 702, the first acquisition module 704, and the second acquisition module 706 have the same functions as the corresponding modules in FIG.
第三获取模块708用于在所述根据所述大气光值获取原始透射率之后,获取预设的RGB三个通道中每个通道的透射率因子。The third obtaining module 708 is configured to acquire a transmittance factor of each of the preset three channels of RGB after the obtaining the original transmittance according to the atmospheric light value.
第四获取模块710用于根据所述透射率因子及所述原始透射率获取RGB三个通道中每个通道的波段透射率。The fourth obtaining module 710 is configured to obtain a band transmittance of each of the three channels of the RGB according to the transmittance factor and the original transmittance.
去雾处理模块712还用于根据所述大气光值和RGB各个通道的波段透射率对所述彩色图像的RGB各个通道进行去雾处理。The defogging processing module 712 is further configured to perform a defogging process on each of the RGB channels of the color image according to the atmospheric light value and the band transmittance of each of the RGB channels.
本实施例中图像处理装置,通过黑白摄像头拍摄黑白图像,获取黑白图像中的最大亮度值,将最大亮度值作为大气光值,得到大气光值的计算量小,速度快,再根据大气光值得到原始透射率,获取到RGB三通道的透射率因子,根据透射率因子调节及原始透射率得到各个通道的波段透射率,采用各个通道对应的波段透射率对彩色图像进行去雾处理,防止图像偏蓝,既提高了去雾效率,又实现了真实自然的色彩还原。In the image processing apparatus of the embodiment, the black and white image is captured by the black and white camera, and the maximum brightness value in the black and white image is obtained, and the maximum brightness value is used as the atmospheric light value, and the calculation amount of the atmospheric light value is small, the speed is fast, and then the ambient light value is obtained. To the original transmittance, obtain the transmittance factor of RGB three channels, obtain the band transmittance of each channel according to the transmittance factor adjustment and the original transmittance, and defogg the color image by using the band transmittance corresponding to each channel to prevent the image. The bluish color not only improves the efficiency of defogging, but also achieves true and natural color reproduction.
图8为另一个实施例中图像处理装置的结构框图。如图8所示,一种图像处理装置800,包括图像采集模块802、第一获取模块804、第二获取模块806、去雾等级获取模块808、去雾处理模块810。其中:图像采集模块802、第一获取模块804、第二获取模块806与图6中对应的模块具有相同的作用。Figure 8 is a block diagram showing the structure of an image processing apparatus in another embodiment. As shown in FIG. 8 , an image processing apparatus 800 includes an image acquisition module 802 , a first acquisition module 804 , a second acquisition module 806 , a defogging level acquisition module 808 , and a defogging processing module 810 . The image acquisition module 802, the first acquisition module 804, and the second acquisition module 806 have the same functions as the corresponding modules in FIG.
去雾等级获取模块808用于在所述根据所述大气光值获取原始透射率之后,获取去雾等级。The defogging level acquisition module 808 is configured to acquire a defogging level after the obtaining the original transmittance according to the atmospheric light value.
去雾处理模块810用于根据所述去雾等级、大气光值和原始透射率对所述彩色图像进行去雾处理。The defogging processing module 810 is configured to perform a defogging process on the color image according to the defogging level, the atmospheric light value, and the original transmittance.
在一个实施例中,一种图像处理装置包括图像采集模块、第一获取模块、第二获取模块、第三获取模块、去雾等级获取模块、第四获取模块、去雾处理模块。图像采集模块用于通过黑白摄像头和彩色摄像头拍摄同一场景获取黑白图像和彩色图像;第一获取模块用于获取所述黑白图像中像素点的最大亮度值,将所述最大亮度值作为大气光值;第二获取模块用于根据所述大气光值获取原始透射率;去雾等级获取模块用于获取去雾等级,根据所述去雾等级获取对应的去雾程度因子;第三获取模块用于获取预设的RGB三个通道中每个通道的透射率因子;第四获取模块用于根据所述透射率因子、去雾程度因子及所述原始透射率获取RGB三个通道中每个通道的波段透射率;去雾处理模块用于根据所述大气光值和RGB各个通道的波段透射率对所述彩色图像的RGB各个通道进行去雾处理。In an embodiment, an image processing apparatus includes an image acquisition module, a first acquisition module, a second acquisition module, a third acquisition module, a defogging level acquisition module, a fourth acquisition module, and a defogging processing module. The image acquisition module is configured to capture the same scene by the black and white camera and the color camera to obtain a black and white image and a color image; the first acquiring module is configured to acquire a maximum brightness value of the pixel in the black and white image, and use the maximum brightness value as the atmospheric light value. The second obtaining module is configured to obtain an original transmittance according to the atmospheric light value; the defogging level acquiring module is configured to acquire a defogging level, and obtain a corresponding defogging degree factor according to the defogging level; the third obtaining module is configured to: Obtaining a transmittance factor of each of the three channels of the preset RGB; the fourth obtaining module is configured to acquire each of the three channels of the RGB according to the transmittance factor, the degree of dehazing factor, and the original transmittance Band Transmittance; The defogging process module is configured to perform defogging processing on each of the RGB channels of the color image according to the atmospheric light value and the band transmittance of each of the RGB channels.
在一个实施例中,上述图像处理装置还可包括检测模块和降噪模块。所述检测模块用于检测去雾处理后的彩色图像的噪点数量;所述降噪模块用于当所述噪点数量大于预设阈值时,则对所述去雾处理后的彩色图像进行降噪处理。In one embodiment, the image processing apparatus described above may further include a detection module and a noise reduction module. The detecting module is configured to detect a noise quantity of the color image after the defogging process; and the noise reduction module is configured to: when the number of the noise is greater than a preset threshold, perform noise reduction on the color image after the defogging process deal with.
在一个实施例中,上述图像处理装置还可包括亮度获取模块和亮度调整模块。亮度获取模块用于获取去雾处理后的彩色图像中各像素点的亮度值。亮度调整模块用于当所述亮度值小于预设亮度值时,则调整所述亮度值为预设亮度值。预设亮度值可为经验值,或根据需要设置。In an embodiment, the image processing apparatus may further include a brightness acquisition module and a brightness adjustment module. The brightness acquisition module is configured to obtain a brightness value of each pixel in the color image after the defogging process. The brightness adjustment module is configured to adjust the brightness value to be a preset brightness value when the brightness value is less than a preset brightness value. The preset brightness value can be an empirical value or set as desired.
上述图像处理装置中各个模块的划分仅用于举例说明,在其他实施例中,可将图像处理装置按照需要划分为不同的模块,以完成上述图像处理装置的全部或部分功能。The division of each module in the above image processing apparatus is for illustrative purposes only. In other embodiments, the image processing apparatus may be divided into different modules as needed to complete all or part of the functions of the image processing apparatus.
上述图像处理装置中的各个模块可全部或部分通过软件、硬件及其组合来实现。上述各模块可以硬件形式内嵌于或独立于服务器中的处理器中,也可以以软件形式存储于服务器中的存储器中,以便于处理器调用执行以上各个模块对应的操作。如在本申请中所使用的,术语“组件”、“模块”和“系统”等旨在表示计算机相关的实体,它可以是硬件、硬件和软件的组合、软件、或者执行中的软件。例如,组件可以是但不限于是,在处理器上 运行的进程、处理器、对象、可执行码、执行的线程、程序和/或计算机。作为说明,运行在服务器上的应用程序和服务器都可以是组件。一个或多个组件可以驻留在进程和/或执行的线程中,并且组件可以位于一个计算机内和/或分布在两个或更多的计算机之间。The various modules in the image processing apparatus described above may be implemented in whole or in part by software, hardware, and combinations thereof. The above modules may be embedded in the hardware in the processor or in the memory in the server, or may be stored in the memory in the server, so that the processor calls the corresponding operations of the above modules. As used in this application, the terms "component", "module" and "system" and the like are intended to mean a computer-related entity, which may be hardware, a combination of hardware and software, software, or software in execution. For example, a component can be, but is not limited to being, a process running on a processor, a processor, an object, an executable, a thread of execution, a program, and/or a computer. By way of illustration, both an application running on a server and a server can be a component. One or more components can reside within a process and/or executed thread, and the components can be located within one computer and/or distributed between two or more computers.
本申请实施例还提供了一种非易失性计算机可读存储介质。一个或多个包含计算机可执行指令的非易失性计算机可读存储介质,当所述计算机可执行指令被一个或多个处理器执行时,使得所述处理器执行本申请实施例中所描述的图像处理方法。The embodiment of the present application also provides a non-transitory computer readable storage medium. One or more non-transitory computer readable storage media containing computer executable instructions that, when executed by one or more processors, cause the processor to perform the operations described in the embodiments of the present application Image processing method.
本申请实施例还提供一种计算机设备。一种计算机设备,包括存储器及处理器,所述存储器中储存有计算机可读指令,所述指令被所述处理器执行时,使得所述处理器本申请实施例中所描述的图像处理方法。The embodiment of the present application further provides a computer device. A computer device comprising a memory and a processor, the memory storing computer readable instructions, the instructions being executed by the processor, such that the processor is an image processing method as described in the embodiments of the present application.
本申请实施例还提供一种计算机设备。上述计算机设备中包括图像处理电路,图像处理电路可以利用硬件和/或软件组件实现,可包括定义ISP(Image Signal Processing,图像信号处理)管线的各种处理单元。图9为一个实施例中图像处理电路的示意图。如图9所示,为便于说明,仅示出与本申请实施例相关的图像处理技术的各个方面。The embodiment of the present application further provides a computer device. The above computer device includes an image processing circuit, and the image processing circuit may be implemented by hardware and/or software components, and may include various processing units defining an ISP (Image Signal Processing) pipeline. Figure 9 is a schematic illustration of an image processing circuit in one embodiment. As shown in FIG. 9, for convenience of explanation, only various aspects of the image processing technique related to the embodiment of the present application are shown.
如图9所示,图像处理电路包括ISP处理器940和控制逻辑器950。成像设备910捕捉的图像数据首先由ISP处理器940处理,ISP处理器940对图像数据进行分析以捕捉可用于确定和/或成像设备910的一个或多个控制参数的图像统计信息。成像设备910可包括具有一个或多个透镜912和图像传感器914的照相机。图像传感器914可包括色彩滤镜阵列(如Bayer滤镜),图像传感器914可获取用图像传感器914的每个成像像素捕捉的光强度和波长信息,并提供可由ISP处理器940处理的一组原始图像数据。传感器920可基于传感器920接口类型把原始图像数据提供给ISP处理器940。传感器920接口可以利用SMIA(Standard Mobile Imaging Architecture,标准移动成像架构)接口、其它串行或并行照相机接口、或上述接口的组合。传感器920可用于提供图像处理的参数,如防抖参数、增益参数等。成像设备910可包括黑白摄像头和彩色摄像头。黑白摄像头采集黑白图像,彩色摄像头采集与黑白摄像头同一场景的彩色图像。As shown in FIG. 9, the image processing circuit includes an ISP processor 940 and a control logic 950. The image data captured by imaging device 910 is first processed by ISP processor 940, which analyzes the image data to capture image statistics that can be used to determine and/or control one or more control parameters of imaging device 910. Imaging device 910 can include a camera having one or more lenses 912 and image sensor 914. Image sensor 914 may include a color filter array (such as a Bayer filter) that may acquire light intensity and wavelength information captured with each imaging pixel of image sensor 914 and provide a set of primitives that may be processed by ISP processor 940 Image data. Sensor 920 can provide raw image data to ISP processor 940 based on sensor 920 interface type. The sensor 920 interface may utilize a SMIA (Standard Mobile Imaging Architecture) interface, other serial or parallel camera interfaces, or a combination of the above. Sensor 920 can be used to provide parameters for image processing, such as anti-shake parameters, gain parameters, and the like. Imaging device 910 can include a black and white camera and a color camera. The black and white camera captures black and white images, and the color camera captures color images of the same scene as the black and white camera.
ISP处理器940按多种格式逐个像素地处理原始图像数据。例如,每个图像像素可具有8、10、12或14比特的位深度,ISP处理器940可对原始图像数据进行一个或多个图像 处理操作、收集关于图像数据的统计信息。其中,图像处理操作可按相同或不同的位深度精度进行。The ISP processor 940 processes the raw image data pixel by pixel in a variety of formats. For example, each image pixel can have a bit depth of 8, 10, 12 or 14 bits, and the ISP processor 940 can perform one or more image processing operations on the raw image data, collecting statistical information about the image data. Among them, image processing operations can be performed with the same or different bit depth precision.
ISP处理器940还可从图像存储器930接收像素数据。例如,从传感器920接口将原始像素数据发送给图像存储器930,图像存储器930中的原始像素数据再提供给ISP处理器940以供处理。图像存储器930可为存储器装置的一部分、存储设备、或计算机设备内的独立的专用存储器,并可包括DMA(Direct Memory Access,直接直接存储器存取)特征。 ISP processor 940 can also receive pixel data from image memory 930. For example, raw pixel data is sent from the sensor 920 interface to image memory 930, which is then provided to ISP processor 940 for processing. Image memory 930 may be part of a memory device, a storage device, or a separate dedicated memory within a computer device, and may include DMA (Direct Memory Access) features.
当接收到来自传感器920接口或来自图像存储器930的原始图像数据时,ISP处理器940可进行一个或多个图像处理操作,如时域滤波。处理后的图像数据可发送给或图像存储器930,以便在被显示之前进行另外的处理。ISP处理器940从图像存储器930接收处理数据,并对所述处理数据进行原始域中以及RGB和YCbCr颜色空间中的图像数据处理。处理后的图像数据可输出给显示器980,以供用户观看和/或由图形引擎或GPU(Graphics Processing Unit,图形处理器)进一步处理。此外,ISP处理器940的输出还可发送给图像存储器930,且显示器980可从图像存储器930读取图像数据。在一个实施例中,图像存储器930可被配置为实现一个或多个帧缓冲器。此外,ISP处理器940的输出可发送给编码器/解码器970,以便编码/解码图像数据。编码的图像数据可被保存,并在显示与显示器980设备上之前解压缩。When receiving raw image data from the sensor 920 interface or from image memory 930, ISP processor 940 can perform one or more image processing operations, such as time domain filtering. The processed image data can be sent to or to image memory 930 for additional processing prior to being displayed. The ISP processor 940 receives the processed data from the image memory 930 and performs image data processing in the original domain and in the RGB and YCbCr color spaces. The processed image data can be output to display 980 for viewing by a user and/or further processed by a graphics engine or a GPU (Graphics Processing Unit). Additionally, the output of ISP processor 940 can also be sent to image memory 930, and display 980 can read image data from image memory 930. In one embodiment, image memory 930 can be configured to implement one or more frame buffers. Additionally, the output of ISP processor 940 can be sent to encoder/decoder 970 to encode/decode image data. The encoded image data can be saved and decompressed before being displayed on the display 980 device.
ISP处理后的图像数据可发送给去雾模块960,以便在被显示之前对图像进行去雾处理。去雾模块960对获取黑白图像中像素点的最大亮度值,将最大亮度值作为大气光值,根据大气光值获取原始透射率,根据大气光值和原始透射率对彩色图像进行去雾处理等。去雾模块960将图像数据进行去雾处理后,可将去雾处理后的图像数据发送给编码器/解码器970,以便编码/解码图像数据。编码的图像数据可被保存,并在显示与显示器980设备上之前解压缩。可以理解的是,去雾模块960处理后的图像数据可以不经过编码器/解码器970,直接发给显示器980进行显示。ISP处理器940处理后的图像数据还可以先经过编码器/解码器970处理,然后再经过去雾模块960进行处理。其中,去雾模块960或编码器/解码器970可为移动终端中CPU(Central Processing Unit,中央处理器)或GPU(Graphics Processing Unit,图形处理器)等。The image data processed by the ISP can be sent to the defogging module 960 to defogg the image before being displayed. The defogging module 960 acquires the maximum brightness value of the pixel in the black and white image, takes the maximum brightness value as the atmospheric light value, obtains the original transmittance according to the atmospheric light value, and performs the dehazing treatment on the color image according to the atmospheric light value and the original transmittance. . After the defogging module 960 performs the defogging process on the image data, the image data after the defogging process can be transmitted to the encoder/decoder 970 to encode/decode the image data. The encoded image data can be saved and decompressed before being displayed on the display 980 device. It can be understood that the image data processed by the defogging module 960 can be directly sent to the display 980 for display without passing through the encoder/decoder 970. The image data processed by the ISP processor 940 may also be processed by the encoder/decoder 970 and then processed by the defogging module 960. The defogging module 960 or the encoder/decoder 970 may be a CPU (Central Processing Unit) or a GPU (Graphics Processing Unit) in the mobile terminal.
ISP处理器940确定的统计数据可发送给控制逻辑器950单元。例如,统计数据可包括自动曝光、自动白平衡、自动聚焦、闪烁检测、黑电平补偿、透镜912阴影校正等图像传感器914统计信息。控制逻辑器950可包括执行一个或多个例程(如固件)的处理器和/或微控制器,一个或多个例程可根据接收的统计数据,确定成像设备910的控制参数以及的控制参数。例如,控制参数可包括传感器920控制参数(例如增益、曝光控制的积分时间)、照相机闪光控制参数、透镜912控制参数(例如聚焦或变焦用焦距)、或这些参数的组合。ISP控制参数可包括用于自动白平衡和颜色调整(例如,在RGB处理期间)的增益水平和色彩校正矩阵,以及透镜912阴影校正参数。The statistics determined by the ISP processor 940 can be sent to the control logic 950 unit. For example, the statistics may include image sensor 914 statistics such as auto exposure, auto white balance, auto focus, flicker detection, black level compensation, lens 912 shading correction, and the like. Control logic 950 can include a processor and/or a microcontroller that executes one or more routines, such as firmware, and one or more routines can determine control parameters and control of imaging device 910 based on received statistical data. parameter. For example, the control parameters may include sensor 920 control parameters (eg, gain, integration time for exposure control), camera flash control parameters, lens 912 control parameters (eg, focus or zoom focal length), or a combination of these parameters. The ISP control parameters may include a gain level and color correction matrix for automatic white balance and color adjustment (eg, during RGB processing), and a lens 912 shading correction parameter.
本领域普通技术人员可以理解实现上述实施例方法中的全部或部分流程,是可以通过计算机程序来指令相关的硬件来完成,所述的程序可存储于一非易失性计算机可读取存储介质中,该程序在执行时,可包括如上述各方法的实施例的流程。其中,所述的存储介质可为磁碟、光盘、只读存储记忆体(Read-Only Memory,ROM)等。One of ordinary skill in the art can understand that all or part of the process of implementing the above embodiments can be completed by a computer program to instruct related hardware, and the program can be stored in a non-volatile computer readable storage medium. Wherein, the program, when executed, may include the flow of an embodiment of the methods as described above. The storage medium may be a magnetic disk, an optical disk, a read-only memory (ROM), or the like.
以上所述实施例仅表达了本申请的几种实施方式,其描述较为具体和详细,但并不能因此而理解为对本申请专利范围的限制。应当指出的是,对于本领域的普通技术人员来说,在不脱离本申请构思的前提下,还可以做出若干变形和改进,这些都属于本申请的保护范围。因此,本申请专利的保护范围应以所附权利要求为准。The above-mentioned embodiments are merely illustrative of several embodiments of the present application, and the description thereof is more specific and detailed, but is not to be construed as limiting the scope of the claims. It should be noted that a number of variations and modifications may be made by those skilled in the art without departing from the spirit and scope of the present application. Therefore, the scope of the invention should be determined by the appended claims.
Claims (15)
- 一种图像处理方法,包括:An image processing method comprising:通过黑白摄像头和彩色摄像头拍摄同一场景获取黑白图像和彩色图像;Obtaining black and white images and color images by shooting the same scene through a black and white camera and a color camera;获取所述黑白图像中像素点的最大亮度值,将所述最大亮度值作为大气光值;Obtaining a maximum brightness value of a pixel in the black and white image, and using the maximum brightness value as an atmospheric light value;根据所述大气光值获取原始透射率;及Obtaining the original transmittance according to the atmospheric light value; and根据所述大气光值和原始透射率对所述彩色图像进行去雾处理。The color image is subjected to a defogging process according to the atmospheric light value and the original transmittance.
- 根据权利要求1所述的方法,其特征在于,在所述根据所述大气光值获取原始透射率之后,还包括:The method according to claim 1, wherein after the obtaining the original transmittance according to the atmospheric light value, the method further comprises:获取预设的RGB三个通道中每个通道的透射率因子;Obtain a transmittance factor for each of the preset RGB three channels;根据所述透射率因子及所述原始透射率获取RGB三个通道中每个通道的波段透射率;Obtaining a band transmittance of each of the three channels of RGB according to the transmittance factor and the original transmittance;所述根据所述大气光值和原始透射率对所述彩色图像进行去雾处理,包括:Defogging the color image according to the atmospheric light value and the original transmittance, including:根据所述大气光值和RGB各个通道的波段透射率对所述彩色图像的RGB各个通道进行去雾处理。Decolorizing the respective RGB channels of the color image according to the atmospheric light value and the band transmittance of each of the RGB channels.
- 根据权利要求1所述的方法,其特征在于,在所述根据所述大气光值获取原始透射率之后,还包括:The method according to claim 1, wherein after the obtaining the original transmittance according to the atmospheric light value, the method further comprises:获取去雾等级,根据所述去雾等级获取对应的去雾程度因子;Obtaining a dehazing level, and obtaining a corresponding dehazing degree factor according to the defogging level;所述根据所述大气光值和原始透射率对所述彩色图像进行去雾处理,包括:Defogging the color image according to the atmospheric light value and the original transmittance, including:根据所述去雾程度因子、大气光值和原始透射率对所述彩色图像进行去雾处理。The color image is subjected to a defogging process according to the dehazing degree factor, the atmospheric light value, and the original transmittance.
- 根据权利要求1所述的方法,其特征在于,还包括:The method of claim 1 further comprising:检测去雾处理后的彩色图像的噪点数量;及Detecting the amount of noise of the color image after the defogging process; and当所述噪点数量大于预设阈值时,则对所述去雾处理后的彩色图像进行降噪处理。When the number of noises is greater than a preset threshold, the color image after the defogging process is subjected to noise reduction processing.
- 根据权利要求1所述的方法,其特征在于,还包括:The method of claim 1 further comprising:获取去雾处理后的彩色图像中各像素点的亮度值;及Obtaining the brightness value of each pixel in the color image after the defogging process; and当所述亮度值小于预设亮度值时,则调整所述亮度值为预设亮度值。When the brightness value is less than the preset brightness value, the brightness value is adjusted to be a preset brightness value.
- 一种计算机设备,包括存储器及处理器,所述存储器中储存有计算机可读指令,所述指令被所述处理器执行时,使得所述处理器执行如下操作:A computer device comprising a memory and a processor, the memory storing computer readable instructions, the instructions being executed by the processor, causing the processor to perform the following operations:通过黑白摄像头和彩色摄像头拍摄同一场景获取黑白图像和彩色图像;Obtaining black and white images and color images by shooting the same scene through a black and white camera and a color camera;获取所述黑白图像中像素点的最大亮度值,将所述最大亮度值作为大气光值;Obtaining a maximum brightness value of a pixel in the black and white image, and using the maximum brightness value as an atmospheric light value;根据所述大气光值获取原始透射率;及Obtaining the original transmittance according to the atmospheric light value; and根据所述大气光值和原始透射率对所述彩色图像进行去雾处理。The color image is subjected to a defogging process according to the atmospheric light value and the original transmittance.
- 根据权利要求6所述的计算机设备,其特征在于,在所述根据所述大气光值获取原始透射率之后,还包括:The computer device according to claim 6, wherein after the obtaining the original transmittance according to the atmospheric light value, the method further comprises:获取预设的RGB三个通道中每个通道的透射率因子;Obtain a transmittance factor for each of the preset RGB three channels;根据所述透射率因子及所述原始透射率获取RGB三个通道中每个通道的波段透射率;Obtaining a band transmittance of each of the three channels of RGB according to the transmittance factor and the original transmittance;所述根据所述大气光值和原始透射率对所述彩色图像进行去雾处理,包括:Defogging the color image according to the atmospheric light value and the original transmittance, including:根据所述大气光值和RGB各个通道的波段透射率对所述彩色图像的RGB各个通道进行去雾处理。Decolorizing the respective RGB channels of the color image according to the atmospheric light value and the band transmittance of each of the RGB channels.
- 根据权利要求6所述的计算机设备,其特征在于,在所述根据所述大气光值获取原始透射率之后,还包括:The computer device according to claim 6, wherein after the obtaining the original transmittance according to the atmospheric light value, the method further comprises:获取去雾等级,根据所述去雾等级获取对应的去雾程度因子;Obtaining a dehazing level, and obtaining a corresponding dehazing degree factor according to the defogging level;所述根据所述大气光值和原始透射率对所述彩色图像进行去雾处理,包括:Defogging the color image according to the atmospheric light value and the original transmittance, including:根据所述去雾程度因子、大气光值和原始透射率对所述彩色图像进行去雾处理。The color image is subjected to a defogging process according to the dehazing degree factor, the atmospheric light value, and the original transmittance.
- 根据权利要求6所述的计算机设备,其特征在于,所述计算机可执行指令被所述处理器执行时,使得所述处理器还执行:The computer apparatus of claim 6 wherein said computer executable instructions are executed by said processor such that said processor further executes:检测去雾处理后的彩色图像的噪点数量;及Detecting the amount of noise of the color image after the defogging process; and当所述噪点数量大于预设阈值时,则对所述去雾处理后的彩色图像进行降噪处理。When the number of noises is greater than a preset threshold, the color image after the defogging process is subjected to noise reduction processing.
- 根据权利要求6所述的计算机设备,其特征在于,所述计算机可执行指令被所述处理器执行时,使得所述处理器还执行:The computer apparatus of claim 6 wherein said computer executable instructions are executed by said processor such that said processor further executes:获取去雾处理后的彩色图像中各像素点的亮度值;及Obtaining the brightness value of each pixel in the color image after the defogging process; and当所述亮度值小于预设亮度值时,则调整所述亮度值为预设亮度值。When the brightness value is less than the preset brightness value, the brightness value is adjusted to be a preset brightness value.
- 一个或多个包含计算机可执行指令的非易失性计算机可读存储介质,当所述计算机可执行指令被一个或多个处理器执行时,使得所述处理器执行以下操作:One or more non-transitory computer readable storage media containing computer executable instructions that, when executed by one or more processors, cause the processor to:通过黑白摄像头和彩色摄像头拍摄同一场景获取黑白图像和彩色图像;Obtaining black and white images and color images by shooting the same scene through a black and white camera and a color camera;获取所述黑白图像中像素点的最大亮度值,将所述最大亮度值作为大气光值;Obtaining a maximum brightness value of a pixel in the black and white image, and using the maximum brightness value as an atmospheric light value;根据所述大气光值获取原始透射率;及Obtaining the original transmittance according to the atmospheric light value; and根据所述大气光值和原始透射率对所述彩色图像进行去雾处理。The color image is subjected to a defogging process according to the atmospheric light value and the original transmittance.
- 根据权利要求11所述的非易失性计算机可读存储介质,其特征在于,在所述根据所述大气光值获取原始透射率之后,还包括:The non-transitory computer readable storage medium according to claim 11, wherein after the obtaining the original transmittance according to the atmospheric light value, the method further comprises:获取预设的RGB三个通道中每个通道的透射率因子;Obtain a transmittance factor for each of the preset RGB three channels;根据所述透射率因子及所述原始透射率获取RGB三个通道中每个通道的波段透射率;Obtaining a band transmittance of each of the three channels of RGB according to the transmittance factor and the original transmittance;所述根据所述大气光值和原始透射率对所述彩色图像进行去雾处理,包括:Defogging the color image according to the atmospheric light value and the original transmittance, including:根据所述大气光值和RGB各个通道的波段透射率对所述彩色图像的RGB各个通道进行去雾处理。Decolorizing the respective RGB channels of the color image according to the atmospheric light value and the band transmittance of each of the RGB channels.
- 根据权利要求11所述的非易失性计算机可读存储介质,其特征在于,在所述根据所述大气光值获取原始透射率之后,还包括:The non-transitory computer readable storage medium according to claim 11, wherein after the obtaining the original transmittance according to the atmospheric light value, the method further comprises:获取去雾等级,根据所述去雾等级获取对应的去雾程度因子;Obtaining a dehazing level, and obtaining a corresponding dehazing degree factor according to the defogging level;所述根据所述大气光值和原始透射率对所述彩色图像进行去雾处理,包括:Defogging the color image according to the atmospheric light value and the original transmittance, including:根据所述去雾程度因子、大气光值和原始透射率对所述彩色图像进行去雾处理。The color image is subjected to a defogging process according to the dehazing degree factor, the atmospheric light value, and the original transmittance.
- 根据权利要求11所述的非易失性计算机可读存储介质,其特征在于,所述计算机可执行指令被所述处理器执行时,使得所述处理器还执行:A non-transitory computer readable storage medium according to claim 11, wherein said computer executable instructions are executed by said processor such that said processor further executes:检测去雾处理后的彩色图像的噪点数量;及Detecting the amount of noise of the color image after the defogging process; and当所述噪点数量大于预设阈值时,则对所述去雾处理后的彩色图像进行降噪处理。When the number of noises is greater than a preset threshold, the color image after the defogging process is subjected to noise reduction processing.
- 根据权利要求11所述的非易失性计算机可读存储介质,其特征在于,所述计算机可执行指令被一个或多个处理器执行时,还执行:The non-transitory computer readable storage medium of claim 11, wherein when the computer executable instructions are executed by one or more processors, the method further comprises:获取去雾处理后的彩色图像中各像素点的亮度值;及Obtaining the brightness value of each pixel in the color image after the defogging process; and当所述亮度值小于预设亮度值时,则调整所述亮度值为预设亮度值。When the brightness value is less than the preset brightness value, the brightness value is adjusted to be a preset brightness value.
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710626258.6A CN107341782B (en) | 2017-07-27 | 2017-07-27 | Image processing method, image processing device, computer equipment and computer readable storage medium |
CN201710626258.6 | 2017-07-27 |
Publications (1)
Publication Number | Publication Date |
---|---|
WO2019019890A1 true WO2019019890A1 (en) | 2019-01-31 |
Family
ID=60216643
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/CN2018/094625 WO2019019890A1 (en) | 2017-07-27 | 2018-07-05 | Image processing method, computer equipment, and computer-readable storage medium |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN107341782B (en) |
WO (1) | WO2019019890A1 (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112767278A (en) * | 2021-01-28 | 2021-05-07 | 湖南大学 | Image defogging method based on non-uniform atmospheric light prior and related equipment |
CN114549336A (en) * | 2021-11-25 | 2022-05-27 | 湖南科技大学 | Unsupervised image defogging method |
Families Citing this family (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107341782B (en) * | 2017-07-27 | 2020-01-10 | Oppo广东移动通信有限公司 | Image processing method, image processing device, computer equipment and computer readable storage medium |
CN110163804A (en) * | 2018-06-05 | 2019-08-23 | 腾讯科技(深圳)有限公司 | Image defogging method, device, computer equipment and storage medium |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20140177960A1 (en) * | 2012-12-24 | 2014-06-26 | Korea University Research And Business Foundation | Apparatus and method of processing image |
CN105049718A (en) * | 2015-07-06 | 2015-11-11 | 深圳市金立通信设备有限公司 | Image processing method and terminal |
CN106127715A (en) * | 2016-08-29 | 2016-11-16 | 程建 | A kind of image defogging method and system |
CN107341782A (en) * | 2017-07-27 | 2017-11-10 | 广东欧珀移动通信有限公司 | Image processing method, device, computer equipment and computer-readable recording medium |
Family Cites Families (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102411774B (en) * | 2011-08-08 | 2013-05-01 | 安科智慧城市技术(中国)有限公司 | Processing method, device and system based on single-image defogging |
KR101470831B1 (en) * | 2013-05-28 | 2014-12-10 | 전남대학교산학협력단 | Appatatus for image dehazing using the user controllable radical root operation |
CN103761720B (en) * | 2013-12-13 | 2017-01-04 | 中国科学院深圳先进技术研究院 | Image defogging method and image demister |
-
2017
- 2017-07-27 CN CN201710626258.6A patent/CN107341782B/en active Active
-
2018
- 2018-07-05 WO PCT/CN2018/094625 patent/WO2019019890A1/en active Application Filing
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20140177960A1 (en) * | 2012-12-24 | 2014-06-26 | Korea University Research And Business Foundation | Apparatus and method of processing image |
CN105049718A (en) * | 2015-07-06 | 2015-11-11 | 深圳市金立通信设备有限公司 | Image processing method and terminal |
CN106127715A (en) * | 2016-08-29 | 2016-11-16 | 程建 | A kind of image defogging method and system |
CN107341782A (en) * | 2017-07-27 | 2017-11-10 | 广东欧珀移动通信有限公司 | Image processing method, device, computer equipment and computer-readable recording medium |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112767278A (en) * | 2021-01-28 | 2021-05-07 | 湖南大学 | Image defogging method based on non-uniform atmospheric light prior and related equipment |
CN112767278B (en) * | 2021-01-28 | 2024-05-14 | 湖南大学 | Image defogging method based on non-uniform atmosphere light priori and related equipment |
CN114549336A (en) * | 2021-11-25 | 2022-05-27 | 湖南科技大学 | Unsupervised image defogging method |
CN114549336B (en) * | 2021-11-25 | 2024-05-03 | 湖南科技大学 | Unsupervised image defogging method |
Also Published As
Publication number | Publication date |
---|---|
CN107341782A (en) | 2017-11-10 |
CN107341782B (en) | 2020-01-10 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US10757312B2 (en) | Method for image-processing and mobile terminal using dual cameras | |
CN108055452B (en) | Image processing method, device and equipment | |
CN107948519B (en) | Image processing method, device and equipment | |
JP7145208B2 (en) | Method and Apparatus and Storage Medium for Dual Camera Based Imaging | |
JP6903816B2 (en) | Image processing method and equipment | |
CN108712608B (en) | Terminal equipment shooting method and device | |
WO2020034737A1 (en) | Imaging control method, apparatus, electronic device, and computer-readable storage medium | |
JP2020533697A (en) | Methods and equipment for image processing | |
CN107395991B (en) | Image synthesis method, image synthesis device, computer-readable storage medium and computer equipment | |
CN107704798B (en) | Image blurring method and device, computer readable storage medium and computer device | |
US11184518B2 (en) | Focusing method using compensated FV value, storage medium and mobile phone for performing the same | |
CN107194901B (en) | Image processing method, image processing device, computer equipment and computer readable storage medium | |
CN107194900A (en) | Image processing method, device, computer readable storage medium and mobile terminal | |
WO2020029679A1 (en) | Control method and apparatus, imaging device, electronic device and readable storage medium | |
WO2019019890A1 (en) | Image processing method, computer equipment, and computer-readable storage medium | |
WO2019105260A1 (en) | Depth of field obtaining method, apparatus and device | |
CN107464225B (en) | Image processing method, image processing device, computer-readable storage medium and mobile terminal | |
WO2018228186A1 (en) | Focusing method and apparatus, computer readable storage medium, and mobile terminal | |
CN107396079A (en) | Method and device for adjusting white balance | |
CN107454317B (en) | Image processing method, image processing device, computer-readable storage medium and computer equipment | |
CN107454318B (en) | Image processing method, image processing device, mobile terminal and computer readable storage medium | |
CN107277369B (en) | Image processing method, device, computer readable storage medium and computer equipment | |
CN107392870B (en) | Image processing method, image processing device, mobile terminal and computer readable storage medium | |
CN107481199B (en) | Image defogging method and device, storage medium and mobile terminal | |
CN107277372B (en) | Focusing method, focusing device, computer readable storage medium and mobile terminal |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 18838745 Country of ref document: EP Kind code of ref document: A1 |
|
NENP | Non-entry into the national phase |
Ref country code: DE |
|
122 | Ep: pct application non-entry in european phase |
Ref document number: 18838745 Country of ref document: EP Kind code of ref document: A1 |