A method and acquisition device for true color restoration of underwater images

By calculating the optical attenuation coefficient of water and performing energy compensation, the problem of poor color restoration effect of underwater images in the prior art is solved, efficient true color restoration of underwater images is achieved, and the image restoration and accuracy are improved.

CN114708167BActive Publication Date: 2024-12-20OCEAN UNIV OF CHINA
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202210439486.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-04-25
Publication Date
2024-12-20
Estimated Expiration
2042-04-25

AI Technical Summary

Technical Problem

The existing underwater image restoration technology ignores the physical process of underwater imaging, resulting in poor image color restoration effect and lacks effective methods based on the optical attenuation value of water bodies.

Method used

By obtaining the underwater target image, the water measurement lamp image and the underwater measurement lamp image, the optical attenuation coefficient of the water body is calculated, and the image is compensated with energy by using Bill's law to achieve true color restoration of the image.

Benefits of technology

It improves the resilience of underwater images, obtains more accurate image real colors, avoids the accidental influence of a single pixel, and is convenient and efficient in operation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114708167B_ABST
    Figure CN114708167B_ABST
Patent Text Reader

Abstract

The present invention provides a method and acquisition device for true color restoration of underwater images, wherein the restoration method comprises: first, acquiring an underwater target image, an image of an above-water measuring light, and an image of an underwater measuring light, and determining a shooting distance; then obtaining energy values ​​of the above-water measuring light and the underwater measuring light according to pixel values ​​of the above-water measuring light and the underwater measuring light images; calculating the RGB attenuation coefficient of the water body; obtaining the energy value of the target image according to the pixel value of the target image; using Beer's law to perform energy compensation on the underwater target image according to the RGB attenuation coefficient of the water body; and obtaining the image pixel value of the color restoration of the target image. The method calculates the water body attenuation coefficient by analyzing the numerical value of the RGB channel of the image, and on this basis compensates the RGB channel of the original image to obtain the true color of the image, and the restoration degree of the image is greatly improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of underwater image restoration, and in particular relates to a method and an acquisition device for true color restoration of underwater images. Background Art

[0002] Underwater optical imaging technology is one of the basic methods for exploring underwater mysteries. It is of great significance in many fields such as biology, geology, and port engineering. However, due to the nature of water itself, its optical properties as a medium are different from those of air. Underwater, the parameters that affect light transmission are the inherent optical properties of water, and the volume scattering function and water absorption coefficient are the two most basic optical properties of water. The absorption and scattering of light by water will consume the energy of the imaging beam and the illumination beam, causing a lot of image noise and reducing image quality.

[0003] An important research branch of underwater image processing is color restoration technology. Alhen et al. developed hyperspectral imaging technology and used mathematical statistical models to calculate the attenuation coefficient of light propagating in water to restore color. Petit et al. used the light source attenuation compensation method in RGB color space to restore color distortion. Lu et al. proposed to restore the color of underwater scenes using the camera spectral characteristics and light source propagation attenuation characteristics. There are also many methods for underwater image color enhancement. The most commonly used methods are machine learning-based methods. The biggest drawback is that they ignore the physical process and mechanism of underwater imaging and rely too much on the "guessing" of the machine to achieve visual blind enhancement. In the direction of color restoration, there is still a lack of effective technical methods to repair images based on the actual optical attenuation value of the water body. This technology is based on the actual RGB attenuation coefficient of the water body to restore the true color of underwater images, which has certain guiding significance for the research direction of underwater image color restoration.

[0004] Most existing image restoration technologies are based on computer compensation of the three RGB channels of an image, but there is no specific method to let the computer know what the compensation value of each channel should be. This technology focuses on the restoration of underwater image color distortion. By analyzing the values ​​of the RGB channels of the image, the optical attenuation coefficient of the water body is calculated, and on this basis, the RGB channels of the original image are compensated to obtain the true color of the image. Summary of the invention

[0005] In view of the above problems, the first aspect of the present invention provides a method for true color restoration of underwater images, comprising the following steps:

[0006] Step 1, obtaining an underwater target image, an above-water measuring light image, and an underwater measuring light image; when obtaining the underwater target image, determining that the distance between the camera and the target is d, and photographing the measuring light at a distance d from the camera lens in the air and in water, respectively, to obtain the above-water measuring light image and the underwater measuring light image;

