A method for image visibility grading for images including a sea sky background

By preprocessing and gradient analysis of sea and sky background images, the Canny algorithm was improved and combined with Hough transform to solve the visibility classification problem of ship target detection in sea and sky background, thereby improving the accuracy and stability of detection.

CN116563590BActive Publication Date: 2026-01-13BEIJING HUAHANG RADIO MEASUREMENT & RES INST
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210103236.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-01-27
Publication Date
2026-01-13
Estimated Expiration
2042-01-27

AI Technical Summary

Technical Problem

In infrared images, when sea surface clutter or fish scale light is strong, the performance of ship target detection algorithms degrades, leading to frequent missed detections and false detections. Furthermore, the detection results are inaccurate when visibility is poor.

Method used

Image preprocessing, gradient feature extraction, and normalization are employed. The existence of the sea-line is determined by edge point analysis, and visibility is graded based on the maximum gradient magnitude. The sea-line is extracted by combining the Canny algorithm and Hough transform, thus improving image edge detection.

Benefits of technology

It improves the stability and accuracy of visibility judgment in sea and sky background images, reduces false judgments, and achieves more stable sea-sky line extraction and visibility assessment.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116563590B_ABST
    Figure CN116563590B_ABST
Patent Text Reader

Abstract

The present application relates to a kind of methods for the visibility grading of image including sea-sky background, comprising: the pre-processing of input image including resolution reduction, target gradient feature extraction and gradient normalization;According to the result of the gradient normalization, the edge point of image is extracted;According to the point number and length information of the edge point, it is judged whether sea-sky line in image can be extracted;For the image of the sea-sky line that can be extracted, the visibility of image is graded according to the size of maximum gradient.The present application can meet the judgment of weather condition under the sea-sky background of field, realizes more stable and effective sea-sky line extraction and visibility judgment.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of image processing and target detection technology, specifically relating to a method for image visibility classification including sea and sky backgrounds. Background Technology

[0002] In recent years, ship target detection has been a research hotspot in the field of target detection. As the most important mode of transportation in international logistics, maritime transport has seen a rapid increase in the number of ships entering and leaving ports with the rapid development of my country's maritime trade. Therefore, ship target detection is increasingly important for improving maritime traffic order and maintaining maritime safety. When sea surface clutter or fish scale light is strong, the gray intensity of many wave peaks in infrared images is close to, or even equal to, or greater than the maximum gray value of the target pixel, significantly degrading the performance of detection algorithms.

[0003] Given that weather visibility significantly impacts ship inspection results, inspections are generally more accurate in good or moderate visibility conditions, while poor visibility increases the risk of missed or incorrect detections. To improve inspection accuracy, weather visibility can be used as a supplementary factor in ship inspections. Summary of the Invention

[0004] Based on the above analysis, the present invention aims to disclose a visibility classification method for images including sea and sky backgrounds, to solve the visibility classification problem of sea and sky background images when performing ship target detection.

[0005] This invention discloses a method for image visibility grading with a sea and sky background, comprising:

[0006] The input image undergoes preprocessing including resolution reduction, target gradient feature extraction, and gradient normalization.

[0007] Extract the edge points of the image based on the gradient normalization result;

[0008] Based on the number and length information of the edge points, it is determined whether the sea-line area in the image can be extracted;

[0009] For images of the sea-line that can be extracted, the visibility of the image is graded according to the magnitude of the maximum gradient.

[0010] Furthermore, the preprocessing includes:

[0011] The original input image is down-resolution processed to obtain a down-resolution image; and the visibility of images with a gray mean value less than a gray threshold in the down-resolution image is classified as poor.

[0012] An adaptive Gaussian filter is applied to a down-resolution image with a grayscale mean not less than a grayscale threshold to calculate the target gradient feature set of the image, including the horizontal gradient, vertical gradient, and maximum gradient.

[0013] Images with a maximum gradient value less than the first gradient threshold are classified as having poor visibility.

[0014] For images whose maximum gradient value is not less than the first gradient threshold, the gradient normalization result is obtained by performing a gradient normalization operation.

