WO2022253014A1 - Underwater image color restoration method and apparatus - Google Patents

Underwater image color restoration method and apparatus Download PDF

Info

Publication number
WO2022253014A1
WO2022253014A1 PCT/CN2022/094350 CN2022094350W WO2022253014A1 WO 2022253014 A1 WO2022253014 A1 WO 2022253014A1 CN 2022094350 W CN2022094350 W CN 2022094350W WO 2022253014 A1 WO2022253014 A1 WO 2022253014A1
Authority
WO
WIPO (PCT)
Prior art keywords
channel
pixel
underwater image
color
value
Prior art date
Application number
PCT/CN2022/094350
Other languages
French (fr)
Chinese (zh)
Inventor
苏坦
Original Assignee
影石创新科技股份有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 影石创新科技股份有限公司 filed Critical 影石创新科技股份有限公司
Publication of WO2022253014A1 publication Critical patent/WO2022253014A1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N9/00Details of colour television systems
    • H04N9/64Circuits for processing colour signals
    • H04N9/646Circuits for processing colour signals for image enhancement, e.g. vertical detail restoration, cross-colour elimination, contour correction, chrominance trapping filters

Definitions

  • the present application relates to the technical field of image processing, in particular to a color restoration method, device and computer-readable storage medium for underwater images.
  • Underwater vision is not only widely used in scientific research activities such as ocean exploration and underwater engineering monitoring, but also an important source of shooting materials for photographers. Therefore, it is particularly important to obtain real underwater images.
  • manual adjustment of video color is mainly based on manpower.
  • post-editing software can be used to use manual white balance correction, channel mixer, and color search for color cast video or pictures. Correcting the surface can restore the real underwater color to a certain extent, but the manual adjustment operation is cumbersome, and when the distance between the shooting object in the picture and the camera changes, or the water depth of the shooting environment changes greatly, the picture will be blurred. The color cast will also change accordingly. At this time, it is often necessary to re-color, which is time-consuming and laborious.
  • Chinese Patent Publication No. CN112348904A titled "Underwater Image and Underwater Video Color Restoration Method and Device” discloses an underwater image color restoration method.
  • the 8-bit RGB pixel value is converted into a linear sRGB space for adjustment processing, and then the adjusted pixel value is converted to an 8-bit RGB pixel value, and then the obtained 8-bit RGB pixel value is fused with the adjusted pixel value to obtain Restored underwater image.
  • the object of the present invention is to provide an underwater image color restoration method, device, electronic equipment and computer-readable storage medium, aiming at solving the defects in the existing underwater image restoration method.
  • the present invention provides a method for color restoration of an underwater image, the method comprising:
  • S2 Determine at least one compensation channel according to the relative relationship of the global intensity of each color channel, and combine the pixel value of each pixel of the underwater image in the compensation channel to perform gain compensation for the pixel in the corresponding compensation channel;
  • the global intensity of each color channel is determined by the pixel value of each color channel.
  • an underwater image color restoration device which includes:
  • the global intensity acquisition module is used to acquire the global intensity of each color channel of the underwater image in the RGB color format
  • a compensation module configured to determine at least one compensation channel according to the relative relationship of the global intensity of each color channel, and perform gain compensation on the pixel in the corresponding compensation channel in combination with the pixel value of each pixel of the underwater image in the compensation channel;
  • the global intensity of each color channel is determined by the pixel value of each color channel.
  • the present invention provides an electronic device, comprising:
  • a processor the processor is configured to execute the computer program to realize the above-mentioned underwater image color restoration method.
  • the present invention provides a computer-readable storage medium, where a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the above is realized to realize the above-mentioned underwater image color restoration method.
  • the present invention color-colors each pixel in the underwater image according to specific steps according to the relative relationship of the global intensity of each color channel of the underwater image and the pixel value of a single pixel in each color channel.
  • the restoration process makes the color cast of the underwater picture relatively uniform, and solves the problems in the prior art that the underwater foreground object and the background water cannot be correctly distinguished and/or the red channel of the foreground object is easy to overflow.
  • Fig. 1 is a flow chart of the method for restoring the color of an underwater image in Embodiment 1 of the present invention.
  • Fig. 2 is a flowchart of step S1 in Embodiment 1 of the present invention.
  • Fig. 3 is a flowchart of step S2 in Embodiment 1 of the present invention.
  • Fig. 4 is a structural block diagram of an underwater image color restoration device in Embodiment 2 of the present invention.
  • Fig. 5 is a structural block diagram of an electronic device in Embodiment 3 of the present invention.
  • this embodiment discloses a method for color restoration of an underwater image, comprising the following steps:
  • Underwater images refer to photos or video frames taken by the lens of a shooting device (such as a camera or mobile phone) in water.
  • Underwater images can be in any pixel color format (such as BGR, RGB, YUV, etc.), if the underwater image is not in RGB color format, you need to convert it to RGB color format.
  • RGB color format such as BGR, RGB, YUV, etc.
  • step S1 includes the following sub-steps.
  • an 8-bit RGB color space is taken as an example for illustration, and the pixel value of the acquired underwater image in each color channel is between 0-255.
  • the pixel value of each color channel of the acquired underwater image is divided by 255, so that each pixel value becomes between 0-1, that is, the normalization process of each pixel value is completed.
  • the global intensity of each color channel is determined by averaging the pixel values of each pixel of the underwater image in each color channel. Specifically, assuming that the underwater image has n pixels, r i , g i , and b i represent the pixel values of the i-th pixel in the red channel, green channel, and blue channel respectively, then the pixel average value of the red channel Pixel average for the green channel Pixel average for the blue channel
  • the global intensity of each color channel is determined by an average value of pixel values of each pixel of the underwater image in a certain section of each color channel. Specifically, the pixel values of each pixel of the underwater image in each color channel are sorted from large to small, and then a certain proportion (such as 50%) of the pixel values in the middle is taken, and then the average value of these pixel values is calculated. In this way, the influence of the underwater picture on the global intensity of each color channel in extreme cases (such as underexposure or partial areas of the underwater image being occluded) can be reduced.
  • the global intensity of each color channel may also be a median of pixel values in each color channel for each pixel of the underwater image.
  • S2 Determine at least one compensation channel according to the relative relationship of the global intensity of each color channel, and combine the pixel value of each pixel of the underwater image in the compensation channel to perform gain compensation for the pixel in the corresponding compensation channel.
  • step S2 includes the following sub-steps.
  • step S21 Determine whether the global intensity of the blue channel is greater than the global intensity of the green channel, if yes, go to step S22, otherwise go to step S23.
  • g is the pixel value of the pixel in the green channel
  • g a is the average value of the pixel values or the median value of the pixel values of each pixel in the underwater image in the green channel
  • b is the pixel value in the blue channel of the pixel.
  • b a is the average value of the pixel values of each pixel of the underwater image in the blue channel or the average value of the median value of the pixel value
  • w gb is the empirical value parameter
  • the general value range is 0.2- 0.8, which means to compensate the green channel intensity according to the blue channel intensity of the pixel.
  • b is the pixel value of the pixel in the blue channel
  • b a is the average value of the pixel value or the median value of the pixel value of each pixel in the underwater image in the blue channel
  • g is the pixel value of the pixel
  • g a is the average value of the pixel values or the median value of the pixel values of each pixel in the underwater image in the green channel
  • w bg is the empirical value parameter
  • the general value range is 0.2- 0.8
  • step S22 or step S23 gain compensation may also be performed on the red channel of each pixel in the underwater image.
  • the compensation scheme of the red channel of the underwater image is as follows: For any pixel in the underwater image, the calculation formula of the pixel value r' of the red channel after gain compensation is as follows:
  • r' r+w rb *(b a -r a )*(1-r)*b/*b a +w rg *(g a -r a )*(1-r)*g/*g a
  • r, b, g are the pixel values of the pixel in the red channel, blue channel and green channel respectively
  • r a , b a , g a are the underwater image pixels in the red channel, blue channel and green channel respectively.
  • the average value of the pixel value of the channel or the average value of the median value of the pixel value, w rb and w rg are empirical value parameters, respectively indicating the intensity of red compensation according to the intensity of the green channel and the intensity of the blue channel of the pixel.
  • the above compensation for the red channel is generally performed when the global intensity of the blue channel or the global intensity of the green channel of the underwater image is maximum.
  • the red channel can also be compensated. From the above formula, it can be known that in this case, the compensation for the red channel is negative compensation, and the compensated red pixel The value becomes smaller, making red objects in underwater images lighter.
  • step S3 adding saturation processing and/or dark channel defogging algorithm to the underwater image after gain compensation deal with.
  • the specific method for increasing the saturation is not limited, and those skilled in the art can choose a scheme for increasing the saturation by themselves.
  • using the dark channel dehazing algorithm is also a common technique in image processing, and will not be described in detail here. It should be pointed out that if the dark channel dehazing algorithm is directly used without the compensation operation of the color channel, the seawater area where the red channel is seriously missing will be lost. Foreground regions that are misidentified as non-foggy cannot get ideal results.
  • step S4 is further included: adjusting the gain-compensated underwater image through a three-dimensional color lookup table.
  • a three-dimensional color look-up table (3D Look-up Table, 3D LUT)
  • 3D Look-up Table, 3D LUT 3D Look-up Table
  • An underwater image color restoration device includes a global intensity acquisition module, a compensation module, an RGB conversion module, a saturation processing module, a dark channel defogging module and a loading module.
  • the global intensity acquisition module is used to acquire the global intensity of each color channel of the underwater image in the RGB color format; the compensation module is used to determine at least one compensation channel according to the relative relationship of the global intensity of each color channel, and combine the underwater
  • the pixel value of each pixel of the image in the compensation channel performs gain compensation on the pixel in the corresponding compensation channel;
  • the RGB conversion module is used to convert the underwater image from other color spaces to RGB color format;
  • the saturation processing module is used to adjust the gain
  • the compensated underwater image is increased in saturation;
  • the dark channel defogging module is used to perform dark channel defogging algorithm processing on the gain-compensated underwater image;
  • the loading module is used to load a three-dimensional color lookup table for gain-compensated underwater images The image is processed.
  • the global intensity of each color channel is determined by the pixel value of each color channel, and the specific implementation manner of the determination may refer to the relevant description in Embodiment 1, and no further description is given here.
  • This embodiment discloses an electronic device, including a memory and a processor, and a computer program is stored on the memory; the processor is used to execute the computer program to realize the underwater image color restoration method in Embodiment 1.
  • the electronic device in this embodiment may specifically be a camera or a mobile phone.
  • This embodiment discloses a computer-readable storage medium, on which a computer program is stored.
  • the computer program is executed by a processor, the underwater image color restoration method in Embodiment 1 is implemented.
  • the storage medium can be a computer-readable storage medium, for example, a ferroelectric memory (FRAM , Ferromagnetic Random Access Memory), Read Only Memory (ROM, Read Only Memory), Programmable Read Only Memory (PROM, Programmable Read Only Memory), Erasable Programmable Read Only Memory (EPROM, Erasable Programmable Read Only Memory), Electrically Erasable Programmable Read Only Memory (EEPROM, Electrically Erasable Programmable Read Only Memory), flash memory, magnetic surface memory, optical disc, or CD-ROM (Compact Disk-Read Only Memory) and other memories; it can also be Various devices including one or any combination of the above memories.
  • FRAM ferroelectric memory
  • ROM Read Only Memory
  • PROM Programmable Read Only Memory
  • EPROM Erasable Programmable Read Only Memory
  • EEPROM Electrically Erasable Programmable Read Only Memory
  • flash memory magnetic surface memory, optical disc, or CD-ROM (Compact Disk-Read Only Memory) and other memories; it can also be Various devices including one or any combination of the above

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Image Processing (AREA)

