Recursive adaptive color correction method for underwater light source image
Through recursive adaptive color correction method, chunking processing and bilateral stretching of HSI color model, the problems of underwater image blur and color distortion are solved, the clarity and contrast of the image are improved, and the higher quality underwater image is achieved Enhance the effect.
Patent Information
- Application Number
- CN202410927610.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-11
- Publication Date
- 2024-11-08
AI Technical Summary
Underwater images are blurred, noise and color distortion due to the complex marine environment and the absorption and scattering effects of light, which affects the use value of the image. Especially when the near-shore water quality is turbid, the reflected photons of the target object are scattered and the contrast is reduced, making it difficult to obtain. Clear underwater information.
Recursive adaptive color correction method is adopted, and the underwater light source image is obtained, entropy calculation is performed after blocking, and the recursive processing is generated, white balance and contrast are corrected, and the two sides of saturation and intensity are converted to the HSI color model. Stretch, combine bilinear interpolation to remove the tile boundaries, and output the corrected image.
It significantly improves the clarity and contrast of underwater images, enhances information entropy and peak signal-to-noise ratio, reduces mean square error and running time, and achieves a higher quality underwater image enhancement effect.
Smart Images

Figure CN118918028A_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the technical field of underwater image data processing and analysis, and in particular relates to a recursive adaptive color correction method for underwater light source images. Background Art
[0002] Due to the complex marine environment, and the absorption and scattering of light, as well as the influence of microorganisms, algae, impurities, etc. in the water, the visual effect of the underwater images obtained is not good, such as overall image blur, more noise, color distortion, etc. The distortion of the image directly affects the subsequent use value of the image. This requires underwater image enhancement technology to highlight the target information, features and details of people in the image to meet people's acquisition and use of information in the image.
[0003] At the same time, the water quality of my country's coastal areas is relatively turbid, and the attenuation of the water medium causes the energy of photons to be absorbed or scattered in the propagation direction when propagating in the water. In particular, the scattering effect causes the reflected photons of the target or the backscattered photons in the illumination path to generate a lot of noise in the imaging interface, reducing the contrast of the target and even submerging the image. We must enhance or restore the image to understand the real situation and information underwater, so as to better study and use images for underwater surveys and analysis. Therefore, image enhancement is particularly important and indispensable for the exploration of underwater resources. Summary of the invention
[0004] In view of the above problems, the first aspect of the present invention proposes a recursive adaptive color correction method for underwater light source images, comprising the following steps:
[0005] Step 1, obtain the captured underwater light source image and crop the image to a fixed size;
[0006] Step 2: Divide the image into blocks. The original image is divided into several rows and columns, and the image is divided by calculating the entropy of each block in the boundary area.
[0007] Step 3, recursively process the divided image; extract the block from the original image, extract half of the previous block to combine with half of the next block and generate a new histogram, and then recursively repeat this process to all blocks to generate a recursively processed histogram;
[0008] Step 4, equalize the RGB channels by white balancing the recursively processed histogram;
[0009] Step 5, performing contrast correction under the RGB color model;
[0010] Step 6, convert to HSI color model for contrast correction, and perform bilateral stretching on saturation S and intensity I components;
[0011] In step 7, the processed channels are combined again and the corrected image is output.
[0012] Preferably, the specific process of step 2 is:
[0013] The original image boundary is divided into t blocks with 8 columns and 8 rows; next, the entropy of each block is calculated, and then the average entropy value of the four boundary blocks is calculated and compared with the average entropy value of the opposite edge, that is, the right side is compared with the left side, and the top side is compared with the bottom side; the following formula is used to determine the average entropy H of the image edge mean value:
[0014]
[0015] Among them, H X It refers to the entropy value of each image block at the image boundary, where 1≤X≤8; t is the number of the image block;
[0016] Depending on the nature of the image and the calculation of entropy, the image is divided column by column or row by row; if the lowest entropy value is shown at the left edge and the right boundary or at one of them, then the image is divided row by row; if the lowest entropy value is shown at the top and bottom boundary or at one of them, then the image will be divided column by column.
[0017] Preferably, after the recursively processed histogram is generated in step 3, contrast limiting must be used for each small divided area, and a threshold is set to crop the histogram to limit the amplification range, subtract the part of the histogram that exceeds the threshold, limit the maximum number of pixels of a certain grayscale value, and evenly distribute the cropped part to other parts of the histogram.
[0018] Preferably, the step 4 is specifically:
[0019] Calculate the maximum value of each channel of R, G, and B; use I R (i,j),I G (i, j) and I B (i, j) represent the red, green and blue components of an RGB image of size M×N pixels, where i = 1, ..., M, j = 1, ..., N; calculate the maximum pixel value R of each color component max , G max and B max :
[0020]
[0021] Use the above formula to find the prominent color cast channel and calculate each color component R arg , G arg and B argThe average value of:
[0022]
[0023] Use the color components with relatively higher values to increase other color components; based on the main hue, two gain factors are calculated as shown in the following formula:
[0024]
[0025] The highest color channel is set to the target average, and to produce a balanced image, the remaining color channels are determined to match using multipliers;
[0026] Use two color channels to reduce the color cast problem of the affected image; based on the Von Kries hypothesis, the color channel values are adjusted by the following formula:
[0027]
[0028] Among them I R(i,j) and I G(i,j) is the original pixel value in the image, and is the pixel value to be adjusted.
[0029] Preferably, the step 5 is specifically:
[0030] Find the minimum and maximum pixel values in the histogram, and obtain a clearer image by clipping both sides of the histogram, that is, cutting off some pixel values from both sides of the histogram. 0.2% and 99.8% are selected as the determining factors for clipping; the image ignores all pixel values outside the range of 0.2% to 99.8%, and applies the contrast correction method to redistribute the internal pixel values;
[0031] The contrast correction method applies a linear scaling function to those pixels within the 0.2% to 99.8% range, with each pixel being scaled using the following formula:
[0032]
[0033] Among them, P0 is the normalized pixel value; P I is the pixel value under consideration; a is the minimum value of the desired range; b is the maximum value of the desired range; c is the lowest pixel value currently present in the image; d is the highest pixel value currently present in the image;
[0034] When the contrast stretching algorithm is applied to a color image, each channel is stretched using the same scaling to maintain the correct color ratios.
[0035] Preferably, the specific process of step 6 is:
[0036] The HSI color model provides a wider color range by controlling the color elements of the image, by controlling saturation S and intensity I, by increasing the true color using saturation S and solving lighting problems through intensity I; using adjustments in both directions, downward toward the dark side and upward toward the bright side, by applying the histogram of the image and stretching it and redistributing the image changes over the maximum range of possible values.
[0037] Preferably, when processing the image in blocks, bilinear interpolation is performed between the block maps to remove artificial block boundaries, taking into account the intensity values of the unknown point P(x, y) and the assumed four points Q 11 (x1,y1),Q 12 (x1,y2),Q 21 (x2,y1),Q 22 The known intensity value at (x2, y2) is calculated by the average of the distances between P(x, y) and the other four known points as the interpolation value; the specific process is:
[0038] Assuming that the function f(x,y) is the value at point P, the calculation starts by calculating the intensity values at points f(x,y1) and f(x,y2) in the x direction;
[0039] First, interpolate in the x direction and get:
[0040]
[0041] Then interpolate in the y direction and get:
[0042]
[0043] Right now:
[0044]
[0045] Then the obtained f(x,y) is the intensity value at point P(x,y).
[0046] A second aspect of the present invention provides a recursive adaptive color correction device for underwater light source images, the device comprising at least one processor and at least one memory, the processor and the memory being coupled; a computer execution program is stored in the memory; when the processor executes the computer execution program stored in the memory, the device executes a recursive adaptive color correction method for underwater light source images as described in the first aspect.
[0047] The third aspect of the present invention provides a computer-readable storage medium, characterized in that: the computer-readable storage medium stores programs or instructions, and when the programs or instructions are executed by a processor, the computer executes a recursive adaptive color correction method for underwater light source images as described in the first aspect.
[0048] Compared with the prior art, the present invention has the following beneficial effects:
[0049] The present invention mainly provides a recursive adaptive color correction method for underwater light source images, based on color balance, RGB color model and contrast correction HSI color model for contrast and color correction. Most underwater images are acquired under conditions of uneven lighting, which will cause local color unevenness in color images after being processed by general enhancement methods. This algorithm divides the local processing into small blocks, recursively limits the contrast of each small area and then applies the color correction model algorithm, and uses bilinear interpolation to improve the efficiency of the algorithm, and eliminates artificial boundaries between blocks, while there is no decrease in quality.
[0050] The present invention solves the problem of underwater image blur; compared with existing traditional methods, it has higher information entropy, average gradient, peak signal-to-noise ratio and edge number, as well as lower mean square error and less running time; experimental results partially prove that the present invention significantly achieves underwater image enhancement effect. BRIEF DESCRIPTION OF THE DRAWINGS
[0051] Figure 1 Schematic diagram of the process of the recursive adaptive color correction method of the present invention;
[0052] Figure 2 Schematic diagram of the experimental platform based on digital light source.
[0053] Figure 3 Schematic diagram of processing small areas of an image divided into 8*8 blocks.
[0054] Figure 4 Schematic diagram of the blocks on the four boundaries of the image.
[0055] Figure 5 A new histogram diagram is generated by combining half of the previous block with half of the next block.
[0056] Figure 6 The figure is a schematic diagram of cropping and limiting an image.
[0057] Figure 7 Schematic diagram of cutting both sides of the histogram and performing contrast stretching.
[0058] Figure 8 Schematic diagram of the HSI color model for bidirectional stretching of S and I.
[0059] Fig. 9 Schematic diagram of bilinear interpolation.
[0060] Fig.10 This is an experimental comparison chart of applying the algorithm of the present invention to a standard color palette.
[0061] Fig.11 Edge detection graph of the algorithm of the present invention applied to image data.
[0062] Fig.12 4 is a simplified block diagram of the structure of the recursive adaptive color correction device in Example 2. DETAILED DESCRIPTION
[0063] The invention will be further described below in conjunction with specific embodiments.
[0064] The present invention provides a recursive adaptive color correction method for underwater light source images, such as Figure 1 As shown, the following steps are included:
[0065] Step 1, obtain the captured underwater light source image and crop the image to a fixed size;
[0066] Step 2: Divide the image into blocks. The original image is divided into several rows and columns, and the image is divided by calculating the entropy of each block in the boundary area.
[0067] Step 3, recursively process the divided image; extract the block from the original image, extract half of the previous block to combine with half of the next block and generate a new histogram, and then recursively repeat this process to all blocks to generate a recursively processed histogram;
[0068] Step 4, equalize the RGB channels by white balancing the recursively processed histogram;
[0069] Step 5, performing contrast correction under the RGB color model;
[0070] Step 6, convert to HSI color model for contrast correction, and perform bilateral stretching on saturation S and intensity I components;
[0071] Step 7: Output the corrected image.
[0072] This embodiment is experimented on a data set acquired by an underwater high signal-to-noise ratio imaging system based on a digital light source. The performance of this method on this data set exceeds that of other methods. The present invention also conducts experimental research on marine data to verify its effectiveness and robustness.
[0073] 1. Get the dataset:
[0074] Image acquisition based on digital light source, as shown in the following figure Figure 2 As shown in the figure, the process of obtaining the data set is as follows. The experimental targets include a variety of fish models and plaster statues, as well as instrumental targets including standard color plates. When doing the experiment, the predetermined target is placed in the characteristic position of the pool, and the image acquisition equipment and digital light source system are placed. The digital light source system includes a digital servo and motion pan-tilt module and a light source module. The digital servo and motion pan-tilt module has 6 two-degree-of-freedom pan-tilts, including 12 servos. One pan-tilt contains two servos, which are connected to the control end through the servo driver board. The pan-tilt is a mechanical device for supporting and controlling the light source. It can rotate, tilt or translate in the horizontal and vertical directions to achieve precise control of the light source illumination delivery. In addition to the automation function, the user is also allowed to manually control the direction and angle. The light source module contains 6 small-angle light sources, which are fixed on the pan-tilt. Underwater image data that meets the requirements is obtained by regularly changing the preset experimental parameters.
[0075] After acquiring the video data, the video is first processed into images frame by frame, and each frame is cropped to a fixed size.
[0076] 2. Image recursive processing:
[0077] The image is divided into small areas for processing (for example, using an 8*8 window). The original image is first divided into several rows and columns (tiles) to solve the problem of uneven color and contrast of the processed image.
[0078] Due to the uneven illumination underwater, the acquired image has bright areas in the front direction and dark areas in the back direction. This property of the image should be determined before further processing. From the test, combining bright and dark areas into blocks will produce a better output distribution. Therefore, the entropy at the boundary of the image is calculated first. Information entropy is used to measure the richness of details in the image, and information entropy indicates the richness of image information, where higher values indicate more information in the image. The calculation of entropy is given by the following formula:
[0079]
[0080] Where p(x) is the probability distribution function of the image.
[0081] The image boundary is divided into t blocks with 8 columns and 8 rows, as Figure 3 Next, the entropy of each block is calculated. Then, the entropy of the four boundary blocks (such as Figure 4 The average entropy of the edge of the image is calculated by taking the average entropy of the edge (as shown in Figure 1) and comparing it with the average entropy of the opposite edge, that is, comparing the right side with the left side and the top side with the bottom side. The following formula is used to determine the average entropy H of the edge of the image mean Value. XIt refers to the entropy value of each image block at the image boundary, where 1≤X≤8. t is the number of the image block.
[0082] Average Entropy:
[0083]
[0084] Depending on the nature of the image and the calculation of entropy, the image is divided column by column or row by row. If the lowest entropy value is shown at the left edge and the right boundary or at one of them, then the image should be divided row by row; if the lowest entropy value is shown at the top and bottom boundary or at one of them, then the image will be divided column by column.
[0085] After dividing the image by rows or columns, extract the tiles from the original image. Then apply the color correction part to be studied next to the histogram. Next, extract half of the previous tile to combine with half of the next tile and generate a new histogram. If the tiles are divided by rows, process the first tile first, then divide the first tile into two, numbered 1 and 2. The second tile is divided into numbers 3 and 4, extract numbers 2 and 3, and then process them as a whole tile after combining them. And so on, process numbers 3 and 4 next, and then combine numbers 4 and 5. This process will recursively process these histogram tiles for the entire image. Figure 5 shown.
[0086] The default number of rows and columns is 8, which is the best number to divide from the test image because the recursive process will result in 2n-1 times to process the entire image. Therefore, the image is divided into 8 rows or 8 columns, which means that the image will need to be processed recursively 15 times. Therefore, the number of recursive processes r is given by the following formula, where n is the number of columns or rows. In this case, the default number of n is 8.
[0087] r=2n-1
[0088] Due to backscattering, the light hits other particles in the water and reflects onto the target object. The underwater image thus obtained will produce noise, reduce contrast, and have a mist-like effect. Therefore, contrast limiting must be used for each small area divided. The histogram is cropped by setting a threshold to achieve the purpose of limiting the amplification range. The cropping limit is to subtract the part of the histogram that exceeds the threshold. The limit is applied to the histogram to limit the maximum number of pixels of a certain grayscale value. Usually, the part that exceeds the histogram cropping limit is directly ignored, which will affect the accuracy of image processing. Instead, these cropped parts should be evenly distributed to other parts of the histogram. The image is cropped and limited, such as Figure 6 shown.
[0089] 3. Balance RGB channels:
[0090] The gray world algorithm assumes that, given an image with sufficiently large color variations, the average values of the R, G, and B components of the image will average to a common gray value. Therefore, in images acquired by a digital camera in a specific lighting environment, the color cast caused by the effects of lighting can be removed by enforcing the gray world assumption on the image.
[0091] First, find the average value R of the three channel components R, G, and B arg , G arg , B arg :
[0092]
[0093] Where N is the total number of pixels in the image.
[0094] Then find the average grayscale of the image:
[0095]
[0096] Once a common grayscale value is chosen, each color component is scaled by applying a transformation with coefficients:
[0097]
[0098]
[0099] Among them, GrayR, GrayG, and GrayB represent the selected grayscale values.
[0100] One way to perform a white balance algorithm is to set the maximum value (R) of each channel at the reference white (WhiteR, WhiteG, WhiteB). max , G max , B max ), the Von Kries coefficient is evaluated as:
[0101]
[0102] In order to obtain high-quality images, balanced color values of each R, G, and B component are required. Unfortunately, in underwater environments, images are rarely correctly color balanced. In order to balance the R, G, and B values, the first step of the method proposed in the present invention is to calculate the maximum value of each R, G, and B channel. R (i,j),I G (i, j) and I B (i, j) represent the red, green and blue components of an RGB image of size M×N pixels, where i = 1, ..., M, j = 1, ..., N. Calculate the maximum pixel value R of each color component max , G maxand B max :
[0103]
[0104] First, use the above formula to find the prominent color shift channel and calculate each color component R arg , G arg and B arg The average value of:
[0105]
[0106] The proposed method keeps the dominant color channel constant because underwater images always have too high blue compared to other colors. Therefore, in order to make the image color balanced, the color component with higher value is used to increase other local color components. Based on the dominant color, two gain factors are calculated as shown in the following formula.
[0107]
[0108] The highest color channel is set to the target average, and in order to produce a balanced image, the remaining color channels are determined to match using multipliers. The method proposed in the present invention uses two color channels to reduce the color cast problem of the affected image. Based on the Von Kries hypothesis, the value of the color channel is adjusted by the following formula:
[0109]
[0110] Among them I R(i,j) and I G(i,j) is the original pixel value in the image, and is the pixel value to be adjusted.
[0111] 4. Contrast correction of RGB color model:
[0112] Low contrast makes the image unclear, not easy to see enough information, and difficult to evaluate. Therefore, in addition to clipping the histogram to enhance the contrast, an important step of the method proposed by the present invention is to apply a contrast correction algorithm to further enhance the contrast of the image. This is achieved by stretching the intensity value range so that the intensity value can span the expected range of values. Before performing contrast correction, it is necessary to determine the upper and lower limits of the contrast corrected image for each channel. Typically, the range of values in an 8-bit color channel is 0 to 255. Use a general method to find the minimum and maximum pixel values in the histogram and stretch them between specific ranges.
[0113] The main problem with this method is that there will be a single pixel value that is too high or too low in the edge area of the image, which seriously affects the histogram distribution of the image. This will result in a non-representative scaled histogram. The present invention can obtain a clearer image by clipping both sides of the histogram (i.e., cutting off several pixel values from both sides of the histogram). That is, by obtaining the histogram of the image, and then selecting 0.2% and 99.8% as the determining factors for clipping to clip the histogram on both sides. This shows that the image can be redistributed by ignoring all pixel values outside the range of 0.2% and 99.8%, and only applying the contrast correction method to the internal pixel values. As Figure 7 shown.
[0114] The contrast stretching algorithm is used to enhance the contrast of an image. This is achieved by stretching the range of color values to utilize all possible values. The contrast correction method applies a linear scaling function to those pixels that are within the range of 0.2% to 99.8%. Each pixel is scaled using the following formula:
[0115]
[0116] in:
[0117] P0 is the normalized pixel value;
[0118] P I is the pixel value under consideration;
[0119] a is the minimum value of the required range;
[0120] b is the maximum value of the desired range;
[0121] c is the lowest pixel value currently present in the image;
[0122] d is the highest pixel value currently present in the image;
[0123] When the contrast stretching algorithm is applied to a color image, each channel is stretched using the same scaling to maintain the correct color ratios.
[0124] 5. Contrast correction of HSI color model:
[0125] After stretching the contrast of the image in the RGB color model, it introduces how to improve the quality of the image by applying the HSI color model. In addition, it describes the conversion of the image from the RGB color model to the HSI color model. The HSI color model has three components, namely Hue (H), Saturation (S), and Intensity (I). Hue is the pure color component, saturation is the purity of the color, and brightness is the illumination component. The hue channel is a pure color channel, which has seven colors, the same as the rainbow colors, and this channel is kept constant to avoid color gamut problems. Unlike the hue component in the HSI color model that represents several colors, each component in other color models such as RGB, CMY, and YCrCb represents only one color.
[0126] Contrast correction for both sides: The saturation and intensity parameters of the HSI color model are used in the contrast correction method. In the present invention, these parameters are combined with the RGB color model for underwater image enhancement. In this case, the contrast correction method is used to adjust both the downward (towards the dark side) and upward (towards the bright side). Such adjustments help to expand the histogram well in both directions, such as Figure 8 shown.
[0127] The HSI color model provides a wider color range by controlling the color elements of the image. Saturation and intensity are the elements that produce a wider color range. The blue element in the image can be controlled by the "S" and "I" values to extend the range from light blue to dark blue. Using this technique, the contrast in underwater images can be controlled by reducing or increasing the "S" and "I" values. This is done by applying the histogram of the image and stretching it to redistribute the image variation over the maximum range of possible values. In addition, a linear stretch from the "S" value can provide larger values for each range by looking at smaller output values. Importantly, using the saturation parameter, the true colors of underwater images can be obtained; using the intensity parameter to increase the intensity of the lighting.
[0128] The above stages are applied to each pixel of the image to produce the correct value for the final output of the pixel.
[0129] 6. Bilinear interpolation:
[0130] Due to the block processing, the output image will have artificial boundaries between the tiles. In order to remove the artificially generated tile boundaries, a mapping is applied, that is, bilinear interpolation is interpolated between the tile mappings. Interpolation refers to the known points near a certain function f(x,y) to be solved, and the approximate value of the function f(x,y) is obtained through these specific points to replace it. From a mathematical point of view, the core idea of bilinear interpolation is to first perform a linear interpolation in the x direction and then interpolate again in the y direction. Changing the order of x and y has no effect on the result. Interpolation greatly improves the efficiency of the algorithm without reducing the quality.
[0131] In general, basic calculations for unknown points can be obtained by calculating distances. Consider the intensity value of the unknown point P(x,y) and the point Q 11 (x1,y1),Q 12 (x1,y2),Q 21 (x2,y1),Q 22 The known intensity value at (x2, y2) and the example of calculation can be applied by the explanation and illustration of the figure below. The intensity value at point P(x, y) can be calculated by the average of the distances between P(x, y) and the other four known points. Assuming that the function f(x, y) is the value of point P, the calculation starts by calculating the intensity values at points f(x, y1) and f(x, y2) in the x direction. Reference Fig. 9 .
[0132] First, interpolate in the x direction and get:
[0133]
[0134] Then interpolate in the y direction and get:
[0135]
[0136] Right now,
[0137]
[0138] Then the obtained f(x,y) is the intensity value at point P(x,y).
[0139] 7. Comparison of experimental results:
[0140] In order to verify the effectiveness and robustness of the algorithm of the present invention, experiments were conducted in two water environments: one was a coastal area with a water depth of 6m and a visibility of 2.6m, and the other was a school experimental pool. Underwater images of standard targets in specific water environments were obtained to form an underwater image dataset. The experimental comparison of the standard color plate using the algorithm of the present invention is shown in the figure below. Fig.10 shown.
[0141] Table 1 lists the MSE (mean square error) and PSNR (peak signal-to-noise ratio) comparison values of the images processed by each algorithm for the color plate and the resolution plate and the original image without degradation on the water. It can be seen that the method of the present invention produces the lowest MSE value and the highest PSNR value compared with other methods. These values also show that the proposed method can fully reduce noise and increase valuable information of the image.
[0142] Table 1 Comparison of MSE and PSNR between processed images and original images
[0143]
[0144] The average quantitative values of underwater images processed by various algorithms in the test data sample set are shown in the table:
[0145] Table 2 Average quantitative values of underwater images processed by various algorithms in the test data sample set
[0146]
[0147] The method of the present invention has the highest information entropy and average value of average gradient, which indicates that there is a certain degree of improvement in the clarity and richness of details of the output image produced by the proposed method. This is because the background of the image processed by the algorithm of the present invention is more visible, and the object is better distinguished from the background. HE (histogram equalization) obtains the highest contrast, because the overall image processed by traditional HE produces under-enhanced and over-enhanced areas, which result in overly dark and overly bright areas, so the contrast is too high, but the processed image will appear severely distorted. The algorithm of this paper has the highest contrast average value, which shows that the algorithm of this paper can enhance the image contrast very well.
[0148] In terms of processing time, the WP (white balance) method requires the shortest processing time compared to other methods because the calculations mainly involved in WP are relatively simple. However, the PDSCC (Pixel Distribution Displacement Color Correction) method requires more processing time compared to other existing methods. This is followed by the CLAHE-Mix (Mixed Contrast Limited Adaptive Histogram Equalization) method, which requires the second longest processing time. In addition, the conventional CLAHE (Contrast Limited Adaptive Histogram Equalization) method ranks third in processing time among the compared existing methods. The method proposed in the present invention has a fairly short processing time, which is comparable to other methods such as HE, ICM (Integrated Color Model), etc. In addition, the processing time of the method proposed in the present invention is shorter than that of the conventional CLAHE method. The average value of the underwater images of the test set proves the effectiveness of the proposed method because it ranks third in the lowest processing time required among the 8 methods.
[0149] To evaluate the capability and performance of the method, edge detection was performed based on the number of edges found in the image. Images with more edges are considered to have higher feature content. Fig.11 As shown, the image processed by the algorithm of the present invention can clearly see rich edges, and at the same time the foreground target object and the background image are well distinguished, and the processing effect is better.
[0150] As shown in the results, the proposed method not only improves the contrast but also enhances the color of the image. In addition, the proposed method increases the sharpness of the background objects, making them more clearly visible. The proposed method has shown better qualitative and quantitative results and is suitable for enhancing underwater images.
[0151] Embodiment 2:
[0152] like Fig.12 As shown, the present invention also provides a marine sub-mesoscale vortex identification device, the device includes at least one processor and at least one memory, and also includes a communication interface and an internal bus; the memory stores a computer execution program of the sub-mesoscale vortex identification model constructed by the construction method described in Example 1; when the processor executes the execution program stored in the memory, the device executes a marine sub-mesoscale vortex identification method. The internal bus can be an Industry Standard Architecture (ISA) bus, a Peripheral Component (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus, etc. The bus can 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 memory, and may also be a U disk, a mobile hard disk, a read-only memory, a disk or an optical disk, etc.
[0153] The device may be provided as a terminal, a server or other forms of devices.
[0154] Fig.12is a block diagram of a device shown as an example. The device may include one or more of the following components: a processing component, a memory, a power component, a multimedia component, an audio component, an input / output (I / O) interface, a sensor component, and a communication component. The processing component generally controls the overall operation of the electronic device, such as operations associated with display, phone calls, data communications, camera operations, and recording operations. The processing component may include one or more processors to execute instructions to complete all or part of the steps of the above method. In addition, the processing component may include one or more modules to facilitate interaction between the processing component and other components. For example, the processing component may include a multimedia module to facilitate interaction between the multimedia component and the processing component.
[0155] The memory is configured to store various types of data to support operations on the electronic device. Examples of such data include instructions for any application or method operating on the electronic device, contact data, phone book data, messages, pictures, videos, etc. The memory 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.
[0156] The power supply assembly provides power to various components of the electronic device. The power supply assembly may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power for the electronic device. The multimedia assembly includes a screen that provides an output interface between the electronic device and the user. In some embodiments, the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundaries of the touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia assembly includes a front camera and / or a rear camera. When the electronic device is in an operating mode, such as a shooting mode or a video mode, the front camera and / or the rear camera may receive external multimedia data. Each front camera and rear camera may be a fixed optical lens system or have a focal length and optical zoom capability.
[0157] The audio component is configured to output and / or input audio signals. For example, the audio component includes a microphone (MIC), and when the electronic device is in an operating mode, such as a call mode, a recording mode, and a voice recognition mode, the microphone is configured to receive an external audio signal. The received audio signal can be further stored in a memory or sent via a communication component. In some embodiments, the audio component also includes a speaker for outputting an audio signal. The I / O interface provides an interface between the processing component and the peripheral interface module, and the above-mentioned peripheral interface module can be a keyboard, a click wheel, a button, etc. These buttons may include, but are not limited to: a home button, a volume button, a start button, and a lock button.
[0158] The sensor assembly includes one or more sensors for providing various aspects of status assessment for the electronic device. For example, the sensor assembly can detect the on / off state of the electronic device, the relative positioning of components, such as the display and keypad of the electronic device, and the sensor assembly can also detect the position change of the electronic device or a component of the electronic device, the presence or absence of user contact with the electronic device, the orientation or acceleration / deceleration of the electronic device and the temperature change of the electronic device. The sensor assembly may include a proximity sensor configured to detect the presence of nearby objects without any physical contact. The sensor assembly may also include a light sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly may also include an accelerometer, a gyroscope sensor, a magnetic sensor, a pressure sensor or a temperature sensor.
[0159] The communication component is configured to facilitate wired or wireless communication between the electronic device and other devices. The electronic device can access a wireless network based on a communication standard, such as WiFi, 2G or 3G, or a combination thereof. In an exemplary embodiment, the communication component receives a broadcast signal or broadcast-related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component also includes a near field communication (NFC) module to facilitate short-range communication. For example, the NFC module can be implemented based on radio frequency identification (RFID) technology, infrared data association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology and other technologies.
[0160] In an exemplary embodiment, the electronic device may be implemented by one or more application specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors or other electronic components to perform the above methods.
[0161] Embodiment 3:
[0162] The present invention also provides a non-volatile computer-readable storage medium, in which is stored a program or instruction of a sub-mesoscale vortex identification model constructed by the construction method described in Example 1. When the program or instruction is executed by a processor, the computer executes a method for identifying ocean sub-mesoscale vortexes.
[0163] Specifically, a system, device or equipment equipped with a readable storage medium may be provided, on which a software program code for implementing the functions of any of the above-mentioned embodiments is stored, and a computer or processor of the system, device or equipment reads and executes the instructions stored in the readable storage medium. In this case, the program code read from the readable medium itself can implement the functions of any of the above-mentioned embodiments, so the machine-readable code and the readable storage medium storing the machine-readable code constitute a part of the present invention.
[0164] 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.
[0165] 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.
[0166] 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.
[0167] 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.
[0168] 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 customized 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.
[0169] 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.
[0170] 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 recursive adaptive color correction method for underwater light source images, characterized in that: The following steps are involved: Step 1, obtain the captured underwater light source image and crop the image to a fixed size; Step 2: Divide the image into blocks. The original image is divided into several rows and columns, and the image is divided by calculating the entropy of each block in the boundary area. Step 3, recursively process the divided image; extract the block from the original image, extract half of the previous block to combine with half of the next block and generate a new histogram, and then recursively repeat this process to all blocks to generate a recursively processed histogram; Step 4, equalize the RGB channels by white balancing the recursively processed histogram; Step 5, performing contrast correction under the RGB color model; Step 6, convert to HSI color model for contrast correction, and perform bilateral stretching on saturation S and intensity I components; In step 7, the processed channels are combined again and the corrected image is output.
2. A recursive adaptive color correction method for underwater light source images as claimed in claim 1, characterized in that: The specific process of step 2 is: The original image boundary is divided into t blocks with 8 columns and 8 rows; next, the entropy of each block is calculated, and then the average entropy value of the four boundary blocks is calculated and compared with the average entropy value of the opposite edge, that is, the right side is compared with the left side, and the top side is compared with the bottom side; the following formula is used to determine the average entropy H of the image edge mean value: Among them, H X It refers to the entropy value of each image block at the image boundary, where 1≤X≤8; t is the number of the image block; Depending on the nature of the image and the calculation of entropy, the image is divided column by column or row by row; if the lowest entropy value is shown at the left edge and the right boundary or at one of them, then the image is divided row by row; if the lowest entropy value is shown at the top and bottom boundary or at one of them, then the image will be divided column by column.
3. The recursive adaptive color correction method for underwater light source images according to claim 1, characterized in that: After the recursively processed histogram is generated in step 3, contrast limiting must be used for each small area divided. A threshold is set to crop the histogram to limit the amplification range, subtract the part of the histogram that exceeds the threshold, limit the maximum number of pixels of a certain grayscale value, and evenly distribute the cropped part to other parts of the histogram.
4. A recursive adaptive color correction method for underwater light source images as claimed in claim 1, characterized in that: The step 4 is specifically as follows: Calculate the maximum value of each channel of R, G, and B; use I R (,j),I G (,j) and I B (,j) represent the red, green and blue components of an RGB image of size M×N pixels, where i=1,……,M, j=1,……,N; Calculate the maximum pixel value R for each color component max , G max and B max : Use the above formula to find the prominent color cast channel and calculate each color component R arg , G arg and B arg The average value of: Use the color components with relatively higher values to increase other color components; based on the main hue, two gain factors are calculated as shown in the following formula: The highest color channel is set to the target average, and to produce a balanced image, the remaining color channels are determined to match using multipliers; Use two color channels to reduce the color cast problem of the affected image; based on the Von Kries hypothesis, the color channel values are adjusted by the following formula: Among them I R(i,j) and I G(i,j) is the original pixel value in the image, and is the pixel value to be adjusted.
5. A recursive adaptive color correction method for underwater light source images as claimed in claim 1, characterized in that: The step 5 is specifically as follows: Find the minimum and maximum pixel values in the histogram, and obtain a clearer image by clipping both sides of the histogram, that is, cutting off some pixel values from both sides of the histogram. 0.2% and 99.8% are selected as the determining factors for clipping; the image ignores all pixel values outside the range of 0.2% to 99.8%, and applies the contrast correction method to redistribute the internal pixel values; The contrast correction method applies a linear scaling function to those pixels within the 0.2% to 99.8% range, with each pixel being scaled using the following formula: Among them, P0 is the normalized pixel value; P I is the pixel value under consideration; a is the minimum value of the desired range; b is the maximum value of the desired range; c is the lowest pixel value currently present in the image; d is the highest pixel value currently present in the image; When the contrast stretching algorithm is applied to a color image, each channel is stretched using the same scaling to maintain the correct color ratios.
6. A recursive adaptive color correction method for underwater light source images as claimed in claim 1, characterized in that: The specific process of step 6 is as follows: The HSI color model provides a wider color range by controlling the color elements of the image, by controlling saturation S and intensity I, by increasing the true color using saturation S and solving lighting problems through intensity I; using adjustments in both directions, downward toward the dark side and upward toward the bright side, by applying the histogram of the image and stretching it and redistributing the image changes over the maximum range of possible values.
7. A recursive adaptive color correction method for underwater light source images as claimed in claim 1, characterized in that: When processing the image in blocks, bilinear interpolation is performed between the block maps to remove the artificial block boundaries, considering the intensity values of the unknown points P(x, y) and the assumed four points Q 11 (x1,y1),Q 12 (x1,y2),Q 21 (x2,y1),Q 22 The known intensity value at (x2, y2) is calculated by the average of the distances between P(x, y) and the other four known points as the interpolation value; the specific process is: Assuming that the function f(x,y) is the value at point P, the calculation starts by calculating the intensity values at points f(x,y1) and f(x,y2) in the x direction; First, interpolate in the x direction and get: Then interpolate in the y direction and get: Right now: Then the obtained f(x,y) is the intensity value at point P(x,y).
8. A recursive adaptive color correction device for underwater light source images, characterized in that: The device includes at least one processor and at least one memory, the processor and the memory are coupled; a computer execution program is stored in the memory; when the processor executes the computer execution program stored in the memory, the device executes a recursive adaptive color correction method for underwater light source images as described in any one of claims 1 to 7.
9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores programs or instructions, and when the programs or instructions are executed by the processor, the computer executes the recursive adaptive color correction method for underwater light source images as described in any one of claims 1 to 7.
Citation Information
Patent Citations
Underwater image enhancement method based on adaptive histogram stretching of different color spaces
CN107507145A
Underwater culvert and tunnel inner wall three-dimensional information recovery method based on binocular vision
CN110322572A
Underwater image color enhancement method based on potential low-rank representation and image fusion
CN111968054A
Low-illumination image enhancement method based on Retinex theory
CN117635438A
Cited By
Liquid crystal screen anomaly detection method and system based on deep learning
CN119559169A
Intelligent visual inspection system and method for non-standard automatic production line
CN119599994A
An intelligent visual inspection system and method for non-standard automated production lines
CN119599994B
