An ice-coated conductor recognition method, system, device and medium based on color threshold and area conditions

By constructing BGR and HSV color threshold models and combining them with environmental brightness data and morphological processing, accurate identification of icy guide wires in complex backgrounds was achieved, solving the problems of low accuracy and poor environmental adaptability in existing technologies, and improving the identification accuracy and positioning accuracy of de-icing robots.

CN120599320BActive Publication Date: 2026-03-24SHAOYANG UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-04-09
Publication Date
2026-03-24

AI Technical Summary

Technical Problem

Existing technologies for identifying icy conductors suffer from low accuracy and poor environmental adaptability. They are particularly difficult to identify icy conductors in complex backgrounds and are easily affected by changes in lighting and background color.

Method used

A recognition method based on color threshold and area conditions is adopted. By constructing BGR and HSV color threshold models, and combining them with environmental brightness data to generate an adaptive threshold band, a double masking operation is performed. The minimum bounding rectangle of the icing area is extracted by combining morphological kernel structure, and the center line positioning coordinates are fitted.

Benefits of technology

It improves the accuracy and targeting of ice-covered wire identification, effectively eliminates interfering color blocks, adapts to complex environments, reduces false alarm rate, and ensures accurate positioning and de-icing effect of the de-icing robot.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120599320B_ABST
    Figure CN120599320B_ABST
Patent Text Reader

Abstract

The present application relates to a kind of ice-coated conductor identification method, system, equipment and medium based on color threshold and area condition, method includes: by establishing BGR color threshold model and the HSV color threshold band region with brightness adaptability to the image to be identified is carried out double mask operation, and based on current ambient light intensity dynamically adjusts the brightness offset of HSV color threshold band region, to generate initial mask image is carried out mask correction, obtain optimal mask image;The optimal mask image is carried out open operation processing, extracts the ice-coated connected region satisfying preset area condition, and generates the minimum circumscribed rectangle of ice-coated region;According to the vertex position information of minimum circumscribed rectangle, center line fitting is carried out, and the intersection point of the center line fitted is used as the positioning coordinate of ice-coated conductor, and is output to the deicing robot of preestablished to carry out deicing work.The present application solves the technical problems of low accuracy and poor environmental adaptability existing in the prior art of ice-coated conductor identification.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of image target recognition, and in particular to an icing conductor recognition method, system, device and medium based on color threshold and area condition. BACKGROUND

[0002] In the power system in cold regions, icing of the conductor of the railway overhead contact system will increase the load of the line and change the sag, thereby seriously affecting the normal operation of the overhead contact system. The existing method is to use an automatic deicing robot to deice the icing conductor. However, the prerequisite for the deicing automation of the deicing robot is to accurately recognize the icing conductor.

[0003] The existing technology for recognizing the icing conductor mainly uses image recognition technology. However, the image recognition technology mainly relies on single-type color threshold segmentation and traditional target detection algorithms, and has the following defects:

[0004] (1) The mask method based on single-type color threshold sets a specific color space threshold to segment the target. However, it cannot filter specific area color blocks, so that small-area interference objects (such as birds and leaves) or large-area background noise (such as the sky and mountains) are misjudged as icing targets, thereby causing a high false alarm rate.

[0005] (2) Since the icing conductor is in the shape of a long strip, it is difficult for an algorithm relying on rectangular frame detection (such as YOLO and Faster R-CNN) to accurately fit the main body of the conductor, and the positioning accuracy is low, and it is easily disturbed by complex backgrounds (such as towers and vegetation), which causes false detection or missed detection.

[0006] (3) The single-type color threshold method is sensitive to the environment, and changes in illumination or background color interference (such as white buildings and snow) will significantly reduce the segmentation stability. SUMMARY

[0007] (1) Technical problems to be solved

[0008] In view of the above-mentioned defects and shortcomings of the prior art, the present application provides an icing conductor recognition method, system, device and medium based on color threshold and area condition, which solves the technical problems of low accuracy and poor environmental adaptability of the existing icing conductor recognition technology.

[0009] (2) Technical solutions

[0010] In order to achieve the above-mentioned purposes, the main technical solutions adopted by the present application include:

[0011] In a first aspect, the present application provides an icing conductor recognition method based on color threshold and area condition, comprising:

[0012] A BGR color threshold model of icing features is constructed according to the color information of the collected icing conductor, an initial HSV color threshold interval is obtained through dynamic random sampling, and an HSV color threshold band with luminance adaptability is generated in combination with the collected environmental luminance data;

[0013] The initial mask image containing the icing area is generated through the double mask operation of the BGR color threshold model and the HSV color threshold band on the image to be recognized, the luminance offset of the HSV color threshold band is dynamically adjusted based on the current environmental light intensity, the initial mask image is corrected through mask, and the optimal mask image resistant to light interference is obtained;

[0014] The open operation is performed on the optimal mask image by using a predefined morphological kernel structure, the icing connected region meeting the preset area condition is extracted, and the minimum circumscribed rectangle of the icing area is generated;

