Underwater image correction method and system based on adaptive color enhancement

Through the adaptive color enhancement method, the underwater image is initially compensated and balanced, and is divided into green and blue images for compensation processing, which solves the problem of red channel information loss and improves the color recovery effect of the underwater image. Image quality.

CN118735829AActive Publication Date: 2024-10-01GUANGDONG MEDICAL UNIV
View PDF 8 Cites 0 Cited by

Patent Information

Application Number
CN202410834346.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-06-26
Publication Date
2024-10-01
Estimated Expiration
2044-06-26

AI Technical Summary

Technical Problem

The existing underwater image color restoration system suffers serious loss of red channel information, causing the image to appear blue or green as the main color, and the blue and green channels adopt a unified restoration mode, resulting in excessive or under-compensation of the red channel.

Method used

The adaptive color enhancement method is used to perform preliminary compensation processing on the underwater image, balance adjustment is performed through the minimum color loss constraint, and color compensation is performed in the CI ELAB color space. The images are divided into greenish and bluish images for separate compensation processing to ensure The color average of each channel is close.

Benefits of technology

It improves the color restoration effect of underwater images, reduces excessive or under-compensation of the red channel, enhances the natural color performance of the image, and significantly improves the image quality.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118735829A_ABST
    Figure CN118735829A_ABST
Patent Text Reader

Abstract

The invention discloses an underwater image correction method and system based on adaptive color enhancement. The method comprises the following steps: firstly, carrying out preliminary compensation processing on the color of an obtained to-be-corrected original underwater image; carrying out equalization adjustment on the result of the preliminary compensation processing by adopting minimum color loss constraint; and finally, color compensation processing is carried out on a balance adjustment result, and image correction of the original underwater image to be corrected is completed. The method can improve the color recovery effect, and can be widely applied to the technical field of image processing.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of image processing, and in particular to an underwater image correction method and system based on adaptive color enhancement. Background Art

[0002] In recent years, underwater remote sensing analysis has become increasingly important due to advances in remote sensing technology. However, the quality of captured underwater images is affected by interference factors such as light absorption and scattering during propagation, resulting in color distortion, inappropriate contrast, and blurred details. Therefore, it is crucial to restore the original colors of the captured underwater images.

[0003] The existing underwater image color restoration system has not achieved satisfactory results. The main reason is that the red channel of underwater images usually loses a lot of information, resulting in the image being blue or green as the main color. However, the existing system uses a unified restoration mode for the blue and green channels, resulting in over-compensation or under-compensation of the red channel. Summary of the invention

[0004] In view of this, an embodiment of the present invention provides an underwater image correction method and system based on adaptive color enhancement to improve the effect of color restoration.

[0005] An aspect of an embodiment of the present invention provides an underwater image correction method based on adaptive color enhancement, comprising the following steps:

[0006] Performing preliminary color compensation processing on the acquired original underwater image to be corrected;

[0007] Using a minimum color loss constraint to perform equalization adjustment on the result of the preliminary compensation processing;

[0008] A color compensation process is performed on the result of the equalization adjustment to complete the image correction of the original underwater image to be corrected.

[0009] In some embodiments, the preliminary compensation processing of the color of the acquired original underwater image to be corrected includes the following steps:

[0010] Acquiring the original underwater image to be corrected;

[0011] In the RGB color space, determining the color mean of each channel of the original underwater image to be corrected;

[0012] Determining whether the original underwater image to be corrected is a green-biased image or a blue-biased image according to the color mean values ​​of the green channel and the blue channel of the original underwater image to be corrected;

[0013] Color compensation for greenish or bluish images;

[0014] Wherein, the expression of the color mean is:

[0015]

[0016] in, represents the color mean of the c channel; L represents the length value of the original underwater image to be corrected; H represents the height value of the original underwater image to be corrected; I i,j Represents the color value of the corresponding channel at the length value i and the height value j.

[0017] In some embodiments, the color compensation for the greenish image or the bluish image comprises the following steps:

