Scene-adaptive sea-sky-line detection method

By processing image data in sea and sky scenes and selecting optimal algorithms, the problem of insufficient adaptability of sea antenna detection in the existing technology is solved, real-time and accurate sea antenna detection in complex marine environments is achieved, and the robustness and detection accuracy of the ship-based photoelectric detection system are improved.

CN120451757APending Publication Date: 2025-08-08西安应用光学研究所
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510429203.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-08
Publication Date
2025-08-08

AI Technical Summary

Technical Problem

The existing sea antenna detection methods are difficult to adapt to the complex and changeable maritime environment, and are unable to accurately detect sea antennas under real-time conditions, resulting in insufficient target detection and tracking accuracy of ship-based photoelectric detection systems.

Method used

By processing the image data in the sea and sky scene, we judge whether sea and antenna detection is needed, and select the optimal detection algorithm from a variety of alternative algorithms. We use the optimal algorithm to detect sea and antenna parameters, and conduct rational verification, and finally transmit the results to the computer system.

Benefits of technology

It realizes real-time, fast and accurate detection of sea antennas in different sea and sky scenarios, and improves the robustness and detection accuracy of the ship-based photoelectric detection system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120451757A_ABST
    Figure CN120451757A_ABST
Patent Text Reader

Abstract

The invention provides a scene-adaptive sea-sky-line detection method, and belongs to the technical field of image processing and computer vision. The method comprises the following steps: collecting image data in a current sea-sky scene, and carrying out image processing on the image data so as to judge whether sea-sky line detection needs to be carried out in the current sea-sky scene; if sea-sky-line detection needs to be carried out, selecting an optimal detection algorithm from a plurality of alternative sea-sky-line detection algorithms according to an image processing result; performing sea-sky-line detection by using an optimal detection algorithm to obtain sea-sky-line parameters in the current sea-sky scene; and the sea-sky line parameters in the current sea-sky scene are verified, and a verification result is transmitted to a computer system. The method can adapt to sea-sky-line detection in different sea-sky scenes in real time.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of image processing and computer vision technology, and in particular to a scene-adaptive sea-sky-line detection method. Background Art

[0002] Shipborne optoelectronic detection systems are an important part of the coast guard's activities in protecting maritime rights, patrolling, and law enforcement. They usually use optical sensors such as visible light television, infrared thermal imagers, and laser rangefinders carried by shipborne optoelectronic detection systems to search, detect, and track targets.

[0003] The maritime environment is complex and ever-changing. Due to the influence of various natural factors, such as lighting, wind, and waves, the collected image data often contains a large amount of noise and disturbance information, such as the chaotic light of fish scales and irregular movement and rich textures of waves. Furthermore, the narrow visual range of maritime targets, severe video jitter, and significant positional fluctuations make it difficult to accurately locate targets in real time.

[0004] Given the numerous challenges currently facing maritime target detection and tracking, traditional target detection techniques are no longer able to meet the requirements for real-time and efficient processing of maritime data. Some studies have shown that, under sea-sky background conditions and at long distances, due to the influence of the Earth's curvature and the frequent presence of drones, ships, and boats near the sea-sky line, before detecting weak targets, it is necessary to first detect the sea-sky line. Then, the area surrounding the sea-sky line must be processed. This approach, on the one hand, narrows the search area for weak targets by determining the sea-sky line's location. Once the sea-sky line's location is determined, the area surrounding the sea-sky line can be searched, reducing the amount of data computation and ensuring the real-time performance of the shipborne optoelectronic detection system. On the other hand, after detecting the sea-sky line's location, a Region of Interest (ROI) can be defined to eliminate unnecessary interference outside the sea-sky line, such as clouds, haze, waves, seabirds, and coastal background, thereby improving the accuracy of target detection and tracking by the shipborne optoelectronic detection system.

[0005] Currently, sea-skyline detection methods generally include those based on image grayscale gradients, those based on image texture features, Otsu threshold segmentation, and those based on wavelet transforms. However, these existing methods are often only applicable to specific sea-sky scenarios and are not suitable for real-time, complex, and ever-changing sea-sky scenarios. Specifically:

[0006] Detection methods based on image grayscale gradient derivation can effectively suppress cloud interference in scenes where the sea-sky line is flat, the grayscale variation between the sea surface and the sky is large, and the sea surface reflection is small. However, detection often fails when strong winds and waves cause the sea-sky line to fluctuate, strong sea surface reflections make the sea-sky line discontinuous, or when facing sea-sky scenes with large interference objects on the sea surface.

[0007] The detection method derived from image texture features is suitable for sea and sky scenes with large changes in sea and sky texture, a clean sky background, and no cloud interference. However, when the sea is calm or the sea surface texture changes very little, the sensor will have blurred imaging or poor lighting, resulting in the inability to detect.

[0008] The Otsu threshold segmentation detection method has poor noise resistance and it is difficult to determine the optimal threshold.

[0009] The detection method based on minimum wavelet transform uses wavelet coefficients at different scales to suppress background and extract edges, but the detection efficiency is low.

[0010] Therefore, given that the existing sea-sky-line detection method is difficult to take into account different sea-sky scenes, it is necessary to propose a solution to improve one or more problems existing in the above-mentioned related technical solutions.

[0011] It should be noted that the information disclosed in the above background technology section is only used to enhance the understanding of the background of this application, and therefore may include information that does not constitute prior art known to ordinary technicians in this field. Summary of the Invention