[0015] The center line fitting is performed according to the vertex position information of the minimum circumscribed rectangle, the intersection point of the fitted center line is taken as the positioning coordinate of the icing conductor, and is output to the preset deicing robot to perform deicing work.

[0016] Optionally, the BGR color threshold model of icing features is constructed according to the color information of the collected icing conductor, the initial HSV color threshold interval is obtained through dynamic random sampling, and the HSV color threshold band with luminance adaptability is generated in combination with the collected environmental luminance data, which includes:

[0017] The BGR color pixel values of the icing area in the multiple frames of icing conductor images are obtained through dynamic random sampling, and the BGR color threshold model of the icing features is established in the BGR color space;

[0018] The color space conversion is performed based on the BGR color pixel values, and the HSV color components of the corresponding HSV color space are generated;

[0019] The initial HSV color threshold interval of the icing area in the icing conductor image is obtained according to the HSV color components, and the HSV color threshold band with luminance adaptability is generated in combination with the collected environmental luminance data.

[0020] Optionally, the BGR color threshold model of icing features is constructed according to the color information of the collected icing conductor, the initial HSV color threshold interval is obtained through dynamic random sampling, and the HSV color threshold band with luminance adaptability is generated in combination with the collected environmental luminance data, which includes:

[0021] Multiple initial images of the icing conductor are collected, and the boundary range of the icing area is marked;

[0022] The BGR color pixel values of the selected sub-region are extracted through random sampling of the non-overlapping sub-region in the icing area of each image;

[0023] The extreme value distribution of the BGR color pixel value is counted, and a BGR color threshold model of the icing area is obtained through Gaussian distribution calculation;

[0024] The mathematical expression of the BGR color threshold model is as follows:

[0025]

[0026] In the formula, B max , G max , and R max represent the maximum values of the BGR three-channel colors of the icing area, B min , G min , and R min represent the minimum values of the BGR three-channel colors of the icing area, μ B , μ G , and μ R represent the mean values of the BGR three-channel colors of the icing area, k represents a confidence factor, and σ B , σ G , and σ R represent the standard deviations of the BGR three-channel colors of the icing area.

[0027] Optionally, the BGR color threshold model and the HSV color threshold band are used for double mask operation on the to-be-identified image to generate an initial mask image containing the icing area, the brightness offset of the HSV color threshold band is dynamically adjusted based on the current ambient light intensity, the initial mask image is corrected through mask operation, and an optimal mask image resistant to light interference is obtained.

[0028] The BGR color components and the HSV color components of all pixels in the to-be-identified image are obtained.

[0029] It is determined whether the BGR color components satisfy the threshold condition of the BGR color threshold model and whether the HSV color components satisfy the HSV color threshold band.

[0030] In the case that the BGR color components do not satisfy the threshold condition of the BGR color threshold model and the HSV color components do not satisfy the HSV color threshold band, the pixels corresponding to the BGR color components and the HSV color components are subjected to double mask operation to generate an initial mask image containing the icing area.

[0031] The brightness offset of the HSV color threshold band is dynamically adjusted based on the current ambient light intensity, the initial mask image is corrected through mask operation, and an optimal mask image resistant to light interference is obtained.

[0032] The calculation formula of the double mask operation is as follows:

[0033]

[0034] In the formula, D represents a mask function, x is a pixel of an input image, T min represents the minimum value of a BGR threshold range, T max represents the maximum value of a BGR threshold range, T x represents the BGR value at pixel x, H min represents the minimum hue value of an HSV threshold range, H max represents the maximum hue value of an HSV threshold range, H x represents the hue value at pixel x, V min represents the maximum value of an HSV threshold range, V max represents the maximum value of an HSV threshold range, V x represents the value of the brightness at pixel x.

[0035] Optionally, the optimal mask image is subjected to an opening operation processing by using a predefined morphological kernel structure, an icing connected region satisfying a preset area condition is extracted, and a minimum circumscribed rectangle of the icing region is generated.

[0036] The optimal mask image is subjected to an opening operation processing including image erosion and image dilation by using a predefined morphological kernel structure, and a binary image of the to-be-recognized image is generated.

[0037] According to the number and length value of the white color block in the binary image, an icing region area value corresponding to the white color block is called from a preset database;

[0038] The difference between the area value of the white color block and the icing region area value corresponding to the length of the white color block is compared with a set threshold value, and whether the white color block is an icing region is judged according to the comparison result.

[0039] When the difference between the area value of the white color block and the icing region area value corresponding to the length of the white color block is less than the set threshold value, the white color block is determined to be an icing region, and a minimum circumscribed rectangle of the icing region is generated.

[0040] Optionally, a center line fitting is performed according to the vertex position information of the minimum circumscribed rectangle, an intersection point of the fitted center line is taken as a positioning coordinate of an icing conductor, and the positioning coordinate is output to a preset deicing robot to perform deicing work.

[0041] The vertex position information of the minimum circumscribed rectangle is acquired.

