A method and system for identifying surface defects of navigation lights

Through HSI image recognition and weighted brightness calculation, the degree of light blocking of the beacon surface is accurately judged, which solves the problem of the inability to identify stain light blocking in the prior art, and realizes accurate cleaning of the beacon surface and extends the lighting battery life.

CN118691606BActive Publication Date: 2024-11-08WUHAN HUIHE TECH CO LTD

Patent Information

Application Number
CN202411161954.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-08-23
Publication Date
2024-11-08
Estimated Expiration
2044-08-23

AI Technical Summary

Technical Problem

The prior art cannot accurately determine the light blocking properties of the beacon lamp when identifying stains on the surface, resulting in unnecessary cleaning operations and affecting the lighting battery life of the beacon lamp.

Method used

The HSI image recognition method is used to identify stained pixel points through tone difference and saturation difference, connectivity domain analysis and weighted brightness calculation are performed, light blocking degree of beacon surface is calculated, and whether cleaning is required.

Benefits of technology

Accurate cleaning of the surface of the beacon lights is achieved, unnecessary energy consumption is avoided, and the lighting battery life of the beacon lights is extended.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118691606B_ABST
    Figure CN118691606B_ABST
Patent Text Reader

Abstract

The present invention relates to a method and system for identifying surface defects of a beacon light, and belongs to the technical field of data processing. The method comprises the following steps: obtaining an HSI image of the surface of a beacon light to be detected and an HSI image of the surface of a standard beacon light, identifying all stain pixel points in the image to be detected, replacing the original brightness value of a target pixel point with the weighted brightness value of all non-stain pixel points in the neighborhood of the stain pixel point to obtain a new brightness value of the target pixel point; calculating the light blocking degree of the image to be detected using the new brightness values ​​and original brightness values ​​of all stain pixel points contained in the image to be detected, and determining that the surface of the beacon light needs to be cleaned when the light blocking degree of the image to be detected is greater than a preset light blocking degree; the present invention can accurately identify light blocking stains in the image to be detected, and determine whether the surface of the beacon light needs to be cleaned according to the light blocking degree of the light blocking stains.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention belongs to the technical field of data processing, and in particular relates to a method and system for identifying surface defects of a beacon light. Background Art

[0002] The main function of navigation lights is to ensure the safety of ships' navigation and the safety of water structures such as bridges. They are set up on the sea or water surface and emit specified light colors and flashing frequencies at night to serve as reminders and warnings to passing ships.

[0003] At present, a lampshade is installed on the outside of the beacon light, but it will inevitably attract a lot of mosquitoes when it glows at night, and it is easy to stick to dead mosquitoes and bird droppings, etc., and the side walls of the lampshade will absorb a lot of dust after long-term use, especially in some turbid waters, the splashing waves will carry a lot of sludge, and this sludge will adhere to the surface of the lampshade to block the normal dispersion of light, reduce the brightness of the beacon light, and affect its warning effect. When the surface of the beacon light is adhered with stains that affect the brightness of the beacon light, the beacon light needs to be cleaned and maintained in time. In order to clean and maintain the beacon light efficiently, an automatic control cleaner is generally used to clean and maintain the lampshade. However, when the cleaner is controlled to clean the lampshade, it is generally necessary to first identify whether there are stains on the surface of the lampshade. When it is identified that there are stains on the surface of the lampshade, the lampshade surface is cleaned by controlling the cleaner.

[0004] However, in the prior art, when identifying stains on the surface of the lampshade, the color difference between the stain and the beacon light is generally used to identify the stain, and the light-blocking property of the stain is not judged. The precise degree of influence of the stain on the brightness of the beacon light cannot be obtained. Once the stain is identified, the automatic cleaner will be activated to clean the beacon light. However, some non-light-blocking stains will not affect the use of the beacon light. If the non-light-blocking stains are also cleaned, a lot of unnecessary cleaning will be caused, which will waste energy and thus affect the lighting life of the beacon light. Summary of the invention

[0005] The present invention provides a method and system for identifying surface defects of a beacon light, which can accurately calculate the light blocking degree of a beacon light with stains, and determine whether the surface of the beacon light with stains needs to be cleaned according to the light blocking degree.

[0006] A method for identifying surface defects of a navigation light of the present invention adopts the following technical solution:

[0007] Obtain an HSI image of the surface of the beacon light to be detected and an HSI image of the surface of a standard beacon light, record the HSI image of the surface of the beacon light to be detected as the image to be detected, and record the HSI image of the surface of the standard beacon light as the standard image;

[0008] According to the hue difference and saturation difference between each pixel in the image to be detected and the corresponding pixel in the standard image, all the stain pixels in the image to be detected are identified;

[0009] Performing a connected domain analysis on all the stain pixels to obtain multiple stain connected domains, selecting any edge stain pixel of any stain connected domain as a target pixel, and obtaining multiple non-stain pixels in the neighborhood of the target pixel;

[0010] The total weight of each non-stain pixel in the neighborhood of the target pixel is calculated by using the positional relationship between each non-stain pixel and the target pixel in the neighborhood of the target pixel, and the hue difference and saturation difference between each non-stain pixel in the neighborhood of the target pixel and the corresponding pixel in the standard image; the original brightness value of each non-stain pixel in the neighborhood of the target pixel is weighted by using the total weight of each non-stain pixel in the neighborhood of the target pixel to obtain a weighted brightness value;