[0012] The present invention provides a scene-adaptive sea-sky-line detection method, comprising the following steps:

[0013] Collecting image data of the current sea-sky scene and performing image processing on the image data to determine whether the current sea-sky scene requires sea-sky-line detection;

[0014] If the sea-sky-line detection is required, selecting an optimal detection algorithm from a plurality of alternative sea-sky-line detection algorithms according to the result of the image processing;

[0015] Performing sea-sky-line detection using the optimal detection algorithm to obtain sea-sky-line parameters in the current sea-sky scene;

[0016] The sea-sky-line parameters in the current sea-sky scenario are verified, and the verification results are transmitted to a computer system.

[0017] In an exemplary embodiment of the present application, the step of collecting image data of the current sea-sky scene and performing image processing on the image data to determine whether the current sea-sky scene requires sea-sky-line detection includes:

[0018] Using an image sensor to collect the image data of the current sea and sky scene, and converting the image data into multiple grayscale images;

[0019] Selecting a plurality of upper boundary blocks from the upper boundary of each of the grayscale images, and selecting a plurality of lower boundary blocks from the lower boundary of each of the grayscale images, wherein the number of all the upper boundary blocks and the number of all the lower boundary blocks are equal, the length is equal, and the width is equal;

[0020] Calculating the upper boundary grayscale mean and the upper boundary dispersion mean of all the upper boundary blocks, and the lower boundary grayscale mean and the lower boundary dispersion mean of all the lower boundary blocks respectively;

[0021] Calculating a first grayscale mean difference according to the upper boundary grayscale mean and the lower boundary grayscale mean, and calculating a dispersion mean difference according to the upper boundary dispersion mean and the lower boundary dispersion mean;

[0022] If the first grayscale mean difference is within the grayscale difference interval, and the dispersion mean difference is within the dispersion interval, it is considered that a sea-sky line exists, that is, it is determined that the current sea-sky line scene needs to perform sea-sky line detection.

[0023] In an exemplary embodiment of the present application, the expression of the upper boundary grayscale mean is:

[0024]

[0025] in, represents the upper boundary grayscale mean, Represents the grayscale mean of the s1th upper boundary block of the grayscale image, s1=1,2,…,N1, N1 represents the number of upper boundary blocks, H s1 Indicates the height of the s1th upper boundary block, W s1 Indicates the width of the s1th upper boundary block, I up_S1 (i1, j1) represents the grayscale value of the s1th upper boundary block of the grayscale image at (i1, j1), average represents the average value, i1 represents the i1th column of the grayscale image, and j1 represents the j1th row of the grayscale image;

[0026] The expression of the lower boundary grayscale mean is:

[0027]

[0028] in, represents the grayscale mean of the lower boundary, Represents the grayscale mean of the s2th lower boundary block of the grayscale image, N2 represents the number of lower boundary blocks, H s2 Indicates the height of the s2th lower boundary block, W s2 Indicates the width of the s2th lower boundary block, represents the gray value of the s2th lower boundary block of the gray image at (i2, j2), i2 represents the i2th column of the gray image, and j2 represents the j2th row of the gray image;

[0029] The expression of the first grayscale mean difference is:

[0030]

[0031] in, Represents the first grayscale mean difference, and abs represents the absolute value sign.

[0032] In an exemplary embodiment of the present application, the expression for the upper boundary dispersion mean is:

[0033]

[0034] in, Indicates the upper boundary dispersion mean, average indicates the average value, T up_s1 Represents the discrete value of the s1th upper boundary block of the grayscale image, T up_s1 =abs(I up_s1 *A)+abs(I up_s1 *B), I up_s1 Represents the grayscale value of the s1th upper boundary block of the grayscale image, * indicates the multiplication sign, and abs indicates the absolute value;

[0035] The expression of the lower boundary discrete mean is:

[0036]

[0037] in, Represents the lower boundary dispersion mean, T down_s2 Represents the discrete value of the s2th lower boundary block of the grayscale image, T down_s2 =abs(I down_s2 *A)+abs(I down_s2 *B), I down_s2 Represents the grayscale value of the s2th lower boundary block of the grayscale image;

[0038] The expression of the dispersion mean difference is:

[0039]

[0040] in, It represents the mean difference of dispersion.

[0041] In an exemplary embodiment of the present application, if sea-sky-line detection is required, the step of selecting an optimal detection algorithm from a plurality of candidate sea-sky-line detection algorithms based on the image processing result includes:

[0042] Set the grayscale difference threshold to And set the discrete difference threshold to

[0043] The types of the alternative sea-sky-line detection algorithms include: Algorithm A, Algorithm B and Algorithm C;

[0044] The first grayscale mean difference is compared with the grayscale difference threshold, and the dispersion mean difference is compared with the dispersion difference threshold to obtain the following selection results:

[0045] like Then select the algorithm A as the optimal detection algorithm;

[0046] like and Then select the algorithm B as the optimal detection algorithm;

[0047] like and Then select the algorithm C as the optimal detection algorithm;

[0048] in, represents the first grayscale mean difference, It represents the mean difference of dispersion.

[0049] In an exemplary embodiment of the present application, the algorithm A is a detection algorithm derived from image texture features, the algorithm B is a detection algorithm derived from image grayscale gradients, and the algorithm C is an Otsu threshold segmentation detection algorithm.

[0050] In an exemplary embodiment of the present application, the step of performing the sea-sky-line detection using the optimal detection algorithm to obtain the sea-sky-line parameters in the current sea-sky scene includes:

[0051] When the optimal detection algorithm is Algorithm A, the steps of performing sea-sky-line detection using Algorithm A include:

[0052] respectively calculating the image textures of all the grayscale images;

[0053] Searching for the coordinates of the area with the largest change in the image texture of each of the grayscale images from top to bottom respectively;

[0054] storing the position coordinates of all the regions with the largest changes, and fitting the position coordinates of all the regions with the largest changes into a straight line;

[0055] Calculating the sea-sky line parameters according to the fitted straight line;

[0056] When the optimal detection algorithm is Algorithm B, the steps of performing sea-sky-line detection using Algorithm B include:

[0057] Calculating the grayscale gradients of all the grayscale images respectively;

[0058] extracting image information of all edges of each of the grayscale images according to the grayscale gradients of all the grayscale images;

[0059] detecting, based on image information of all the edges of all the grayscale images, the first longest straight line among all the edges of each of the grayscale images;

[0060] Calculating the sea-sky line parameters according to all the first longest straight lines;

[0061] When the optimal detection algorithm is Algorithm C, the steps of performing sea-sky-line detection using Algorithm C include:

[0062] Calculating the Otsu segmentation thresholds of all the grayscale images respectively;

[0063] performing image binarization processing on each of the grayscale images according to all the Otsu segmentation thresholds to obtain a binary image of each of the grayscale images;

[0064] Performing edge detection on all the binary images to obtain the second longest straight line in each binary image;

[0065] The sea-sky line parameters are calculated based on all the second longest straight lines.

[0066] In an exemplary embodiment of the present application, the step of verifying the sea-sky line parameters in the current sea-sky scenario and transmitting the verification result to the computer system includes:

[0067] Performing rational verification on the sea-sky line parameters;

[0068] Or perform difference verification on the sea-sky line parameters.

[0069] In an exemplary embodiment of the present application, the step of performing the rationalization verification on the sea-sky line parameters includes:

[0070] The sea-sky-line parameters include the sea-sky-line slope and the sea-sky-line intercept;

[0071] Set the reasonable interval of slope and intercept;

[0072] If the sea-sky-line slope is within the reasonable slope range, the sea-sky-line slope is considered to be calculated correctly; otherwise, the calculation is considered to be incorrect, and the sea-sky-line slope is set to zero;

[0073] Furthermore, if the sea-sky-line intercept is within the reasonable intercept range, it is considered that the sea-sky-line intercept is calculated correctly;

[0074] The correct result after verification is uploaded to the computer system as the correct sea-sky line data in the current sea-sky scene; if the verification result is incorrect, a report is sent to the computer system indicating that the sea-sky line is not detected.

[0075] In an exemplary embodiment of the present application, the step of performing the difference verification on the sea-sky line parameters includes:

[0076] performing a step of solving the first grayscale mean difference in the image data according to the calculated sea-sky line parameters to obtain a second grayscale mean difference;

[0077] If the second grayscale mean difference is greater than or equal to the grayscale difference threshold, the calculation result of the sea-sky-line parameter is considered correct; if the second grayscale mean difference is less than the grayscale difference threshold, the calculation result of the sea-sky-line parameter is considered incorrect;

[0078] The correct result after verification is uploaded to the computer system as the correct sea-sky line data in the current sea-sky scene; if the result after verification is incorrect, a report is sent to the computer system indicating that the sea-sky line is not detected.

[0079] Beneficial effects:

[0080] This application provides a scene-adaptive sea-sky-line detection method, which has at least the following beneficial effects:

[0081] (1) This application performs image processing on image data and selects the optimal detection algorithm from a variety of alternative sea-sky-line detection algorithms based on the image processing results to perform sea-sky-line detection in the current sea-sky-line scenario. This allows the application to automatically adapt to different sea-sky-line scenarios in real time, thereby increasing the robustness of the sea-sky-line detection method proposed in this application.

[0082] (2) This application selects the optimal detection algorithm from a variety of alternative sea-sky line detection algorithms, and can quickly determine the detection algorithm that is suitable for the current sea-sky scene in real time, thereby giving full play to the advantages and rationality of different detection algorithms;

[0083] (3) This application improves the accuracy of sea-sky-line detection by performing rationality verification or difference verification on the obtained sea-sky-line parameters. BRIEF DESCRIPTION OF THE DRAWINGS

[0084] The accompanying drawings are incorporated into and constitute a part of the specification, illustrate embodiments consistent with the present application, and together with the specification, are used to explain the principles of the present application. Obviously, the drawings described below are only some embodiments of the present application, and those skilled in the art can derive other drawings based on these drawings without inventive effort.

[0085] Figure 1 A schematic diagram showing the steps of a scene-adaptive sea-sky-line detection method in an exemplary embodiment of the present application is shown;

[0086] Figure 2 A schematic flow chart showing a scene-adaptive sea-sky-line detection method in an exemplary embodiment of the present application is shown;

[0087] Figure 3 A schematic diagram illustrating selecting a plurality of upper boundary blocks and a plurality of lower boundary blocks in a grayscale image in an exemplary embodiment of the present application is shown;

[0088] Figure 4 A schematic diagram of a process for performing sea-sky-line detection using Algorithm A in an exemplary embodiment of the present application is shown;

[0089] Figure 5 A schematic diagram showing a process of performing sea-sky-line detection using Algorithm B in an exemplary embodiment of the present application is shown;