Abstract

The present invention provides an underwater image color restoration method. The method comprises: S1: acquiring the global intensity of each color channel of an underwater image in an RGB color format; and S2, determining at least one compensation channel according to the relative relationship of the global intensity of each color channel, and performing, on the basis of the pixel value of each pixel of the underwater image in the compensation channel, gain compensation on the pixel in the corresponding compensation channel, wherein the global intensity of each color channel is determined by the pixel value of each color channel. Compared with the prior art, according to the present invention, color restoration is performed on each pixel in the underwater image by means of specific steps according to the relative relationship of the global intensity of each color channel of the underwater image, so that the color cast degree of the underwater image is relatively uniform, and the problems in the prior art that underwater foreground objects and background water cannot be correctly distinguished, and/or a red channel of the foreground objects is likely to overflow are solved.

Description

水下图像色彩还原方法和装置Underwater image color restoration method and device 技术领域technical field
本申请涉及图像处理技术领域,具体涉及一种水下图像的色彩还原方法、装置及计算机可读存储介质。The present application relates to the technical field of image processing, in particular to a color restoration method, device and computer-readable storage medium for underwater images.
背景技术Background technique
水下视觉不仅广泛运用于海洋探测、水下工程监测等的科学研究活动,也是广大摄影爱好者的重要拍摄素材来源,因此,获取真实的水下图像尤为重要。Underwater vision is not only widely used in scientific research activities such as ocean exploration and underwater engineering monitoring, but also an important source of shooting materials for photographers. Therefore, it is particularly important to obtain real underwater images.
市面上的数码相机在水下拍摄常常遇到偏色问题。由于不同波长的光在水中衰减率不同,其中波长较长的红光在水下传播衰减最为明显,水下拍摄画面中的物体普遍红色信息缺失,导致画面整体偏蓝或者偏绿。此时,相机的自动白平衡在此特殊的光照条件下容易失效,进一步导致画面色彩失真。Digital cameras on the market often encounter color cast problems when shooting underwater. Because different wavelengths of light have different attenuation rates in water, red light with longer wavelengths has the most obvious attenuation underwater. Objects in underwater shooting pictures generally lack red information, resulting in the overall picture being blue or green. At this time, the automatic white balance of the camera is prone to failure under this special lighting condition, which further leads to color distortion of the picture.
现有对水下拍摄的视频或图片的后期处理过程中,主要依靠人力对视频色彩进行手动调整,比如可以使用后期编辑软件对偏色视频或图片使用手动白平衡修正、通道混合器、色彩查找表去修正,在一定程度上可以还原出真实的水下色彩,但手动调整操作繁琐,而且当画面中的拍摄物体到相机的距离发生变化,或者拍摄的环境的水深发生较大变化时,画面偏色情况也会相应的改变,此时往往需要重新调色,费时费力。In the existing post-processing process of underwater video or pictures, manual adjustment of video color is mainly based on manpower. For example, post-editing software can be used to use manual white balance correction, channel mixer, and color search for color cast video or pictures. Correcting the surface can restore the real underwater color to a certain extent, but the manual adjustment operation is cumbersome, and when the distance between the shooting object in the picture and the camera changes, or the water depth of the shooting environment changes greatly, the picture will be blurred. The color cast will also change accordingly. At this time, it is often necessary to re-color, which is time-consuming and laborious.
针对上述问题,中国专利公开号为CN112348904A、发明名称为“水下图像及水下视频色彩还原方法和装置”公开了一种水下图像色彩还原方法,该方法通过将水下图像的各像素的由8位RGB像素值转换线性sRGB空间上进行调整处理,再将调整后的像素值转换至8位RGB像素值,然后将获取的8位RGB像素值与调整后的像素值进行融合,进而得到还原后的水下图像。In view of the above problems, Chinese Patent Publication No. CN112348904A, titled "Underwater Image and Underwater Video Color Restoration Method and Device" discloses an underwater image color restoration method. The 8-bit RGB pixel value is converted into a linear sRGB space for adjustment processing, and then the adjusted pixel value is converted to an 8-bit RGB pixel value, and then the obtained 8-bit RGB pixel value is fused with the adjusted pixel value to obtain Restored underwater image.
技术问题technical problem
但上述专利的技术方案存在以下缺陷:1、该方案需要计算一个权重值来表示衰减的程度。但是由于水下环境多变,计算衰减程度往往不准,进而无法正确区分水下的前景物体和背景的水。2、该方案主要通过计算通道增益去补偿水下的颜色,但是由于红色很少,所以算得红色增益较大,使得前景物体的红色通道容易溢出。However, the technical solution of the above-mentioned patent has the following defects: 1. This solution needs to calculate a weight value to represent the degree of attenuation. However, due to the changeable underwater environment, the calculation of the attenuation degree is often inaccurate, and thus the underwater foreground object and the background water cannot be correctly distinguished. 2. This solution mainly calculates the channel gain to compensate the underwater color, but since there is very little red, the calculated red gain is relatively large, which makes the red channel of the foreground object overflow easily.
因此,有必要对现有的水下图像色彩还原方法进行改进。Therefore, it is necessary to improve the existing underwater image color restoration methods.
技术解决方案technical solution
本发明的目的在于提供一种水下图像色彩还原方法、装置、电子设备及计算机可读存储介质,旨在解决现有一种水下图像的复原方法存在的缺陷。The object of the present invention is to provide an underwater image color restoration method, device, electronic equipment and computer-readable storage medium, aiming at solving the defects in the existing underwater image restoration method.
第一方面,本发明提供了一种水下图像色彩还原方法,该方法包括:In a first aspect, the present invention provides a method for color restoration of an underwater image, the method comprising:
S1:获取水下图像在RGB色彩格式下的各色彩通道的全局强度;S1: Obtain the global intensity of each color channel of the underwater image in the RGB color format;
S2:根据各色彩通道的全局强度的相对关系确定至少一个补偿通道,并结合水下图像的每个像素在补偿通道的像素值对该像素在对应的补偿通道进行增益补偿;S2: Determine at least one compensation channel according to the relative relationship of the global intensity of each color channel, and combine the pixel value of each pixel of the underwater image in the compensation channel to perform gain compensation for the pixel in the corresponding compensation channel;
其中,各色彩通道的全局强度由各色彩通道的像素值确定。Wherein, the global intensity of each color channel is determined by the pixel value of each color channel.
第二方面,本发明提供了一种水下图像色彩还原装置,该装置包括:In a second aspect, the present invention provides an underwater image color restoration device, which includes:
全局强度获取模块,用于获取水下图像在RGB色彩格式下的各色彩通道的全局强度;The global intensity acquisition module is used to acquire the global intensity of each color channel of the underwater image in the RGB color format;
补偿模块,用于根据各色彩通道的全局强度的相对关系确定至少一个补偿通道,并结合水下图像的每个像素在补偿通道的像素值对该像素在对应的补偿通道进行增益补偿;A compensation module, configured to determine at least one compensation channel according to the relative relationship of the global intensity of each color channel, and perform gain compensation on the pixel in the corresponding compensation channel in combination with the pixel value of each pixel of the underwater image in the compensation channel;
其中,各色彩通道的全局强度由各色彩通道的像素值确定。Wherein, the global intensity of each color channel is determined by the pixel value of each color channel.
第三方面,本发明提供了一种电子设备,包括:In a third aspect, the present invention provides an electronic device, comprising:
存储器,所述存储器存储有计算机程序;a memory storing a computer program;
处理器,所述处理器用于执行所述计算机程序以实现上述的水下图像色彩还原方法。A processor, the processor is configured to execute the computer program to realize the above-mentioned underwater image color restoration method.
第四方面,本发明提供了一种计算机可读存储介质,所述计算机可读存储介质上存储有计算机程序,所述计算机程序被处理器执行时实现上述的以实现上述的水下图像色彩还原方 法。In a fourth aspect, the present invention provides a computer-readable storage medium, where a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the above is realized to realize the above-mentioned underwater image color restoration method.
技术效果technical effect
与现有技术相比,本发明根据水下图像的各色彩通道的全局强度的相对关系和单个像素在各色彩通道的像素值来对水下图像中的每个像素按特定的步骤进行了色彩还原处理,使得水下画面的偏色程度相对统一,解决了现有技术中无法正确区分水下的前景物体和背景的水和/或使得前景物体的红色通道容易溢出等问题。Compared with the prior art, the present invention color-colors each pixel in the underwater image according to specific steps according to the relative relationship of the global intensity of each color channel of the underwater image and the pixel value of a single pixel in each color channel. The restoration process makes the color cast of the underwater picture relatively uniform, and solves the problems in the prior art that the underwater foreground object and the background water cannot be correctly distinguished and/or the red channel of the foreground object is easy to overflow.
附图说明Description of drawings
图1是本发明实施例1中的水下图像色彩还原方法的流程图。Fig. 1 is a flow chart of the method for restoring the color of an underwater image in Embodiment 1 of the present invention.
图2是本发明实施例1中的步骤S1的流程图。Fig. 2 is a flowchart of step S1 in Embodiment 1 of the present invention.
图3是本发明实施例1中的步骤S2的流程图。Fig. 3 is a flowchart of step S2 in Embodiment 1 of the present invention.
图4是本发明实施例2中的水下图像色彩还原装置的结构框图。Fig. 4 is a structural block diagram of an underwater image color restoration device in Embodiment 2 of the present invention.
图5是本发明实施例3中的电子设备的结构框图。Fig. 5 is a structural block diagram of an electronic device in Embodiment 3 of the present invention.
本发明的实施方式Embodiments of the present invention
为了使本发明的目的、技术方案及有益效果更加清楚明白,以下结合附图及实施例,对本发明进行进一步详细说明。应当理解,此处所描述的具体实施例仅仅用以解释本发明,并不用于限定本发明。In order to make the object, technical solution and beneficial effects of the present invention more clear, the present invention will be further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described here are only used to explain the present invention, not to limit the present invention.
为了说明本发明所述的技术方案,下面通过具体实施例来进行说明。In order to illustrate the technical solutions of the present invention, specific examples are used below to illustrate.
实施例1Example 1
如图1所示,本实施例揭示了一种水下图像色彩还原方法,包括以下步骤:As shown in Figure 1, this embodiment discloses a method for color restoration of an underwater image, comprising the following steps:
S0:检测水下图像是否为RGB色彩格式,如果不是则将其转换为RGB色彩格式。S0: Detect whether the underwater image is in RGB color format, if not, convert it to RGB color format.
水下图像是指拍摄装置(如相机或手机)的镜头在水中拍摄的照片或视频帧,水下图像可以是任意像素色彩格式(如BGR、RGB、YUV等),如果水下图像不是RGB色彩格式,则需要将其转换为RGB色彩格式。图像的不同色彩格式之间的转换为现有技术,本实施例 中不再详细说明。Underwater images refer to photos or video frames taken by the lens of a shooting device (such as a camera or mobile phone) in water. Underwater images can be in any pixel color format (such as BGR, RGB, YUV, etc.), if the underwater image is not in RGB color format, you need to convert it to RGB color format. The conversion between different color formats of images is a prior art, and will not be described in detail in this embodiment.
S1:获取水下图像在RGB色彩格式下的各色彩通道的全局强度。S1: Obtain the global intensity of each color channel of the underwater image in the RGB color format.
本实施例的一个具体方案中,步骤S1包括以下子步骤。In a specific solution of this embodiment, step S1 includes the following sub-steps.
S11:获取各像素在各色彩通道的像素值。S11: Obtain the pixel value of each pixel in each color channel.
本实施例以8位RGB色彩空间为例进行说明,获取的水下图像在每个色彩通道中的像素值在0-255之间。In this embodiment, an 8-bit RGB color space is taken as an example for illustration, and the pixel value of the acquired underwater image in each color channel is between 0-255.
S12:对各像素值进行归一化处理。S12: Perform normalization processing on each pixel value.
将获取的水下图像的各色彩通道的像素值除以255,使得各像素值变为0-1之间,即完成了各像素值的归一化处理。The pixel value of each color channel of the acquired underwater image is divided by 255, so that each pixel value becomes between 0-1, that is, the normalization process of each pixel value is completed.
S13:根据归一化处理后的在各色彩通道的像素值确定各色彩通道的全局强度。S13: Determine the global intensity of each color channel according to the normalized pixel values in each color channel.
在本实施例中的一个具体方案中,是通过对水下图像的各像素在各色彩通道的像素值的平均值来确定各色彩通道的全局强度。具体的,假设水下图像有n个像素,r i、g i、b i分别代表第i个像素在红色通道、绿色通道和蓝色通道的像素值,则红色通道的像素平均值
Figure PCTCN2022094350-appb-000001
Figure PCTCN2022094350-appb-000002
绿色通道的像素平均值
Figure PCTCN2022094350-appb-000003
蓝色通道的像素平均值
Figure PCTCN2022094350-appb-000004
In a specific solution in this embodiment, the global intensity of each color channel is determined by averaging the pixel values of each pixel of the underwater image in each color channel. Specifically, assuming that the underwater image has n pixels, r i , g i , and b i represent the pixel values of the i-th pixel in the red channel, green channel, and blue channel respectively, then the pixel average value of the red channel
Figure PCTCN2022094350-appb-000001
Figure PCTCN2022094350-appb-000002
Pixel average for the green channel
Figure PCTCN2022094350-appb-000003
Pixel average for the blue channel
Figure PCTCN2022094350-appb-000004
在本实施例中的另一可选方案中,是通过对水下图像的各像素在各色彩通道的某个区段内的像素值的平均值来确定各色彩通道的全局强度。具体的,将水下图像的各像素在各色彩通道的像素值按从大到小进行排序,然后取位于中间的一定比例(如50%)的像素值,然后计算这些像素值的平均值。通过这种方式,可以降低水下图片在极端情况下(如曝光不足或水下图像部分区域被遮挡时)对各色彩通道的全局强度的影响。In another optional solution in this embodiment, the global intensity of each color channel is determined by an average value of pixel values of each pixel of the underwater image in a certain section of each color channel. Specifically, the pixel values of each pixel of the underwater image in each color channel are sorted from large to small, and then a certain proportion (such as 50%) of the pixel values in the middle is taken, and then the average value of these pixel values is calculated. In this way, the influence of the underwater picture on the global intensity of each color channel in extreme cases (such as underexposure or partial areas of the underwater image being occluded) can be reduced.
在本实施例中的其他可选方案中,各色彩通道的全局强度还可以为对水下图像的各像素在各色彩通道的像素值的中位数。In other optional solutions in this embodiment, the global intensity of each color channel may also be a median of pixel values in each color channel for each pixel of the underwater image.
S2:根据各色彩通道的全局强度的相对关系确定至少一个补偿通道,并结合水下图像的每个像素在补偿通道的像素值对该像素在对应的补偿通道进行增益补偿。S2: Determine at least one compensation channel according to the relative relationship of the global intensity of each color channel, and combine the pixel value of each pixel of the underwater image in the compensation channel to perform gain compensation for the pixel in the corresponding compensation channel.
一般水下拍摄的图像画面是偏蓝或偏绿。通过比较水下图像的在各色彩通道的像素值的平均值或像素值的中位数的平均值的大小来确定各色彩通道的全局强度,即该色彩通道的像素值的平均值或像素值的中位数的平均值越大,该色彩通道的全局强度越大。本实施例中,步骤S2包括以下子步骤。Generally, images taken underwater are bluish or greenish. The global intensity of each color channel is determined by comparing the average value of the pixel values or the average value of the median value of the pixel values of the underwater image in each color channel, that is, the average value or pixel value of the pixel values of the color channel The greater the average value of the median of , the greater the global intensity of that color channel. In this embodiment, step S2 includes the following sub-steps.
S21:判断蓝色通道的全局强度是否大于绿色通道的全局强度,如果是,则进入步骤S22,如果否则进入步骤S23。S21: Determine whether the global intensity of the blue channel is greater than the global intensity of the green channel, if yes, go to step S22, otherwise go to step S23.
在本实施例中,通过直接比较蓝色通道的像素平均值b a和绿色通道的像素平均值g a的大小来判断蓝色通道的全局强度是否大于绿色通道的全局强度。 In this embodiment, it is judged whether the global intensity of the blue channel is greater than the global intensity of the green channel by directly comparing the average pixel value b a of the blue channel with the average value g a of the green channel.
S22:对水下图像中的每个像素的绿色通道进行增益补偿。S22: Perform gain compensation on the green channel of each pixel in the underwater image.
本实施例中,对于水下图像中的任一像素,其经增益补偿后的绿色通道的像素值g'的计算公式如下:In this embodiment, for any pixel in the underwater image, the calculation formula of the pixel value g' of the green channel after gain compensation is as follows:
g'=g+w gb*(b a-g a)*(1-g)*b/*b a g'=g+w gb *(b a -g a )*(1-g)*b/*b a
其中,g为该像素的在绿色通道的像素值,g a为水下图像的各像素在绿色通道的像素值的平均值或像素值的中位数的平均值,b为该像素的在蓝色通道的像素值,b a为水下图像的各像素在蓝色通道的像素值的平均值或像素值的中位数的平均值,w gb为经验值参数,一般取值范围为0.2-0.8,表示根据该像素的蓝色通道强度去补偿绿色通道强度。 Among them, g is the pixel value of the pixel in the green channel, g a is the average value of the pixel values or the median value of the pixel values of each pixel in the underwater image in the green channel, and b is the pixel value in the blue channel of the pixel. The pixel value of the color channel, b a is the average value of the pixel values of each pixel of the underwater image in the blue channel or the average value of the median value of the pixel value, w gb is the empirical value parameter, and the general value range is 0.2- 0.8, which means to compensate the green channel intensity according to the blue channel intensity of the pixel.
S23:对水下图像中的每个像素的蓝色通道进行增益补偿。S23: Perform gain compensation on the blue channel of each pixel in the underwater image.
本实施例中,对于水下图像中的任一像素,其经增益补偿后的蓝色通道的像素值b'的计算公式如下:In this embodiment, for any pixel in the underwater image, the calculation formula of the pixel value b' of the blue channel after gain compensation is as follows:
b'=b+w bg*(g a-b a)*(1-b)*g/*g a b'=b+w bg *(g a -b a )*(1-b)*g/*g a
其中,b为该像素的在蓝色通道的像素值,b a为水下图像的各像素在蓝色通道的像素值的平均值或像素值的中位数的平均值,g为该像素的在绿色通道的像素值,g a为水下图像的各像素在绿色通道的像素值的平均值或像素值的中位数的平均值,w bg为经验值参数,一般 取值范围为0.2-0.8,表示根据该像素的绿色通道强度去补偿蓝色通道强度。 Among them, b is the pixel value of the pixel in the blue channel, b a is the average value of the pixel value or the median value of the pixel value of each pixel in the underwater image in the blue channel, and g is the pixel value of the pixel The pixel value in the green channel, g a is the average value of the pixel values or the median value of the pixel values of each pixel in the underwater image in the green channel, w bg is the empirical value parameter, and the general value range is 0.2- 0.8, means to compensate the blue channel intensity according to the green channel intensity of the pixel.
在本实施例中的其他方案中,在步骤S22或步骤S23中,还可对水下图像中的每个像素的红色通道进行增益补偿。水下图像的红色通道的补偿具体方案如下:对于水下图像中的任一像素,其经增益补偿后的红色通道的像素值r'的计算公式如下:In other solutions in this embodiment, in step S22 or step S23, gain compensation may also be performed on the red channel of each pixel in the underwater image. The compensation scheme of the red channel of the underwater image is as follows: For any pixel in the underwater image, the calculation formula of the pixel value r' of the red channel after gain compensation is as follows:
r'=r+w rb*(b a-r a)*(1-r)*b/*b a+w rg*(g a-r a)*(1-r)*g/*g a r'=r+w rb *(b a -r a )*(1-r)*b/*b a +w rg *(g a -r a )*(1-r)*g/*g a
其中,r、b、g分别为该像素在红色通道、蓝色通道及绿色通道的像素值,r a、b a、g a分别为水下图像的各像素在红色通道、蓝色通道及绿色通道的像素值的平均值或像素值的中位数的平均值,w rb、w rg为经验值参数,分别表示根据该像素的绿色通道强度和蓝色通道强度的去补偿红色的强度。 Among them, r, b, g are the pixel values of the pixel in the red channel, blue channel and green channel respectively, and r a , b a , g a are the underwater image pixels in the red channel, blue channel and green channel respectively. The average value of the pixel value of the channel or the average value of the median value of the pixel value, w rb and w rg are empirical value parameters, respectively indicating the intensity of red compensation according to the intensity of the green channel and the intensity of the blue channel of the pixel.
需要说明的是,上述对红色通道的补偿一般在在水下图像的蓝色通道的全局强度或绿色通道的全局强度最大的时候进行。当然,在水下图像的红色通道的全局强度最大时,也可以对红色通道进行补偿,通过上述公式可以得知,在这种情况下,对红色通道的补偿是负补偿,补偿后的红色像素值会变小,使得水下图像中的红色物体变淡。It should be noted that, the above compensation for the red channel is generally performed when the global intensity of the blue channel or the global intensity of the green channel of the underwater image is maximum. Of course, when the global intensity of the red channel of the underwater image is the largest, the red channel can also be compensated. From the above formula, it can be known that in this case, the compensation for the red channel is negative compensation, and the compensated red pixel The value becomes smaller, making red objects in underwater images lighter.
此外,由于水下拍摄设备的色彩调教不一,即时在同一个水下场景,不同设备拍摄到的画面会也有差异。因此,本领域的一般技术人员可以通过调整四个经验值参数w gb、w bg、w rb、w rg,使得某一型号的相机拍摄的画面色彩更自然。 In addition, due to the different color adjustments of underwater shooting equipment, even in the same underwater scene, the pictures captured by different equipment will also be different. Therefore, a person skilled in the art can adjust the four empirical parameters w gb , w bg , w rb , and w rg to make the color of a picture captured by a certain type of camera more natural.
由上可知,各色彩通道的全局强度由各色彩通道的像素值确定。It can be known from the above that the global intensity of each color channel is determined by the pixel value of each color channel.
在经上述步骤S1和S2的处理后,水下图像的画面偏绿或偏蓝的问题已经解决,但水的颜色从原本的蓝色或绿色变为接近灰色的淡蓝色或淡绿色,一些场景下仍不够真实。为了使水的颜色更接近肉眼所见海水的蓝色,在本实施例的优化方案中,还包括步骤S3:对增益补偿后的水下图像进行增加饱和度处理和/或暗通道去雾算法处理。其中,增加饱和度的具体方法不做限制,领域内普通技术人员可以自行选择增加饱和度的方案。另外,使用暗通道去雾算法也是图像处理的常见技术,这里不再详细说明,需要指出,如果不进行色彩通道 的补偿操作而直接使用暗通道去雾算法,则红色通道严重缺失的海水区域会被错误识别成没有雾的前景区域,不能得到理想的结果。After the processing of the above steps S1 and S2, the problem of the greenish or bluish picture of the underwater image has been solved, but the color of the water has changed from the original blue or green to light blue or light green close to gray, some The scene is still not realistic enough. In order to make the color of the water closer to the blue of the seawater seen by the naked eye, in the optimization scheme of this embodiment, it also includes step S3: adding saturation processing and/or dark channel defogging algorithm to the underwater image after gain compensation deal with. Wherein, the specific method for increasing the saturation is not limited, and those skilled in the art can choose a scheme for increasing the saturation by themselves. In addition, using the dark channel dehazing algorithm is also a common technique in image processing, and will not be described in detail here. It should be pointed out that if the dark channel dehazing algorithm is directly used without the compensation operation of the color channel, the seawater area where the red channel is seriously missing will be lost. Foreground regions that are misidentified as non-foggy cannot get ideal results.
在本实施例的进一步优化方案中,还包括步骤S4:对增益补偿后的水下图像通过三维颜色查找表进行调整。具体地,还可对经步骤S2或S3处理后水下图像的画面应用固定的三维颜色查找表(3D Look-up Table,3D LUT)进行处理,通过在图像或视频处理软件上加载三维颜色查找表,使得水下图像的画面色彩更真实自然。需要补充说明的是,如果未经步骤S1和S2的色彩通道的补偿操作,则存在不同水下的画面偏色情况不同,偏蓝或偏绿的程度不统一,这种情况下不适用加载固定的三维颜色查找表对水下图像的画面进行处理。In the further optimization solution of this embodiment, step S4 is further included: adjusting the gain-compensated underwater image through a three-dimensional color lookup table. Specifically, it is also possible to apply a fixed three-dimensional color look-up table (3D Look-up Table, 3D LUT) to the picture of the underwater image processed in step S2 or S3, by loading the three-dimensional color look-up table on the image or video processing software Table, making the picture color of underwater images more realistic and natural. It needs to be added that if the color channel compensation operation in steps S1 and S2 is not performed, there will be different color casts in different underwater pictures, and the degree of blue cast or green cast will not be uniform. In this case, loading fixation is not applicable. The 3D color look-up table for underwater image processing.
实施例2Example 2
一种水下图像色彩还原装置,包括全局强度获取模块、补偿模块、RGB转换模块、饱和度处理模块、暗通道去雾模块和加载模块。An underwater image color restoration device includes a global intensity acquisition module, a compensation module, an RGB conversion module, a saturation processing module, a dark channel defogging module and a loading module.
具体地,全局强度获取模块用于获取水下图像在RGB色彩格式下的各色彩通道的全局强度;补偿模块用于根据各色彩通道的全局强度的相对关系确定至少一个补偿通道,并结合水下图像的每个像素在补偿通道的像素值对该像素在对应的补偿通道进行增益补偿;RGB转换模块用于将水下图像由其他颜色空间转换为RGB色彩格式;饱和度处理模块用于对增益补偿后的水下图像进行增加饱和度;暗通道去雾模块用于对增益补偿后的水下图像进行暗通道去雾算法处理;加载模块用于加载三维颜色查找表对增益补偿后的水下图像进行处理。Specifically, the global intensity acquisition module is used to acquire the global intensity of each color channel of the underwater image in the RGB color format; the compensation module is used to determine at least one compensation channel according to the relative relationship of the global intensity of each color channel, and combine the underwater The pixel value of each pixel of the image in the compensation channel performs gain compensation on the pixel in the corresponding compensation channel; the RGB conversion module is used to convert the underwater image from other color spaces to RGB color format; the saturation processing module is used to adjust the gain The compensated underwater image is increased in saturation; the dark channel defogging module is used to perform dark channel defogging algorithm processing on the gain-compensated underwater image; the loading module is used to load a three-dimensional color lookup table for gain-compensated underwater images The image is processed.
其中,各色彩通道的全局强度由各色彩通道的像素值确定,其确定的具体实现方式可参考实施例1中的相关描述,这里不再进行说明。Wherein, the global intensity of each color channel is determined by the pixel value of each color channel, and the specific implementation manner of the determination may refer to the relevant description in Embodiment 1, and no further description is given here.
实施例3Example 3
本实施例揭示了一种电子设备,包括存储器和处理器,存储器上存储有计算机程序;处理器用于执行所述计算机程序以实现实施例1中的水下图像色彩还原方法。本实施例中的电子设备具体可以为相机或手机。This embodiment discloses an electronic device, including a memory and a processor, and a computer program is stored on the memory; the processor is used to execute the computer program to realize the underwater image color restoration method in Embodiment 1. The electronic device in this embodiment may specifically be a camera or a mobile phone.
实施例4Example 4
本实施例揭示了一种计算机可读存储介质,该计算机可读存储介质上存储有计算机程序,该计算机程序被处理器执行时实现实施例1中的水下图像色彩还原方法。This embodiment discloses a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the underwater image color restoration method in Embodiment 1 is implemented.
本领域普通技术人员可以理解上述各个实施例的各种方法中的全部或部分步骤是可以通过程序来指令相关的硬件来完成,存储介质可以是计算机可读存储介质,例如,铁电存储器(FRAM,Ferromagnetic Random Access Memory)、只读存储器(ROM,Read Only Memory)、可编程只读存储器(PROM,Programmable Read Only Memory)、可擦除可编程只读存储器(EPROM,Erasable Programmable Read Only Memory)、带电可擦可编程只读存储器(EEPROM,Electrically Erasable Programmable Read Only Memory)、闪存、磁表面存储器、光盘、或光盘只读存储器(CD-ROM,Compact Disk-Read Only Memory)等存储器;也可以是包括上述存储器之一或任意组合的各种设备。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 storage medium can be a computer-readable storage medium, for example, a ferroelectric memory (FRAM , Ferromagnetic Random Access Memory), Read Only Memory (ROM, Read Only Memory), Programmable Read Only Memory (PROM, Programmable Read Only Memory), Erasable Programmable Read Only Memory (EPROM, Erasable Programmable Read Only Memory), Electrically Erasable Programmable Read Only Memory (EEPROM, Electrically Erasable Programmable Read Only Memory), flash memory, magnetic surface memory, optical disc, or CD-ROM (Compact Disk-Read Only Memory) and other memories; it can also be Various devices including one or any combination of the above memories.
以上所述仅为本发明的较佳实施例而已,并不用以限制本发明,凡在本发明的精神和原则之内所作的任何修改、等同替换和改进等,均应包含在本发明的保护范围之内。The above descriptions are only preferred embodiments of the present invention, and are not intended to limit the present invention. Any modifications, equivalent replacements and improvements made within the spirit and principles of the present invention should be included in the protection of the present invention. within range.

Claims (17)

  1. 一种水下图像色彩还原方法,其特征在于,包括:A method for color restoration of an underwater image, characterized in that it comprises:
    S1:获取水下图像在RGB色彩格式下的各色彩通道的全局强度;S1: Obtain the global intensity of each color channel of the underwater image in the RGB color format;
    S2:根据各色彩通道的全局强度的相对关系确定至少一个补偿通道,并结合水下图像的每个像素在补偿通道的像素值对该像素在对应的补偿通道进行增益补偿;S2: Determine at least one compensation channel according to the relative relationship of the global intensity of each color channel, and combine the pixel value of each pixel of the underwater image in the compensation channel to perform gain compensation for the pixel in the corresponding compensation channel;
    其中,各色彩通道的全局强度由各色彩通道的像素值确定。Wherein, the global intensity of each color channel is determined by the pixel value of each color channel.
  2. 根据权利要求1所述的水下图像色彩还原方法,其特征在于,所述各色彩通道的全局强度为:(1)水下图像的各像素在各色彩通道的像素值的平均值,或(2)对水下图像的各像素在各色彩通道的某个区段内的像素值的平均值,或(3)水下图像的各像素在各色彩通道的像素值的中位数。The underwater image color restoration method according to claim 1, wherein the global intensity of each color channel is: (1) the average value of the pixel values of each pixel of the underwater image in each color channel, or ( 2) The average value of the pixel values of each pixel of the underwater image in a certain section of each color channel, or (3) the median of the pixel values of each pixel of the underwater image in each color channel.
  3. 根据权利要求1所述的水下图像色彩还原方法,其特征在于,在所述步骤S1之前包括:The underwater image color restoration method according to claim 1, characterized in that, before the step S1, comprising:
    S0:检测水下图像是否为RGB色彩格式,如果不是则将其转换为RGB色彩格式。S0: Detect whether the underwater image is in RGB color format, if not, convert it to RGB color format.
  4. 根据权利要求1所述的水下图像色彩还原方法,其特征在于,所述步骤S1包括:The underwater image color restoration method according to claim 1, wherein said step S1 comprises:
    S11:获取各像素在各色彩通道的像素值;S11: Obtain the pixel value of each pixel in each color channel;
    S12:对各像素值进行归一化处理;S12: Perform normalization processing on each pixel value;
    S13:根据归一化处理后的在各色彩通道的像素值确定各色彩通道的全局强度。S13: Determine the global intensity of each color channel according to the normalized pixel values in each color channel.
  5. 根据权利要求1所述的水下图像色彩还原方法,其特征在于,所述步骤S2包括:The underwater image color restoration method according to claim 1, wherein said step S2 comprises:
    S21:判断蓝色通道的全局强度是否大于绿色通道的全局强度,如果是,则进入步骤S22,如果否则进入步骤S23;S21: Determine whether the global intensity of the blue channel is greater than the global intensity of the green channel, if yes, proceed to step S22, otherwise proceed to step S23;
    S22:对水下图像中的每个像素的绿色通道进行增益补偿;S22: performing gain compensation on the green channel of each pixel in the underwater image;
    S23:对水下图像中的每个像素的蓝色通道进行增益补偿。S23: Perform gain compensation on the blue channel of each pixel in the underwater image.
  6. 根据权利要求5所述的水下图像色彩还原方法,其特征在于,所述步骤S22具体为:The underwater image color restoration method according to claim 5, wherein the step S22 is specifically:
    对于水下图像中的任一像素,其经增益补偿后的绿色通道的像素值g′的计算公式如下:For any pixel in the underwater image, the calculation formula of the pixel value g' of the green channel after gain compensation is as follows:
    g′=g+w gb*(b a-g a)*(1-g)*b/*b a g'=g+w gb *(b a -g a )*(1-g)*b/*b a
    其中,g为该像素的在绿色通道的像素值,g a为水下图像的各像素在绿色通道的像素值的平均值、某个区段内的像素值的平均值或像素值的中位数,b为该像素的在蓝色通道的像素值,b a为水下图像的各像素在蓝色通道的像素值的平均值、某个区段内的像素值的平均值或像素值的中位数,w gb为经验值参数,表示根据该像素的蓝色通道强度去补偿绿色通道强度。 Among them, g is the pixel value of the pixel in the green channel, and g a is the average value of the pixel values of each pixel in the underwater image in the green channel, the average value of the pixel values in a certain section, or the median of the pixel values b is the pixel value of the pixel in the blue channel, b a is the average value of the pixel values of each pixel in the underwater image in the blue channel, the average value of the pixel values in a certain section, or the pixel value of the pixel value Median, w gb is an empirical value parameter, indicating that the intensity of the green channel is compensated according to the intensity of the blue channel of the pixel.
  7. 根据权利要求5所述的水下图像色彩还原方法,其特征在于,所述步骤S23具体为:The underwater image color restoration method according to claim 5, wherein the step S23 is specifically:
    对于水下图像中的任一像素,其经增益补偿后的蓝色通道的像素值b′的计算公式如下:For any pixel in the underwater image, the calculation formula of the pixel value b' of the blue channel after gain compensation is as follows:
    b′=b+w bg*(g a-b a)*(1-b)*g/*g a b'=b+w bg *(g a -b a )*(1-b)*g/*g a
    其中,b为该像素的在蓝色通道的像素值,b a为水下图像的各像素在蓝色通道的像素值的平均值、某个区段内的像素值的平均值或像素值的中位数,g为该像素的在绿色通道的像素值,g a为水下图像的各像素在绿色通道的像素值的平均值、某个区段内的像素值的平均值或像素值的中位数,w bg为经验值参数,表示根据该像素的绿色通道强度去补偿蓝色通道强度。 Among them, b is the pixel value of the pixel in the blue channel, b a is the average value of the pixel values of each pixel in the underwater image in the blue channel, the average value of the pixel values in a certain section, or the pixel value of the pixel value The median, g is the pixel value of the pixel in the green channel, g a is the average value of the pixel values of each pixel in the underwater image in the green channel, the average value of the pixel values in a certain section, or the pixel value of the pixel value Median, w bg is an empirical value parameter, indicating that the intensity of the blue channel is compensated according to the intensity of the green channel of the pixel.
  8. 根据权利要求5所述的水下图像色彩还原方法,其特征在于,所述步骤S22或步骤S23还包括对水下图像中的每个像素的红色通道进行增益补偿。The underwater image color restoration method according to claim 5, wherein the step S22 or step S23 further comprises performing gain compensation on the red channel of each pixel in the underwater image.
  9. 根据权利要求8所述的水下图像色彩还原方法,其特征在于,所述对水下图像中的每个像素的红色通道进行增益补偿具体为:The underwater image color restoration method according to claim 8, wherein the gain compensation for the red channel of each pixel in the underwater image is specifically:
    对于水下图像中的任一像素,其经增益补偿后的红色通道的像素值r′的计算公式如下:For any pixel in the underwater image, the calculation formula of the pixel value r′ of the red channel after gain compensation is as follows:
    r′=r+w rb*(b a-r a)*(1-r)*b/*b a+w rg*(g a-r a)*(1-r)*g/*g a r'=r+w rb *(b a -r a )*(1-r)*b/*b a +w rg *(g a -r a )*(1-r)*g/*g a
    其中,r、b、g分别为该像素在红色通道、蓝色通道及绿色通道的像素值,r a、b a、g a分别为水下图像的各像素在红色通道、蓝色通道及绿色通道的像素值的平均值、某个区段内 的像素值的平均值或像素值的中位数,w rb、w rg为经验值参数,分别表示根据该像素的绿色通道强度和蓝色通道强度的去补偿红色的强度。 Among them, r, b, g are the pixel values of the pixel in the red channel, blue channel and green channel respectively, and r a , b a , g a are the underwater image pixels in the red channel, blue channel and green channel respectively. The average value of the pixel value of the channel, the average value of the pixel value in a certain section or the median value of the pixel value, w rb and w rg are empirical value parameters, which respectively represent the intensity of the green channel and the blue channel according to the pixel Intensity to compensate for red intensity.
  10. 根据权利要求1所述的水下图像色彩还原方法,其特征在于,还包括步骤S3:对增益补偿后的水下图像进行增加饱和度处理和/或暗通道去雾算法处理。The underwater image color restoration method according to claim 1, further comprising step S3: performing saturation increase processing and/or dark channel defogging algorithm processing on the gain-compensated underwater image.
  11. 根据权利要求1至8任意一项所述的水下图像色彩还原方法,其特征在于,还包括步骤S4:对增益补偿后的水下图像通过三维颜色查找表进行调整。The underwater image color restoration method according to any one of claims 1 to 8, further comprising step S4: adjusting the gain-compensated underwater image through a three-dimensional color lookup table.
  12. 一种水下图像色彩还原装置,其特征在于,包括:An underwater image color restoration device is characterized in that it comprises:
    全局强度获取模块,用于获取水下图像在RGB色彩格式下的各色彩通道的全局强度;The global intensity acquisition module is used to acquire the global intensity of each color channel of the underwater image in the RGB color format;
    补偿模块,用于根据各色彩通道的全局强度的相对关系确定至少一个补偿通道,并结合水下图像的每个像素在补偿通道的像素值对该像素在对应的补偿通道进行增益补偿;A compensation module, configured to determine at least one compensation channel according to the relative relationship of the global intensity of each color channel, and perform gain compensation on the pixel in the corresponding compensation channel in combination with the pixel value of each pixel of the underwater image in the compensation channel;
    其中,各色彩通道的全局强度由各色彩通道的像素值确定。Wherein, the global intensity of each color channel is determined by the pixel value of each color channel.
  13. 如权利要求12所述的水下图像色彩还原装置,其特征在于,还包括:The underwater image color restoration device according to claim 12, further comprising:
    RGB转换模块,用于将水下图像由其他颜色空间转换为RGB色彩格式。The RGB conversion module is used to convert the underwater image from other color spaces to RGB color format.
  14. 如权利要求12所述的水下图像色彩还原装置,其特征在于,还包括:The underwater image color restoration device according to claim 12, further comprising:
    饱和度处理模块和/或暗通道去雾模块,所述饱和度处理模块用于对增益补偿后的水下图像进行增加饱和度,所述暗通道去雾模块用于对增益补偿后的水下图像进行暗通道去雾算法处理。A saturation processing module and/or a dark channel defogging module, the saturation processing module is used to increase the saturation of the underwater image after gain compensation, and the dark channel defogging module is used to correct the underwater image after gain compensation The image is processed by dark channel dehazing algorithm.
  15. 如权利要求12所述的水下图像色彩还原装置,其特征在于,还包括:The underwater image color restoration device according to claim 12, further comprising:
    加载模块,所述加载模块用于加载三维颜色查找表对增益补偿后的水下图像进行处理。A loading module, the loading module is used to load a three-dimensional color lookup table to process the gain-compensated underwater image.
  16. 一种电子设备,其特征在于,包括:An electronic device, characterized in that it comprises:
    存储器,所述存储器存储有计算机程序;a memory storing a computer program;
    处理器,所述处理器用于执行所述计算机程序以实现权利要求1至11中任一项所述的水下图像色彩还原方法。A processor, the processor is used to execute the computer program to realize the underwater image color restoration method according to any one of claims 1 to 11.
  17. 一种计算机可读存储介质,其特征在于,所述计算机可读存储介质上存储有计算机程序,所述计算机程序被处理器执行时实现权利要求1至11中任一项所述的水下图像色彩还原方法。A computer-readable storage medium, characterized in that a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the underwater image according to any one of claims 1 to 11 is realized Color reproduction method.
PCT/CN2022/094350 2021-05-31 2022-05-23 Underwater image color restoration method and apparatus WO2022253014A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202110602708.4A CN113411554A (en) 2021-05-31 2021-05-31 Underwater image color restoration method and device
CN202110602708.4 2021-05-31

Publications (1)

Publication Number Publication Date
WO2022253014A1 true WO2022253014A1 (en) 2022-12-08

Family

ID=77675487

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2022/094350 WO2022253014A1 (en) 2021-05-31 2022-05-23 Underwater image color restoration method and apparatus

Country Status (2)

Country Link
CN (1) CN113411554A (en)
WO (1) WO2022253014A1 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116309607A (en) * 2023-05-25 2023-06-23 山东航宇游艇发展有限公司 Ship type intelligent water rescue platform based on machine vision
CN117808712A (en) * 2024-02-28 2024-04-02 山东科技大学 Image correction method based on underwater camera

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113411554A (en) * 2021-05-31 2021-09-17 影石创新科技股份有限公司 Underwater image color restoration method and device
CN114445300A (en) * 2022-01-29 2022-05-06 赵恒� Nonlinear underwater image gain algorithm for hyperbolic tangent deformation function transformation

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20160088194A1 (en) * 2013-04-22 2016-03-24 Nederlandse Organisatie Voor Toegepast- Natuurwetenschappelijk Onderzoek Tno Image color correction
CN111127359A (en) * 2019-12-19 2020-05-08 大连海事大学 Underwater image enhancement method based on selective compensation color and three-interval balance
CN111696052A (en) * 2020-05-20 2020-09-22 河海大学 Underwater image enhancement method and system based on red channel weakness
CN112446841A (en) * 2020-12-14 2021-03-05 中国科学院长春光学精密机械与物理研究所 Self-adaptive image recovery method
CN113034377A (en) * 2020-12-24 2021-06-25 辽宁港口集团有限公司 Underwater image enhancement algorithm based on quantitative evaluation improved white balance technology
CN113411554A (en) * 2021-05-31 2021-09-17 影石创新科技股份有限公司 Underwater image color restoration method and device

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20160088194A1 (en) * 2013-04-22 2016-03-24 Nederlandse Organisatie Voor Toegepast- Natuurwetenschappelijk Onderzoek Tno Image color correction
CN111127359A (en) * 2019-12-19 2020-05-08 大连海事大学 Underwater image enhancement method based on selective compensation color and three-interval balance
CN111696052A (en) * 2020-05-20 2020-09-22 河海大学 Underwater image enhancement method and system based on red channel weakness
CN112446841A (en) * 2020-12-14 2021-03-05 中国科学院长春光学精密机械与物理研究所 Self-adaptive image recovery method
CN113034377A (en) * 2020-12-24 2021-06-25 辽宁港口集团有限公司 Underwater image enhancement algorithm based on quantitative evaluation improved white balance technology
CN113411554A (en) * 2021-05-31 2021-09-17 影石创新科技股份有限公司 Underwater image color restoration method and device

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116309607A (en) * 2023-05-25 2023-06-23 山东航宇游艇发展有限公司 Ship type intelligent water rescue platform based on machine vision
CN117808712A (en) * 2024-02-28 2024-04-02 山东科技大学 Image correction method based on underwater camera
CN117808712B (en) * 2024-02-28 2024-05-07 山东科技大学 Image correction method based on underwater camera

Also Published As

Publication number Publication date
CN113411554A (en) 2021-09-17

Similar Documents

Publication Publication Date Title
WO2022253014A1 (en) Underwater image color restoration method and apparatus
US10142536B2 (en) Camera using preview image to select exposure
US8730353B2 (en) Method of controlling adaptive auto exposure based on adaptive region weight
US9723285B2 (en) Multi-area white-balance control device, multi-area white-balance control method, multi-area white-balance control program, computer in which multi-area white-balance control program is recorded, multi-area white-balance image-processing device, multi-area white-balance image-processing method, multi-area white-balance image-processing program, computer in which multi-area white-balance image-processing program is recorded, and image-capture apparatus
EP2426928B1 (en) Image processing apparatus, image processing method and program
CN104954771B (en) Carry out the image processing equipment and image processing method of color range correction
US20060274160A1 (en) Automatic white balance correction method for image capturing apparatus
JP5677113B2 (en) Image processing device
CN112752023A (en) Image adjusting method and device, electronic equipment and storage medium
US20100195906A1 (en) Automatic image enhancement
WO2019019904A1 (en) White balance processing method and apparatus, and terminal
WO2015119271A1 (en) Image processing device, imaging device, image processing method, computer-processable non-temporary storage medium
WO2022206353A1 (en) Image processing method, photographic apparatus, image processing apparatus and readable storage medium
JP2017055235A (en) Image processing apparatus and image processing method
CN107682611B (en) Focusing method and device, computer readable storage medium and electronic equipment
WO2021051307A1 (en) Image color calibration method, camera devices, and image color calibration system
JP2013143593A (en) Imaging device, control method thereof, and program
JP7307541B2 (en) IMAGE PROCESSING DEVICE, IMAGING DEVICE, IMAGE PROCESSING METHOD, AND PROGRAM
WO2022083765A1 (en) Underwater image color restoration method and apparatus, and underwater video color restoration method and apparatus
JP6196882B2 (en) Multi-area white balance control device, multi-area white balance control method, multi-area white balance control program, computer recording multi-area white balance control program, multi-area white balance image processing device, multi-area white balance image processing method, multi-area White balance image processing program, computer recording multi-area white balance image processing program, and imaging apparatus provided with multi-area white balance image processing device
JP2013058869A (en) Image processor, image processing method, and program
JP2013500610A (en) Lens roll-off correction operation using values corrected based on luminance information
CN114125408A (en) Image processing method and device, terminal and readable storage medium
CN115914850A (en) Method for enhancing permeability of wide dynamic image, electronic device and storage medium
CN108711176B (en) Method and device for determining gain value of panoramic fisheye camera and adjusting imaging color, terminal and fisheye camera

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: 22815061

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: 22815061

Country of ref document: EP

Kind code of ref document: A1