[0011] The weighted brightness values ​​of all non-stain pixels in the neighborhood of the target pixel are added, and the original brightness value of the target pixel is replaced with the added weighted brightness value to obtain a new brightness value of the target pixel; the target pixel after the replacement of the new brightness value is marked as a non-stain pixel to obtain a new edge stain pixel, and the new brightness value of the new edge stain pixel is obtained according to the method for obtaining the new brightness value of the target pixel, until the new brightness values ​​of all stain pixels are obtained;

[0012] The light blocking degree of the image to be detected is calculated using the new brightness values ​​and original brightness values ​​of all the stain pixels contained in the image to be detected. When the light blocking degree of the image to be detected is greater than a preset light blocking degree threshold, it is determined that the surface of the beacon light needs to be cleaned.

[0013] Furthermore, the step of identifying all the stain pixels in the image to be detected according to the hue difference and saturation difference between each pixel in the image to be detected and the corresponding pixel in the standard image includes:

[0014] Obtaining the hue value of each pixel in the hue image of the image to be detected and the hue value of each pixel in the hue image of the standard image;

[0015] Calculate the first difference between the hue value of each pixel in the hue image of the standard image and the hue value of the corresponding pixel in the hue image of the image to be detected; take the ratio of the absolute value of the first difference to the preset hue range as the first probability that each pixel in the hue image of the image to be detected is a stain pixel;

[0016] Calculate the second difference between the saturation value of each pixel in the saturation image of the standard image and the saturation value of each pixel in the saturation image of the image to be detected; use the second difference as the second probability that each pixel in the saturation image of the image to be detected is a stain pixel;

[0017] Using the first probability and the second probability, the total probability of each pixel being a stain pixel is obtained after removing the influence of illumination, and the pixel points whose total probability is greater than a preset probability threshold are selected as suspected pixels;

[0018] According to the number of suspected pixels in the neighborhood of each suspected pixel, all the stained pixels are selected from the suspected pixels.

[0019] Furthermore, the step of using the first probability and the second probability to obtain the total probability that each pixel is a stain pixel after removing the influence of illumination includes:

[0020] The average of the first probability and the second probability is taken as the total probability that each pixel is a stain pixel after removing the influence of illumination.

[0021] Furthermore, the step of selecting all stained pixels from the suspected pixels according to the number of suspected pixels in the neighborhood of each suspected pixel includes:

[0022] Get the number of suspected pixels in the eight-neighborhood of each suspected pixel;

[0023] The suspected pixels whose number of suspected pixels in the eight neighborhoods is greater than or equal to four are selected as stain pixels, and all the stain pixels are selected in the same way.

[0024] Furthermore, the step of calculating the total weight of each non-stain pixel in the neighborhood of the target pixel by using the positional relationship between each non-stain pixel in the neighborhood of the target pixel and the target pixel, and the hue difference and saturation difference between each non-stain pixel in the neighborhood of the target pixel and the corresponding pixel in the standard image includes:

[0025] A rectangular coordinate system is established with the lower left corner of the image to be detected as the origin, and the position weight of each non-stain pixel in the neighborhood of the target pixel is obtained according to the row where the ordinate of the target pixel is located, the preset standard brightness value of each row, and the position relationship between each non-stain pixel in the neighborhood of the target pixel and the target pixel;

[0026] According to the hue difference and saturation difference between each non-stain pixel in the neighborhood of the target pixel and the corresponding pixel in the standard image, the total probability of each non-stain pixel being a stain pixel after removing the influence of illumination is obtained;

[0027] According to the total probability corresponding to each non-stain pixel in the neighborhood of the target pixel, the color weight of each non-stain pixel in the neighborhood of the target pixel is calculated;

[0028] The position weight and color weight of each non-stain pixel in the neighborhood of the target pixel are multiplied to obtain the total weight of each non-stain pixel in the neighborhood of the target pixel.

[0029] Furthermore, the step of obtaining the position weight of each non-stain pixel in the neighborhood of the target pixel includes:

[0030] Obtain the preset standard brightness value of the row where the target pixel point's ordinate is located, the preset standard brightness value of the row above the target pixel point's ordinate, and the preset standard brightness value of the row below the target pixel point's ordinate;

[0031] When the non-stained pixels in the eight-neighborhood of the target pixel are located in the same row as the target pixel, the position weight of the non-stained pixels in the same row as the target pixel is 1;

[0032] When the eight-neighborhood non-stained pixel points of the target pixel point are located in the previous row of the target pixel point, the ratio of the preset standard brightness value of the row where the target pixel point is located to the preset standard brightness value of the previous row is used as the position weight of the non-stained pixel point located in the previous row of the target pixel point;

[0033] When the eight-neighborhood non-stain pixels of the target pixel are located in the next row of the target pixel, the ratio of the preset standard brightness value of the row where the target pixel is located to the preset standard brightness value of the next row is used as the position weight of the non-stain pixels located in the next row of the target pixel.

[0034] Furthermore, the calculation formula for the light blocking degree of the image to be detected is:

[0035]

[0036] in, Indicates the light blocking degree of the image to be detected; Indicates the first The new brightness value of the stained pixel; Indicates the first The original brightness value of the stain pixel; Indicates the total number of all stain pixels contained in the image to be detected.

[0037] A system for identifying surface defects of a navigation light, comprising:

[0038] An image acquisition module is used to obtain an HSI image of the surface of the beacon light to be detected and an HSI image of the surface of the standard beacon light, and record the HSI image of the surface of the beacon light to be detected as the image to be detected, and record the HSI image of the surface of the standard beacon light as the standard image;

[0039] A recognition module, used to identify all stain pixels in the image to be detected based on the hue difference and saturation difference between each pixel in the image to be detected and the corresponding pixel in the standard image;

[0040] A connected domain analysis module is used to perform connected domain analysis on all stain pixels to obtain multiple stain connected domains, select any edge stain pixel of any stain connected domain as a target pixel, and obtain multiple non-stain pixels in the neighborhood of the target pixel;

[0041] The first calculation module is used to calculate the total weight of each non-stain pixel in the neighborhood of the target pixel point by using the positional relationship between each non-stain pixel in the neighborhood of the target pixel point and the target pixel point, and the hue difference and saturation difference between each non-stain pixel in the neighborhood of the target pixel point and the corresponding pixel point in the standard image; and to weight the original brightness value of each non-stain pixel in the neighborhood of the target pixel point by using the total weight of each non-stain pixel in the neighborhood of the target pixel point to obtain a weighted brightness value;

[0042] The second calculation module is used to add the weighted brightness values ​​of all non-stain pixels in the neighborhood of the target pixel, and replace the original brightness value of the target pixel with the added weighted brightness value to obtain a new brightness value of the target pixel; mark the target pixel after the replacement of the new brightness value as a non-stain pixel to obtain a new edge stain pixel, and obtain a new brightness value of the new edge stain pixel according to the method for obtaining the new brightness value of the target pixel, until the new brightness values ​​of all the stain pixels are obtained;

[0043] The third calculation module is used to calculate the light blocking degree of the image to be detected by using the new brightness values ​​and original brightness values ​​of all stain pixels contained in the image to be detected;

[0044] The judgment module is used to judge that the surface of the navigation light needs to be cleaned when the light blocking degree of the image to be detected is greater than a preset light blocking degree.

[0045] The beneficial effects of the present invention are:

[0046] The present invention provides a method for identifying surface defects of navigation lights. First, all the stained pixels in the image to be detected are identified according to the hue difference and saturation difference between each pixel in the image to be detected and the corresponding pixel in the standard image. After all the stained pixels are identified, the original brightness values ​​of all the stained pixels in the brightness image are obtained. If the stained pixel is a light-blocking pixel, the brightness value will be greatly different from that of the non-stained pixel. If the brightness values ​​of all the stained pixels after the stains are removed can be obtained, the light-blocking degree of the image to be detected can be calculated. The brightness value of each stained pixel after the stains are removed can be calculated according to the brightness of the stained pixel. The brightness values ​​of non-stained pixels in the neighborhood of stained pixels are inferred, and the new brightness values ​​of edge pixels in the stained connected domain after stains are removed are calculated according to the brightness changes of non-stained defective pixels in the eight neighborhoods of edge pixels in each stained connected domain. After obtaining the new brightness values, the light blocking degree of the image to be detected is calculated using the new brightness values ​​and original brightness values ​​of all stained pixels contained in the image to be detected, and whether the surface of the beacon light with stains needs to be cleaned is determined according to the light blocking degree, thereby avoiding excessive cleaning of some non-light-blocking stains and achieving precise cleaning of the surface of the beacon light. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0048] Figure 1 The diagram is a schematic diagram of the overall steps of an embodiment of a method for identifying surface defects of a beacon light of the present invention. DETAILED DESCRIPTION

[0049] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0050] An embodiment of a method for identifying surface defects of a beacon light of the present invention is as follows: Figure 1 As shown, the method includes:

[0051] S1. Obtain an HSI image of the surface of a beacon light to be detected and an HSI image of the surface of a standard beacon light, record the HSI image of the surface of the beacon light to be detected as the image to be detected, and record the HSI image of the surface of the standard beacon light as the standard image.

[0052] The present invention uses a beacon light surface defect recognition device to complete the beacon light surface cleaning work, the beacon light surface defect recognition device includes three micro cameras and an automatic control cleaner, wherein the automatic control cleaner is composed of a cleaning brush and a servo motor. The three micro cameras are used to capture a complete beacon light surface image.

[0053] What needs to be explained is: a micro camera is installed every 120 degrees around the base of the beacon light, and the distance between the three cameras and the beacon light is equal. The three micro cameras shoot the surface image of the beacon light at eye level, that is, the pixels on the same row of the beacon light area in the image to be detected correspond to the same height of the actual beacon light; when the surface of the beacon light is adhered to stains that affect the brightness of the beacon light, the beacon light needs to be cleaned and maintained in time. In order to clean and maintain the beacon light efficiently, an automatic control cleaner is generally used to clean and maintain the lampshade. The automatic cleaner is located under the base of the beacon light. When cleaning is required, the cleaning brush pops up and controls the servo motor to rotate the brush to complete the cleaning of the surface of the beacon light. The surface image of the beacon light is collected at 8 am and 4 pm every day. The natural light environment is good, and it is the time period after the beacon light work is completed and before the preparation work.

[0054] The complete surface images of the beacon light captured by three micro cameras are preprocessed to obtain a complete panoramic image of the surface of the beacon light. The preprocessing process is specifically as follows: semantic segmentation identifies the connected domain information of the surface of the beacon light in the surface image of the beacon light to obtain a complete panoramic image of the surface of the beacon light.

