Iced conductor identification method, system and device based on color threshold and area condition, and medium
By constructing BGR and HSV color threshold models combined with morphological processing, the accuracy and environmental adaptability issues of ice-covered conductor identification technology in complex backgrounds were solved, and precise positioning and efficient de-icing of ice-covered conductors were achieved.
Patent Information
- Application Number
- CN202510436768.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-09
- Publication Date
- 2025-09-05
- Estimated Expiration
- 2045-04-09
AI Technical Summary
Existing ice-covered conductor identification technology has problems of low accuracy and poor environmental adaptability. It is particularly difficult to accurately identify ice-covered conductors in complex backgrounds, and is easily affected by lighting changes and background interference.
A recognition method based on color threshold and area conditions was adopted. By constructing BGR and HSV color threshold models and combining them with environmental brightness data to generate an adaptive threshold band, a double mask operation was performed. The morphological kernel structure was used to extract the minimum bounding rectangle of the ice-covered area, and the centerline positioning coordinates were fitted.
It improves the accuracy and pertinence of ice-covered wire identification, effectively eliminates interfering color blocks, adapts to complex environments, reduces false alarm rates, and ensures accurate positioning and de-icing effects of de-icing robots.
Smart Images

Figure CN120599320A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of image target recognition, and in particular to a method, system, device and medium for identifying ice-covered wires based on color thresholds and area conditions. Background Art
[0002] In power systems in cold regions, ice coating on railway overhead wires can increase line loads and cause sag changes, seriously impacting the normal operation of the overhead wire. Currently, automated de-icing robots are used to de-ice iced conductors. However, automated de-icing robots require the ability to accurately identify iced conductors.
[0003] Existing technologies for identifying ice-covered conductors primarily use image recognition technology. However, this technology relies primarily on single-type color threshold segmentation and traditional target detection algorithms, which have significant drawbacks:
[0004] (1) The masking method based on a single type of color threshold segments the target by setting a specific color space threshold. However, it cannot filter specific area color blocks, resulting in small area interference objects (such as birds and leaves) or large area background noise (such as the sky and mountains) being misjudged as ice-covered targets, which in turn leads to a high false alarm rate.
[0005] (2) Since ice-covered conductors are long strips, it is difficult for algorithms that rely on rectangular box detection (such as YOLO and Faster R-CNN) to accurately fit the conductor body, resulting in low positioning accuracy and easy interference from complex backgrounds (such as poles and vegetation), leading to false detection or missed detection.
[0006] (3) The single-type color threshold method is sensitive to the environment. Lighting changes or background color interference (such as white buildings and snow) will significantly reduce the segmentation stability. Summary of the Invention
[0007] (1) Technical issues to be solved
[0008] In view of the above-mentioned shortcomings and deficiencies of the prior art, the present invention provides a method, system, device and medium for identifying ice-covered conductors based on color thresholds and area conditions, which solves the technical problems of low accuracy and poor environmental adaptability of the existing ice-covered conductor identification technology.
[0009] (2) Technical solution
[0010] In order to achieve the above objectives, the main technical solutions adopted by the present invention include:
[0011] In a first aspect, an embodiment of the present invention provides a method for identifying ice-covered conductors based on color thresholds and area conditions, including:
[0012] Based on the collected color information of ice-covered conductors, a BGR color threshold model for ice coverage characteristics is constructed. The initial HSV color threshold interval is obtained through dynamic random sampling. Combined with the collected ambient brightness data, an HSV color threshold band with brightness adaptability is generated.
[0013] A double masking operation is performed on the image to be identified using the BGR color threshold model and the HSV color threshold band to generate an initial mask image containing the ice-covered area. The brightness offset of the HSV color threshold band is dynamically adjusted based on the current ambient light intensity to perform mask correction on the initial mask image and obtain an optimal mask image that is resistant to light interference.
[0014] The optimal mask image is opened using a predefined morphological kernel structure to extract the ice-covered connected area that meets the preset area conditions and generate the minimum bounding rectangle of the ice-covered area.
[0015] The centerline is fitted according to the vertex position information of the minimum circumscribed rectangle, and the intersection of the fitted centerline is used as the positioning coordinate of the ice-covered wire and output to the preset deicing robot to perform deicing work.
[0016] Optionally, a BGR color threshold model of ice coverage characteristics is constructed based on the collected color information of ice-covered conductors. An initial HSV color threshold interval is obtained by dynamic random sampling. Combined with the collected ambient brightness data, an HSV color threshold band with brightness adaptability is generated, including:
[0017] The BGR color pixel values of the ice-covered area in multiple frames of ice-covered wire images are obtained by dynamic random sampling, and a BGR color threshold model of ice-covered features is established in the BGR color space.
[0018] Performing color space conversion based on the BGR color pixel value to generate a corresponding HSV color component in the HSV color space;
[0019] According to the HSV color components, the initial HSV color threshold interval of the ice-covered area in the ice-covered wire image is obtained, and combined with the collected environmental brightness data, an HSV color threshold band with brightness adaptability is generated.
[0020] Optionally, obtaining BGR color pixel values of ice-covered areas in multiple frames of ice-covered wire images according to dynamic random sampling, and establishing a BGR color threshold model of ice-covered features in the BGR color space includes:
[0021] Collect multiple frames of initial images of the ice-covered conductor and mark the boundary of the ice-covered area;
[0022] In the ice-covered area of each frame image, random sampling of non-overlapping sub-areas is performed, and the BGR color pixel value of the selected sub-area is extracted each time;
[0023] The extreme value distribution of BGR color pixel values is counted, and the BGR color threshold model of the ice-covered area is obtained through Gaussian distribution calculation;
[0024] Among them, the mathematical expression of the BGR color threshold modulus is:
[0025]
[0026] Where B max , G max 、R max Represents the maximum value of the BGR three-channel color of the ice-covered area, B min , G min 、R min Represents the minimum value of the BGR three-channel color of the ice-covered area, μ B 、μ G 、μ R represents the mean of the BGR three-channel color of the sampled ice-covered area, k represents the confidence factor, σ B , σ G , σ R Represents the standard deviation of the BGR three-channel color of the sampled ice-covered area.
[0027] Optionally, a double masking operation is performed on the image to be identified using a BGR color threshold model and an HSV color threshold band to generate an initial mask image containing the ice-covered area. The brightness offset of the HSV color threshold band is dynamically adjusted based on the current ambient light intensity to perform mask correction on the initial mask image. Obtaining an optimal mask image that is resistant to light interference includes:
[0028] Get the BGR color components and HSV color components of all pixels in the image to be identified;
[0029] Determine whether the BGR color component meets the threshold condition of the BGR color threshold model and whether the HSV color component meets the HSV color threshold band;
[0030] When the BGR color component does not meet the threshold condition of the BGR color threshold model and the HSV color component does not meet the HSV color threshold band, a double mask operation is performed on the pixels corresponding to the BGR color component and the HSV color component to generate an initial mask image containing the ice-covered area;
[0031] Dynamically adjust the brightness offset of the HSV color threshold band based on the current ambient light intensity to perform mask correction on the initial mask image and obtain the optimal mask image that is resistant to light interference;
[0032] Among them, the calculation formula of the double mask operation is:
[0033]
[0034] Where D represents the mask function, x is the pixel of the input image, and T min Represents the minimum value of the BGR threshold range, T max Represents the maximum value of the BGR threshold range, T x Represents the BGR value at pixel x, H min Represents the minimum hue value of the HSV threshold range, H max Represents the maximum hue value of the HSV threshold range, H x Represents the hue value at pixel x, V min Represents the maximum brightness value of the HSV threshold range, V max Represents the maximum brightness value of the HSV threshold range, V x Represents the brightness value at pixel x.
[0035] Optionally, a predefined morphological kernel structure is used to perform an opening operation on the optimal mask image to extract ice-covered connected areas that meet a preset area condition, and a minimum bounding rectangle of the ice-covered area is generated, including:
[0036] Using a predefined morphological kernel structure, the optimal mask image is processed with an opening operation including image erosion and image dilation to generate a binary image of the image to be identified;
[0037] According to the number and length of white blocks in the binary image, the ice-covered area value corresponding to the white block is called from the preset database;
[0038] Compare the difference between the area value of the white block and the area value of the ice-covered area of the corresponding length of the white block with a set threshold, and determine whether the white block is an ice-covered area based on the comparison result;
[0039] When the difference between the area value of the white block and the area value of the ice-covered area of the corresponding length of the white block is less than a set threshold, the white block is determined to be an ice-covered area, and the minimum circumscribed rectangle of the ice-covered area is generated.
[0040] Optionally, performing centerline fitting based on vertex position information of the minimum circumscribed rectangle, using the intersection of the fitted centerlines as the positioning coordinates of the ice-covered conductor, and outputting the coordinates to a preset deicing robot to perform deicing work includes:
[0041] Get the vertex position information of the minimum enclosing rectangle;
[0042] According to the vertex position information, the horizontal center line and vertical center line of the minimum circumscribed rectangle are fitted, and the position information of the intersection of the two center lines is extracted;
[0043] The intersection of the two center lines is determined as the positioning reference point of the ice-covered conductor, and the coordinates of the positioning reference point are mapped to the preset robot motion coordinate system through coordinate transformation to generate the path control instructions of the end effector of the deicing mechanism.
[0044] Optionally, after performing centerline fitting based on the vertex position information of the minimum circumscribed rectangle, using the intersection of the fitted centerlines as the positioning coordinates of the ice-covered wire, and outputting them to a preset deicing robot to perform deicing work, the method further includes:
[0045] Determine the number of minimum bounding rectangles in the binary image marked by the minimum bounding rectangle;
[0046] When there are at least two minimum bounding rectangles in the binary image marked by the minimum bounding rectangle, fitting the minimum bounding circle of each minimum bounding rectangle according to the vertex position information of the minimum bounding rectangle;
[0047] Traverse the radius values of all minimum circumscribed circles and sort them, and determine the deicing priority of each section of ice-covered wire in the image to be identified based on the sorting results.
[0048] In a second aspect, an embodiment of the present invention provides an ice-covered wire identification system based on color thresholds and area conditions, including:
[0049] The color threshold setting module is used to construct a BGR color threshold model for ice coverage characteristics based on the collected color information of ice-covered conductors. The initial HSV color threshold interval is obtained through dynamic random sampling, and combined with the collected ambient brightness data, an HSV color threshold band with brightness adaptability is generated.
[0050] A dual mask operation module is used to perform a dual mask operation on the image to be identified using the BGR color threshold model and the HSV color threshold band to generate an initial mask image containing the ice-covered area. The brightness offset of the HSV color threshold band is dynamically adjusted based on the current ambient light intensity to perform mask correction on the initial mask image to obtain an optimal mask image that is resistant to light interference.
[0051] The minimum bounding rectangle marking module is used to perform an opening operation on the optimal mask image using a predefined morphological kernel structure, extract ice-covered connected areas that meet the preset area conditions, and generate the minimum bounding rectangle of the ice-covered area;
[0052] The ice-covered conductor positioning coordinate identification module is used to fit the center line according to the vertex position information of the minimum circumscribed rectangle, use the intersection of the fitted center line as the positioning coordinate of the ice-covered conductor, and output it to the preset de-icing robot to perform de-icing work.
[0053] In a third aspect, an embodiment of the present invention provides an ice-covered wire identification device based on color thresholding and morphological processing, the device being provided on a deicing robot, the device comprising:
[0054] camera;
[0055] Light sensor;
[0056] The processor connected to the camera and the photosensor is used to execute the above-mentioned steps of the ice-covered wire identification method based on color threshold and area conditions.
[0057] In a fourth aspect, an embodiment of the present invention provides a computer-readable medium having computer-executable instructions stored thereon, which, when executed by a processor, implement the above-mentioned steps of the method for identifying ice-covered conductors based on color thresholds and area conditions.
[0058] (3) Beneficial effects
[0059] The beneficial effects of the present invention are as follows: a method for identifying ice-covered conductors based on color threshold and area conditions of the present invention, by combining color threshold screening with area condition screening, can more accurately locate the target color block to which the ice-covered conductor belongs under a complex background, effectively eliminate the interference of color blocks that do not meet the conditions, and greatly improve the accuracy and pertinence of detection.
[0060] At the same time, the present invention also adopts a dual-color space threshold setting method, determines the BGR color threshold and HSV color threshold through multiple random samplings, and dynamically corrects the HSV color threshold band. In order to target the situations of single color and brightness changes, a double mask screening strategy is adopted to make color threshold screening more flexible and accurate, and adapt to various complex color environments. BRIEF DESCRIPTION OF THE DRAWINGS
[0061] Figure 1 A schematic flow chart of a method for identifying ice-covered conductors based on color thresholds and area conditions provided in one embodiment of the present invention;
[0062] Figure 2 A schematic diagram of an algorithm flow of an ice-covered conductor identification method based on color threshold and area conditions provided in one embodiment of the present invention;
[0063] Figure 3 An image of an ice-covered conductor and a de-icing effect diagram provided by an embodiment of the present invention;
[0064] Figure 4 An initial mask image after a double masking operation provided by an embodiment of the present invention;
[0065] Figure 5 The corrected optimal mask image provided by an embodiment of the present invention;
[0066] Figure 6 A binary image marked with a minimum circumscribed rectangle and a minimum circumscribed circle is provided in an embodiment of the present invention. DETAILED DESCRIPTION
[0067] In order to better explain the present invention and facilitate understanding, the present invention is described in detail below through specific implementation methods in conjunction with the accompanying drawings.
[0068] refer to Figures 1 to 5 As shown, an embodiment of the present invention proposes a method for identifying ice-covered conductors based on color thresholds and area conditions, which includes: constructing a BGR color threshold model of ice-covered features based on the collected color information of the ice-covered conductors, obtaining an initial HSV color threshold interval through dynamic random sampling, and generating an HSV color threshold band with brightness adaptability in combination with the collected ambient brightness data; performing a masking operation on the image to be identified using the BGR color threshold model and the HSV color threshold band to generate an initial mask image containing the ice-covered area; dynamically adjusting the brightness offset of the HSV color threshold band based on the current ambient light intensity to perform a secondary masking operation on the initial mask image to obtain an optimal mask image that is resistant to light interference; performing an opening operation on the optimal mask image using a predefined morphological kernel structure to extract ice-covered connected areas that meet a preset area condition and generate a minimum bounding rectangle of the ice-covered area; performing centerline fitting based on the vertex position information of the minimum bounding rectangle, using the intersection of the fitted centerlines as the positioning coordinates of the ice-covered conductor, and outputting them to a preset deicing robot to perform deicing.
[0069] Since this embodiment combines color threshold screening with area condition screening, it can more accurately locate the target color block to which the ice-covered wire belongs under a complex background, effectively eliminate the interference of color blocks that do not meet the conditions, and greatly improve the accuracy and pertinence of detection.
[0070] At the same time, this embodiment also adopts a dual-color space threshold setting method, determines the BGR color threshold and HSV color threshold through multiple random samplings, and dynamically corrects the HSV color threshold band. In order to target situations where the color is single and there are changes in brightness and darkness, a double mask screening strategy is adopted to make the color threshold screening more flexible and accurate, and adapt to various complex color environments.
[0071] To better understand the above technical solutions, exemplary embodiments of the present invention will be described in more detail below with reference to the accompanying drawings. Although exemplary embodiments of the present invention are shown in the accompanying drawings, it should be understood that the present invention can be implemented in various forms and should not be limited by the embodiments described herein. Rather, these embodiments are provided to enable a clearer and more thorough understanding of the present invention and to fully convey the scope of the present invention to those skilled in the art.
[0072] Specifically, refer to Figure 1 and Figure 2 As shown, an embodiment of the present invention proposes a method for identifying ice-covered wires based on color thresholds and area conditions, which includes:
[0073] S100: Construct a BGR color threshold model of ice-covered features based on the collected color information of ice-covered conductors, obtain an initial HSV color threshold interval through dynamic random sampling, and generate an HSV color threshold band with brightness adaptability in combination with the collected ambient brightness data.
[0074] In this embodiment, by designing the dual color channel threshold screening conditions of the BGR color threshold model and the HSV color threshold band, the target color block is screened based on the dual color threshold, so that the target color block to which the ice-covered wire belongs can be located more accurately under a complex background. The HSV color threshold band also has brightness adaptability, which can improve the segmentation stability of the target color block under the condition of lighting changes or background color interference.
[0075] In this embodiment, step S100 may include the following sub-steps S110 to S130:
[0076] S110 , obtaining BGR color pixel values of ice-covered areas in multiple frames of ice-covered conductor images according to dynamic random sampling, and establishing a BGR color threshold model of ice-covered features in the BGR color space.
[0077] Furthermore, step S110 includes steps S111 to S113:
[0078] S111 , collecting multiple frames of initial images of the ice-covered conductor and marking the boundary range of the ice-covered area.
[0079] For example, a camera and a high-definition camera mounted on a de-icing robot capture multiple frames of images of ice-covered conductors. Then, an appropriate number of ice-covered conductor images are selected based on a set definition. Finally, an automated annotation tool marks the boundaries of the ice-covered area in each frame of the ice-covered conductor image, ensuring that the color sampling position is confined to this boundary.
[0080] S112 , performing random sampling of non-overlapping sub-regions within the ice-covered region of each frame image, and extracting the BGR color pixel value of the selected sub-region during each sampling.
[0081] S113 , counting the extreme value distribution of BGR color pixel values, and obtaining a BGR color threshold model of the ice-covered area through Gaussian distribution calculation.
[0082] Among them, the mathematical expression of the BGR color threshold modulus is:
[0083]
[0084] In formula (1), B max , G max 、R max Represents the maximum value of the BGR three-channel color of the ice-covered area, B min , G min 、R min Represents the minimum value of the BGR three-channel color of the ice-covered area, μ B 、μ G 、μ R represents the mean of the BGR three-channel color of the sampled ice-covered area, k represents the confidence factor, σ B , σ G , σ R Represents the standard deviation of the BGR three-channel color of the sampled ice-covered area.
[0085] For each color channel (B / G / R), the extreme value dataset {x1, x2, ..., x n}.
[0086] Mean calculation:
[0087]
[0088] Standard deviation calculation:
[0089]
[0090] S120 , performing color space conversion based on the BGR color pixel value to generate corresponding HSV color components in the HSV color space.
[0091] HSV color components include hue, saturation, and value. These three parameters together define the position of a color component in the HSV color space.
[0092] S130. Obtain an initial HSV color threshold interval of the ice-covered area in the ice-covered wire image based on the HSV color component, and generate an HSV color threshold band with brightness adaptability in combination with the collected ambient brightness data.
[0093] S200. Perform a double masking operation on the image to be identified using the BGR color threshold model and the HSV color threshold band to generate an initial mask image containing the ice-covered area. Dynamically adjust the brightness offset of the HSV color threshold band based on the current ambient light intensity to perform mask correction on the initial mask image to obtain an optimal mask image that is resistant to light interference.
[0094] In this embodiment, step S200 may include the following sub-steps S210 to S240:
[0095] S210 , obtaining BGR color components and HSV color components of all pixels in the image to be identified.
[0096] S220 , determining whether the BGR color component satisfies the threshold condition of the BGR color threshold model and determining whether the HSV color component satisfies the HSV color threshold band.
[0097] S230. When the BGR color component does not satisfy the threshold condition of the BGR color threshold model and the HSV color component does not satisfy the HSV color threshold band, a double mask operation is performed on the pixels corresponding to the BGR color component and the HSV color component to generate an initial mask image containing the ice-covered area.
[0098] Among them, the calculation formula of the double mask operation is:
[0099]
[0100] In formula (4), D represents the mask function, x is the pixel of the input image, and T min Represents the minimum value of the BGR threshold range, T max Represents the maximum value of the BGR threshold range, T x Represents the BGR value at pixel x, H min Represents the minimum hue value of the HSV threshold range, H max Represents the maximum hue value of the HSV threshold range, H x Represents the hue value at pixel x, V min Represents the maximum brightness value of the HSV threshold range, V max Represents the maximum brightness value of the HSV threshold range, V x Represents the brightness value at pixel x.
[0101] S240 , dynamically adjusting the brightness offset of the HSV color threshold band based on the current ambient light intensity to perform mask correction on the initial mask image to obtain an optimal mask image that is resistant to light interference.
[0102] In a specific embodiment, Figure 3 When applying the masking operation to the ice-covered conductor shown in the figure, the BGR color threshold of the ice-covered conductor is first calculated, and the BGR color threshold range is obtained as (24, 37, 33) to (103, 93, 93). Identify the ice-covered conductor in the figure. Then, based on the BGR color threshold range, apply the masking operation to obtain a primary mask image. Next, use the HSV color threshold band to apply the mask to the existing background interference color blocks (other non-contact wires) to obtain a secondary mask image, as shown in Figure 1. Figure 4 Finally, the brightness offset of the HSV color threshold band is dynamically adjusted based on the current ambient light intensity to perform mask correction on the initial mask image and obtain the optimal mask image that is resistant to light interference, as shown in Figure 5 shown.
[0103] S300: Performing an opening operation on the optimal mask image using a predefined morphological kernel structure to extract ice-covered connected areas that meet a preset area condition, and generating a minimum circumscribed rectangle of the ice-covered area.
[0104] In this embodiment, step S300 may include the following sub-steps S310 to S340:
[0105] S310 , using a predefined morphological kernel structure, performing an opening operation including image erosion and image dilation on the optimal mask image to generate a binary image of the image to be identified.
[0106] For example, a 7×7 matrix kernel is used to perform four opening operations on the input optimal mask image. First, an erosion operation is performed on the input optimal mask image to remove small noise points and burrs. Then, a dilation operation is performed on the processed image to restore the target shape.
[0107] Among them, the calculation formula of the corrosion operation is:
[0108]
[0109] In formula (5), A represents the input image, B represents the morphological operation kernel, and Bz represents the symmetric matrix operation kernel of the structure element B about the origin z.
[0110] The calculation formula of the expansion operation is:
[0111]
[0112] S320: According to the number and length of the white blocks in the binary image, retrieve the ice-covered area value corresponding to the white blocks from a preset database, wherein the length of the white blocks is positively correlated with the actual ice area value.
[0113] S330: Compare the difference between the area value of the white block and the area value of the ice-covered area of the corresponding length of the white block with a set threshold, and determine whether the white block is an ice-covered area based on the comparison result.
[0114] S340: When the difference between the area value of the white block and the area value of the ice-covered area of the corresponding length of the white block is less than a set threshold, the white block is determined to be an ice-covered area, and a minimum circumscribed rectangle of the ice-covered area is generated.
[0115] For example, in the same frame of binary image, there is a 50*100 pixel interfering white block and a 10*100 pixel white block of ice-covered wire. When these two white blocks have the same length value, the area value of the ice-covered area called from the data is 10*100±50 pixels. Based on the area value of the ice-covered area, the 50*100 pixel interfering white block is screened out as not belonging to the ice-covered wire, which greatly improves the accuracy and specificity of ice-covered wire detection.
[0116] S400: performing centerline fitting based on vertex position information of the minimum circumscribed rectangle, using the intersection of the fitted centerlines as the positioning coordinates of the ice-covered conductor, and outputting them to a preset deicing robot to perform deicing work.
[0117] In this embodiment, step S400 may include the following sub-steps S410 to S430:
[0118] S410: Obtain vertex position information of a minimum bounding rectangle.
[0119] When fitting a minimum bounding rectangle (MBR) around an ice-covered conductor, the length of the conductor is used for fitting. Using the geometric principles of rectangles, the relative positions of the four vertices of the MBR are determined. A plane coordinate system is established with any point in the image as the origin. By calculating the pixel distance between the origin and the ends of the ice-covered conductor, the positions of the two diagonal vertices of the MBR are obtained. The positions of the other two diagonal vertices can then be calculated based on the geometric principles of rectangles.
[0120] S420 . Fit the horizontal center line and the vertical center line of the minimum circumscribed rectangle according to the vertex position information, and extract the position information of the intersection of the two center lines.
[0121] S430: Determine the intersection of the two center lines as the positioning reference point of the ice-covered conductor, and map the coordinates of the positioning reference point to a preset robot motion coordinate system through coordinate conversion to generate a path control instruction for the end effector of the deicing mechanism.
[0122] In this embodiment, after step S400, steps S510 to S530 are further included:
[0123] S510: Determine the number of minimum bounding rectangles in the binary image marked by the minimum bounding rectangles.
[0124] S520 : When there are at least two minimum bounding rectangles in the binary image marked by the minimum bounding rectangle, fit the minimum bounding circle of each minimum bounding rectangle according to the vertex position information of the minimum bounding rectangle.
[0125] S530: Traverse and sort the radius values of all minimum circumscribed circles, and determine the deicing priority of each section of ice-covered wire in the image to be identified according to the sorting result.
[0126] In one specific implementation, Figure 5 The number of white blocks in the binary image of the ice-covered conductor shown is counted, and the number of white blocks (ice-covered conductor segments) is obtained to be five. Then, all white blocks are traversed to perform minimum circumscribed rectangle marking, and the vertex position information of each minimum circumscribed rectangle is obtained. Next, the horizontal center line and vertical center line of each minimum circumscribed rectangle are fitted, and the position information of the intersection of the two center lines is extracted. Finally, the minimum circumscribed circle of each minimum circumscribed rectangle is fitted, and the deicing priority of each segment of the ice-covered conductor is determined according to the radius value of the minimum circumscribed circle. The deicing action is performed first for the largest radius value. The marking effect diagram of the minimum circumscribed rectangle and the minimum circumscribed circle is shown as follows: Figure 6 shown.
[0127] In addition, an embodiment of the present invention provides an ice-covered wire identification system based on color threshold and area conditions, which includes:
[0128] The color threshold setting module is used to construct a BGR color threshold model of ice coverage characteristics based on the collected color information of ice-covered conductors. The initial HSV color threshold interval is obtained through dynamic random sampling, and combined with the collected environmental brightness data, an HSV color threshold band with brightness adaptability is generated.
[0129] The dual mask operation module is used to perform a dual mask operation on the image to be identified using the BGR color threshold model and the HSV color threshold band to generate an initial mask image containing the ice-covered area. The brightness offset of the HSV color threshold band is dynamically adjusted based on the current ambient light intensity to perform mask correction on the initial mask image and obtain an optimal mask image that is resistant to light interference.
[0130] The minimum bounding rectangle marking module is used to perform opening operation on the optimal mask image using a predefined morphological kernel structure, extract the ice-covered connected area that meets the preset area conditions, and generate the minimum bounding rectangle of the ice-covered area.
[0131] The ice-covered conductor positioning coordinate identification module is used to fit the center line according to the vertex position information of the minimum circumscribed rectangle, use the intersection of the fitted center line as the positioning coordinate of the ice-covered conductor, and output it to the preset de-icing robot to perform de-icing work.
[0132] In addition, an embodiment of the present invention proposes an ice-covered wire identification device based on color threshold and morphological processing. The device is set on a de-icing robot and includes: a camera for capturing images of ice-covered wires; a photosensitive sensor for collecting brightness data of the current environment; and a processor connected to the camera and the photosensitive sensor for executing the above-mentioned steps of the ice-covered wire identification method based on color threshold and area conditions.
[0133] Finally, an embodiment of the present invention proposes a computer-readable medium having computer-executable instructions stored thereon. When the executable instructions are executed by a processor, the above-mentioned steps of the method for identifying ice-covered wires based on color thresholds and area conditions are implemented.
[0134] In summary, this embodiment proposes a method, system, device and medium for identifying ice-covered conductors based on color thresholds and area conditions. First, this embodiment uses dual-type color thresholds and area conditions to screen the ice-covered conductor area, which can more accurately locate the target color block (ice-covered conductor) under complex backgrounds, effectively eliminate the interference of color blocks that do not meet the conditions, and greatly improve the accuracy and pertinence of detection. Secondly, a dynamic threshold setting method is adopted to determine the color threshold through multiple random samplings, and different screening strategies are adopted for different situations such as single color and brightness changes, so that the color threshold screening is more flexible and accurate, and adaptable to various complex color environments. Finally, the opening operation is used to effectively suppress image noise. At the same time, by calculating the center line of the rectangle and the circumscribed circle, the geometric features of the color block (ice-covered conductor) are accurately extracted to calculate the center coordinates of the color block, providing a reliable basis for the de-icing robot to calculate the position coordinates of the ice-covered conductor.
[0135] Since the systems / devices described in the above embodiments of the present invention are systems / devices used to implement the methods of the above embodiments of the present invention, those skilled in the art will be able to understand the specific structures and variations of these systems / devices based on the methods described in the above embodiments of the present invention, and thus will not be described in detail here. All systems / devices used in the methods of the above embodiments of the present invention are within the scope of protection of the present invention.
[0136] Those skilled in the art will appreciate that embodiments of the present invention may be provided as methods, systems, or computer program products. Thus, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to magnetic disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0137] The present invention is described with reference to flowcharts and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It should be understood that each process and / or block in the flowcharts and / or block diagrams, as well as combinations of processes and / or blocks in the flowcharts and / or block diagrams, can be implemented by computer program instructions.
[0138] It should be noted that, in the description of the present invention, the word "a" or "an" preceding a component does not exclude the presence of a plurality of such components. The present invention can be implemented by means of hardware comprising several distinct components and by means of a suitably programmed computer. The use of the words first, second, third, etc., is merely for convenience and does not imply any order. These words should be understood as part of the component name.
[0139] In addition, it should be noted that, in the description of this specification, the description of the terms "one embodiment", "some embodiments", "embodiment", "example", "specific example" or "some examples" means 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 invention. 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 and the features of different embodiments or examples, unless they are contradictory.
[0140] Although preferred embodiments of the present invention have been described, those skilled in the art will be able to make additional changes and modifications to these embodiments after obtaining the basic inventive concepts.
[0141] Obviously, those skilled in the art can make various modifications and variations to the present invention without departing from the spirit and scope of the invention.
Claims
1. A method for identifying ice-covered wires based on color threshold and area conditions, characterized in that: include: Based on the collected color information of ice-covered conductors, a BGR color threshold model for ice coverage characteristics is constructed. The initial HSV color threshold interval is obtained through dynamic random sampling. Combined with the collected ambient brightness data, an HSV color threshold band with brightness adaptability is generated. A double masking operation is performed on the image to be identified using the BGR color threshold model and the HSV color threshold band to generate an initial mask image containing the ice-covered area. The brightness offset of the HSV color threshold band is dynamically adjusted based on the current ambient light intensity to perform mask correction on the initial mask image and obtain an optimal mask image that is resistant to light interference. The optimal mask image is opened using a predefined morphological kernel structure to extract the ice-covered connected area that meets the preset area conditions and generate the minimum bounding rectangle of the ice-covered area. The centerline is fitted according to the vertex position information of the minimum circumscribed rectangle, and the intersection of the fitted centerline is used as the positioning coordinate of the ice-covered wire and output to the preset deicing robot to perform deicing work.
2. The method according to claim 1, wherein Based on the collected color information of ice-covered conductors, a BGR color threshold model for ice coverage characteristics is constructed. The initial HSV color threshold interval is obtained through dynamic random sampling. Combined with the collected ambient brightness data, the HSV color threshold band with brightness adaptability is generated, including: The BGR color pixel values of the ice-covered area in multiple frames of ice-covered wire images are obtained by dynamic random sampling, and a BGR color threshold model of ice-covered features is established in the BGR color space. Performing color space conversion based on the BGR color pixel value to generate a corresponding HSV color component in the HSV color space; According to the HSV color components, the initial HSV color threshold interval of the ice-covered area in the ice-covered wire image is obtained, and combined with the collected environmental brightness data, an HSV color threshold band with brightness adaptability is generated.
3. The method according to claim 1, wherein The BGR color pixel values of the ice-covered area in multiple frames of ice-covered wire images are obtained by dynamic random sampling, and a BGR color threshold model for ice-covered features is established in the BGR color space, including: Collect multiple frames of initial images of the ice-covered conductor and mark the boundary of the ice-covered area; In the ice-covered area of each frame image, random sampling of non-overlapping sub-areas is performed, and the BGR color pixel value of the selected sub-area is extracted each time; The extreme value distribution of BGR color pixel values is counted, and the BGR color threshold model of the ice-covered area is obtained through Gaussian distribution calculation; Among them, the mathematical expression of the BGR color threshold modulus is: Where B max , G max 、R max Represents the maximum value of the BGR three-channel color of the ice-covered area, B min , G min 、R min Represents the minimum value of the BGR three-channel color of the ice-covered area, μ B 、μ G 、μ R represents the mean of the BGR three-channel color of the sampled ice-covered area, k represents the confidence factor, σ B , σ G , σ R Represents the standard deviation of the BGR three-channel color of the sampled ice-covered area.
4. The method according to claim 1, wherein The image to be identified is double-masked using the BGR color threshold model and the HSV color threshold band to generate an initial mask image containing the ice-covered area. The brightness offset of the HSV color threshold band is dynamically adjusted based on the current ambient light intensity to perform mask correction on the initial mask image. The optimal mask image that is resistant to light interference is obtained, including: Get the BGR color components and HSV color components of all pixels in the image to be identified; Determine whether the BGR color component meets the threshold condition of the BGR color threshold model and whether the HSV color component meets the HSV color threshold band; When the BGR color component does not meet the threshold condition of the BGR color threshold model and the HSV color component does not meet the HSV color threshold band, a double mask operation is performed on the pixels corresponding to the BGR color component and the HSV color component to generate an initial mask image containing the ice-covered area; Dynamically adjust the brightness offset of the HSV color threshold band based on the current ambient light intensity to perform mask correction on the initial mask image and obtain the optimal mask image that is resistant to light interference; Among them, the calculation formula of the double mask operation is: Where D represents the mask function, x is the pixel of the input image, and T min Represents the minimum value of the BGR threshold range, T max Represents the maximum value of the BGR threshold range, T x Represents the BGR value at pixel x, H min Represents the minimum hue value of the HSV threshold range, H max Represents the maximum hue value of the HSV threshold range, H x Represents the hue value at pixel x, V min Represents the maximum brightness value of the HSV threshold range, V max Represents the maximum brightness value of the HSV threshold range, V x Represents the brightness value at pixel x.
5. The method according to claim 1, wherein The optimal mask image is opened using a predefined morphological kernel structure to extract the ice-covered connected area that meets the preset area conditions, and the minimum bounding rectangle of the ice-covered area is generated, including: Using a predefined morphological kernel structure, the optimal mask image is processed with an opening operation including image erosion and image dilation to generate a binary image of the image to be identified; According to the number and length of white blocks in the binary image, the ice-covered area value corresponding to the white block is called from the preset database; Compare the difference between the area value of the white block and the area value of the ice-covered area of the corresponding length of the white block with a set threshold, and determine whether the white block is an ice-covered area based on the comparison result; When the difference between the area value of the white block and the area value of the ice-covered area of the corresponding length of the white block is less than a set threshold, the white block is determined to be an ice-covered area, and the minimum circumscribed rectangle of the ice-covered area is generated.
6. The method according to claim 1, wherein The centerline is fitted based on the vertex position information of the minimum circumscribed rectangle. The intersection of the fitted centerline is used as the positioning coordinate of the ice-covered wire and output to the preset deicing robot to perform deicing work, including: Get the vertex position information of the minimum enclosing rectangle; According to the vertex position information, the horizontal center line and vertical center line of the minimum circumscribed rectangle are fitted, and the position information of the intersection of the two center lines is extracted; The intersection of the two center lines is determined as the positioning reference point of the ice-covered conductor, and the coordinates of the positioning reference point are mapped to the preset robot motion coordinate system through coordinate transformation to generate the path control instructions of the end effector of the deicing mechanism.
7. The method according to claim 1, wherein After performing centerline fitting based on the vertex position information of the minimum circumscribed rectangle, using the intersection of the fitted centerlines as the positioning coordinates of the ice-covered conductor, and outputting them to a preset deicing robot for performing deicing work, the method further includes: Determine the number of minimum bounding rectangles in the binary image marked by the minimum bounding rectangle; When there are at least two minimum bounding rectangles in the binary image marked by the minimum bounding rectangle, fitting the minimum bounding circle of each minimum bounding rectangle according to the vertex position information of the minimum bounding rectangle; Traverse the radius values of all minimum circumscribed circles and sort them, and determine the deicing priority of each section of ice-covered wire in the image to be identified based on the sorting results.
8. An ice-covered wire identification system based on color threshold and area conditions, characterized in that: include: The color threshold setting module is used to construct a BGR color threshold model for ice coverage characteristics based on the collected color information of ice-covered conductors. The initial HSV color threshold interval is obtained through dynamic random sampling, and combined with the collected ambient brightness data, an HSV color threshold band with brightness adaptability is generated. A dual mask operation module is used to perform a dual mask operation on the image to be identified using the BGR color threshold model and the HSV color threshold band to generate an initial mask image containing the ice-covered area. The brightness offset of the HSV color threshold band is dynamically adjusted based on the current ambient light intensity to perform mask correction on the initial mask image to obtain an optimal mask image that is resistant to light interference. The minimum bounding rectangle marking module is used to perform an opening operation on the optimal mask image using a predefined morphological kernel structure, extract ice-covered connected areas that meet the preset area conditions, and generate the minimum bounding rectangle of the ice-covered area; The ice-covered conductor positioning coordinate identification module is used to fit the center line according to the vertex position information of the minimum circumscribed rectangle, use the intersection of the fitted center line as the positioning coordinate of the ice-covered conductor, and output it to the preset de-icing robot to perform de-icing work.
9. An ice-covered wire identification device based on color threshold and morphological processing, the device is set on a de-icing robot, characterized in that: include: camera; Light sensor; A processor connected to the camera and the photosensor is used to execute the steps of the ice-covered wire identification method based on color threshold and area conditions as described in any one of claims 1 to 7.
10. A computer-readable medium having computer-executable instructions stored thereon, characterized in that: When the executable instructions are executed by the processor, the steps of the method for identifying ice-covered wires based on color thresholds and area conditions are implemented as described in any one of claims 1 to 7.
Citation Information
Patent Citations
Real-time identification method of hickory nut fruits in image based on machine vision
CN112507911A
Rice color sorting method based on improved center positioning method and HSV color model
CN115382782A
Power transmission line insulator icing type identification method and device and storage medium
CN118470443A
Furrow identification and navigation line extraction method of self-propelled transportation platform for ridge planting vegetables
CN119723343A
Method and device for determining color and electronic apparatus
JP2018196111A