[0090] Figure 6 A schematic diagram of a process for performing sea-sky-line detection using Algorithm C in an exemplary embodiment of the present application is shown;

[0091] Figure 7 A schematic diagram showing a sea-sky image collected in a sea-sky scene with thick clouds near the sea-sky line in the simulation experiment of the present application;

[0092] Figure 8 A schematic diagram showing a sea-sky image captured in a sea-sky scene with uneven illumination near the sea-sky line in a simulation experiment of the present application;

[0093] Figure 9 A schematic diagram showing a sea-sky image collected in a sea-sky scene with strong winds and waves near the sea-sky line in the simulation experiment of this application;

[0094] Figure 10 A schematic diagram showing a sea-sky image collected in a sea-sky scene with low contrast near the sea-sky line in the simulation experiment of the present application;

[0095] Figure 11 A schematic diagram showing a sea-sky image collected in a sea-sky scene with a large interference object near the sea-sky line in a simulation experiment of the present application;

[0096] Figure 12 A schematic diagram showing a sea-sky image collected in a sea-sky scene with strong reflection of the sea surface near the sea-sky line in the simulation experiment of this application. DETAILED DESCRIPTION

[0097] Example embodiments will now be described more fully with reference to the accompanying drawings. However, example embodiments can be embodied in many forms and should not be construed as limited to the examples set forth herein; rather, these embodiments are provided so that this disclosure will be thorough and complete and will fully convey the concepts of the example embodiments to those skilled in the art. The described features, structures, or characteristics may be combined in any suitable manner in one or more embodiments.

[0098] In addition, the accompanying drawings are merely schematic illustrations of the present application and are not necessarily drawn to scale. Identical reference numerals in the figures denote identical or similar parts, and thus repetitive descriptions thereof will be omitted. Some of the blocks shown in the accompanying drawings are functional entities that do not necessarily correspond to physically or logically separate entities. These functional entities may be implemented in software, in one or more hardware modules or integrated circuits, or in different networks and / or processor devices and / or microcontroller devices.

[0099] This example embodiment provides a scene-adaptive sea-sky-line detection method, such as Figure 1 and Figure 2 As shown, the evaluation method may include the following steps:

[0100] Step S101: collecting image data of the current sea-sky scene and performing image processing on the image data to determine whether the current sea-sky scene requires sea-sky-line detection;

[0101] Step S102: If sea-sky-line detection is required, an optimal detection algorithm is selected from a plurality of candidate sea-sky-line detection algorithms according to the image processing result;

[0102] Step S103: Perform sea-sky-line detection using an optimal detection algorithm to obtain sea-sky-line parameters in the current sea-sky scene;

[0103] Step S104: verifying the sea-sky line parameters in the current sea-sky scene, and transmitting the verification results to the computer system.

[0104] The present application provides a scenario-adaptive sea-sky-line detection method, which has at least the following beneficial effects:

[0105] (1) This application performs image processing on image data and selects the optimal detection algorithm from a variety of alternative sea-sky-line detection algorithms based on the image processing results to perform sea-sky-line detection in the current sea-sky-line scenario. This allows the application to automatically adapt to different sea-sky-line scenarios in real time, thereby increasing the robustness of the sea-sky-line detection method proposed in this application.

[0106] (2) This application selects the optimal detection algorithm from a variety of alternative sea-sky line detection algorithms, and can quickly determine the detection algorithm that is suitable for the current sea-sky scene in real time, thereby giving full play to the advantages and rationality of different detection algorithms;

[0107] (3) This application improves the accuracy of sea-sky-line detection by performing rationality verification or difference verification on the obtained sea-sky-line parameters.

[0108] The following describes in more detail a scene-adaptive sea-sky-line detection method proposed in this exemplary embodiment.

[0109] In step S101 of this embodiment, image data of the current sea-sky scene is collected and image processing is performed on the image data to determine whether the current sea-sky scene requires sea-sky-line detection. Step S101 of this embodiment includes the following sub-steps:

[0110] Sub-step S1011: using an image sensor to collect image data of the current sea and sky scene, and converting the image data into multiple grayscale images.

[0111] Furthermore, the hardware platform adopted in this embodiment is a digital signal processor, namely a DSP (Digital Signal Processor, DSP) processor, with a video resolution of 720×576, a bit depth of 8 bits, and a frame rate of 50 Hz.

[0112] Sub-step S1012: Figure 3 As shown, a plurality of upper boundary blocks are selected from the upper boundary of each grayscale image, and a plurality of lower boundary blocks are selected from the lower boundary of each grayscale image.

[0113] Furthermore, in this embodiment, six upper boundary blocks are selected near the upper boundary, and correspondingly six small boundary blocks are also selected near the lower boundary.

[0114] Furthermore, the upper boundary may be understood as the sky area above the sea-sky line, and the lower boundary may be understood as the sea surface area below the sea-sky line.

[0115] Furthermore, in this embodiment, Figure 3It can be seen that there is a lower boundary block below each upper boundary block, and it is necessary to ensure that the number, length and width of all upper boundary blocks and all lower boundary blocks are equal.

[0116] Sub-step S1013: calculating the upper boundary grayscale mean and upper boundary dispersion mean of all upper boundary blocks, and the lower boundary grayscale mean and lower boundary dispersion mean of all lower boundary blocks respectively.

[0117] Furthermore, the expression of the upper boundary grayscale mean is:

[0118]