[0015] Furthermore, the horizontal and vertical gradients of the image are calculated using adaptive Gaussian filtering;

[0016] The Gaussian filter is an n*n matrix. Combining this with the sigma parameter of the Canny operator, the Gaussian filter is: dgau2D=-x·*exp(-(x·*x+x) T ·*x T ) / (2*canny_sigma)) / (2*π*canny_sigma 2 );

[0017] The horizontal gradient set and the vertical gradient set dx and dy are:

[0018] The intermediate value of the image gradient is: value = sqrt(dx.*dx + dy.*dy);

[0019] The maximum gradient is: max_grad = max(value);

[0020] I represents the pixel matrix of the image after downscaling.

[0021] Furthermore, the gradient normalization operation based on the maximum gradient gradation includes:

[0022] Five normalization factors are derived from the maximum gradient to complete gradient normalization. The normalization factors are shown in the following formula: In the formula, the grading constants are va1 < va2 < va3 < va4 < va5;

[0023] When the maximum gradient max_grad is greater than th1, the gradient is normalized to value1; otherwise, when the maximum gradient is greater than th2, the gradient is normalized to value2; otherwise, when the maximum gradient is greater than th3, the gradient is normalized to value3; otherwise, when the maximum gradient is greater than th4, the gradient is normalized to value4; when none of the above conditions are met, the gradient is directly normalized to value5.

[0024] Furthermore, the edge point extraction of the image employs the Canny algorithm.

[0025] Furthermore, during edge point extraction of the image, non-maximum suppression in the Canny algorithm is performed using adaptive horizontal and vertical gradient sets.

[0026] Furthermore, during edge point extraction of the image, gradient normalization results are used to perform gradient high and low threshold detection using the Canny algorithm; high threshold detection is used to reduce false edges in the image; low threshold detection is used to collect edge points whose contours meet the requirements to form new edges, thereby achieving edge closure of the image.

[0027] Furthermore, the detection of the high and low thresholds is carried out by establishing a histogram based on the normalized gradient according to the principle of 16 equal parts and proportions, and the high and low thresholds of the gradient that meet the conditions are extracted using the histogram.

[0028] The gradient high threshold high_thresold = find(add(counts)>canny_higth*Δrow*Δline,1,first);

[0029] Gradient low threshold low_thresold = canny_lowth * high_thresold;

[0030] Here, counts represents the normalized gradient histogram, canny_higth and canny_lowth represent the preset high and low gradient thresholds, respectively, and Δrow and Δline refer to the pixel width and height of the image after removing boundaries such as black and white edges, respectively.

[0031] Furthermore, based on the number and length information of the edge points, the method for determining whether the sea-line area in the image can be extracted includes:

[0032] The number of points and length information of each edge are obtained by eight-neighbor labeling. When the number of edges is greater than the threshold, the sea line is extracted by Hough transform. Images whose number and range of sea lines do not meet the conditions are identified as images of sea lines that cannot be extracted, and the visibility is classified as poor.

[0033] Furthermore, images whose number and range of sea-line antennas meet the conditions are identified as images of sea-line antennas that can be extracted. For images of sea-line antennas that can be extracted, the maximum gradient of the image is used for threshold comparison and judgment. When the maximum gradient value is not less than the third gradient threshold, the visibility level of the image is good; when it is not less than the second gradient threshold and less than the third gradient threshold, the visibility level of the image is average; when it is less than the second gradient threshold, the visibility level of the image is poor.

[0034] This invention can achieve at least one of the following beneficial effects:

[0035] This invention establishes an adaptive gradient planning method based on maximum gradient calculation and weighted texture of the acquired image using an improved Canny algorithm to determine visibility against a sea-sky background. Engineering practice and experiments have demonstrated that this sea-sky background visibility grading method can meet the requirements for judging weather conditions against a sea-sky background in the field, achieving more stable and effective sea-sky line extraction and visibility assessment. Attached Figure Description

[0036] The accompanying drawings are for illustrative purposes only and are not intended to limit the invention. Throughout the drawings, the same reference numerals denote the same parts.