[0055] It should be noted that: the present invention adopts DNN semantic segmentation to identify the connected domain of the beacon light in the three collected images, and realizes the processing of the beacon light image on the lighthouse through DNN semantic segmentation, and obtains the connected domain information of the beacon light surface in the three collected images, thereby obtaining three beacon light surface sub-images, and then uses the SIFT algorithm to splice the three beacon light surface sub-images to obtain a complete panoramic image of the beacon light surface.

[0056] After knowing the method of collecting the complete panoramic image of the beacon light surface, first collect the panoramic image of the newly installed beacon light surface with uniform illumination, and convert it into the HSI color space to obtain the HSI image recorded as the standard image G. At the same time, collect the panoramic image of the current installed beacon light surface, and convert it into the HSI color space to obtain the HSI image recorded as the image to be detected F.

[0057] S2. Identify all the stain pixels in the image to be detected based on the hue difference and saturation difference between each pixel in the image to be detected and the corresponding pixel in the standard image.

[0058] According to the hue difference and saturation difference between each pixel in the image to be detected and the corresponding pixel in the standard image, the step of identifying all the stain pixels in the image to be detected includes: obtaining the hue value of each pixel in the hue image of the image to be detected and the hue value of each pixel in the hue image of the standard image; calculating the first difference between the hue value of each pixel in the hue image of the standard image and the hue value of the corresponding pixel in the hue image of the image to be detected; taking the ratio of the absolute value of the first difference to the preset hue range as the first probability that each pixel in the hue image of the image to be detected is a stain pixel; calculating the second difference between the saturation value of each pixel in the saturation image of the standard image and the saturation value of each pixel in the saturation image of the image to be detected; taking the second difference as the second probability that each pixel in the saturation image of the image to be detected is a stain pixel; using the first probability and the second probability to obtain the total probability that each pixel is a stain pixel after removing the influence of illumination, and selecting the pixels whose total probability is greater than the preset probability threshold as suspected pixels; and selecting all the stain pixels from the suspected pixels according to the number of suspected pixels in the neighborhood of each suspected pixel.

[0059] The step of obtaining the total probability that each pixel is a stain pixel after removing the influence of illumination by using the first probability and the second probability includes: taking the average of the first probability and the second probability as the total probability that each pixel is a stain pixel after removing the influence of illumination.

[0060] According to the number of suspected pixels in the neighborhood of each suspected pixel, the step of selecting stained pixels from the suspected pixels includes: obtaining the number of suspected pixels in the eight neighborhoods of each suspected pixel; selecting suspected pixels whose number of suspected pixels in the eight neighborhoods is greater than or equal to four as stained pixels, and selecting all stained pixels in the same way.

[0061] The image to be detected F is resized to make it the same scale as the standard image G. Then, the hue value of each pixel in the standard image G is subtracted from the hue value of the corresponding pixel in the image to be detected F to obtain the first probability that each pixel in the hue image is a stain pixel. The first probability that each pixel in the hue image of the image to be detected is a stain pixel is obtained. The calculation formula is:

[0062]

[0063] in, Indicates the hue image of the image to be detected. The first probability that a pixel is a stain pixel; Indicates the first The hue value of each pixel; Indicates the first The denominator 360 in the formula represents the range of the hue value in the hue image; Represents the total number of pixels in the image to be detected; the numerator in the formula represents the difference in the hue value of the corresponding pixel in the image to be detected F and the standard image G. The larger the difference value, the greater the probability of being a stain, thus obtaining the set Thus, the feature extraction of the first probability that each pixel in the to-be-detected image tone image is a stain pixel is completed.

[0064] The calculation formula for the second probability that each pixel in the saturation image to be detected is a stain pixel is:

[0065]

[0066] in, Indicates the saturation of the image to be detected. The second probability that a pixel is a stain pixel; Indicates that in the standard image G saturation image The saturation value of each pixel; Indicates that in the saturation image F to be detected, The saturation value of each pixel point; the numerator in the formula represents the difference in saturation value of the corresponding pixel point in the image to be detected F and the standard image G. The larger the difference value, the greater the probability of being a stain. Thus, the probability set of each pixel point in the saturation image of the image to be detected being a stain pixel point is obtained. Thus, the feature extraction of the second probability that each pixel in the saturation image of the image to be detected is a stain pixel is completed.

[0067] The average of the first probability and the second probability is taken as the total probability that each pixel is a stain pixel after removing the influence of illumination, thereby obtaining the total probability set that each pixel is a stain pixel after removing the influence of illumination:

[0068]

[0069] in, Indicates The first probability that a pixel is a stain pixel; Indicates The second probability that a pixel is a stain pixel; Represents the total number of pixels in the image to be detected. This completes the feature extraction of the total probability that each pixel is a stain pixel.

[0070] After obtaining the total probability that each pixel is a stain pixel without the influence of illumination, the pixels whose total probability is greater than the preset probability threshold are selected as suspected pixels. The calculation method of the preset probability threshold is:

[0071] From the collected panoramic images of the current beacon light surface, 5 panoramic images of the beacon light surface known to be free of stains are manually selected as the filtered images. Each filtered image is compared with the standard image to calculate the total probability that each pixel in each filtered image is a stained pixel. Each pixel corresponds to 5 groups of data, and the average of these 5 groups of data is taken as ,make is the preset probability threshold, when The pixel point is selected as a suspected pixel point. Thus, the identification of the suspected pixel point is completed according to the total probability that each pixel point is a stain pixel point.