[0018] For the green-biased image, a first compensation process formula is used to compensate the losses of the red channel and the blue channel using the information contained in the green channel;

[0019] For the bluish image, a second compensation process formula is used to compensate the information contained in the red channel with the information contained in the green channel;

[0020] Among them, the first compensation process formula is:

[0021]

[0022] The second compensation process formula is:

[0023]

[0024] Among them, I r (x),I g (x),I b (x) represents the information of the red channel, green channel and blue channel in the underwater image, I′ r (x),I' g (x), I′ b (x) represents the information of the red channel, green channel and blue channel after compensation, Represents the average value of the red channel, green channel, and blue channel of the original underwater image.

[0025] In some embodiments, the step of using the minimum color loss constraint to perform equalization adjustment on the result of the preliminary compensation process comprises the following steps:

[0026] According to the result of the preliminary compensation processing, obtaining the color mean value of each channel of the original underwater image to be corrected;

[0027] According to the preset minimum color loss formula and the color mean, the compensation formula in the preliminary compensation process is updated until the difference between the color mean values ​​of each channel is less than a fixed threshold.

[0028] In some embodiments, the minimum color loss formula is expressed as:

[0029]

[0030] Among them, L color represents minimum color loss; Represents the average value of the red channel, green channel, and blue channel of the original underwater image.

[0031] In some embodiments, the color compensation processing is performed on the result of the equalization adjustment to complete the image correction of the original underwater image to be corrected, including the following steps:

[0032] The compensation of channel a and channel b of the CI ELAB color space of the original underwater image to be corrected is adjusted to convert the RGB color space into the CI ELAB color space.

[0033] In some embodiments, the compensation formula for converting the RGB color space to the CI ELAB color space is:

[0034]

[0035] Among them, the channel with a larger mean value between channel a and channel b is represented as I max , the channel with smaller mean is represented by I min , γ is the adjustment parameter; Representative I max The average value of Representative I min The average value of .

[0036] Another aspect of the embodiment of the present invention further provides an underwater image correction system based on adaptive color enhancement, comprising:

[0037] The first module is used to perform preliminary compensation processing on the color of the acquired original underwater image to be corrected;

[0038] The second module is used to balance the result of the preliminary compensation processing by using a minimum color loss constraint;

[0039] The third module is used to perform color compensation processing on the result of the equalization adjustment to complete the image correction of the original underwater image to be corrected.

[0040] Another aspect of an embodiment of the present invention further provides an electronic device, including a processor and a memory;

[0041] The memory is used to store programs;

[0042] The processor executes the program to implement the method described above.

[0043] Another aspect of the embodiments of the present invention further provides a computer-readable storage medium, wherein the storage medium stores a program, and the program is executed by a processor to implement the method described above.

[0044] The embodiment of the present invention also discloses a computer program product or a computer program, which includes a computer instruction stored in a computer-readable storage medium. A processor of a computer device can read the computer instruction from the computer-readable storage medium, and the processor executes the computer instruction, so that the computer device executes the above method.

[0045] The embodiment of the present invention first performs a preliminary compensation process on the color of the acquired original underwater image to be corrected; then uses the minimum color loss constraint to balance the result of the preliminary compensation process; and finally performs a color compensation process on the result of the balance adjustment to complete the image correction of the original underwater image to be corrected. The present invention can improve the effect of color restoration. BRIEF DESCRIPTION OF THE DRAWINGS

[0046] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0047] Figure 1 A schematic diagram of an implementation environment provided for an embodiment of the present invention;

[0048] Figure 2 An overall step flow chart provided for an embodiment of the present invention;

[0049] Figure 3 A flowchart of an implementation process provided for an embodiment of the present invention;

[0050] Figure 4 A schematic diagram of the structure of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0051] In order to make the purpose, technical solutions and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention. When the following description refers to the drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the embodiments of the present invention. They are only examples of devices and methods consistent with some aspects of the embodiments of the present invention as detailed in the attached claims.