[0119] in, represents the upper boundary grayscale mean, Represents the grayscale mean of the s1th upper boundary block of the grayscale image, s1=1,2,…,N1, N1 represents the number of upper boundary blocks, H s1 Indicates the height of the s1th upper boundary block, W s1 Indicates the width of the s1th upper boundary block, I up_S1 (i1, j1) represents the grayscale value of the s1th upper boundary block of the grayscale image at (i1, j1), average represents the average value, i1 represents the i1th column of the grayscale image, and j1 represents the j1th row of the grayscale image.

[0120] Furthermore, the expression of the lower boundary grayscale mean is:

[0121]

[0122] in, represents the grayscale mean of the lower boundary, Represents the grayscale value of the s2th lower boundary block of the grayscale image, N2 represents the number of lower boundary blocks, H s2 Indicates the height of the s2th lower boundary block, W s2 Indicates the width of the s2th lower boundary block, I down_s2 (i2, j2) represents the grayscale value of the s2th lower boundary block of the grayscale image at (i2, j2), i2 represents the i2th column in the grayscale image, and j2 represents the j2th row in the grayscale image.

[0123] Furthermore, the expression of the upper boundary discrete mean is:

[0124]

[0125] in, Indicates the upper boundary dispersion mean, average indicates the average value, Tup_s1 Represents the discrete value of the s1th upper boundary block of the grayscale image, T up_s1 =abs(I up_s1 *A)+abs(I up_s1 *B), I up_s1 Represents the grayscale value of the s1th upper boundary block of the grayscale image, * represents the multiplication sign, and abs represents the absolute value.

[0126] Furthermore, the expression of the mean of the lower boundary dispersion is:

[0127]

[0128] in, Represents the lower boundary dispersion mean, T down_s2 Represents the discrete value of the s2th lower boundary block of the grayscale image, T down_s2 =abs(I down_s2 *A)+abs(I down_s2 *B), I down_s2 Represents the grayscale value of the s2th lower boundary block of the grayscale image.

[0129] Sub-step S1014: Calculate a first grayscale mean difference based on the upper boundary grayscale mean and the lower boundary grayscale mean, and calculate a dispersion mean difference based on the upper boundary dispersion mean and the lower boundary dispersion mean.

[0130] Furthermore, the expression of the first grayscale mean difference is:

[0131]

[0132] in, Represents the first grayscale mean difference.

[0133] Furthermore, the expression of the mean difference of dispersion is:

[0134]

[0135] in, It represents the mean difference of dispersion.

[0136] Sub-step S1015: If the first grayscale mean difference is within the grayscale difference interval, and the dispersion mean difference is within the dispersion interval, it is considered that a sea-sky line exists, that is, it is determined that the image data needs to be detected by sea-sky line.

[0137] In step S102 of this embodiment, if sea-sky-line detection is required, the optimal detection algorithm is selected from a plurality of alternative sea-sky-line detection algorithms based on the image processing results. Step S102 of this embodiment includes the following sub-steps:

[0138] Sub-step S1021: Set the grayscale difference threshold to And set the discrete difference threshold to

[0139] It should be noted that the multiple alternative sea-sky-line detection algorithms in this embodiment include: Algorithm A, Algorithm B, and Algorithm C. Algorithm A is a detection algorithm derived from image texture features; Algorithm B is a detection algorithm derived from image grayscale gradients; and Algorithm C is an Otsu threshold segmentation detection algorithm. This embodiment includes, but is not limited to, Algorithm A, Algorithm B, and Algorithm C. All existing sea-sky-line detection methods can be used as alternative sea-sky-line detection algorithms, thereby fully leveraging the advantages and rationality of different detection algorithms.

[0140] Sub-step S1022: Compare the first grayscale mean difference with the grayscale difference threshold, and compare the dispersion mean difference with the dispersion difference threshold, and obtain the following selection results:

[0141] like Then select algorithm A as the optimal detection algorithm;

[0142] like and Then select algorithm B as the optimal detection algorithm;

[0143] like and Then select algorithm C as the optimal detection algorithm;

[0144] in, represents the first grayscale mean difference, It represents the mean difference of dispersion.

[0145] By selecting the optimal detection algorithm from a plurality of alternative sea-sky-line detection algorithms to perform sea-sky-line detection in the current sea-sky-line scenario, the method can automatically adapt to different sea-sky-line scenarios in real time, thereby increasing the robustness of the sea-sky-line detection method proposed in this embodiment.

[0146] In step S103 of this embodiment, the sea-sky line detection is performed using the optimal detection algorithm to obtain the sea-sky line parameters in the current sea-sky scene. Depending on the detection algorithm selected in step 102, step S103 of this embodiment includes the following three cases:

[0147] The first case: if Figure 4 As shown, when the optimal detection algorithm is algorithm A, the steps of performing sea-sky-line detection using algorithm A may include:

[0148] First, the image textures of all grayscale images are calculated separately;

[0149] Secondly, the coordinates of the area with the largest change in the image texture of each grayscale image are searched from top to bottom.

[0150] Thirdly, the position coordinates of all the regions with the largest changes are stored, and the position coordinates of all the regions with the largest changes are fitted into a straight line;

[0151] Finally, the sea-sky line parameters are calculated based on the fitted straight line.

[0152] The second case: If Figure 5 As shown, when the optimal detection algorithm is algorithm B, the steps of performing sea-sky-line detection using algorithm B may include:

[0153] First, calculate the grayscale gradients of all grayscale images respectively;