[0042] According to the vertex position information, a horizontal center line and a vertical center line of the minimum circumscribed rectangle are fitted, and position information of an intersection point of the two center lines is extracted.

[0043] The intersection of the two center lines is determined as a positioning reference point of the iced conductor, and the coordinates of the positioning reference point are mapped to a preset robot motion coordinate system through coordinate conversion to generate path control instructions of the end effector of the deicing mechanism.

[0044] Optionally, after fitting the center line according to the vertex position information of the minimum bounding rectangle, taking the intersection of the fitted center line as the positioning coordinates of the iced conductor, and outputting to a preset deicing robot to perform deicing work, the method further comprises:

[0045] judging the number of minimum bounding rectangles in the binary image marked by the minimum bounding rectangles;

[0046] when there are at least two minimum bounding rectangles in the binary image marked by the minimum bounding rectangles, fitting a minimum circumscribed circle of each minimum bounding rectangle according to the vertex position information of the minimum bounding rectangle;

[0047] sorting the radius values of all the minimum circumscribed circles, and determining the deicing priority of each section of the iced conductor in the image to be recognized according to the sorting result.

[0048] In a second aspect, an embodiment of the present application provides an iced conductor recognition system based on color threshold and area condition, comprising:

[0049] a color threshold setting module configured to construct a BGR color threshold model of iced features according to color information of the collected iced conductor, obtain an initial HSV color threshold interval through dynamic random sampling, and generate an HSV color threshold band with luminance adaptability in combination with collected environmental luminance data;

[0050] a double mask operation module configured to perform double mask operation on the image to be recognized through the BGR color threshold model and the HSV color threshold band to generate an initial mask image containing the iced area, dynamically adjust the luminance offset of the HSV color threshold band based on the current ambient light intensity to correct the initial mask image through mask operation, and obtain an optimal mask image resistant to light interference;

[0051] a minimum bounding rectangle marking module configured to perform opening operation processing on the optimal mask image using a predefined morphological kernel structure, extract iced connected regions satisfying a preset area condition, and generate minimum bounding rectangles of the iced regions;

[0052] an iced conductor positioning coordinate recognition module configured to fit a center line according to vertex position information of the minimum bounding rectangle, take the intersection of the fitted center line as the positioning coordinates of the iced conductor, and output to a preset deicing robot to perform deicing work.

[0053] In a third aspect, the embodiment of the present application provides an icing conductor identification device based on color threshold and morphological processing, which is arranged on a deicing robot, and comprises:

[0054] a camera;

[0055] a photosensitive sensor;

[0056] a processor connected with the camera and the photosensitive sensor, used for executing the icing conductor identification method steps based on color threshold and area condition as described above.

[0057] In a fourth aspect, the embodiment of the present application provides a computer readable medium, which stores computer executable instructions, and the executable instructions are executed by a processor to realize the icing conductor identification method steps based on color threshold and area condition as described above.

[0058] (III) Beneficial Effects

[0059] The beneficial effects of the present application are that the icing conductor identification method based on color threshold and area condition can more accurately locate the target color block of the icing conductor in a complex background by combining color threshold screening with area condition screening, effectively eliminates the interference of color blocks that do not meet the conditions, and greatly improves the accuracy and pertinence of detection.

[0060] Meanwhile, the present application also adopts a threshold setting method of double color space, determines the BGR color threshold and the HSV color threshold through multiple random sampling, and dynamically corrects the HSV color threshold band, so as to take a double mask screening strategy for the case of single color and light and dark changes, so that the color threshold screening is more flexible and accurate, and adapts to various complex color environments. BRIEF DESCRIPTION OF DRAWINGS

[0061] Figure 1 A flowchart of an icing conductor identification method based on color threshold and area condition provided by an embodiment of the present application;

[0062] Figure 2 An algorithm flowchart of an icing conductor identification method based on color threshold and area condition provided by an embodiment of the present application;

[0063] Figure 3 An icing conductor image and a deicing effect diagram provided by an embodiment of the present application;

[0064] Figure 4 An initial mask image after double mask operation provided by an embodiment of the present application;

[0065] Figure 5 An optimal mask image after correction provided by an embodiment of the present application;

[0066] Figure 6 A binary image marked by a minimum circumscribed rectangle and a minimum circumscribed circle provided by an embodiment of the present application. DETAILED DESCRIPTION

[0067] In order to better explain the present application, so as to be understood, the present application is described in detail below by specific embodiments in combination with the accompanying drawings.