[0052] It is understood that the terms "first", "second", etc. used in the present invention may be used herein to describe various concepts, but unless otherwise specified, these concepts are not limited by these terms. These terms are only used to distinguish one concept from another. For example, without departing from the scope of the embodiments of the present invention, the first information may also be referred to as the second information, and similarly, the second information may also be referred to as the first information. Depending on the context, the words "if" and "if" as used herein may be interpreted as "at the time of" or "when" or "in response to determining".

[0053] The terms "at least one", "multiple", "each", "any", etc. used in the present invention, at least one includes one, two or more, multiple includes two or more, each refers to each of the corresponding multiple, and any refers to any one of the multiple.

[0054] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art to which the present invention belongs. The terms used herein are only for the purpose of describing the embodiments of the present invention and are not intended to limit the present invention.

[0055] The underwater image correction method based on adaptive color enhancement provided by the embodiment of the present invention relates to the field of image processing technology. The underwater image correction method based on adaptive color enhancement provided by the embodiment of the present invention can be applied to a terminal, can also be applied to a server, and can also be software running in a terminal or a server. In some embodiments, the terminal can be a smart phone, a tablet computer, a laptop computer, a desktop computer, a smart speaker, a smart watch, and a car terminal, etc., but is not limited to this; the server side can be configured as an independent physical server, or a server cluster or distributed system composed of multiple physical servers, and can also be configured as a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN, and big data and artificial intelligence platforms. The server can also be a node server in a blockchain network; the software can be an application that implements an underwater image correction method based on adaptive color enhancement, etc., but is not limited to the above forms.

[0056] The present invention can be used in many general or special computer system environments or configurations. For example: personal computers, server computers, handheld or portable devices, tablet devices, multiprocessor systems, microprocessor-based systems, set-top boxes, programmable consumer electronic devices, network PCs, minicomputers, mainframe computers, distributed computing environments including any of the above systems or devices, etc. The present invention can be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform specific tasks or implement specific abstract data types. The present invention can also be practiced in distributed computing environments, in which tasks are performed by remote processing devices connected through a communication network. In a distributed computing environment, program modules can be located in local and remote computer storage media including storage devices.

[0057] like Figure 1 FIG. 1 is a schematic diagram of an implementation environment provided by an embodiment of the invention. Figure 1 The implementation environment includes at least one terminal 102 and a server 101. The terminal 102 and the server 101 can be connected to a network wirelessly or wired to complete data transmission and exchange.

[0058] Server 101 can be an independent physical server, or a server cluster or distributed system composed of multiple physical servers. It can also be a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN (Content Delivery Network), as well as big data and artificial intelligence platforms.

[0059] In addition, the server 101 can also be a node server in the blockchain network. Blockchain is a new application model of computer technologies such as distributed data storage, peer-to-peer transmission, consensus mechanism, and encryption algorithm.

[0060] The terminal 102 may be a smart phone, a tablet computer, a laptop computer, a desktop computer, a smart speaker, a smart watch, etc. The terminal 102 may also be a vehicle-mounted terminal of various device types described above, but is not limited thereto. The terminal 102 and the server 101 may be directly or indirectly connected via wired or wireless communication, which is not limited in this embodiment of the present invention.

[0061] Based on the example Figure 1 In the implementation environment shown, an embodiment of the present invention provides an underwater image correction method based on adaptive color enhancement. The underwater image correction method based on adaptive color enhancement is applied to the server 101 as an example for explanation. It can be understood that the method can also be applied to the terminal 102.

[0062] Reference Figure 2 , Figure 2 The flowchart of the underwater image correction method based on adaptive color enhancement applied to the server provided by the embodiment of the present invention, the execution subject of the method can be any of the aforementioned computer devices (including servers or terminals). Figure 2 , the method may include the following steps:

[0063] Performing preliminary color compensation processing on the acquired original underwater image to be corrected;

[0064] Using a minimum color loss constraint to perform equalization adjustment on the result of the preliminary compensation processing;