[0154] Secondly, according to the grayscale gradients of all grayscale images, the image information of all edges of each grayscale image is extracted respectively;

[0155] Thirdly, according to the image information of all edges of all grayscale images, the first longest straight line among all edges of each grayscale image is detected respectively;

[0156] Finally, the sea-sky line parameters are calculated based on all the first longest straight lines.

[0157] The third case: Figure 6 As shown, when the optimal detection algorithm is Algorithm C, the steps of performing sea-sky-line detection using Algorithm C may include:

[0158] First, calculate the Otsu segmentation threshold of all grayscale images respectively;

[0159] Secondly, according to all Otsu segmentation thresholds, each grayscale image is binarized to obtain a binary image of each grayscale image;

[0160] Again, perform edge detection on all binary images and obtain the second longest straight line in each binary image;

[0161] Finally, the sea-sky line parameters are calculated based on all the second longest straight lines.

[0162] If there are more alternative sea-sky-line detection methods, the detection steps of the corresponding detection algorithms are performed.

[0163] In step S104 of this embodiment, the sea-sky-line parameters in the current sea-sky scenario are verified, and the verification results are transmitted to the computer system. In this embodiment, step S104 of this embodiment includes performing a rationalization verification of the sea-sky-line parameters or performing a difference verification of the sea-sky-line parameters.

[0164] The steps for rationalizing the sea-sky-line parameters include:

[0165] When conducting rationalization verification, the sea-sky-line parameters include the sea-sky-line slope and the sea-sky-line intercept.

[0166] First, set the slope reasonable interval and intercept reasonable interval.

[0167] Furthermore, in this embodiment, the reasonable interval of the slope is set to [-0.5, +0.5] according to the application of the actual project. In this embodiment, the reasonable interval of the intercept is set to [20, 556] according to the application of the actual project.

[0168] Secondly, when the sea-sky-line slope is within the reasonable slope range, the sea-sky-line slope is considered to be calculated correctly; otherwise, it is considered to be incorrect and the sea-sky-line slope is assigned to zero.

[0169] Furthermore, in this embodiment, when the calculated sea-sky-line slope is less than -0.5 or greater than +0.5, it can be considered that the sea-sky-line slope is incorrectly calculated. In this case, the sea-sky-line slope is set to zero.

[0170] Again, when the sea-sky-line intercept is within the reasonable intercept range, it is considered that the sea-sky-line intercept is calculated correctly.

[0171] Furthermore, in this embodiment, when the calculated sea-sky-line intercept is less than 20 or greater than 556, it can be considered that the sea-sky-line intercept is incorrectly calculated.

[0172] Finally, the correct result after verification is uploaded to the computer system as the correct sea-sky line data in the current sea-sky scene; if the result after verification is incorrect, the computer system is reported that the sea-sky line is not detected.

[0173] Furthermore, in this embodiment, the computer system is preferably a host computer.

[0174] The steps for performing difference verification of sea-sky-line parameters include:

[0175] First, according to the calculated sea-sky-line parameters, a step of solving a first grayscale mean difference is performed in the image data to obtain a second grayscale mean difference.

[0176] Secondly, if the second grayscale mean difference is greater than the grayscale difference threshold, the calculation result of the sea-sky line parameters is considered correct; if the second grayscale mean difference is less than the grayscale difference threshold, the calculation result of the sea-sky line parameters is considered incorrect.

[0177] Finally, the correct result after verification is uploaded to the computer system as the correct sea-sky line data in the current sea-sky scene; if the result after verification is incorrect, the computer system is reported that the sea-sky line is not detected.

[0178] In order to verify the superiority of the scene-adaptive sea-sky-line detection method proposed in the embodiment of the present application, the following simulation experiment was conducted.

[0179] This simulation experiment uses sea-skyline images from various typical sea-sky scenarios for verification. The computer used is a Lenovo Thinkpad with an i7 processor, 2.30 GHz. The simulation software used is CCS 5.5. The simulation program runs on a TMS320C6455 DSP chip, and the DSP simulator is a SEED 510plus.

[0180] The simulation test method is as follows: connect the DSP simulator to a computer and a DSP chip, open the simulation software CCS5.5, and use both CCS5.5 and the DSP simulator to read the sea-sky-line image stored on the computer. The sea-sky-line image is then imported into the DSP chip, and a sea-sky-line detection program is run on the DSP chip. After detecting the sea-sky-line, a white line is superimposed on the corresponding position of the original image as a sea-sky-line marker. After the calculation is complete, the image with the sea-sky-line marker added is stored on the computer via the DSP simulator.

[0181] Figures 7 to 12 is the test result of this simulation experiment. Figures 7 to 12 (1) represents the detection result of sea-sky-line detection using the detection algorithm proposed in this application; (2) represents the detection result of sea-sky-line detection using the detection algorithm derived from image grayscale gradient alone; (3) represents the detection result of sea-sky-line detection using the detection algorithm derived from image texture features alone; (4) represents the detection result of sea-sky-line detection using the Otsu threshold segmentation detection algorithm alone.

[0182] Figure 7 This is a sea-sky scene with many clouds in the sky and significant interference from waves on the sea surface. It can be seen that the detection algorithm based on image texture feature derivation alone has many errors due to the interference of clouds. The Otsu threshold segmentation detection algorithm alone cannot correctly detect the sea-sky line, while the other detection algorithms all correctly detect the sea-sky line.