[0037] Figure 1 This is a flowchart of the image visibility classification method in an embodiment of the present invention;

[0038] Figure 2 This is a flowchart of the preprocessing method in an embodiment of the present invention;

[0039] Figure 3 This is a flowchart of the gradient normalization method in an embodiment of the present invention;

[0040] Figure 4 This is a flowchart of the image visibility classification method in an embodiment of the present invention. Detailed Implementation

[0041] Preferred embodiments of the present invention will now be described in detail with reference to the accompanying drawings, which form part of this application and, together with the embodiments of the present invention, serve to illustrate the principles of the present invention.

[0042] One embodiment of the present invention discloses a method for image visibility grading with a sea and sky background, such as... Figure 1 As shown, it includes:

[0043] Step S101: Perform preprocessing on the input image, including resolution reduction, target gradient feature extraction, and gradient normalization;

[0044] Step S102: Extract the edge points of the image based on the gradient normalization result;

[0045] Step S103: Based on the number and length information of the edge points, determine whether the sea-line area in the image can be extracted;

[0046] Step S104: For images of the sea-line that can be extracted, classify the visibility of the image according to the magnitude of the maximum gradient.

[0047] Specifically, such as Figure 2 As shown, the preprocessing includes:

[0048] Step S201: Reduce the resolution of the input original image to obtain a reduced-resolution image; and classify the visibility of images in the reduced-resolution image whose average gray level is less than the gray level threshold as poor level.

[0049] The original input image (640*480 resolution) is down-resolution processed to obtain a down-resolution image (320*240 resolution), thereby reducing the computational load. At the same time, when the average gray level of the image is less than the gray level threshold Gray_TH, the visibility of the image is classified as "poor".

[0050] Step S202: Perform adaptive Gaussian filtering on the down-resolution image with a grayscale mean not less than the grayscale threshold to calculate the target gradient feature set of the image, including the horizontal gradient, vertical gradient and maximum gradient of the image.

[0051] The Gaussian filter is an n*n matrix. Combining this with the sigma parameter of the Canny operator, the Gaussian filter is: dgau2D=-x·*exp(-(x·*x+x) T ·*x T ) / (2*canny_sigma)) / (2*π*canny_sigma 2 );

[0052] Where x is the input data of the Gaussian filter, a two-dimensional n*n vector.

[0053] The horizontal gradient set and the vertical gradient set dx and dy are:

[0054] The intermediate value of the image gradient is: value = sqrt(dx.*dx + dy.*dy);

[0055] The maximum gradient is: max_grad = max(value);

[0056] I represents the pixel matrix of the image after downscaling.

[0057] Step S203: Classify the visibility of images whose maximum gradient value is less than the first gradient threshold grad1 as poor level;

[0058] Step S204: For the image whose maximum gradient value is not less than the first gradient threshold grad1, perform gradient normalization operation to obtain the gradient normalization result.

[0059] The gradient normalization operation based on the maximum gradient gradation includes:

[0060] Five normalization factors are derived from the maximum gradient to complete gradient normalization. The normalization factors are: In the formula, the grading constants are va1 < va2 < va3 < va4 < va5;

[0061] Specifically, the normalization process is as follows: Figure 3 As shown, when the maximum gradient max_grad is greater than th1, the gradient is normalized to value1; otherwise, when the maximum gradient is greater than th2, the gradient is normalized to value2; otherwise, when the maximum gradient is greater than th3, the gradient is normalized to value3; otherwise, when the maximum gradient is greater than th4, the gradient is normalized to value4; when none of the above conditions are met, the gradient is directly normalized to value5.

[0062] th1, th2, th3, and th4 are four thresholds for gradient grading, which are set according to specific application scenarios.

[0063] Normalization by using the maximum gradient value can achieve fine classification of seascape background images, thereby completing visibility grading. This reduces misjudgments of image quality and improves the accuracy of visibility assessment.