[0068] Reference Figures 1 to 5 As shown in the drawings, the ice-coated conductor recognition method based on color threshold and area condition provided by the embodiment of the present application comprises: constructing a BGR color threshold model of ice-coated features according to the color information of the collected ice-coated conductor, obtaining an initial HSV color threshold interval through dynamic random sampling, and combining the collected ambient brightness data to generate an HSV color threshold band with brightness adaptability; performing mask operation on the image to be recognized through the BGR color threshold model and the HSV color threshold band to generate an initial mask image containing the ice-coated area, dynamically adjusting the brightness offset of the HSV color threshold band based on the current ambient light intensity to perform secondary mask operation on the initial mask image to obtain an optimal mask image resistant to light interference; performing opening operation processing on the optimal mask image using a predefined morphological kernel structure to extract the ice-coated connected area satisfying the preset area condition and generate the minimum circumscribed rectangle of the ice-coated area; fitting the center line according to the vertex position information of the minimum circumscribed rectangle, taking the intersection point of the fitted center line as the positioning coordinates of the ice-coated conductor, and outputting to the preset deicing robot to perform deicing work.

[0069] The embodiment combines color threshold screening with area condition screening, which can more accurately locate the target color block to which the ice-coated conductor belongs in a complex background, effectively excludes color block interference that does not meet the condition, and greatly improves the accuracy and pertinence of detection.

[0070] Meanwhile, the embodiment also adopts a double-color space threshold setting method, determines the BGR color threshold and the HSV color threshold through multiple random sampling, and dynamically corrects the HSV color threshold band, so as to take a double mask screening strategy for the case of single color and brightness change, make the color threshold screening more flexible and accurate, and adapt to various complex color environments.

[0071] In order to better understand the above technical solutions, exemplary embodiments of the present application will be described in more detail below with reference to the accompanying drawings. Although the exemplary embodiments of the present application are shown in the drawings, it should be understood that the present application can be implemented in various forms and should not be limited by the embodiments described herein. On the contrary, these embodiments are provided in order to enable a clearer, more thorough understanding of the present application and to convey the complete scope of the present application to those skilled in the art.

[0072] Specifically, referring to Figure 1 and Figure 2 The embodiment of the present application proposes an ice-coated conductor recognition method based on color threshold and area condition, which comprises:

[0073] S100, constructing a BGR color threshold model of ice-coated conductor characteristics according to the collected color information of the ice-coated conductor, 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 environmental brightness data.

[0074] In the embodiment, the double-color channel threshold screening condition of the BGR color threshold model and the HSV color threshold band is designed, so that the target color block is screened based on the double-color threshold, and the target color block belonging to the ice-coated conductor can be more accurately located in a complex background. In addition, the HSV color threshold band has brightness adaptability, so as to improve the segmentation stability of the target color block in the case of light change or background color interference.

[0075] In the embodiment, step S100 can comprise the following sub-steps S110 to S130:

[0076] S110, obtaining the BGR color pixel value of the ice-coated area in the multiple frames of ice-coated conductor images according to dynamic random sampling, and establishing a BGR color threshold model of the ice-coated conductor characteristics in the BGR color space.

[0077] Further, step S110 comprises steps S111 to S113:

[0078] S111, collecting multiple initial images of the ice-coated conductor, and marking the boundary range of the ice-coated area.

[0079] For example, the camera and high-definition camera arranged on the de-icing robot are used to collect multiple frames of conductor images with ice-coated condition. Then, a proper number of ice-coated conductor images are screened based on the set definition. Finally, the boundary range of the ice-coated area in each frame of ice-coated conductor image is marked by using an automatic labeling tool, so as to limit the color sampling position within the boundary range.

[0080] S112, randomly sampling non-overlapping sub-areas in the ice-coated area of each frame of image, and extracting the BGR color pixel value of the selected sub-area each time.

[0081] S113, counting the extreme value distribution of the BGR color pixel value, and obtaining the BGR color threshold model of the ice-coated area through Gaussian distribution calculation.

[0082] The mathematical expression of the BGR color threshold model is:

[0083]

[0084] In formula (1), B max , G max , R max represents the maximum value of the BGR three-channel color of the icing area, B min , G min , R min represents the minimum value of the BGR three-channel color of the icing area, μ B , μ G , μ R represents the mean value of the BGR three-channel color of the sampled icing area, k represents a confidence factor, and σ B , σ G , σ R represents the standard deviation of the BGR three-channel color of the sampled icing area.

[0085] The extreme value data set {x1, x2, …, xn} of the color pixel value of n times of sampling for each color channel (B / G / R). n} is obtained.

[0086] Mean value calculation:

[0087]

[0088] Standard deviation calculation:

[0089]

[0090] S120, performing color space conversion based on the BGR color pixel value to generate HSV color components corresponding to the HSV color space.

[0091] The HSV color component includes hue (Hue), saturation (Saturation), and value (Value), and the three parameters jointly define the position of a color component in the HSV color space.

[0092] S130, according to the HSV color component, obtaining an initial HSV color threshold interval of the icing area in the icing conductor image, and combining the collected ambient brightness data to generate an HSV color threshold band with brightness adaptability.

[0093] S200, performing double mask operation on the to-be-recognized image through the BGR color threshold model and the HSV color threshold band to generate an initial mask image containing the icing area, dynamically adjusting the brightness offset of the HSV color threshold band based on the current ambient light intensity to correct the initial mask image, and obtaining an optimal mask image resistant to light interference.

[0094] In this embodiment, step S200 can include the following sub-steps S210 to S240:

[0095] S210, acquire BGR color components and HSV color components of all pixels in the to-be-identified image.

[0096] S220, judge whether the BGR color components satisfy the threshold condition of the BGR color threshold model and whether the HSV color components satisfy the HSV color threshold range.

[0097] S230, in the case that the BGR color components do not satisfy the threshold condition of the BGR color threshold model and the HSV color components do not satisfy the HSV color threshold range, perform double mask operation on the pixels corresponding to the BGR color components and the HSV color components to generate an initial mask image containing the icing area.

[0098] In the formula, D represents the mask function, x is the pixel of the input image, T

[0099]

[0100] In formula (4), D represents the mask function, x is the pixel of the input image, 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 the 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 the pixel x, V min represents the minimum value of the HSV threshold range, V max represents the maximum value of the HSV threshold range, V x represents the luminance value at the pixel x.

[0101] S240, dynamically adjust the luminance offset of the HSV color threshold range based on the current ambient light intensity to perform mask correction on the initial mask image to obtain an optimal mask image resistant to light interference.

[0102] In one specific embodiment, when the mask operation is applied to the icing conductor as shown in FIG. 1, first, the BGR color threshold of the icing conductor is calculated to obtain a BGR color threshold interval of (24, 37, 33)~(103, 93, 93). The icing conductor in the image is identified. Then, based on the BGR color threshold interval, the mask operation is applied to obtain a primary mask image. Next, the HSV color threshold range is used to apply mask to the existing background interference color blocks (other non-contact net conductors) to obtain a secondary mask image, as shown in FIG. 2. Finally, the luminance offset of the HSV color threshold range 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 resistant to light interference, as shown in FIG. 3. Figure 4 Figure 3 In one specific embodiment, when the mask operation is applied to the icing conductor as shown in FIG. 1, first, the BGR color threshold of the icing conductor is calculated to obtain a BGR color threshold interval of (24, 37, 33)~(103, 93, 93). The icing conductor in the image is identified. Then, based on the BGR color threshold interval, the mask operation is applied to obtain a primary mask image. Next, the HSV color threshold range is used to apply mask to the existing background interference color blocks (other non-contact net conductors) to obtain a secondary mask image, as shown in FIG. 2. Finally, the luminance offset of the HSV color threshold range 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 resistant to light interference, as shown in FIG. 3.​Figure 5 as shown.

[0103] S300, the optimal mask image is processed by using a predefined morphological kernel structure, and an ice-covered area meeting a preset area condition is extracted, and a minimum circumscribed rectangle of the ice-covered area is generated.

[0104] In this embodiment, step S300 can include the following sub-steps S310-S340:

[0105] S310, the optimal mask image is processed by using a predefined morphological kernel structure, and an ice-covered area meeting a preset area condition is extracted, and a minimum circumscribed rectangle of the ice-covered area is generated.

[0106] For example, a 7x7 matrix operation kernel is selected, and the input optimal mask image is processed by 4 opening operations. First, the input optimal mask image is processed by erosion operation to remove small noise points and burrs. Then, the processed image is processed by dilation operation to restore the target shape.

[0107] The operation formula of the erosion operation is:

[0108]

[0109] In formula (5), A represents an input image, B represents a morphological operation kernel, and Bz represents a symmetric matrix operation kernel of the structure element B with respect to the origin z.

[0110] The operation formula of the dilation operation is:

[0111]

[0112] S320, according to the number and length value of the white color block in the binary image, the ice-covered area area value corresponding to the white color block is called from the preset database. The length value of the white color block is positively correlated with the actual ice area area value.

[0113] S330, the difference between the area value of the white color block and the ice-covered area area value corresponding to the length of the white color block is compared with a set threshold value, and whether the white color block is an ice-covered area is judged according to the comparison result.

[0114] S340, when the difference between the area value of the white color block and the ice-covered area area value corresponding to the length of the white color block is less than the set threshold value, the white color 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 are a 50*100 pixel interference white block and a 10*100 pixel iced conductor white block, and in the case that the two white blocks have the same length value, the icing area value called from the data is 10*100±50 pixels, and the 50*100 pixel interference white block is screened out as not belonging to the iced conductor, thereby greatly improving the accuracy and pertinence of iced conductor detection.

[0116] S400, fitting a center line according to the vertex position information of the minimum circumscribed rectangle, taking the intersection point of the fitted center line as the positioning coordinate of the iced conductor, and outputting to a preset deicing robot to perform deicing work.

[0117] In this embodiment, step S400 can include the following sub-steps S410 to S430:

[0118] S410, obtaining the vertex position information of the minimum circumscribed rectangle.

[0119] When fitting the minimum circumscribed rectangle in the iced conductor area, fitting is performed according to the length of the iced conductor, and through the geometric principle of the rectangle, the relative position relationship of the four vertices of the minimum circumscribed rectangle can be obtained. A plane coordinate system is established with an arbitrary point as the origin in the image, the pixel distance between the origin and the two ends of the iced conductor is calculated, and the position information of the two diagonal vertices of the minimum circumscribed rectangle is obtained, and then based on the geometric principle of the rectangle, the position information of the other two diagonal vertices can be calculated.