[0183] Figure 8 This is a sea-sky scene with a large grayscale difference between the sky and the sea surface, no cloud interference, but strong light interference. It can be seen that all four algorithms can correctly detect the sea-sky line.

[0184] Figure 9 This is a sea-sky scene with large wave interference on the sea surface. It can be seen that the Otsu threshold segmentation detection algorithm alone cannot correctly detect the sea-sky line, while other detection algorithms can correctly detect the sea-sky line.

[0185] Figure 10 This is a sea-sky scene with low contrast between the sky and the sea surface. It can be seen that the detection algorithm based on image texture feature derivation and the Otsu threshold segmentation detection algorithm alone are both ineffective, while other detection algorithms can correctly detect the sea-sky line.

[0186] Figure 11 This is a sea-sky scene with an interference object with a long straight line boundary near the sea-sky line. In this case, the Otsu threshold segmentation detection algorithm alone will fail, while other detection algorithms can correctly detect the sea-sky line.

[0187] Figure 12 When there are chaotic strong reflections on the sea surface, the detection algorithm based on image grayscale gradient derivation alone will fail, while other detection algorithms can correctly detect the sea-sky line.

[0188] The test results of the above simulation experiments show that the scene-adaptive sea-sky-line detection method proposed in this application can correctly detect the sea-sky-line in a variety of complex sea-sky scenes. Compared with the use of any other algorithm alone, it has outstanding excellent results and good robustness.

[0189] In addition, the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of the technical features indicated. Therefore, a feature defined as "first" or "second" may explicitly or implicitly include one or more of the features. In the description of the embodiments of this application, the meaning of "plurality" is two or more, unless otherwise clearly specified.

[0190] In the description of this specification, the reference terms "one embodiment", "some embodiments", "example", "specific example" or "some examples" mean that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present application. In this specification, the schematic expressions of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described can be combined in any one or more embodiments or examples in a suitable manner. In addition, those skilled in the art can combine and combine different embodiments or examples described in this specification.

[0191] The above is only a specific implementation method of the present application, but the scope of protection of the present application is not limited thereto. Any technician familiar with this technical field can easily think of various equivalent modifications or replacements within the technical scope disclosed in this application, and these modifications or replacements should be included in the scope of protection of the present application.

[0192] Those skilled in the art will readily appreciate other embodiments of the present invention after considering the specification and practicing the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of the present invention that follow the general principles of this application and include common knowledge or customary techniques in the art that are not disclosed herein.

Claims

1. A scene-adaptive sea-sky-line detection method, characterized in that: The following steps are involved: Collecting image data of the current sea-sky scene and performing image processing on the image data to determine whether the current sea-sky scene requires sea-sky-line detection; If the sea-sky-line detection is required, selecting an optimal detection algorithm from a plurality of alternative sea-sky-line detection algorithms according to the result of the image processing; Performing sea-sky-line detection using the optimal detection algorithm to obtain sea-sky-line parameters in the current sea-sky scene; The sea-sky-line parameters in the current sea-sky scenario are verified, and the verification results are transmitted to a computer system.

2. The scene-adaptive sea-sky-line detection method according to claim 1, characterized in that: The step of collecting image data of the current sea-sky scene and performing image processing on the image data to determine whether the current sea-sky scene needs to be subjected to sea-sky-line detection includes: Using an image sensor to collect the image data of the current sea and sky scene, and converting the image data into multiple grayscale images; Selecting a plurality of upper boundary blocks from the upper boundary of each of the grayscale images, and selecting a plurality of lower boundary blocks from the lower boundary of each of the grayscale images, wherein the number of all the upper boundary blocks and the number of all the lower boundary blocks are equal, the length is equal, and the width is equal; Calculating the upper boundary grayscale mean and the upper boundary dispersion mean of all the upper boundary blocks, and the lower boundary grayscale mean and the lower boundary dispersion mean of all the lower boundary blocks respectively; Calculating a first grayscale mean difference according to the upper boundary grayscale mean and the lower boundary grayscale mean, and calculating a dispersion mean difference according to the upper boundary dispersion mean and the lower boundary dispersion mean; If the first grayscale mean difference is within the grayscale difference interval, and the dispersion mean difference is within the dispersion interval, it is considered that a sea-sky line exists, that is, it is determined that the current sea-sky line scene needs to perform sea-sky line detection.

3. The scene-adaptive sea-sky-line detection method according to claim 2, characterized in that: The expression of the upper boundary grayscale mean is: in, represents the upper boundary grayscale mean, Represents the grayscale mean of the s1th upper boundary block of the grayscale image, s1=1,2,…,N1, N1 represents the number of upper boundary blocks, H s1 Indicates the height of the s1th upper boundary block, W s1 Indicates the width of the s1th upper boundary block, I up_s1 (i1, j1) represents the grayscale value of the s1th upper boundary block of the grayscale image at (i1, j1), average represents the average value, i1 represents the i1th column of the grayscale image, and j1 represents the j1th row of the grayscale image; The expression of the lower boundary grayscale mean is: in, represents the grayscale mean of the lower boundary, Represents the grayscale mean of the s2th lower boundary block of the grayscale image, s2=1,2,…,N2, N2 represents the number of lower boundary blocks, H s2 Indicates the height of the s2th lower boundary block, W s2 Indicates the width of the s2th lower boundary block, I down_s2 (i2, j2) represents the grayscale value of the s2th lower boundary block of the grayscale image at (i2, j2), i2 represents the i2th column of the grayscale image, and j2 represents the j2th row of the grayscale image; The expression of the first grayscale mean difference is: in, represents the first grayscale mean difference, and abs represents the absolute value.