[0065] A color compensation process is performed on the result of the equalization adjustment to complete the image correction of the original underwater image to be corrected.

[0066] In some embodiments, the preliminary compensation processing of the color of the acquired original underwater image to be corrected includes the following steps:

[0067] Acquiring the original underwater image to be corrected;

[0068] In the RGB color space, determining the color mean of each channel of the original underwater image to be corrected;

[0069] Determining whether the original underwater image to be corrected is a green-biased image or a blue-biased image according to the color mean values ​​of the green channel and the blue channel of the original underwater image to be corrected;

[0070] Color compensation for greenish or bluish images;

[0071] Wherein, the expression of the color mean is:

[0072]

[0073] in, represents the color mean of the c channel; L represents the length value of the original underwater image to be corrected; H represents the height value of the original underwater image to be corrected; I i,j Represents the color value of the corresponding channel at the length value i and the height value j.

[0074] In some embodiments, the color compensation for the greenish image or the bluish image comprises the following steps:

[0075] For the green-biased image, a first compensation process formula is used to compensate the losses of the red channel and the blue channel using the information contained in the green channel;

[0076] For the bluish image, a second compensation process formula is used to compensate the information contained in the red channel with the information contained in the green channel;

[0077] Among them, the first compensation process formula is:

[0078]

[0079] The second compensation process formula is:

[0080]

[0081] Among them, I r (x),I g (x),I b (x) represents the information of the red channel, green channel and blue channel in the underwater image, I′ r (x),I' g (x), I′ b (x) represents the information of the red channel, green channel and blue channel after compensation, Represents the average value of the red channel, green channel, and blue channel of the original underwater image.

[0082] In some embodiments, the step of using the minimum color loss constraint to perform equalization adjustment on the result of the preliminary compensation process comprises the following steps:

[0083] According to the result of the preliminary compensation processing, obtaining the color mean value of each channel of the original underwater image to be corrected;

[0084] According to the preset minimum color loss formula and the color mean, the compensation formula in the preliminary compensation process is updated until the difference between the color mean values ​​of each channel is less than a fixed threshold.

[0085] In some embodiments, the minimum color loss formula is expressed as:

[0086]

[0087] Among them, L color represents minimum color loss; Represents the average value of the red channel, green channel, and blue channel of the original underwater image.

[0088] In some embodiments, the color compensation processing is performed on the result of the equalization adjustment to complete the image correction of the original underwater image to be corrected, including the following steps:

[0089] The compensation of channel a and channel b of the CI ELAB color space of the original underwater image to be corrected is adjusted to convert the RGB color space into the CI ELAB color space.

[0090] In some embodiments, the compensation formula for converting the RGB color space to the CI ELAB color space is:

[0091]

[0092] Among them, the channel with a larger mean value between channel a and channel b is represented as I max , the channel with smaller mean is represented by I min , γ is the adjustment parameter; Representative I max The average value of Representative I min The average value of .

[0093] The following describes the specific implementation process of the present invention in detail by taking a specific application scenario as an example:

[0094] In view of the problems existing in the prior art, the technical problem that the present invention needs to solve is to classify underwater images into two categories: green-biased images and bluish-biased images, and then perform adaptive compensation processing on the red channels in these two categories, so as to improve the color restoration effect.

[0095] Specifically, due to the absorption of the red light band in the underwater image during the underwater light propagation process, the image color is distorted, thereby forming an image that is mainly blue or green. The embodiment of the present invention analyzes a large number of underwater images and calculates the average distribution of their RGB channels for blue and green images. The following conclusions are drawn: In blue images, the red channel information is severely lost, while the degree of information loss of the blue and green channels is comparable. However, in green images, not only is the red channel information severely degraded, but the blue channel is also significantly affected. In general, the degree of RGB channel loss in blue and green images is different. In order to better restore the lost information in underwater images, it is crucial to process the blue and green images separately. It is also a technical core point of this invention. Therefore, an embodiment of the present invention proposes an underwater image correction method and system based on adaptive color enhancement. As Figure 3 As shown, it mainly includes the following three key steps.