[0072] Since the stain is a complete connected domain, when a suspected stain defect point is a stain defect point, more than half of its eight-neighborhood window should be stain defect points. Therefore, if the eight-neighborhood of a suspected stain defect point contains more than 4 suspected stain defect points, the suspected stain defect point is considered to be a stain defect point, otherwise it is a normal pixel point, thereby completing the identification of the stain defect point.

[0073] S3, performing connected domain analysis on all the stain pixels to obtain multiple stain connected domains, selecting any edge stain pixel of any stain connected domain as a target pixel, and obtaining multiple non-stain pixels in the neighborhood of the target pixel.

[0074] The present invention performs connected domain analysis on all stain pixels to obtain multiple stain connected domains, selects any edge stain pixel of any stain connected domain as a target pixel, and obtains multiple non-stain pixels in the neighborhood of the target pixel.

[0075] S4, calculating the total weight of each non-stain pixel in the neighborhood of the target pixel using the positional relationship between each non-stain pixel in the neighborhood of the target pixel and the target pixel, and the hue difference and saturation difference between each non-stain pixel in the neighborhood of the target pixel and the corresponding pixel in the standard image; weighting the original brightness value of each non-stain pixel in the neighborhood of the target pixel using the total weight of each non-stain pixel in the neighborhood of the target pixel to obtain a weighted brightness value;

[0076] The step of calculating the total weight of each non-stain pixel in the neighborhood of the target pixel by using the positional relationship between each non-stain pixel and the target pixel in the neighborhood of the target pixel, the hue difference and saturation difference between each non-stain pixel in the neighborhood of the target pixel and the corresponding pixel in the standard image comprises: establishing a rectangular coordinate system with the lower left corner of the image to be detected as the origin, obtaining the total weight of each non-stain pixel in the neighborhood of the target pixel according to the row where the ordinate of the target pixel is located, the preset standard brightness value of each row, and the positional relationship between each non-stain pixel and the target pixel in the neighborhood of the target pixel The position weight of each non-stained pixel point; according to the hue difference and saturation difference between each non-stained pixel point in the neighborhood of the target pixel point and the corresponding pixel point in the standard image, the total probability of each non-stained pixel point being a stained pixel point after removing the influence of illumination is obtained; according to the total probability corresponding to each non-stained pixel point in the neighborhood of the target pixel point, the color weight of each non-stained pixel point in the neighborhood of the target pixel point is calculated; the position weight and color weight of each non-stained pixel point in the neighborhood of the target pixel point are multiplied to obtain the total weight of each non-stained pixel point in the neighborhood of the target pixel point.

[0077] The step of obtaining the position weight of each non-stain pixel in the neighborhood of the target pixel includes: obtaining the preset standard brightness value of the row where the ordinate of the target pixel is located, the preset standard brightness value of the row above the ordinate of the target pixel, and the preset standard brightness value of the row below the ordinate of the target pixel; when the eight-neighborhood non-stain pixel of the target pixel is located in the same row as the target pixel, the position weight of the non-stain pixel located in the same row as the target pixel is 1; when the eight-neighborhood non-stain pixel of the target pixel is located in the row above the target pixel, the ratio of the preset standard brightness value of the row where the target pixel is located to the preset standard brightness value of the previous row is used as the position weight of the non-stain pixel located in the row above the target pixel; when the eight-neighborhood non-stain pixel of the target pixel is located in the row below the target pixel, the ratio of the preset standard brightness value of the row where the target pixel is located to the preset standard brightness value of the next row is used as the position weight of the non-stain pixel located in the row below the target pixel.

[0078] First, according to the shape of the beacon light, under uniform illumination, the amount of reflected light at the same height of the beacon light should be consistent. Therefore, the brightness values ​​of the pixels in each row of the standard image G are similar. The mean brightness value of the pixels in each row is calculated from bottom to top to obtain the row standard brightness value set. ,in, Indicates the standard image G from bottom to top The standard brightness value of the row is obtained, thereby obtaining the preset standard brightness value of each row.

[0079] Obtain the brightness image of the image F to be detected, calculate the brightness value of the area in the stain area if there is no stain influence, and calculate the brightness value of the edge pixel points of the stain connected domain after removing the stain according to the brightness change of the non-stain defective pixel points in the eight neighborhoods of the edge pixel points of each stain connected domain.

[0080] Take a pixel point at the edge of the stain connected domain as the target pixel point. First, according to the height position of the non-stain defective pixel point in the eight-neighborhood of the target pixel point, analyze the brightness relationship between the non-stain defective pixel point in the eight-neighborhood and the pixel point. If it is only affected by the height position, the brightness value change relationship of the pixel point in the eight-neighborhood window is that the brightness values ​​of the same row should be the same, that is, the position weight of the non-stain defective pixel point in the same row is 1, and the position weights of the previous row and the next row can be obtained according to the corresponding row standard brightness, which are respectively and ,in, Represents the ordinate of the target pixel. Indicates The preset standard brightness value of the row; Indicates The preset standard brightness value of the row; Indicates The preset standard brightness value of the row, that is, when only affected by the height position, the brightness values ​​of the remaining pixels are multiplied by their corresponding weights, which will make them the same as the brightness value of the central pixel, thereby obtaining the position weight of the non-stain defect pixel in the eight-neighborhood of the target pixel.