[0064] Specifically, in step S102, when extracting image edge points based on the gradient normalization result, the Canny algorithm is used for image edge point extraction. Furthermore, by improving the Canny algorithm using the obtained gradient normalization result, non-maximum suppression and double threshold detection, which are included in the Canny adaptive algorithm, can be achieved.

[0065] More specifically, when extracting edge points in the image, non-maximum suppression in the Canny algorithm is performed by adaptive horizontal and vertical gradient sets, thereby preserving points with the largest local gradients and achieving the purpose of refining the edges.

[0066] When extracting edge points in the image, the gradient normalization result is used to perform high and low threshold detection of the gradient using the Canny algorithm. High threshold detection is used to reduce false edges in the image, but it also produces the phenomenon of unclosed image edges. Then, edge points that meet the contour requirements are collected by low threshold detection to form new edges, thereby achieving image edge closure.

[0067] Preferably, when detecting high and low thresholds, a histogram is established based on the normalized gradient according to the principle of 16 equal parts and proportions, and the high and low thresholds of the gradient that meet the conditions are extracted using the histogram.

[0068] The gradient high threshold high_thresold = find(add(counts)>canny_higth*Δrow*Δline,1,first);

[0069] Gradient low threshold low_thresold = canny_lowth * high_thresold;

[0070] Here, `counts` represents the normalized gradient histogram, `canny_higth` and `canny_lowth` represent the preset high and low thresholds for the gradient, respectively, and `Δrow` and `Δline` refer to the pixel width and height after removing image boundaries such as black and white borders, respectively. `high_thresold` finds the first non-zero value in the gradient histogram that is greater than the threshold condition. `find()` is a MATLAB function used for searching; `add()` is a MATLAB function for summing.

[0071] Specifically, in step S103, the method for determining whether the sea-line area in the image can be extracted based on the number and length information of the edge points includes:

[0072] The number of points and length information of each edge are obtained by eight-neighbor labeling. When the number of edges is greater than the threshold, the sea line is extracted by Hough transform. Images whose number and range of sea lines do not meet the conditions are identified as images of sea lines that cannot be extracted, and the visibility is classified as poor.

[0073] Specifically, in step S104, images whose number and range of sea-line antennas meet the conditions are identified as images of sea-line antennas that can be extracted. For images of sea-line antennas that can be extracted, the maximum gradient of the image is used for threshold comparison. When the maximum gradient value is not less than the third gradient threshold grad3, the visibility of the image is classified as good. When it is not less than the second gradient threshold grad2 and less than the third gradient threshold grad3, the visibility of the image is classified as average. When it is less than the second gradient threshold grad2, the visibility of the image is classified as poor.

[0074] like Figure 4 The diagram shown is a more detailed flowchart of the image visibility grading method for a background including sea and sky in this embodiment.

[0075] In summary, this invention employs an improved Canny algorithm to establish a gradient adaptive planning method based on maximum gradient calculation of acquired images and weighted texture to determine visibility against a sea-sky background. Engineering practice and experiments have demonstrated that this invention's sea-sky background visibility grading method can meet the requirements for judging weather conditions against a sea-sky background in the field, achieving more stable and effective sea-sky line extraction and visibility assessment.

[0076] The above description is only a preferred embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any changes or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in the present invention should be included within the scope of protection of the present invention.

Claims