[0096] Step 1: Perform preliminary compensation for underwater image colors.

[0097] First, in the RGB color space, the embodiment of the present invention calculates the mean of each channel of the red, green and blue channels of the underwater image, and compares the mean of the green channel and the blue channel. If the mean of the green channel is greater than the mean of the blue channel, the image is classified as a green-biased image; if the mean of the blue channel is greater than the mean of the green channel, the image is classified as a blue-biased image.

[0098] Next, the embodiment of the present invention performs color compensation on the greenish image and the bluish image respectively. In the green image, the red and blue channels suffer the most serious information loss, while the degradation of the green channel is relatively small. Therefore, the information contained in the green channel becomes the main part of compensating the loss of the red and blue channels. In addition, the information in the green channel remains consistent. The compensation process formula for the green image is as follows:

[0099]

[0100] Among them, I r (x),I g (x),I b (x) represents the information of the red, green and blue channels in the underwater image, I′ r (x),I' g (x), I′ b (x) represents the information of the red, green and blue channels after compensation, Represents the average value of the red, green, and blue channels of the original underwater image.

[0101] In a bluish image, the red channel has the largest information loss, followed by the green channel, and finally the blue channel, which has the smallest information loss. Applying the same compensation principle to the red channel of a green image may result in excessive red channel compensation, resulting in an image with red artifacts. Therefore, for compensation of the red channel, the selection of compensation channel values ​​does not select the blue channel (which is characterized by minimal information loss). Instead, embodiments of the present invention select a value to compensate the green channel that is located at the center of the lost RGB color channel information. Green channel compensation is the same as green image channel compensation. The information of the blue channel remains unchanged, and compensation for a bluish image is as follows:

[0102]

[0103] In the second step, the embodiment of the present invention adopts the minimum color loss constraint to adjust the balance of color compensation. After the color compensation in the first step, the underwater image often shows undercompensation in the red channel. In order to obtain more natural colors in the enhanced image, it is inspired by the grayscale world hypothesis, which assumes that the color channels of natural images have similar histogram distribution and average value. Therefore, a new minimum color loss algorithm is designed:

[0104]

[0105] in, is the average value after color compensation at formula (1) or (2). If the average value of the channel after color compensation at (1) or (2) does not meet the minimum color loss formula L color , the embodiment of the present invention updates (1) or (2) in each iteration until the difference between the channels is less than a fixed value, thereby obtaining the average value and histogram distribution of each color channel. After the minimum color loss, when their color histogram distributions are in a relatively close state, the obtained enhanced image is closer to the color of the natural image.

[0106] In the third step, in order to achieve better color balance in the enhanced underwater image, the embodiment of the present invention designs fine-tuned color compensation on the a and b channels of the CIELAB color space. Although the compensation of the RGB channels is iteratively minimized using the minimum color loss to make their grayscale means closer and compensate the red channel, the compensation for a specific single image in the red channel is still insufficient. Therefore, the embodiment of the present invention fine-tunes the compensation of channels a and b on the CIELAB of the image. The embodiment of the present invention converts the RGB color space to the CIELAB color space, and the specific compensation formula is as follows:

[0107]

[0108] Among them, the channel with a larger mean value between channel a and channel b is represented as I max , and the other channel is denoted as I min , γ is the adjustment parameter. After fine-tuning the color compensation, the color channel is transferred back to the RGB color space. In addition, the color of the underwater image after fine-tuning compensation is more consistent with the color of the natural image.

[0109] In summary, the embodiment of the present invention analyzes the distribution of color channels of underwater images and finds that better results can be achieved by separately processing blue-biased images and green-biased images. Based on this theory, the embodiment of the present invention adaptively classifies underwater images and then uses different compensation methods for images of different categories. In addition, in order to better perform color correction on images, the embodiment of the present invention proposes a minimum color loss principle based on the gray world hypothesis to constrain the effect of the previous preliminary color compensation. Finally, in order to better correct the color, the embodiment of the present invention not only performs color compensation in the RGB color space, but also performs color compensation in the CIELAB color space. Thereby, the original color information of the underwater image is fully restored.