[0007] Step 2, respectively obtain the pixel value z, the maximum saturation value s and the black pixel value b of the above-water measurement light image and the underwater measurement light image; and convert the energy values ​​E of the two images according to the normalization and inverse gamma transformation formula. air and E water ; The calculation formula is:

[0008]

[0009] In the above formula, k is a constant coefficient adjusted according to the image format;

[0010] Step 3, calculate the attenuation coefficient of the water body, the calculation formula is as follows:

[0011]

[0012] In the above formula, d is the distance between the light source and the camera, e is a natural constant, and C λ is the attenuation coefficient of the water body;

[0013] Step 4: Obtain the pixel value Z, the maximum saturation value S and the black pixel value B of the underwater target image; and obtain the energy value E of the underwater target image according to the normalization and inverse gamma transformation formula. target :

[0014]

[0015] In the above formula, k is a constant coefficient adjusted according to the image format;

[0016] Step 5: Perform color restoration on the underwater target image according to the water body attenuation coefficient. The color restoration method is to perform energy compensation on the image according to Beer's law:

[0017]

[0018] In the above formula, d is the distance between the device measuring light and the target object, C λ is the attenuation coefficient of the water body, e is a natural constant, and Y is the image energy value after color restoration;

[0019] Step 6: According to the maximum saturation value S of the underwater target image, the black pixel value B of the image, and the image energy value Y after color restoration, the underwater target image is subjected to gamma transformation and inverse normalization to obtain the image pixel value X after image color restoration:

[0020]

[0021] In the above formula, k is a constant coefficient determined according to the image format.

[0022] Preferably, the constant coefficient k adjusted according to the image format is 1 for a linear image recording format and is 2.2 for a nonlinear image recording format.

[0023] Preferably, the pixel values ​​z of the above-water measurement light image and the underwater measurement light image are obtained respectively, and the pixel value Z of the underwater target image is obtained, specifically, the pixel point values ​​of the entire photo are sorted according to the sizes of the three channels, and the 18 points with the largest values ​​in the three channels are taken and the average is taken as the pixel value of the image.

[0024] The second aspect of the present invention also provides a device for true color restoration of underwater images, which includes at least one processor and at least one memory; the memory stores an execution program for true color restoration of underwater images; when the processor executes the execution program stored in the memory, the method for true color restoration of underwater images as described in the first aspect can be implemented.

[0025] The third aspect of the present invention further provides a computer-readable storage medium, in which a computer execution program is stored. When the computer execution program is executed by a processor, it is used to implement the method for true color restoration of underwater images as described in the first aspect.

[0026] The fourth aspect of the present invention also provides an image acquisition device for true color restoration of underwater images, comprising a support frame, a fixed platform and a casing fixed to the bottom of the fixed platform; the fixed platform is installed on the support frame, a camera is installed in the middle position of the fixed platform, a number of fill lights are installed on both sides of the camera, and the fill lights are installed on the fixed platform; a measuring light that can generate a light source is installed in front of the camera lens, and the measuring light is installed on the fixed platform through a folding arm; a single-chip microcomputer and a power supply are installed in the casing, the camera, the fill light and the measuring light are all electrically connected to the single-chip microcomputer, and the single-chip microcomputer is used to operate and control the camera, the fill light and the measuring light and obtain the captured image.

[0027] Preferably, the folding arm is a manual folding arm or an electric folding arm, and the folding arm can control the distance between the measuring light and the camera to be in the range of 0.3 meters to 2 meters.

[0028] The fifth aspect of the present invention also provides a system for true color restoration of underwater images, comprising the image acquisition device as described in the fourth aspect, and also comprising a host computer, wherein the host computer is connected to the single-chip microcomputer via a data interface, and the host computer is used to operate and control the single-chip microcomputer and receive images uploaded by the single-chip microcomputer.

[0029] Compared with the prior art, the present invention provides a method and an acquisition device for true color restoration of underwater images. The method focuses on the restoration of color distortion of underwater images. The optical attenuation coefficient of the water body is calculated by analyzing the numerical values ​​of the RGB channels of the image, and the RGB channels of the original image are compensated on this basis to obtain the true color of the image, so that the restoration degree of the image is greatly improved, which has certain guiding significance for the research direction of underwater image color restoration. Among them, the RGB attenuation coefficient measured when 18 pixel points are selected when obtaining the image pixel value is the most stable, and the actual area corresponding to the 18 pixel points in space is extremely small, the weakening of the scattering effect of the water body can be ignored, and the randomness of the influence of the surrounding pixel points on a single pixel is avoided. The acquisition device provides support for the implementation of the above method. The device can be used to obtain the image required for calculating the RGB attenuation coefficient, and the operation is convenient and efficient. BRIEF DESCRIPTION OF THE DRAWINGS