1. A method for image visibility classification including a sea and sky background, characterized in that, include: The input image undergoes preprocessing including resolution reduction, target gradient feature extraction, and gradient normalization. Extract the edge points of the image based on the gradient normalization result; Based on the number and length information of the edge points, it is determined whether the sea-line area in the image can be extracted; For images of the sea-line that can be extracted, the visibility of the image is graded according to the magnitude of the maximum gradient; The preprocessing includes: The original input image is down-resolution processed to obtain a down-resolution image; and the visibility of images with a gray mean value less than a gray threshold in the down-resolution image is classified as poor. An adaptive Gaussian filter is applied to a down-resolution image with a grayscale mean not less than a grayscale threshold to calculate the target gradient feature set of the image, including the horizontal gradient, vertical gradient, and maximum gradient. Images with a maximum gradient value less than the first gradient threshold are classified as having poor visibility. For images whose maximum gradient value is not less than the first gradient threshold, the gradient normalization result is obtained by performing a gradient normalization operation. The methods for determining whether the sea-line area in the image can be extracted based on the number and length information of the edge points include: The number of points and length information of each edge are obtained by eight-neighbor labeling. When the number of edges is greater than the threshold, the sea line is extracted by Hough transform. Images whose number and range of sea lines do not meet the conditions are identified as images of sea lines that cannot be extracted, and the visibility is classified as poor. Images that meet the criteria for the number and range of sea-line antennas are identified as images from which sea-line antennas can be extracted. For images from which sea-line antennas can be extracted, the maximum gradient of the image is used for threshold comparison. When the maximum gradient value is not less than the third gradient threshold, the visibility of the image is classified as good. When it is not less than the second gradient threshold but less than the third gradient threshold, the visibility of the image is classified as average. When it is less than the second gradient threshold, the visibility of the image is classified as poor.

2. The image visibility classification method according to claim 1, characterized in that, The horizontal and vertical gradients of the image are calculated using adaptive Gaussian filtering. The Gaussian filter is an n*n matrix. Combining this with the sigma parameter of the Canny operator, the Gaussian filter is: dgau2D=-x·*exp(-(x·*x+x) T ·*x T ) / (2*canny_sigma)) / (2*π*canny_sigma 2 ); Where x is the input data of the Gaussian filter, a two-dimensional n*n vector; The horizontal gradient set and the vertical gradient set dx and dy are: The intermediate value of the image gradient is: value = sqrt(dx.*dx + dy.*dy); The maximum gradient is: max_grad = max(value); I represents the pixel matrix of the image after downscaling.

3. The image visibility grading method according to claim 2, characterized in that, The gradient normalization operation based on the maximum gradient gradation includes: Five normalization factors are derived from the maximum gradient to complete gradient normalization. The normalization factors are shown in the following formula: In the formula, the grading constants are va1 < va2 < va3 < va4 < va5; When the maximum gradient max_grad is greater than th1, the gradient is normalized to value1; otherwise, when the maximum gradient is greater than th2, the gradient is normalized to value2; otherwise, when the maximum gradient is greater than th3, the gradient is normalized to value3; otherwise, when the maximum gradient is greater than th4, the gradient is normalized to value4; when none of the above conditions are met, the gradient is directly normalized to value5. th1, th2, th3, and th4 are the four thresholds for gradient grading.

4. The image visibility classification method according to claim 1, characterized in that, The edge point extraction of the image was performed using the Canny algorithm.

5. The image visibility classification method according to claim 4, characterized in that, When extracting edge points in the image, non-maximum suppression in the Canny algorithm is performed using adaptive horizontal and vertical gradient sets.

6. The image visibility classification method according to claim 5, characterized in that, When extracting edge points in the image, the gradient normalization result is used to perform high and low threshold detection of the gradient using the Canny algorithm; high threshold detection is used to reduce false edges in the image; low threshold detection is used to collect edge points that meet the contour requirements to form new edges, thereby achieving edge closure of the image.

7. The image visibility classification method according to claim 6, characterized in that, The detection of high and low thresholds is performed by establishing a histogram based on the normalized gradient according to the principle of 16 equal parts and proportions, and using the histogram to extract the high and low thresholds of the gradient that meet the conditions. The gradient high threshold high_thresold = find(add(counts)>canny_higth*Δrow*Δline,1,first); Gradient low threshold low_thresold = canny_lowth * high_thresold; Where counts represents the normalized gradient histogram, canny_higth and canny_lowth represent the preset high and low thresholds for the gradient, respectively, and Δrow and Δline refer to the pixel width and height of the image after removing the black and white edges, respectively. find() is a MATLAB function used to perform search operations; add() is a MATLAB function for summing.

Citation Information

Patent Citations

  • All-weather video measurement method for visibility

    CN101957309A

  • Visibility detection method and device, computer equipment and storage medium

    CN111145120A