[0110] The embodiments of the present invention improve the quality of underwater images and restore the color information lost in underwater images, which is of great significance for scientific research, marine surveys and archaeological work. In underwater construction, marine detection and other projects, the color correction system can provide more accurate visual information, which is conducive to underwater workers making better decisions, thereby improving work efficiency and safety. In addition, for underwater photography and video recording, the color correction system can significantly improve the image quality and bring a better visual experience to diving enthusiasts, documentary makers and viewers.

[0111] Another aspect of the embodiment of the present invention further provides an underwater image correction system based on adaptive color enhancement, comprising:

[0112] The first module is used to perform preliminary compensation processing on the color of the acquired original underwater image to be corrected;

[0113] The second module is used to balance the result of the preliminary compensation processing by using a minimum color loss constraint;

[0114] The third module is used to perform color compensation processing on the result of the equalization adjustment to complete the image correction of the original underwater image to be corrected.

[0115] It can be understood that the contents of the above method embodiments are all applicable to the present system embodiments, the functions specifically implemented by the present system embodiments are the same as those of the above method embodiments, and the beneficial effects achieved are also the same as those achieved by the above method embodiments.

[0116] The embodiment of the present invention further provides an electronic device, the electronic device includes a memory and a processor, the memory stores a computer program, and the processor implements the above-mentioned underwater image correction method based on adaptive color enhancement when executing the computer program. The electronic device can be any intelligent terminal including a tablet computer, a car computer, etc.

[0117] It can be understood that the contents of the above method embodiments are all applicable to the present device embodiments, the functions specifically implemented by the present device embodiments are the same as those of the above method embodiments, and the beneficial effects achieved are also the same as those achieved by the above method embodiments.

[0118] See also Figure 4 , Figure 4 The hardware structure of an electronic device of another embodiment is illustrated, and the electronic device includes:

[0119] The processor 401 may be implemented by a general-purpose CPU (Central Processing Unit), a microprocessor, an application-specific integrated circuit (Application Specific Integrated Circuit, ASIC), or one or more integrated circuits, and is used to execute relevant programs to implement the technical solutions provided in the embodiments of the present invention;

[0120] The memory 402 can be implemented in the form of a read-only memory (ROM), a static storage device, a dynamic storage device, or a random access memory (RAM). The memory 402 can store an operating system and other application programs. When the technical solution provided in the embodiment of this specification is implemented by software or firmware, the relevant program code is stored in the memory 402, and the processor 401 calls and executes the underwater image correction method based on adaptive color enhancement of the embodiment of the present invention;

[0121] Input / output interface 403, used to implement information input and output;

[0122] Communication interface 404, used to realize communication interaction between the device and other devices, which can be realized by wired mode (such as USB, network cable, etc.) or wireless mode (such as mobile network, WIFI, Bluetooth, etc.);

[0123] Bus 405 , which transmits information between various components of the device (e.g., processor 401 , memory 402 , input / output interface 403 , and communication interface 404 );

[0124] The processor 401 , the memory 402 , the input / output interface 403 and the communication interface 404 are connected to each other in communication within the device via the bus 405 .

[0125] An embodiment of the present invention further provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, the underwater image correction method based on adaptive color enhancement is implemented.

[0126] It can be understood that the contents of the above method embodiments are all applicable to the present storage medium embodiments, the functions specifically implemented by the present storage medium embodiments are the same as those of the above method embodiments, and the beneficial effects achieved are also the same as those achieved by the above method embodiments.