[0030] Figure 1 True color degradation and restoration model for underwater images.

[0031] Figure 2 Flow chart of true color restoration of underwater images.

[0032] Figure 3 This is a simplified structural diagram of the device in Example 2.

[0033] Figure 4 It is a schematic diagram of the overall structure of the collection device of the present invention in a folded state.

[0034] Figure 5 It is a schematic diagram of the overall structure of the collection device of the present invention in the extended use state.

[0035] In the figure: 1. Support frame; 2. Fixing table; 3. Housing; 4. Camera; 5. Fill light; 6. Measuring light; 7. Folding arm; 8. Target object. DETAILED DESCRIPTION

[0036] Explanation of the measurement principle of attenuation coefficient of water body (known distance):

[0037] The image degradation process is generally regarded as a noise pollution process. In this case, the degraded image is:

[0038] g(x,y)=H[f(x,y)]+η(x,y)

[0039] Where g(x,y) is the image after being affected by the degradation function and system noise, H[] can be understood as a function that integrates all degradation factors, f(x,y) is the actual image of the target, and η(x,y) is the system noise. From this, we can understand that the underwater image degradation and restoration model is as follows: Figure 1 shown.

[0040] The degradation function H[] is caused by the attenuation characteristics of water, which mainly includes the absorption and scattering of light by water (forward scattering + backscattering), while the noise η(x, y) is caused by the internal working mechanism of the system. When restoring underwater images, the influence of these two factors needs to be considered comprehensively.

[0041] The present invention expresses the overall influence of the degradation function H and the noise η(x, y) on the ideal image f(x, y) as the attenuation degree of the image RGB pixels. Theoretically, the real image before degradation can be obtained by compensating the degraded image pixel data. According to Beer's law:

[0042] I=I0exp(-cz)

[0043] Because light energy is a manifestation of energy, in order to explain the need for compensation, it is expressed here in terms of energy:

[0044] E 始 e -cd =E 末

[0045] Among them, E 始 Represents the energy of the pixel before attenuation, E 末 Represents the energy after the overall attenuation. However, Beer's law does not take into account the influence of system noise, and directly represents the total attenuation of the image degradation process with the water body attenuation coefficient, which is obviously inaccurate. Therefore, the image RGB attenuation coefficient C is defined here λ The energy loss that characterizes the entire attenuation process is:

[0046]

[0047] When light waves propagate underwater, they are affected by the absorption and scattering of water, causing the energy of the light waves to decay sharply with the length of the distance. However, when light waves propagate in the air, there is almost no absorption and attenuation. Therefore, the energy of the light waves after propagating a distance d in the air can be used to replace the energy before attenuation. At the same time, the fixed propagation distance d ensures that the target object has the same divergence angle to the camera lens. Then:

[0048]

[0049] Where E air is the energy recorded in the air, E wateris the energy recorded in the water. We can obtain the underwater measurement image and the surface measurement image with the same distance d respectively and process them according to their image pixel values ​​to get E air and E water At the same time, according to the recorded accurate imaging distance d, the image RGB attenuation coefficient can be measured. The processing method is:

[0050] The pixel value z, the maximum saturation value s and the black pixel value b of the above-water measurement light image and the underwater measurement light image are obtained respectively; the energy values ​​E of the two images are obtained respectively according to the normalization and inverse gamma transformation formula. air and E water ; The calculation formula is:

[0051]

[0052] In the above formula, k is a constant coefficient adjusted according to the image format; for the linear image recording format, the coefficient k is 1, and for the nonlinear image recording format, the coefficient k is 2.2. For the linear image format RAW, k is 1, which is equivalent to normalizing the pixel value of the image. Since the pixel value of the linear image is proportional to the energy value, the normalized data can be processed as the energy value; for the nonlinear image format JPEG, PNG, etc., k is 2.2, which is equivalent to performing a gamma transformation on the normalized image pixel value. The data obtained is proportional to the image energy value and can be processed as the energy value.

[0053] The invention will be further described below in conjunction with specific embodiments.