[0081] Theoretically, the probability that a pixel is a stain defect is The larger the value, the greater the impact on brightness. Therefore, the color weight of the non-stain defect pixel in the eight neighborhoods of the target pixel is for:

[0082]

[0083] in, Represents the color weight of the yth non-stain defect pixel in the eight-neighborhood of the target pixel; Represents the total probability that the yth non-stain defect pixel in the eight-neighborhood of the target pixel is a stain pixel; Represents the number of non-stain defect pixels in the eight-neighborhood of the target pixel. The larger the value, the lower the credibility of the brightness value of the non-stain defect pixel, that is, the smaller its weight is, and then the color weights of each non-stain defect pixel in the eight neighborhoods of the target pixel are used. The total weight of each non-stain pixel in the neighborhood of the target pixel is obtained by multiplying it with its corresponding position weight, and then the total weight is normalized to obtain the normalized total weight of each non-stain pixel in the neighborhood of the target pixel.

[0084] S5. Add the weighted brightness values ​​of all non-stain pixels in the neighborhood of the target pixel, and use the added weighted brightness value to replace the original brightness value of the target pixel to obtain a new brightness value of the target pixel; mark the target pixel after replacing the new brightness value as a non-stain pixel to obtain a new edge stain pixel, and obtain a new brightness value of the new edge stain pixel according to the method for obtaining the new brightness value of the target pixel, until the new brightness values ​​of all the stain pixels are obtained.

[0085] The new brightness value of the target pixel The calculation formula is:

[0086]

[0087] in, Indicates the new brightness value of the target pixel; Indicates the first The original brightness value of non-stain defect pixels; Indicates the first The normalized total weight of non-stain defect pixels; Represents the number of non-stain defect pixels in the eight-neighborhood of the target pixel; the new brightness value of the target pixel In the calculation formula, the brightness value of the target pixel after stain removal is calculated according to the brightness change of the non-stain defective pixels in the eight neighborhoods of the target pixel. This completes the feature extraction of the new brightness value of the edge stain pixel of the stain connected domain.

[0088] In the present invention, after calculating the new brightness value of the target pixel point, the target pixel point after replacing the new brightness value is marked as a non-stained pixel point to obtain a new edge stained pixel point, and the new brightness value of the new edge stained pixel point is obtained according to the method of obtaining the new brightness value of the target pixel point, until the new brightness values ​​of all stained pixel points are obtained, until all stained pixel points are marked as stained pixel points.

[0089] S6. Calculate the light blocking degree of the image to be detected by using the new brightness values ​​and original brightness values ​​of all the stain pixels contained in the image to be detected. When the light blocking degree of the image to be detected is greater than a preset light blocking degree threshold, determine that the surface of the beacon light needs to be cleaned.

[0090] The calculation formula for the light blocking degree of the image to be detected is:

[0091]

[0092] in, Indicates the light blocking degree of the image to be detected; Indicates the first The new brightness value of the stained pixel; Indicates the first The original brightness value of the stain pixel; Indicates the total number of all stain pixels contained in the image to be detected; In the formula, the numerator represents the light blocking amount of the zth stain defect pixel. The larger the difference between the two, the greater the influence of the stain defect pixel on light transmission. The denominator represents the brightness value of the zth stain defect pixel after removing the influence of the stain. Adding 1 to it is to prevent the denominator from being 0. Since the current image to be detected will be affected by uneven illumination, this formula is used to represent the relative light blocking property of the zth stain defect pixel. When the stain is in a high-brightness area, both the numerator and the denominator are larger. When the stain is in a low-brightness area, both the numerator and the denominator are smaller. The larger the ratio, the greater the influence on light transmission. It represents the sum of the relative light-blocking properties of all stain defect pixels. This completes the feature extraction of the light-blocking degree of the image to be detected.

[0093] When the light-blocking degree of the image to be detected is greater than the preset light-blocking degree threshold, it is determined that the surface of the beacon light needs to be cleaned. The calculation process of the preset light-blocking degree threshold is as follows: first, 5 complete images of the surface of the beacon light that are not seriously contaminated by stains and do not need to be cleaned are manually selected from the current panoramic image of the surface of the beacon light collected. According to the calculation method of the light-blocking degree of the image to be detected, the light-blocking degree of the 5 complete images of the surface of the beacon light that are not seriously contaminated by stains and do not need to be cleaned are calculated, and the average of this group of data is taken. , let it be the preset light blocking threshold, if the light blocking level of the image to be detected is greater than the preset light blocking threshold , it is determined that the surface of the beacon light needs to be cleaned. So far, it is identified whether the current surface of the beacon light is seriously contaminated. If the contamination is serious, that is, When the automatic control cleaner is started, the surface of the current navigation light is cleaned.

[0094] A system for identifying surface defects of a navigation light, comprising:

[0095] An image acquisition module is used to obtain an HSI image of the surface of the beacon light to be detected and an HSI image of the surface of the standard beacon light, and record the HSI image of the surface of the beacon light to be detected as the image to be detected, and record the HSI image of the surface of the standard beacon light as the standard image;

[0096] A recognition module, used to identify all stain pixels in the image to be detected based on the hue difference and saturation difference between each pixel in the image to be detected and the corresponding pixel in the standard image;

[0097] A connected domain analysis module is used to perform connected domain analysis on all stain pixels to obtain multiple stain connected domains, select any edge stain pixel of any stain connected domain as a target pixel, and obtain multiple non-stain pixels in the neighborhood of the target pixel;