[0127] The memory, as a non-transient computer-readable storage medium, can be used to store non-transient software programs and non-transient computer executable programs. In addition, the memory may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some embodiments, the memory may optionally include a memory remotely disposed relative to the processor, and these remote memories may be connected to the processor via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0128] In some selectable embodiments, the function / operation mentioned in the block diagram may not occur in the order mentioned in the operation diagram. For example, depending on the function / operation involved, the two boxes shown in succession can actually be executed substantially simultaneously or the boxes can sometimes be executed in reverse order. In addition, the embodiment presented and described in the flow chart of the present invention is provided by way of example, for the purpose of providing a more comprehensive understanding of technology. The disclosed method is not limited to the operation and logic flow presented herein. Selectable embodiments are expected, wherein the order of various operations is changed and the sub-operation of a part for which is described as a larger operation is performed independently.

[0129] In addition, although the present invention is described in the context of functional modules, it should be understood that, unless otherwise specified, one or more of the functions and / or features described may be integrated into a single physical device and / or software module, or one or more functions and / or features may be implemented in separate physical devices or software modules. It is also understood that a detailed discussion of the actual implementation of each module is unnecessary for understanding the present invention. More specifically, in view of the properties, functions, and internal relationships of the various functional modules in the device disclosed herein, the actual implementation of the module will be understood within the conventional skills of the engineer. Therefore, those skilled in the art can implement the present invention set forth in the claims without excessive experimentation using ordinary techniques. It is also understood that the specific concepts disclosed are merely illustrative and are not intended to limit the scope of the present invention, which is determined by the full scope of the appended claims and their equivalents.

[0130] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, etc., which can store program codes.

[0131] The logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as an ordered list of executable instructions for implementing logical functions, and can be embodied in any computer-readable medium for use by an instruction execution system, device or apparatus (such as a computer-based system, a system including a processor, or other system that can fetch instructions from an instruction execution system, device or apparatus and execute instructions), or in conjunction with such instruction execution systems, devices or apparatuses. For the purposes of this specification, "computer-readable medium" can be any device that can contain, store, communicate, propagate or transmit a program for use by an instruction execution system, device or apparatus, or in conjunction with such instruction execution systems, devices or apparatuses.

[0132] More specific examples of computer-readable media (a non-exhaustive list) include the following: an electrical connection with one or more wires (electronic device), a portable computer disk case (magnetic device), a random access memory (RAM), a read-only memory (ROM), an erasable and programmable read-only memory (EPROM or flash memory), an optical fiber device, and a portable compact disk read-only memory (CDROM). In addition, the computer-readable medium may even be a paper or other suitable medium on which the program is printed, since the program may be obtained electronically, for example, by optically scanning the paper or other medium, followed by editing, deciphering or, if necessary, processing in another suitable manner, and then stored in a computer memory.

[0133] It should be understood that the various parts of the present invention can be implemented by hardware, software, firmware or a combination thereof. In the above-mentioned embodiments, a plurality of steps or methods can be implemented by software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented by hardware, as in another embodiment, it can be implemented by any one of the following technologies known in the art or their combination: a discrete logic circuit having a logic gate circuit for implementing a logic function for a data signal, a dedicated integrated circuit having a suitable combination of logic gate circuits, a programmable gate array (PGA), a field programmable gate array (FPGA), etc.

[0134] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "examples", "specific examples", or "some examples" means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic representation of the above terms does not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner.

[0135] Although the embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that various changes, modifications, substitutions and variations may be made to the embodiments without departing from the principles and spirit of the present invention, and that the scope of the present invention is defined by the claims and their equivalents.

[0136] The above is a specific description of the preferred implementation of the present invention, but the present invention is not limited to the described embodiments. Those skilled in the art may make various equivalent modifications or substitutions without violating the spirit of the present invention. These equivalent modifications or substitutions are all included in the scope defined by the claims of the present invention.

Claims

1. An underwater image correction method based on adaptive color enhancement, characterized in that: The following steps are involved: Performing preliminary color compensation processing on the acquired original underwater image to be corrected; Using a minimum color loss constraint to perform equalization adjustment on the result of the preliminary compensation processing; A color compensation process is performed on the result of the equalization adjustment to complete the image correction of the original underwater image to be corrected.