[0054] Embodiment 1:

[0055] like Figure 2 As shown, the present invention provides a method for true color restoration of underwater images, comprising the following steps:

[0056] Step 1, obtaining an underwater target image, an above-water measuring light image, and an underwater measuring light image; when obtaining the underwater target image, determining that the distance between the camera and the target is d, and photographing the measuring light at a distance d from the camera lens in the air and in water, respectively, to obtain the above-water measuring light image and the underwater measuring light image;

[0057] Step 2, respectively obtain the pixel value z, the maximum saturation value s and the black pixel value b of the above-water measurement light image and the underwater measurement light image; and convert the energy values ​​E of the two images according to the normalization and inverse gamma transformation formula. air and E water ; The calculation formula is:

[0058]

[0059] In the above formula, k is a constant coefficient adjusted according to the image format;

[0060] Step 3, calculate the RGB attenuation coefficient of the water body, the calculation formula is as follows:

[0061]

[0062] In the above formula, d is the distance between the light source and the camera, e is a natural constant, and C λ It is the RGB attenuation coefficient of the water body;

[0063] Step 4: Obtain the pixel value Z, the maximum saturation value S and the black pixel value B of the underwater target image; and obtain the energy value E of the underwater target image according to the normalization and inverse gamma transformation formula. target :

[0064]

[0065] In the above formula, k is a constant coefficient adjusted according to the image format;

[0066] Step 5: Perform color restoration on the underwater target image according to the RGB attenuation coefficient of the water body. The color restoration method is to perform energy compensation on the image according to Beer's law:

[0067]

[0068] In the above formula, d is the distance between the device measuring light and the target object, C λ is the RGB attenuation coefficient of the water body, e is a natural constant, and Y is the image energy value after color restoration;

[0069] Step 6: According to the maximum saturation value S of the underwater target image, the black pixel value B of the image, and the image energy value Y after color restoration, the underwater target image is subjected to gamma transformation and inverse normalization to obtain the image pixel value X for image color restoration:

[0070]

[0071] In the above formula, k is a constant coefficient determined according to the image format.

[0072] The constant coefficient k adjusted according to the image format is 1 for the linear image recording format and 2.2 for the non-linear image recording format.

[0073] The pixel values ​​z of the above-water measurement light image and the underwater measurement light image are obtained respectively, and the pixel value Z of the underwater target image is obtained. Specifically, the pixel point values ​​of the entire photo are sorted according to the size of the three channels, and the 18 points with the largest values ​​of the three channels are taken and the average is taken as the pixel value of the image. This technology takes the photon scattering effect into account, sorts the pixel point values ​​of the entire photo according to the size of the three channels, and takes the 18 points with the largest values ​​of the three channels to measure the RGB attenuation coefficient. The RGB attenuation coefficient measured when 18 pixels are selected is the most stable, and the actual area corresponding to 18 pixels in space is very small, so the weakening of the scattering effect of the water body can be ignored, and the randomness of a single pixel being affected by surrounding pixels is avoided. Finally, a more accurate RGB attenuation coefficient is obtained by this method.

[0074] It should be noted that most images in daily life are recorded in non-linear formats that conform to the visual sensitivity characteristics of the human eye, such as JPEG, PNG, etc., rather than in non-linear RAW formats.

[0075] The human eye's response to the brightness of external light sources grows nonlinearly, or more precisely, exponentially. Under low illumination, the human eye can more easily distinguish changes in brightness. As illumination increases, the human eye's sensitivity to brightness changes decreases. For camera equipment, the signal output by its photoreceptor is in a stable linear relationship with the intensity of the external light source.

[0076] Therefore, in order to provide people with a better visual experience at a lower cost, the camera device will perform a gamma transform on the image brightness information when saving it. The gamma transform is a nonlinear operation on the grayscale value of the input image, which makes the grayscale value of the output image exponentially related to the grayscale value of the input image:

[0077]

[0078] This index is gamma, Vin ranges from 0 to 1, and generally needs to be normalized first, and then the index is taken. A is a constant, generally 1, and γ is usually 1 / 2.2.