4. The scene-adaptive sea-sky-line detection method according to claim 2, characterized in that: The expression of the upper boundary discrete mean is: in, Indicates the upper boundary dispersion mean, average indicates the average value, T up_s1 Represents the discrete value of the s1th upper boundary block of the grayscale image, T up_s1 =abs(I up_s1 *A)+abs(I up_s1 *B), I up_s1 Represents the grayscale value of the s1th upper boundary block of the grayscale image, * represents the multiplication sign, abs represents the absolute value sign; The expression of the lower boundary discrete mean is: in, Represents the lower boundary dispersion mean, T down_s2 Represents the discrete value of the s2th lower boundary block of the grayscale image, T down_s2 =abs(I down_s2 *A)+abs(I down_s2 *B), I down_s2 Represents the grayscale value of the s2th lower boundary block of the grayscale image; The expression of the dispersion mean difference is: in, It represents the mean difference of dispersion.

5. The scene-adaptive sea-sky-line detection method according to claim 2, characterized in that: If sea-sky-line detection is required, the step of selecting an optimal detection algorithm from a plurality of alternative sea-sky-line detection algorithms according to the image processing result includes: Set the grayscale difference threshold to And set the discreteness difference threshold to The types of the alternative sea-sky-line detection algorithms include: Algorithm A, Algorithm B and Algorithm C; The first grayscale mean difference is compared with the grayscale difference threshold, and the dispersion mean difference is compared with the dispersion difference threshold to obtain the following selection results: like Then select the algorithm A as the optimal detection algorithm; like and Then select the algorithm B as the optimal detection algorithm; like and Then select the algorithm C as the optimal detection algorithm; in, represents the first grayscale mean difference, It represents the mean difference of dispersion.

6. The scene-adaptive sea-sky-line detection method according to claim 5, characterized in that: The algorithm A is a detection algorithm derived from image texture features, the algorithm B is a detection algorithm derived from image grayscale gradient, and the algorithm C is an Otsu threshold segmentation detection algorithm.

7. The scene-adaptive sea-sky-line detection method according to claim 5, characterized in that: The step of performing the sea-sky-line detection by using the optimal detection algorithm to obtain the sea-sky-line parameters in the current sea-sky scene includes: When the optimal detection algorithm is Algorithm A, the steps of performing sea-sky-line detection using Algorithm A include: respectively calculating the image textures of all the grayscale images; Searching for the coordinates of the area with the largest change in the image texture of each of the grayscale images from top to bottom respectively; storing the position coordinates of all the regions with the largest changes, and fitting the position coordinates of all the regions with the largest changes into a straight line; Calculating the sea-sky line parameters according to the fitted straight line; When the optimal detection algorithm is Algorithm B, the steps of performing sea-sky-line detection using Algorithm B include: Calculating the grayscale gradients of all the grayscale images respectively; extracting image information of all edges of each of the grayscale images according to the grayscale gradients of all the grayscale images; detecting, based on image information of all the edges of all the grayscale images, the first longest straight line among all the edges of each of the grayscale images; Calculating the sea-sky line parameters according to all the first longest straight lines; When the optimal detection algorithm is Algorithm C, the steps of performing sea-sky-line detection using Algorithm C include: Calculating the Otsu segmentation thresholds of all the grayscale images respectively; performing image binarization processing on each of the grayscale images according to all the Otsu segmentation thresholds to obtain a binary image of each of the grayscale images; Performing edge detection on all the binary images to obtain the second longest straight line in each binary image; The sea-sky line parameters are calculated based on all the second longest straight lines.

8. The scene-adaptive sea-sky-line detection method according to claim 5, characterized in that: The step of verifying the sea-sky line parameters in the current sea-sky scene and transmitting the verification result to the computer system includes: Performing rational verification on the sea-sky line parameters; Or perform difference verification on the sea-sky line parameters.

9. The scene-adaptive sea-sky-line detection method according to claim 8, characterized in that: The step of performing the rationalization verification on the sea-sky line parameters includes: The sea-sky-line parameters include the sea-sky-line slope and the sea-sky-line intercept; Set the reasonable interval of slope and intercept; If the sea-sky-line slope is within the reasonable slope range, the sea-sky-line slope is considered to be calculated correctly; otherwise, the calculation is considered to be incorrect, and the sea-sky-line slope is set to zero; Furthermore, if the sea-sky-line intercept is within the reasonable intercept range, it is considered that the sea-sky-line intercept is calculated correctly; The correct result after verification is uploaded to the computer system as the correct sea-sky line data in the current sea-sky scene; if the result after verification is incorrect, a report is sent to the computer system indicating that the sea-sky line is not detected.

10. The scene-adaptive sea-sky-line detection method according to claim 8, characterized in that: The step of performing the difference verification on the sea-sky line parameters includes: performing a step of solving the first grayscale mean difference in the image data according to the calculated sea-sky line parameters to obtain a second grayscale mean difference; If the second grayscale mean difference is greater than or equal to the grayscale difference threshold, the calculation result of the sea-sky-line parameter is considered correct; if the second grayscale mean difference is less than the grayscale difference threshold, the calculation result of the sea-sky-line parameter is considered incorrect; The correct result after verification is uploaded to the computer system as the correct sea-sky line data in the current sea-sky scene; if the result after verification is incorrect, a report is sent to the computer system indicating that the sea-sky line is not detected.