2. The underwater image correction method based on adaptive color enhancement according to claim 1, characterized in that: The preliminary color compensation processing of the acquired original underwater image to be corrected comprises the following steps: Acquiring the original underwater image to be corrected; In the RGB color space, determining the color mean of each channel of the original underwater image to be corrected; Determining whether the original underwater image to be corrected is a green-biased image or a blue-biased image according to the color mean values ​​of the green channel and the blue channel of the original underwater image to be corrected; Color compensation for greenish or bluish images; Wherein, the expression of the color mean is: in, represents the color mean of the c channel; L represents the length value of the original underwater image to be corrected; H represents the height value of the original underwater image to be corrected; I i,j Represents the color value of the corresponding channel at the length value i and the height value j.

3. The underwater image correction method based on adaptive color enhancement according to claim 2, characterized in that: The color compensation for the greenish image or the bluish image comprises the following steps: For the green-biased image, a first compensation process formula is used to compensate the losses of the red channel and the blue channel using the information contained in the green channel; For the bluish image, a second compensation process formula is used to compensate the information contained in the red channel with the information contained in the green channel; Wherein, the first compensation process formula is: The second compensation process formula is: Among them, I r (x),I g (x),I b (x) represents the information of the red channel, green channel and blue channel in the underwater image, I r '(x),I' g (x), I b '(x) represents the information of the red channel, green channel and blue channel after compensation, Represents the average value of the red channel, green channel, and blue channel of the original underwater image.

4. The underwater image correction method based on adaptive color enhancement according to claim 1, characterized in that: The method of using the minimum color loss constraint to balance the result of the preliminary compensation process comprises the following steps: According to the result of the preliminary compensation processing, obtaining the color mean value of each channel of the original underwater image to be corrected; According to the preset minimum color loss formula and the color mean, the compensation formula in the preliminary compensation process is updated until the difference between the color mean values ​​of each channel is less than a fixed threshold.

5. The underwater image correction method based on adaptive color enhancement according to claim 4, characterized in that: The expression of the minimum color loss formula is: Among them, L color represents minimum color loss; Represents the average value of the red channel, green channel, and blue channel of the original underwater image.

6. The underwater image correction method based on adaptive color enhancement according to claim 1, characterized in that: The color compensation processing is performed on the result of the equalization adjustment to complete the image correction of the original underwater image to be corrected, comprising the following steps: The compensation of channel a and channel b of the CIELAB color space of the original underwater image to be corrected is adjusted to convert the RGB color space into the CIELAB color space.

7. The underwater image correction method based on adaptive color enhancement according to claim 6, characterized in that: The compensation formula for converting the RGB color space to the CIELAB color space is: Among them, the channel with a larger mean value between channel a and channel b is represented as I max , the channel with smaller mean is represented by I min , γ is the adjustment parameter; Representative I max The average value of Representative I min The average value of .

8. An underwater image correction system based on adaptive color enhancement, characterized in that: include: The first module is used to perform preliminary compensation processing on the color of the acquired original underwater image to be corrected; The second module is used to balance the result of the preliminary compensation processing by using a minimum color loss constraint; The third module is used to perform color compensation processing on the result of the equalization adjustment to complete the image correction of the original underwater image to be corrected.

9. An electronic device, characterized in that: including a processor and a memory; The memory is used to store programs; The processor executes the program to implement the method according to any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that: The storage medium stores a program, and the program is executed by a processor to implement the method according to any one of claims 1 to 7.

Citation Information

Patent Citations

  • Underwater image color correction algorithm based on color channel local compensation

    CN113902629A

  • Local self-adaptive underwater image color correction method

    CN114820385A

  • Generalized attenuation image enhancement method based on adaptive color compensation and detail optimization

    CN115578297A

  • Underwater image enhancement method based on dynamic color channel compensation

    CN116385568A

  • Underwater image color correction method guided by attenuation image

    CN117058026A