[0079] The image after gamma transformation caters to the visual perception characteristics of people for brightness. The image is nonlinear, and the data recorded by its pixel points does not have a linear mapping relationship with the actual illumination of the underwater scene, and cannot be compensated directly. When processing the data of JPEG type nonlinear images, it is necessary to first perform inverse gamma transformation on them. After linearizing the image, the RGB attenuation coefficient is calculated, and then compensation is performed to restore the underwater image. The prerequisite for gamma transformation and inverse gamma transformation is data normalization, and most daily photos are unnormalized 8-bit bit depth images. Therefore, normalization is required before inverse gamma transformation.

[0080] Embodiment 2:

[0081] like Figure 3 As shown, the present invention also provides a device for true color restoration of underwater images, which includes at least one processor and at least one memory, and also includes a communication interface and an internal bus; the memory stores an execution program code of the true color restoration method of underwater images, etc.; when the processor executes the execution program stored in the memory, the method for true color restoration of underwater images as described in Example 1 can be implemented.

[0082] The internal bus may be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus, etc. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, the bus in the drawings of the present application is not limited to only one bus or one type of bus. The memory may include a high-speed RAM memory, and may also include a non-volatile storage NVM, such as at least one disk storage, and may also be a USB flash drive, a mobile hard disk, a read-only memory, a disk or an optical disk, etc.

[0083] The processor includes one or more general-purpose processors, which are used to run various functional modules by calling the program code in the memory. Among them, the general-purpose processor can be any type of device that can process electronic instructions, including a central processing unit (CPU), a microprocessor, a microcontroller, a main processor, a controller, and an ASIC (Application Specific Integrated Circuit). The processor reads the program code stored in the memory and cooperates with the communication interface to execute all the steps of the method in the above embodiment of the present application.

[0084] The communication interface may be a wired interface (e.g., an Ethernet interface) for communicating with other computing nodes or users. When the communication interface is a wired interface, the communication interface may adopt a protocol family above TCP / IP, such as RAAS protocol, Remote Function Call (RFC) protocol, Simple Object Access Protocol (SOAP) protocol, Simple Network Management Protocol (SNMP) protocol, Common Object Request Broker Architecture (CORBA) protocol, and distributed protocols, etc.

[0085] The device is in the form of a general-purpose computing device and can be provided as a terminal, server, or other form of device.

[0086] Embodiment 3:

[0087] The present invention also provides a non-volatile computer-readable storage medium, in which a computer execution program is stored. When the computer execution program is executed by a processor, it is used to implement the method for true color restoration of underwater images as described in Example 1.

[0088] Specifically, a system, device or equipment equipped with a readable storage medium can be provided, on which software program code that implements the functions of any of the above-mentioned embodiments is stored, and a computer or processor of the system, device or equipment can read and execute instructions stored in the readable storage medium.

[0089] In this case, the program code itself read from the machine-readable medium can realize the function of any one of the above-mentioned embodiments, and thus the machine-readable code and the machine-readable storage medium storing the machine-readable code constitute a part of the present invention.

[0090] The above storage medium can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk (such as CD-ROM, CD-R, CD-RW, DVD-20ROM, DVD-RAM, DVD-RW, DVD-RW), magnetic tape, etc. The storage medium can be any available medium that can be accessed by a general or special-purpose computer.

[0091] It should be understood that the processor may be a central processing unit (CPU), other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), etc. A general-purpose processor may be a microprocessor or any conventional processor. The steps of the method disclosed in the invention may be directly implemented by a hardware processor or implemented by a combination of hardware and software modules in the processor.

[0092] It should be understood that the storage medium is coupled to the processor so that the processor can read information from the storage medium and write information to the storage medium. Of course, the storage medium can also be a component of the processor. The processor and the storage medium can be located in an application specific integrated circuit (ASIC). Of course, the processor and the storage medium can also exist as discrete components in a terminal or server.

[0093] The computer-readable program instructions described herein can be downloaded from a computer-readable storage medium to each computing / processing device, or downloaded to an external computer or external storage device via a network, such as the Internet, a local area network, a wide area network, and / or a wireless network. The network can include copper transmission cables, optical fiber transmissions, wireless transmissions, routers, firewalls, switches, gateway computers, and / or edge servers. The network adapter card or network interface in each computing / processing device receives the computer-readable program instructions from the network and forwards the computer-readable program instructions for storage in the computer-readable storage medium in each computing / processing device.