[0120] S420, fitting the horizontal center line and the vertical center line of the minimum circumscribed rectangle according to the vertex position information, and extracting the position information of the intersection point of the two center lines.

[0121] S430, determining the intersection point of the two center lines as the positioning reference point of the iced conductor, and mapping the coordinates of the positioning reference point to the preset robot motion coordinate system through coordinate conversion to generate a path control instruction of the deicing mechanism end effector.

[0122] In this embodiment, after step S400, steps S510 to S530 are further included:

[0123] S510, judging the number of minimum circumscribed rectangles in the binary image marked by the minimum circumscribed rectangle.

[0124] S520, when there are at least two minimum circumscribed rectangles in the binary image marked by the minimum circumscribed rectangle, fitting a minimum circumscribed circle for each minimum circumscribed rectangle according to the vertex position information of the minimum circumscribed rectangle.

[0125] S530, traversing and sorting the radius values of all the minimum circumscribed circles, and determining the deicing priority of each section of iced conductor in the image to be recognized according to the sorting result.

[0126] In a specific implementation, for Figure 5 The number of white blocks in the binary graph of the icy conductor is counted, resulting in five white blocks (iced conductor segments). Then, the minimum bounding rectangle is marked for all white blocks, and the vertex position information of each minimum bounding rectangle is obtained. Next, the horizontal and vertical center lines of each minimum bounding rectangle are fitted, and the position information of their intersection points is extracted. Finally, the minimum bounding circle of each minimum bounding rectangle is fitted, and the de-icing priority of each iced conductor segment is determined based on the radius value of the minimum bounding circle, with the segment with the largest radius value receiving priority for de-icing. The marking effect of the minimum bounding rectangle and minimum bounding circle is shown in the figure below. Figure 6 As shown.

[0127] In addition, embodiments of the present invention propose an icy guide 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 icing characteristics based on the color information of the collected icy conductor. It obtains the initial HSV color threshold range through dynamic random sampling and generates an HSV color threshold band with brightness adaptability by combining the collected environmental brightness data.

[0129] The dual masking module is used to perform dual masking operations on the image to be recognized using the BGR color threshold model and the HSV color threshold band, generating an initial mask image containing the icy area. Based on the current ambient light intensity, the brightness offset of the HSV color threshold band is dynamically adjusted to correct the initial mask image and obtain the optimal mask image that is resistant to illumination interference.

[0130] The minimum bounding rectangle marking module is used to perform opening operations on the optimal mask image using a predefined morphological kernel structure, extract the ice-covered connected regions that meet the preset area conditions, and generate the minimum bounding rectangle of the ice-covered regions.

[0131] The ice-covered guide wire positioning coordinate recognition module is used to fit the center line based on the vertex position information of the minimum bounding rectangle, and use the intersection of the fitted center lines as the positioning coordinates of the ice-covered guide wire, and output them to the preset de-icing robot to perform de-icing work.

[0132] Furthermore, this invention proposes an ice-covered guide wire recognition device based on color threshold and morphological processing. The device is mounted on a de-icing robot and includes: a camera for capturing images of the ice-covered guide wire; a photosensor for collecting brightness data of the current environment; and a processor connected to the camera and photosensor for executing the steps of the ice-covered guide wire recognition method based on color threshold and area conditions described above.

[0133] Finally, the embodiment of the present application provides a computer readable medium having computer executable instructions stored thereon, and the executable instructions are executed by a processor to implement the above-mentioned ice-coated conductor identification method based on color threshold and area condition.

[0134] To sum up, the embodiment proposes an ice-coated conductor identification method, system, device and medium based on color threshold and area condition. First, the embodiment filters the ice-coated conductor area through the double-type color threshold and area condition, which can more accurately locate the target color block (ice-coated conductor) in a complex background, effectively exclude the interference of color blocks that do not meet the conditions, and greatly improve the accuracy and pertinence of detection. Secondly, the dynamic threshold setting method is adopted, the color threshold is determined through multiple random sampling, and different filtering strategies are adopted for different situations of single color and existence of brightness change, so that the color threshold filtering is more flexible and accurate, and adapts to various complex color environments. Finally, the opening operation effectively suppresses image noise, and at the same time, the geometric features of the color block (ice-coated conductor) are accurately extracted by calculating the rectangular center line and the circumscribed circle, so as to calculate the color block center coordinates, and provide a reliable basis for the ice-coated conductor position coordinates of the deicing robot.

[0135] Since the system / device described in the above-mentioned embodiments of the present application is the system / device used for implementing the method of the above-mentioned embodiments of the present application, the specific structure and deformation of the system / device can be understood by those skilled in the art based on the method described in the above-mentioned embodiments of the present application, and thus will not be described here. Any system / device used in the method of the above-mentioned embodiments of the present application belongs to the scope of the present application.