[0098] The first calculation module is used to calculate the total weight of each non-stain pixel in the neighborhood of the target pixel point by using the positional relationship between each non-stain pixel in the neighborhood of the target pixel point and the target pixel point, and the hue difference and saturation difference between each non-stain pixel in the neighborhood of the target pixel point and the corresponding pixel point in the standard image; and to weight the original brightness value of each non-stain pixel in the neighborhood of the target pixel point by using the total weight of each non-stain pixel in the neighborhood of the target pixel point to obtain a weighted brightness value;

[0099] The second calculation module is used to add the weighted brightness values ​​of all non-stain pixels in the neighborhood of the target pixel, and replace the original brightness value of the target pixel with the added weighted brightness value to obtain a new brightness value of the target pixel; mark the target pixel after the replacement of the new brightness value as a non-stain pixel to obtain a new edge stain pixel, and obtain a new brightness value of the new edge stain pixel according to the method for obtaining the new brightness value of the target pixel, until the new brightness values ​​of all the stain pixels are obtained;

[0100] The third calculation module is used to calculate the light blocking degree of the image to be detected by using the new brightness values ​​and original brightness values ​​of all stain pixels contained in the image to be detected;

[0101] The judgment module is used to judge that the surface of the navigation light needs to be cleaned when the light blocking degree of the image to be detected is greater than a preset light blocking degree.

[0102] The present invention provides a method and system for identifying surface defects of a beacon light, which can accurately calculate the light blocking degree of a beacon light with stains, and determine whether the surface of the beacon light with stains needs to be cleaned according to the light blocking degree.

[0103] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims

1. A method for identifying surface defects of navigation lights. It is characterized in that The method includes: Obtain an HSI image of the surface of the beacon light to be detected and an HSI image of the surface of a standard beacon light, record the HSI image of the surface of the beacon light to be detected as the image to be detected, and record the HSI image of the surface of the standard beacon light as the standard image; According to the hue difference and saturation difference between each pixel in the image to be detected and the corresponding pixel in the standard image, all the stain pixels in the image to be detected are identified; Performing a connected domain analysis on all the stain pixels to obtain multiple stain connected domains, selecting any edge stain pixel of any stain connected domain as a target pixel, and obtaining multiple non-stain pixels in the neighborhood of the target pixel; The total weight of each non-stain pixel in the neighborhood of the target pixel is calculated by using the positional relationship between each non-stain pixel and the target pixel in the neighborhood of the target pixel, and the hue difference and saturation difference between each non-stain pixel in the neighborhood of the target pixel and the corresponding pixel in the standard image; the original brightness value of each non-stain pixel in the neighborhood of the target pixel is weighted by using the total weight of each non-stain pixel in the neighborhood of the target pixel to obtain a weighted brightness value; The weighted brightness values ​​of all non-stain pixels in the neighborhood of the target pixel are added, and the original brightness value of the target pixel is replaced with the added weighted brightness value to obtain a new brightness value of the target pixel; the target pixel after the replacement of the new brightness value is marked as a non-stain pixel to obtain a new edge stain pixel, and the new brightness value of the new edge stain pixel is obtained according to the method for obtaining the new brightness value of the target pixel, until the new brightness values ​​of all stain pixels are obtained; The light blocking degree of the image to be detected is calculated using the new brightness values ​​and original brightness values ​​of all the stain pixels contained in the image to be detected. When the light blocking degree of the image to be detected is greater than a preset light blocking degree threshold, it is determined that the surface of the beacon light needs to be cleaned.

2. A method for identifying surface defects of a beacon light according to claim 1, It is characterized in that The step of identifying all the stain pixels in the image to be detected according to the hue difference and saturation difference between each pixel in the image to be detected and the corresponding pixel in the standard image comprises: Obtaining the hue value of each pixel in the hue image of the image to be detected and the hue value of each pixel in the hue image of the standard image; Calculate the first difference between the hue value of each pixel in the hue image of the standard image and the hue value of the corresponding pixel in the hue image of the image to be detected; take the ratio of the absolute value of the first difference to the preset hue range as the first probability that each pixel in the hue image of the image to be detected is a stain pixel; Calculate the second difference between the saturation value of each pixel in the saturation image of the standard image and the saturation value of each pixel in the saturation image of the image to be detected; use the second difference as the second probability that each pixel in the saturation image of the image to be detected is a stain pixel; Using the first probability and the second probability, the total probability of each pixel being a stain pixel is obtained after removing the influence of illumination, and the pixel points whose total probability is greater than a preset probability threshold are selected as suspected pixels; According to the number of suspected pixels in the neighborhood of each suspected pixel, all the stained pixels are selected from the suspected pixels.

3. A method for identifying surface defects of a navigation light according to claim 2, It is characterized in that The step of using the first probability and the second probability to obtain the total probability that each pixel is a stain pixel under the influence of light removal comprises: The average of the first probability and the second probability is taken as the total probability that each pixel is a stain pixel after removing the influence of illumination.

4. A method for identifying surface defects of a navigation light according to claim 2, It is characterized in that The step of selecting all stained pixels from the suspected pixels according to the number of suspected pixels in the neighborhood of each suspected pixel includes: Get the number of suspected pixels in the eight-neighborhood of each suspected pixel; The suspected pixels whose number of suspected pixels in the eight neighborhoods is greater than or equal to four are selected as stain pixels, and all the stain pixels are selected in the same way.