[0094] The computer program instructions for performing the operation of the present disclosure may be assembly instructions, instruction set architecture (ISA) instructions, machine instructions, machine-related instructions, microcode, firmware instructions, state setting data, or source code or object code written in any combination of one or more programming languages, including object-oriented programming languages, such as Smalltalk, C++, etc., and conventional procedural programming languages, such as "C" language or similar programming languages. Computer-readable program instructions may be executed completely on a user's computer, partially on a user's computer, as an independent software package, partially on a user's computer, partially on a remote computer, or completely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer via any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., using an Internet service provider to connect via the Internet). In some embodiments, an electronic circuit, such as a programmable logic circuit, a field programmable gate array (FPGA), or a programmable logic array (PLA), may be personalized by utilizing the state information of the computer-readable program instructions, and the electronic circuit may execute the computer-readable program instructions, thereby realizing various aspects of the present disclosure.

[0095] Embodiment 4:

[0096] like Figure 4 and Figure 5 As shown, the present invention also provides an image acquisition device for true color restoration of underwater images, comprising a support frame 1, a fixed platform 2 and a casing 3 fixed to the bottom of the fixed platform 2; the fixed platform 2 is installed on the support frame 1, a camera 4 is installed at the middle position of the fixed platform 2, and a plurality of fill lights 5 are installed on both sides of the camera 4, and the fill lights 5 are installed on the fixed platform 2; a measuring light 6 that can generate a light source is installed in front of the lens of the camera 4, and the measuring light 6 is installed on the fixed platform 2 through a folding arm 7; a single-chip microcomputer and a power supply are installed in the casing 3, and the camera 4, the fill light 5 and the measuring light 6 are all electrically connected to the single-chip microcomputer, and the single-chip microcomputer is used to operate and control the camera 4, the fill light 5 and the measuring light 6 and obtain the captured image.

[0097] Among them, the folding arm 7 is a manual folding arm or an electric folding arm. The folding arm 7 can control the distance between the measuring light 6 and the camera 4 to be 0.3 meters to 2 meters. When the folding arm 7 is an electric folding arm, the folding and retracting of the folding arm can be controlled by a single-chip microcomputer. The electric folding rod is a mature existing technology. As long as it can achieve the functions required by the present invention, no specific limitation is made here.

[0098] At the same time, the device can be connected to a host computer and embedded with the method program described in Example 1 to form a measurement system. The host computer is connected to the single-chip microcomputer through a data interface, and the host computer is used to operate and control the single-chip microcomputer and receive images uploaded by the single-chip microcomputer. The host computer can be a computer or other mobile terminal. The execution program of the method described in Example 1 can be set in the single-chip microcomputer or the mobile terminal. When the execution program is set in the single-chip microcomputer, the host computer can directly obtain the restored captured image.

[0099] Working principle of the acquisition device: First, use a data cable with a double-headed USB interface to connect the single-chip microcomputer in the device and the computer on the shore to remotely monitor and control the device. According to the target object and the set fixed position of the device, determine the distance d between the device camera and the object (d should be preferably between 30cm and 200cm). Use the computer to input commands to control the device remotely, start the folding arm and the measuring light, unfold the measuring light to a position d from the camera, and take a picture of the original image Pic0 of the measuring light in the air without water attenuation. Keep the unfolded distance of the measuring light arm, place the device in the water, and take another picture Pic1 of the measuring light attenuated by the water at a distance d. The captured images Pic0 and Pic1 will be automatically input into the single-chip microcomputer, and the single-chip microcomputer will automatically calculate the light attenuation coefficient in the water according to the built-in execution program, and return the RGB light attenuation coefficient of the water to the computer detection system.

[0100] After the device completes the measurement of the RGB light attenuation coefficient of the water body, reset the folding arm, turn off the measuring light, light up the fill lights on both sides of the device, and place the device in the set fixed position. Use the computer to remotely monitor the camera's field of view in real time. After the device is placed, enter the shooting command on the computer, and the device will capture the image of the target object. The captured image will be automatically input into the single-chip microcomputer. The single-chip microcomputer uses the above restoration method to restore the captured image in true color according to the measured RGB attenuation coefficient of the water body, and returns the restored image to the computer.

[0101] The above description is only the preferred embodiment of the present application and is not intended to limit the present application. For those skilled in the art, the present application may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application shall be included in the protection scope of the present application.

[0102] Although the above describes the specific implementation methods of the present invention, it is not intended to limit the scope of protection of the present invention. Those skilled in the art should understand that various modifications or variations that can be made by those skilled in the art on the basis of the technical solution of the present invention without creative work are still within the scope of protection of the present invention.