[0136] Those skilled in the art should understand that the embodiments of the present application can be provided as a method, a system or a computer program product. Therefore, the present application can be in the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware aspects. Moreover, the present application can be in the form of a computer program product implemented on one or more computer usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer usable program code.

[0137] The present application is described with reference to flowcharts and / or block diagrams of methods, devices (systems) and computer program products according to embodiments of the present application. It should be understood that each flow and / or block in the flowcharts and / or block diagrams, and the combination of flows and / or blocks in the flowcharts and / or block diagrams can be realized by computer program instructions.

[0138] It should be noted that the words "comprise" or "comprising" when used in the description of the application do not exclude the presence of other elements or steps than those listed. The invention can be implemented by means of both hardware, including several distinct elements, and software, including several distinct steps or code sections. The use of the word "a" or "an" does not exclude the presence of several of these elements. The use of the word "first", "second" and the like does not imply any order but is used for the purpose of naming.

[0139] Furthermore, it is noted that the described features, structures, or characteristics can be combined in any suitable manner in one or more embodiments or examples. It will also be readily appreciated that the terms "comprise", "comprising", "include", "including", "has", "having" or variants thereof are not to be construed as each necessarily excluding the presence of other features, structures, or characteristics. Moreover, use of "top", "bottom" or the like in reference to a structure is intended to indicate a spatial relationship and an orientation of such structure, and is not to be construed as a relative term unless otherwise specified.

[0140] Although preferred embodiments of the application have been described, those skilled in the art will be able to make additional modifications and variations without departing from the spirit and scope of the application.

[0141] Obviously, numerous modifications and variations of the present application are possible in light of the above teachings. It is therefore to be understood that within the scope of the claims, the application can be practiced otherwise than as specifically written.

Claims

1. A method for identifying icy guide wires based on color threshold and area conditions, characterized in that, include: Based on dynamically random sampling to obtain BGR color pixel values ​​of the icy region in multiple frames of icy guideline images, a BGR color threshold model for icing features is established in the BGR color space. This includes: acquiring multiple initial frames of icy guideline images and marking the boundaries of the icy region; randomly sampling non-overlapping sub-regions within the icy region of each frame, extracting the BGR color pixel values ​​of the selected sub-regions in each sampling; statistically analyzing the extreme value distribution of the BGR color pixel values, and calculating the BGR color threshold model for the icy region using a Gaussian distribution; the mathematical expression of the BGR color threshold model is: In the formula, B max , G max , R max This represents the maximum value of the three BGR color channels in the icy region. B min , G min , R min This represents the minimum value of the three color channels of BGR in the icy region. , , The mean of the three BGR color channels representing the sampled icy area. k Represents the confidence factor. , , The standard deviation of the three-channel BGR color representing the sampled icy area; An initial HSV color threshold range is obtained through dynamic random sampling, and combined with the collected environmental brightness data, an HSV color threshold band with brightness adaptability is generated. The image to be identified is subjected to dual masking operations using the BGR color threshold model and the HSV color threshold band to generate an initial mask image containing the icy area. The brightness offset of the HSV color threshold band is dynamically adjusted based on the current ambient light intensity to correct the initial mask image and obtain the optimal mask image that is resistant to illumination interference. An opening operation is performed on the optimal mask image using a predefined morphological kernel structure to extract the ice-covered connected regions that meet the preset area conditions, and to generate the minimum bounding rectangle of the ice-covered regions. The centerline is fitted based on the vertex position information of the minimum bounding rectangle. The intersection of the fitted centerlines is used as the positioning coordinates of the ice-covered guide wire and output to the preset de-icing robot to perform the de-icing work.

2. The method as described in claim 1, characterized in that, An initial HSV color threshold range is obtained through dynamic random sampling, and combined with the collected environmental brightness data, a brightness-adaptive HSV color threshold band is generated, including: Perform color space conversion based on the BGR color pixel values ​​to generate the corresponding HSV color components in the HSV color space; Based on the HSV color components, the initial HSV color threshold range of the icy area in the icy guide image is obtained, and combined with the collected environmental brightness data, a brightness-adaptive HSV color threshold band is generated.

3. The method as described in claim 1, characterized in that, A dual masking operation is performed on the image to be recognized using the BGR color thresholding model and the HSV color thresholding band to generate an initial mask image containing the icy area. The brightness offset of the HSV color thresholding band is dynamically adjusted based on the current ambient light intensity to correct the initial mask image, resulting in an optimal mask image that is resistant to illumination interference. Obtain the BGR and HSV color components of all pixels in the image to be identified; Determine whether the BGR color components meet the threshold conditions of the BGR color threshold model and whether the HSV color components meet 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 masking 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 icing 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 the optimal mask image that resists illumination interference. The formula for calculating the double mask operation is as follows: ; In the formula, D Represents the mask function. x For the pixels of the input image, T min This represents the minimum value within the BGR threshold range. T max This represents the maximum value within the BGR threshold range. T x Representing pixels x BGR value at that location H min The minimum hue value representing the HSV threshold range. H max The maximum hue value representing the HSV threshold range. H x Representing pixels x The hue value at that location, V min The maximum brightness value representing the HSV threshold range. V max The maximum brightness value representing the HSV threshold range. V x Representing pixels x The brightness value at that location.