5. A method for identifying surface defects of a navigation light according to claim 2, It is characterized in that The step of calculating the total weight of each non-stain pixel in the neighborhood of the target pixel by using the positional relationship between each non-stain pixel in the neighborhood of the target pixel and the target pixel, and the hue difference and saturation difference between each non-stain pixel in the neighborhood of the target pixel and the corresponding pixel in the standard image comprises: A rectangular coordinate system is established with the lower left corner of the image to be detected as the origin, and the position weight of each non-stain pixel in the neighborhood of the target pixel is obtained according to the row where the ordinate of the target pixel is located, the preset standard brightness value of each row, and the position relationship between each non-stain pixel in the neighborhood of the target pixel and the target pixel; According to the hue difference and saturation difference between each non-stain pixel in the neighborhood of the target pixel and the corresponding pixel in the standard image, the total probability of each non-stain pixel being a stain pixel after removing the influence of illumination is obtained; According to the total probability corresponding to each non-stain pixel in the neighborhood of the target pixel, the color weight of each non-stain pixel in the neighborhood of the target pixel is calculated; The position weight and color weight of each non-stain pixel in the neighborhood of the target pixel are multiplied to obtain the total weight of each non-stain pixel in the neighborhood of the target pixel.

6. A method for identifying surface defects of a navigation light according to claim 5, It is characterized in that The step of obtaining the position weight of each non-stain pixel in the neighborhood of the target pixel comprises: Obtain the preset standard brightness value of the row where the target pixel point's ordinate is located, the preset standard brightness value of the row above the target pixel point's ordinate, and the preset standard brightness value of the row below the target pixel point's ordinate; When the non-stained pixels in the eight-neighborhood of the target pixel are located in the same row as the target pixel, the position weight of the non-stained pixels in the same row as the target pixel is 1; When the eight-neighborhood non-stained pixel points of the target pixel point are located in the previous row of the target pixel point, the ratio of the preset standard brightness value of the row where the target pixel point is located to the preset standard brightness value of the previous row is used as the position weight of the non-stained pixel point located in the previous row of the target pixel point; When the eight-neighborhood non-stain pixels of the target pixel are located in the next row of the target pixel, the ratio of the preset standard brightness value of the row where the target pixel is located to the preset standard brightness value of the next row is used as the position weight of the non-stain pixels located in the next row of the target pixel.

7. A method for identifying surface defects of a navigation light according to claim 1, It is characterized in that The calculation formula for the light blocking degree of the image to be detected is: in, Indicates the light blocking degree of the image to be detected; Indicates the first The new brightness value of the stain pixel; Indicates the first The original brightness value of the stain pixel; Indicates the total number of all stain pixels contained in the image to be detected.

8. A system for identifying surface defects of navigation lights. It is characterized in that include: An image acquisition module is used to obtain an HSI image of the surface of the beacon light to be detected and an HSI image of the surface of the standard beacon light, and record the HSI image of the surface of the beacon light to be detected as the image to be detected, and record the HSI image of the surface of the standard beacon light as the standard image; A recognition module, used to identify all stain pixels in the image to be detected based on the hue difference and saturation difference between each pixel in the image to be detected and the corresponding pixel in the standard image; A connected domain analysis module is used to perform connected domain analysis on all stain pixels to obtain multiple stain connected domains, select any edge stain pixel of any stain connected domain as a target pixel, and obtain multiple non-stain pixels in the neighborhood of the target pixel; The first calculation module is used to calculate the total weight of each non-stain pixel in the neighborhood of the target pixel by using the positional relationship between each non-stain pixel in the neighborhood of the target pixel and the target pixel, and the hue difference and saturation difference between each non-stain pixel in the neighborhood of the target pixel and the corresponding pixel in the standard image; The original brightness value of each non-stain pixel in the neighborhood of the target pixel is weighted by using the total weight of each non-stain pixel in the neighborhood of the target pixel to obtain a weighted brightness value; The second calculation module is used to add the weighted brightness values ​​of all non-stain pixels in the neighborhood of the target pixel, and replace the original brightness value of the target pixel with the added weighted brightness value to obtain a new brightness value of the target pixel; mark the target pixel after the replacement of the new brightness value as a non-stain pixel to obtain a new edge stain pixel, and obtain a new brightness value of the new edge stain pixel according to the method for obtaining the new brightness value of the target pixel, until the new brightness values ​​of all the stain pixels are obtained; The third calculation module is used to calculate the light blocking degree of the image to be detected by using the new brightness values ​​and original brightness values ​​of all stain pixels contained in the image to be detected; The judgment module is used to judge that the surface of the navigation light needs to be cleaned when the light blocking degree of the image to be detected is greater than a preset light blocking degree.

Citation Information

Patent Citations

  • Automobile head lamp cleaning control method, cleaning control system and automobile

    CN113815572A

  • Stain detection method and device, electronic equipment and sweeping robot system

    CN114723767A

  • Toner cartridge defect detection method and device, electronic equipment and storage medium

    CN115294024A

  • Stain flaw detection method and stain flaw detection device

    JP2008170325A

  • Automatic inspection apparatus for stain in the polarizing plate using color difference analysis

    KR1020120122301A

Cited By

  • Supercavitation high-pressure water jet machine cleaning quality detection method based on visual technology

    CN119963514A