Claims

1. A method for true color restoration of underwater images, It is characterized in that The following steps are involved: Step 1, acquiring an underwater target image, an above-water measurement light image, and an underwater measurement light image; When acquiring the underwater target image, the distance between the camera and the target is determined to be d, and a measuring light at a distance d from the camera lens is photographed in the air and in the water respectively to obtain the above-water measuring light image and the underwater measuring light image; Step 2, respectively obtain the pixel value z, the maximum saturation value s and the black pixel value b of the above-water measurement light image and the underwater measurement light image; and convert the energy values ​​of the two images according to the normalization and inverse gamma transformation formula. and ; The calculation formula is: = In the above formula, k is a constant coefficient adjusted according to the image format; Step 3, calculate the RGB attenuation coefficient of the water body, the calculation formula is as follows: In the above formula, d is the distance between the light source and the camera, e is a natural constant, It is the RGB attenuation coefficient of the water body; Step 4: Obtain the pixel value Z, the maximum saturation value S and the black pixel value B of the underwater target image; and obtain the energy value of the underwater target image according to the normalization and inverse gamma transform formula. : = In the above formula, k is a constant coefficient adjusted according to the image format; Step 5: Perform color restoration on the underwater target image according to the RGB attenuation coefficient of the water body. The color restoration method is to perform energy compensation on the image according to Beer's law: In the above formula, d is the distance between the device measuring light and the target object. is the RGB attenuation coefficient of the water body, e is a natural constant, and Y is the image energy value after color restoration; Step 6: According to the maximum saturation value S of the underwater target image, the black pixel value B of the image, and the image energy value Y after color restoration, the underwater target image is subjected to gamma transformation and inverse normalization to obtain the image pixel value X after image color restoration: X = In the above formula, k is a constant coefficient determined by the image format; Among them, the pixel values ​​z of the above-water measurement light image and the underwater measurement light image are obtained respectively, and the pixel value Z of the underwater target image is obtained. Specifically, the pixel point values ​​of the entire photo are sorted according to the sizes of the three channels, and the 18 points with the largest values ​​of the three channels are taken and the average is taken as the pixel value of the image.

2. A method for true color restoration of underwater images as claimed in claim 1, Features: The constant coefficient k adjusted according to the image format is 1 for a linear image recording format and is 2.2 for a nonlinear image recording format.

3. A device for true color restoration of underwater images, Features: The device includes at least one processor and at least one memory; the memory stores an execution program for true color restoration of underwater images; when the processor executes the execution program stored in the memory, the method for true color restoration of underwater images as described in claim 1 or 2 is implemented.

4. A computer-readable storage medium, It is characterized in that The computer-readable storage medium stores a computer execution program, and when the computer execution program is executed by a processor, it is used to implement the method for true color restoration of underwater images as claimed in claim 1 or 2.

5. An image acquisition device for true color restoration of underwater images, applied to the method for true color restoration of underwater images as claimed in claim 1 or 2, Features: The invention comprises a support frame (1), a fixing platform (2) and a casing (3) fixed to the bottom of the fixing platform (2); the fixing platform (2) is mounted on the support frame (1); a camera (4) is mounted in the middle of the fixing platform (2); a plurality of fill-in lights (5) are mounted on both sides of the camera (4); the fill-in lights (5) are mounted on the fixing platform (2); a measuring light (6) capable of generating a light source is mounted in front of the lens of the camera (4); the measuring light (6) is mounted on the fixing platform (2) via a folding arm (7); a single-chip microcomputer and a power supply are mounted in the casing (3); the camera (4), the fill-in lights (5) and the measuring light (6) are all electrically connected to the single-chip microcomputer; the single-chip microcomputer is used to operate and control the camera (4), the fill-in lights (5) and the measuring light (6) and obtain a captured image.

6. An image acquisition device for true color restoration of underwater images as claimed in claim 5, Features: The folding arm (7) is a manual folding arm or an electric folding arm, and the folding arm (7) can control the distance between the measuring light (6) and the camera (4) to be in the range of 0.3 m to 2 m.

7. A system for true color restoration of underwater images, Features: It includes the image acquisition device as described in claim 5, and also includes a host computer, which is connected to the single-chip microcomputer through a data interface, and the host computer is used to operate and control the single-chip microcomputer and receive images uploaded by the single-chip microcomputer.