4. The method as described in claim 1, characterized in that, An opening operation is performed on the optimal mask image using a predefined morphological kernel structure to extract icy connected regions that meet preset area conditions, and the minimum bounding rectangle of the icy regions is generated, including: Using a predefined morphological kernel structure, an opening operation involving image erosion and image dilation is performed on the optimal mask image to generate a binary image of the image to be recognized. Based on the number and length of white blocks in the binary image, retrieve the area value of the icy region corresponding to the white blocks from the preset database; 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 compared with a set threshold, and the white block is determined as an ice-covered area based on the comparison result. If the difference between the area of ​​the white block and the area of ​​the ice-covered region corresponding to the length of the white block is less than a set threshold, the white block is determined to be an ice-covered region, and the minimum bounding rectangle of the ice-covered region is generated.

5. The method as described in claim 1, characterized in that, Based on the vertex position information of the minimum bounding rectangle, a centerline is fitted. The intersection of the fitted centerlines is used as the positioning coordinates of the ice-covered guide wire, and output to the preset de-icing robot to perform the de-icing work, including: Obtain the vertex position information of the smallest bounding rectangle; Based on the vertex position information, fit the horizontal and vertical center lines of the minimum bounding rectangle, and extract the position information of the intersection of the two center lines; The intersection of the two center lines is determined as the positioning reference point of the ice-covered guide wire, 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 command of the end effector of the de-icing mechanism.

6. The method as described in claim 1, characterized in that, After fitting a centerline based on the vertex position information of the minimum bounding rectangle, using the intersection of the fitted centerlines as the positioning coordinates of the icing guide wire, and outputting them to the preset de-icing robot to perform the de-icing work, the process also includes: Determine the number of minimum bounding rectangles in a binary image marked with a minimum bounding rectangle; When there are at least two minimum bounding rectangles in a binary image marked by the minimum bounding rectangle, fit the minimum bounding circle of each minimum bounding rectangle based on the vertex position information of the minimum bounding rectangle. Traverse all the radius values ​​of the smallest circumcircle and sort them. Based on the sorting results, determine the de-icing priority of each segment of icy conductor in the image to be identified.

7. A system for identifying icy guide wires based on color threshold and area conditions, characterized in that, include: The color threshold setting module is used to obtain BGR color pixel values ​​of the icy region in multi-frame images of icy guideways based on dynamic random sampling, and to establish a BGR color threshold model of the icing features in the BGR color space. This includes: acquiring multiple initial images of the icy guideway and marking the boundary range of the icy region; randomly sampling non-overlapping sub-regions within the icy region of each frame, extracting the BGR color pixel values ​​of the selected sub-regions in each sampling; statistically analyzing the extreme value distribution of the BGR color pixel values, and calculating the BGR color threshold model of the icy region using a Gaussian distribution; wherein the mathematical expression of the BGR color threshold model is: In the formula, B max , G max , R max This represents the maximum value of the three BGR color channels in the icy region. B min , G min , R min This represents the minimum value of the three color channels of BGR in the icy region. , , The mean of the three BGR color channels representing the sampled icy area. k Represents the confidence factor. , , The standard deviation of the three-channel BGR color represents the icy sampling area; the initial HSV color threshold range is obtained through dynamic random sampling, and combined with the collected environmental brightness data, a brightness-adaptive HSV color threshold band is generated. The dual masking operation module is used to perform dual masking operations on the image to be recognized using the BGR color threshold model and the HSV color threshold band, generating an initial mask image containing the icy area. Based on the current ambient light intensity, the brightness offset of the HSV color threshold band is dynamically adjusted to correct the initial mask image and obtain the optimal mask image that resists illumination interference. The minimum bounding rectangle marking module is used to perform opening operations on the optimal mask image using a predefined morphological kernel structure, extract the ice-covered connected regions that meet the preset area conditions, and generate the minimum bounding rectangle of the ice-covered regions. The ice-covered guide wire positioning coordinate recognition module is used to fit the center line based on the vertex position information of the minimum bounding rectangle, and use the intersection of the fitted center lines as the positioning coordinates of the ice-covered guide wire, and output them to the preset de-icing robot to perform de-icing work.

8. A device for identifying icy wires based on color thresholding and morphological processing, the device being mounted on a de-icing robot, characterized in that... include: camera; Photosensitive sensor; A processor connected to a camera and a photosensitive sensor is used to perform the steps of the ice-covered wire identification method based on color threshold and area conditions as described in any one of claims 1-6.

9. A computer-readable medium having computer-executable instructions stored thereon, characterized in that, When the executable instructions are executed by the processor, they implement the steps of the ice-covered wire identification method based on color threshold and area conditions as described in any one of claims 1-6.

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