Method and device for detecting occupation of a port by a pigtail
By using deep learning target detection and region growing algorithms, the splitter port and pigtail tag area are identified, solving the problems of long detection time and low accuracy in existing technologies, and realizing fast and accurate detection of pigtail occupancy ports.
Patent Information
- Application Number
- CN202111241321.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-10-25
- Publication Date
- 2026-11-20
- Estimated Expiration
- 2041-10-25
AI Technical Summary
In existing technologies, the fiber optic tag identification algorithm for splitters is complex, resulting in long detection time and low accuracy. It is also unable to accurately identify multiple tags, which affects the accuracy of quality inspection.
A deep learning object detection algorithm is used to identify the splitter port and the pigtail label area. Combined with color extraction and region growing algorithms, the overlapping area of the pigtail connector and the fiber cable is determined. The occupied port of the pigtail is determined by the border area.
It improves the processing speed and accuracy of pigtail port occupancy detection, enabling rapid identification of splitter ports and pigtail tag areas, and returning detection results in real time, thus enhancing detection efficiency and accuracy.
Smart Images

Figure CN116029958B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of image processing technology, and specifically to a method and apparatus for detecting the occupancy of a fiber optic port. Background Technology
[0002] The goal of the fiber optic splitter pigtail port occupancy detection method is to identify the port occupancy status of the fiber optic splitter pigtails in real time by analyzing photos taken by installation and maintenance personnel on-site, thereby determining whether the installation and maintenance work meets the requirements. If the work does not meet the requirements, the installation and maintenance personnel can make timely rectifications on-site, reducing the need for secondary visits.
[0003] Existing technical solutions first identify the fiber optic splitter's pigtail label area and port area, then extract the port with the highest overlap rate between the target pigtail pixel location and any port detection area pixel location. Splitter pigtail label location identification is based on a semantic segmentation algorithm. This algorithm has a complex prediction model, requiring the classification of each pixel in the image according to the prediction model, and then merging pixels of the same type, resulting in time-consuming detection. Furthermore, when multiple labels exist in the device image, it cannot accurately identify the label location on the target pigtail, leading to a high error rate in identifying the target area, which significantly impacts the accuracy of quality inspection. Summary of the Invention
[0004] To address the problems existing in the prior art, the present invention provides a method and apparatus for detecting the occupancy of a port by a pigtail.
[0005] In a first aspect, the present invention provides a method for detecting a fiber optic cable occupying a port, comprising:
[0006] Based on a deep learning object detection algorithm, the recognition areas of the beam splitter port and the pigtail tag in the image to be detected are determined.
[0007] Based on the color extraction method, the identification area of the splitter port is determined to be the identification area of the pigtail connector of the same type of pixel;
[0008] Based on the region growing algorithm, the pigtail cable identification area corresponding to the pigtail tag is determined;
[0009] Based on the overlapping area of the pigtail connector identification area and the pigtail cable identification area, and the border area of each pigtail port in the splitter port identification area, the occupied port of the pigtail to which the tag belongs is determined.
[0010] Optionally, before determining the pigtail cable identification area corresponding to the pigtail tag based on the region growing algorithm, the method further includes:
[0011] The image in the pigtail tag recognition area is binarized and smoothed to obtain a smooth white area corresponding to the pigtail tag.
[0012] Based on the number of white pixels on the left and right sides of the smooth white area, determine whether the side with fewer white pixels is the connection part of the pigtail tag, and whether the connection part of the pigtail tag is located on the left or right side of the pigtail tag recognition area.
[0013] The pigtail label includes a content section and a connecting section, wherein the width of the content section is greater than the width of the connecting section.
[0014] Optionally, determining the pigtail cable identification area corresponding to the pigtail tag based on the region growing algorithm includes:
[0015] Based on the region growth algorithm, a seed point is selected above the area outside the connection part of the pigtail tag, and the growth is carried out in the horizontal direction to determine the outer boundary point of the pigtail to which the pigtail tag belongs.
[0016] Using the outer boundary point of the pigtail as the seed point and the pixel corresponding to the outer boundary point of the pigtail as the reference pixel, the area with the same pixel as the reference pixel is determined by growing in all directions, and is used as the first fiber identification area.
[0017] Based on the first fiber identification area, a preset number of pixels are extended outwards to determine the pigtail fiber identification area.
[0018] Optionally, determining the occupied port of the pigtail to which the tag belongs based on the overlapping area of the pigtail connector identification area and the pigtail cable identification area, and the border area of each pigtail port in the splitter port identification area, includes:
[0019] The frame area of each pigtail connector in the pigtail connector identification area is determined, the frame area of the pigtail cable identification area is determined, and the frame area of each pigtail port in the splitter port identification area is determined.
[0020] Based on the overlapping area of the border area of each pigtail connector in the pigtail connector identification area and the border area of the pigtail cable identification area, the correspondence between the pigtail cable and the specific pigtail connector is determined.
[0021] Based on the border area of each pigtail port in the splitter port identification area and the border area of the specific pigtail connector, the pigtail port corresponding to the specific pigtail connector is determined.
[0022] Based on the correspondence between the pigtail cable and the specific pigtail connector, and the pigtail port corresponding to the specific pigtail connector, the occupied port of the pigtail to which the tag belongs is determined.
[0023] Optionally, determining the border area of each pigtail connector in the pigtail connector identification area, determining the border area of the pigtail cable identification area, and determining the border area of each pigtail port in the splitter port identification area includes:
[0024] The images in the pigtail connector identification area, the pigtail cable identification area, and the splitter port identification area are binarized to obtain a binarized white area; the binarized white area is smoothed to obtain a smoothed white area, and the smoothed white area is used as the corresponding border area.
[0025] Optionally, after determining the smooth white area corresponding to the beam splitter port identification area, the method further includes:
[0026] A vertical projection process is performed on the smooth white area corresponding to the beam splitter port identification area to obtain a histogram of the number of white pixels after projection. The histogram of the number of white pixels is used as the border area of the beam splitter port identification area.
[0027] Optionally, the beam splitter port identification area is marked with a square frame, and before determining the frame area, it further includes:
[0028] Adjust the angle of the long side of the square frame of the recognition area of the beam splitter port to be vertical or horizontal, and adjust the image to be detected.
[0029] Secondly, the present invention provides a detection device for detecting a fiber optic cable occupying a port, comprising:
[0030] The recognition module is used to determine the recognition area of the beam splitter port and the recognition area of the pigtail tag in the image to be detected based on a deep learning target detection algorithm.
[0031] The extraction module is used to determine, based on the color extraction method, the identification area of the fiber optic connector that belongs to the same type of pixel as the identification area of the beam splitter port;
[0032] The growth module is used to determine the pigtail cable identification area corresponding to the pigtail tag based on the region growth algorithm.
[0033] The detection module is used to determine the occupied port of the pigtail to which the tag belongs based on the overlapping area of the pigtail connector identification area and the pigtail cable identification area, and the border area of each pigtail port in the splitter port identification area.
[0034] Thirdly, the present invention provides an electronic device, including a memory and a memory storing a computer program, wherein the processor executes the program to implement the steps of the method for detecting occupancy of a pigtail port as described in the first aspect.
[0035] Fourthly, the present invention provides a processor-readable storage medium storing a computer program for causing the processor to perform the steps of the method for detecting occupancy of a pigtail port as described in the first aspect.
[0036] The present invention provides a method and apparatus for detecting the port occupancy of pigtails. By processing the image to be detected, it quickly identifies the area of the splitter port and the pigtail label, extracts the pigtail connector identification area, and determines the pigtail cable identification area corresponding to the pigtail label through a region growing algorithm. Then, by the overlapping part of the pigtail cable identification area and the pigtail connector identification area, as well as the correspondence between the border area of the pigtail connector and the border area of the splitter port, it determines the specific port number occupied by the pigtail to which the label belongs, and returns the detection result in real time. It has improved the speed and accuracy to varying degrees. Attached Figure Description
[0037] To more clearly illustrate the technical solutions in this invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of this invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.
[0038] Figure 1 This is a flowchart illustrating the detection method for occupancy of a pigtail port provided by the present invention;
[0039] Figure 2 This is one of the schematic diagrams of the identification areas in the method for detecting occupancy of a pigtail port provided by the present invention;
[0040] Figure 3 This is the second schematic diagram of each identification area in the detection method for occupancy of a pigtail port provided by the present invention;
[0041] Figure 4 This is a diagram showing the border area of the label provided by the present invention;
[0042] Figure 5 This is a histogram of the number of pixels at the beam splitter port provided by the present invention;
[0043] Figure 6 This is a schematic diagram of the structure of the detection device for the occupancy of a pigtail port provided by the present invention;
[0044] Figure 7 This is a schematic diagram of the electronic device for detecting the occupancy of a pigtail port provided by the present invention. Detailed Implementation
[0045] To make the objectives, technical solutions, and advantages of this invention clearer, the technical solutions of this invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of this invention. All other embodiments obtained by those skilled in the art based on the embodiments of this invention without creative effort are within the scope of protection of this invention.
[0046] The following is combined with Figures 1-7 The present invention describes a method and apparatus for detecting the occupancy of a pigtail port.
[0047] Figure 1 This is a flowchart illustrating the detection method for occupancy of a pigtail port provided by the present invention, as shown below. Figure 1 As shown, the method includes:
[0048] Step 101: Based on the deep learning target detection algorithm, determine the recognition area of the beam splitter port and the recognition area of the pigtail tag in the image to be detected;
[0049] Step 102: Based on the color extraction method, determine the identification area of the fiber optic connector that belongs to the same type of pixel as the identification area of the beam splitter port;
[0050] Step 103: Based on the region growing algorithm, determine the pigtail cable identification area corresponding to the pigtail tag;
[0051] Step 104: Based on the overlapping area of the pigtail connector identification area and the pigtail cable identification area, and the border area of each pigtail port in the splitter port identification area, determine the occupied port of the pigtail to which the tag belongs.
[0052] Specifically, the deep learning object detection algorithm trains a model on a large amount of collected production data and automatically extracts data features. The object detection model can detect the identification area of the beam splitter port and the identification area of the pigtail tag in the field equipment photos in real time. The YOLO object detection algorithm mainly used in this invention has the following specific steps:
[0053] 1. By collecting historical photos of equipment in the production environment, the splitter port and label sections are labeled using graphic tools;
[0054] 2. Using the labeled device images, train the YOLO target detection network model. Adjust the parameters based on each detection result so that the loss function of the trained model for recognizing the beam splitter port and the label part meets the set threshold, and obtain the feature value of the target area.
[0055] 3. Using the trained model and feature values, the equipment photos to be inspected are identified. The location of the beam splitter port and the label image features are obvious, enabling the detection of the target area with good performance and accuracy.
[0056] 4. After region recognition is complete, use a rectangular frame for labeling. That is, use a rectangular frame to circle the portion of the image that displays the port and label.
[0057] A pigtail, also called a tail wire, has a connector at one end and a broken fiber core at the other. It connects to other fiber cores via fusion splicing and is typically connected to the splitter port through its connector. Splitter ports are usually arranged linearly in one direction, and each port can be used for pigtail connection. In practical applications, depending on the needs, some ports may be connected to pigtail connectors, or all ports may be connected to pigtail connectors. Therefore, after identifying the splitter port area, it is necessary to further identify the pigtail connectors on the corresponding ports.
[0058] Furthermore, in practical applications, the connectors of pigtails are usually wrapped in blue or green shells. By utilizing color features, the blue or green image portion near the beam splitter port area is extracted to determine the pigtail connector identification area that belongs to the same pixel type as the identification area of the beam splitter port.
[0059] The label includes a content section and a connector section. The content section is printed with text describing the pigtail. The connector section is used to loop around the pigtail cable. The width of the content section differs from the width of the connector section. The connector section primarily serves to secure the cable; therefore, its width is narrower than that of the content section.
[0060] Based on the aforementioned deep learning target detection algorithm, after determining the identification area of the pigtail tag, the identification area of the pigtail cable between the pigtail connector and the tag connection is determined using a region growing algorithm.
[0061] Based on the overlapping area of the pigtail connector identification area and the pigtail cable identification area, the pigtail connector corresponding to the pigtail labeled is determined. Then, combining the correspondence between the border areas of each pigtail port in the splitter port identification area and the border areas of the pigtail connectors, the occupied port of the pigtail connector to which the label belongs is determined, that is, the occupied port of the pigtail labeled is determined. Figure 2 As shown.
[0062] Figure 2 Ideally, the pigtail identification result shows that the identification area is linear. If the pigtail identification result shows that the identification area is non-linear, such as a bent state, the corresponding diagram is as follows. Figure 3As shown, the border area corresponding to the identification area of the pigtail tag is displayed as a "convex" shaped area. The narrow edge of the tag is where the tag connector connects to the pigtail cable.
[0063] This method is used to identify on-site photos taken by installation and maintenance personnel, and to detect in real time the port occupancy of fiber optic splitters to determine whether the installation and maintenance work meets the requirements. Determining compliance involves checking whether the tagged fiber optic cables are plugged into the correct ports. Therefore, the tags in the images to be inspected must not overlap. Typically, only one complete tag should be displayed in the image. This is equivalent to judging the connection of each fiber optic cable individually.
[0064] The present invention provides a method and apparatus for detecting the port occupancy of pigtails. By processing the image to be detected, it quickly identifies the area of the splitter port and the pigtail label, extracts the pigtail connector identification area, and determines the pigtail cable identification area corresponding to the pigtail label through a region growing algorithm. Then, by the overlapping part of the pigtail cable identification area and the pigtail connector identification area, as well as the correspondence between the border area of the pigtail connector and the border area of the splitter port, it determines the specific port number occupied by the pigtail to which the label belongs, and returns the detection result in real time. It has improved the speed and accuracy to varying degrees.
[0065] Optionally, before determining the pigtail cable identification area corresponding to the pigtail tag based on the region growing algorithm, the method further includes:
[0066] The image in the pigtail tag recognition area is binarized and smoothed to obtain a smooth white area corresponding to the pigtail tag.
[0067] Based on the number of white pixels on the left and right sides of the smooth white area, determine whether the side with fewer white pixels is the connection part of the pigtail tag, and whether the connection part of the pigtail tag is located on the left or right side of the pigtail tag recognition area.
[0068] The pigtail label includes a content section and a connecting section, wherein the width of the content section is greater than the width of the connecting section.
[0069] Specifically, the image in the pigtail tag recognition area is binarized to obtain a binarized white area, and then smoothed to obtain a smoothed white area, such as... Figure 4 As shown. Calculate the number of white pixels on both the left and right sides of the smooth white area of the fiber optic tag. The area with fewer pixels is where the fiber optic tag connects to the fiber optic cable. If the difference in the number of pixels on the left and right sides of the tag is not significant, the connection point is assumed to be on the right side.
[0070] The present invention provides a method and apparatus for detecting the port occupancy of pigtails. By processing the image to be detected, it quickly identifies the area of the splitter port and the pigtail label, extracts the pigtail connector identification area, and determines the pigtail cable identification area corresponding to the pigtail label through a region growing algorithm. Then, by the overlapping part of the pigtail cable identification area and the pigtail connector identification area, as well as the correspondence between the border area of the pigtail connector and the border area of the splitter port, it determines the specific port number occupied by the pigtail to which the label belongs, and returns the detection result in real time. It has improved the speed and accuracy to varying degrees.
[0071] Optionally, determining the pigtail cable identification area corresponding to the pigtail tag based on the region growing algorithm includes:
[0072] Based on the region growth algorithm, a seed point is selected above the area outside the connection part of the pigtail tag, and the growth is carried out in the horizontal direction to determine the outer boundary point of the pigtail to which the pigtail tag belongs.
[0073] Using the outer boundary point of the pigtail as the seed point and the pixel corresponding to the outer boundary point of the pigtail as the reference pixel, the area with the same pixel as the reference pixel is determined by growing in all directions, and is used as the first fiber identification area.
[0074] Based on the first fiber identification area, a preset number of pixels are extended outwards to determine the pigtail fiber identification area.
[0075] Specifically, the region growing algorithm has the following steps: First, a seed point is specified for each region as the starting point for growth. Then, the pixels in the region surrounding the seed point are compared with the seed point. Points with similar properties are merged and the growth continues outward until no pixels that meet the conditions are included. At this point, the result of the region growing is obtained.
[0076] In this invention, after determining the area of the pigtail tag's connection portion, a certain boundary point on the outer side of the pigtail cable is first determined. A seed point is selected above the area outside the connection portion of the pigtail tag, and growth is carried out horizontally. Growth stops when the pigtail area is encountered. The outer boundary point of the pigtail to which the pigtail tag belongs is determined, and the pixel corresponding to the outer boundary point of the pigtail is used as the reference pixel.
[0077] Next, based on the outer boundary point of the pigtail determined above, the area with the same pixel as the reference pixel is determined in the four directions and used as the first fiber identification area.
[0078] For example, since pigtail cables are usually wrapped in a yellow outer shell, after determining the outer boundary point of the pigtail, the area corresponding to the yellow pixel is grown to determine the pigtail cable identification area corresponding to the pigtail label.
[0079] To more accurately identify the relationship between the pigtail cable and the pigtail connector, this invention extends a predetermined number of pixels outwards from the first fiber cable identification area to expand the aforementioned pigtail cable identification area and determine the final pigtail cable identification area, thereby ensuring that there is an overlapping area between the pigtail cable identification area and the pigtail connector identification area.
[0080] The present invention provides a method and apparatus for detecting the port occupancy of pigtails. By processing the image to be detected, it quickly identifies the area of the splitter port and the pigtail label, extracts the pigtail connector identification area, and determines the pigtail cable identification area corresponding to the pigtail label through a region growing algorithm. Then, by the overlapping part of the pigtail cable identification area and the pigtail connector identification area, as well as the correspondence between the border area of the pigtail connector and the border area of the splitter port, it determines the specific port number occupied by the pigtail to which the label belongs, and returns the detection result in real time. It has improved the speed and accuracy to varying degrees.
[0081] Optionally, determining the occupied port of the pigtail to which the tag belongs based on the overlapping area of the pigtail connector identification area and the pigtail cable identification area, and the border area of each pigtail port in the splitter port identification area, includes:
[0082] The frame area of each pigtail connector in the pigtail connector identification area is determined, the frame area of the pigtail cable identification area is determined, and the frame area of each pigtail port in the splitter port identification area is determined.
[0083] Based on the overlapping area of the border area of each pigtail connector in the pigtail connector identification area and the border area of the pigtail cable identification area, the correspondence between the pigtail cable and the specific pigtail connector is determined.
[0084] Based on the border area of each pigtail port in the splitter port identification area and the border area of the specific pigtail connector, the pigtail port corresponding to the specific pigtail connector is determined.
[0085] Based on the correspondence between the pigtail cable and the specific pigtail connector, and the pigtail port corresponding to the specific pigtail connector, the occupied port of the pigtail to which the tag belongs is determined.
[0086] Specifically, the frame area of each pigtail connector is determined based on the pigtail connector identification area; the frame area of the pigtail cable is determined based on the pigtail cable identification area; and the frame area of each pigtail port is determined based on the splitter port identification area.
[0087] If the frame area of the pigtail cable overlaps with the frame area of pigtail connector A, then the pigtail cable and pigtail connector A are identified as corresponding. If the frame area of the pigtail cable overlaps with both the frame areas of pigtail connector A and pigtail connector B, and the overlapping areas are a1 and b1 respectively, then determine which overlapping area, a1 or b1, has a larger area. If the area of overlapping area a1 is larger, then the pigtail cable and pigtail connector A are identified. If the area of overlapping area b1 is larger, then the pigtail cable and pigtail connector B are identified.
[0088] Based on the border area of each pigtail port in the splitter port identification area and the border area of the specific pigtail connector, determine which pigtail port's border area the specific pigtail connector's border area falls within. Then, the specific pigtail connector corresponds to the pigtail port that belongs to the aforementioned pigtail port's border area.
[0089] Based on the established correspondence between the pigtail cable and the specific pigtail connector, and the pigtail port corresponding to the specific pigtail connector, determine the occupied port of the pigtail to which the tag belongs.
[0090] The present invention provides a method and apparatus for detecting the port occupancy of pigtails. By processing the image to be detected, it quickly identifies the area of the splitter port and the pigtail label, extracts the pigtail connector identification area, and determines the pigtail cable identification area corresponding to the pigtail label through a region growing algorithm. Then, by the overlapping part of the pigtail cable identification area and the pigtail connector identification area, as well as the correspondence between the border area of the pigtail connector and the border area of the splitter port, it determines the specific port number occupied by the pigtail to which the label belongs, and returns the detection result in real time. It has improved the speed and accuracy to varying degrees.
[0091] Optionally, determining the border area of each pigtail connector in the pigtail connector identification area, determining the border area of the pigtail cable identification area, and determining the border area of each pigtail port in the splitter port identification area includes:
[0092] The images in the pigtail connector identification area, the pigtail cable identification area, and the splitter port identification area are binarized to obtain a binarized white area; the binarized white area is smoothed to obtain a smoothed white area, and the smoothed white area is used as the corresponding border area.
[0093] Specifically, based on the steps described above, after determining the pigtail connector identification area M, the pigtail cable identification area N, and the splitter port identification area P, the images in these three identification areas M, N, and P are binarized to obtain a binarized white area. Then, the binarized white area is smoothed. For example, if there are one or more scattered white pixels far from the binarized white area outside a continuous white pixel area, these scattered white pixels are deleted. This results in the border areas of the pigtail connector identification area M, the pigtail cable identification area N, and the splitter port identification area P.
[0094] The method and apparatus for detecting occupancy of pigtail ports provided by this invention quickly identify the areas of the splitter port and pigtail label by processing the image to be detected, extracting the pigtail connector identification area, and determining the pigtail cable identification area corresponding to the pigtail label through a region growing algorithm. Then, the above-mentioned splitter port identification area, pigtail label identification area, pigtail connector identification area, and pigtail cable identification area are binarized and smoothed to determine the border area of the above-mentioned identification areas more accurately, which is beneficial to the subsequent determination of the occupancy of pigtail ports.
[0095] Optionally, after determining the smooth white area corresponding to the beam splitter port identification area, the method further includes:
[0096] A vertical projection process is performed on the smooth white area corresponding to the beam splitter port identification area to obtain a histogram of the number of white pixels after projection. The histogram of the number of white pixels is used as the border area of the beam splitter port identification area.
[0097] Specifically, after determining the smooth white area corresponding to the beam splitter port identification area, it is necessary to determine the specific position range of each port, that is, the range of the horizontal coordinates corresponding to each port. In this invention, the smooth white area corresponding to the beam splitter port identification area is vertically projected to obtain a histogram of the number of white pixels after projection, as shown below. Figure 5 As shown in the diagram. Based on the histogram of white pixel counts above, determine the start and end positions and coverage area of each port region, and locate the specific location of each port. The port number starts from 1 by default and increases sequentially from right to left.
[0098] It should be noted that the defined border regions in this invention are irregular. Therefore, by projecting the border regions onto a horizontal baseline using a statistical method based on the number of pixels, a histogram of the number of white pixels corresponding to each region can be obtained. A vertical projection method is then used to process the smoothed white regions, resulting in a histogram of the number of white pixels on a unified baseline, providing a more accurate reference for subsequent alignment between border regions.
[0099] The present invention provides a method and apparatus for detecting the port occupancy of pigtails. By processing the image to be detected, it quickly identifies the area of the splitter port and the pigtail label, extracts the pigtail connector identification area, and determines the pigtail cable identification area corresponding to the pigtail label through a region growing algorithm. Then, by the overlapping part of the pigtail cable identification area and the pigtail connector identification area, as well as the correspondence between the border area of the pigtail connector and the border area of the splitter port, it determines the specific port number occupied by the pigtail to which the label belongs, and returns the detection result in real time. It has improved the speed and accuracy to varying degrees.
[0100] Optionally, the beam splitter port identification area is marked with a square frame, and before determining the frame area, it further includes:
[0101] Adjust the angle of the long side of the square frame of the recognition area of the beam splitter port to be vertical or horizontal, and adjust the image to be detected.
[0102] Specifically, the images to be inspected may not be horizontal due to inconsistent shooting angles by installation and maintenance personnel or deviations in the shooting angles of some equipment photos. This can affect the accuracy of determining the position of each port, thus requiring horizontal angle correction processing of the images to be inspected. The Hough transform algorithm is used to perform horizontal angle correction processing on the images to be inspected. It identifies lines that tend to be horizontal and their average tilt angles within the identified areas of the beam splitter ports. The images to be inspected are then rotated according to this tilt angle to ensure that the beam splitter ports in the images are horizontal. This involves adjusting the angle of the long side of the square frame of the identification area of the pigtail port to either a vertical or horizontal direction, thus adjusting the images to be inspected.
[0103] In this invention, the angle of the device's front is when the port is on top and the label is on the bottom. If the port is not above the label, the image is rotated (90°, 180°, or 270°).
[0104] After determining the border area of each pigtail port, number each border area according to the preset numbering rules to determine the port number of each pigtail port.
[0105] The present invention provides a method for detecting a vacant port of a pigtail, the process of which mainly includes four steps: detection of the splitter port and the pigtail label area, identification of the pigtail connector area, identification of the pigtail cable area, and determination of the vacant port.
[0106] 1) Detection of the splitter port and the pigtail tag area
[0107] First, a large number of historical photos of the production environment were collected, and the fiber optic splitter pigtail port and label were labeled.
[0108] Then, using deep learning object detection algorithms and labeled device images, the test detection model is trained until the accuracy of the test detection model in object recognition meets the user's requirements.
[0109] The model training yielded two target detection models: splitter pigtail port recognition and tag recognition. These models were then used to identify images of the equipment to be inspected, extracting the image portions of the splitter port and tag areas.
[0110] However, the beam splitter port area obtained during image acquisition is not perfectly horizontal. Preprocessing of the acquired image is necessary: using the Hough transform algorithm to correct the horizontal angle of the image to be detected, the line that tends towards horizontality and their average tilt angle of the identified beam splitter port area are found. The image to be detected is then rotated according to this tilt angle to ensure the beam splitter port is horizontal. In other words, the angle of the long side of the rectangular frame of the pigtail port's identification area is adjusted to be either vertical or horizontal, thus adjusting the image to be detected.
[0111] When the beam splitter port is on top and the label is on the bottom, this is the front angle of the device. If the beam splitter port is not above the label, the image is rotated (90°, 180°, or 270°).
[0112] In addition, to determine the port of the pigtail to which a single tag belongs, during the image acquisition process, installation and maintenance personnel can use a baffle to block other parts of the pigtail cable before taking the corresponding image.
[0113] 2) Identification of pigtail connector area
[0114] Extract the fiber optic connector identification area that belongs to the same type of pixel in the above-mentioned splitter port identification area. Here, the same type of pixel mainly refers to the pixel with the same color as the splitter port area. For example, if the splitter port area is blue, then identify the part area that is also blue; or if the splitter port area is green, then identify the part area that is also green; or if the splitter port area is blue and green, then identify the part area that is both blue and green.
[0115] 3) Pigtail cable area identification
[0116] After determining the identification area of the label through the above steps, the number of white pixels on the left and right sides of the corresponding smooth white area is determined according to the smooth white area corresponding to the label area. The side with fewer white pixels is determined to be the connection part of the pigtail label, and whether the connection part of the pigtail label is located on the left or right side of the identification area of the pigtail label.
[0117] If the number of pixels on the left and right sides of the label is not significantly different, the default position of the label's connection point is on the right side.
[0118] Above the identified tag and pigtail connection point, a seed point is selected for region growth, primarily in the horizontal direction. Growth stops upon encountering the pigtail area, at which point the outer boundary point of the target pigtail is determined. This boundary point is then used as a seed point for renewed growth, proceeding in all directions to identify the region with the same pixel count as the boundary point. This yields an image of the target pigtail from the tag connection point to the pigtail connector, which is the pigtail cable identification area to which the tag belongs. To ensure overlap between the pigtail connector area and the pigtail cable identification area, a predetermined number of pixels are extended outwards from the pigtail cable identification area to expand it, thus determining the final pigtail cable identification area.
[0119] 4) Port occupancy determination
[0120] For the effective area of the port image, the start and end positions and coverage of each port area are determined by combining the histogram of the number of pixels after projection, and the specific location of each port is located.
[0121] By identifying the overlapping area of the pigtail cable identification area obtained in the third step and the pigtail connector identification area obtained in the second step, it is determined which specific connector in the pigtail cable and pigtail connector to which the tag belongs, such as pigtail connector A.
[0122] Then, based on the border areas of each pigtail port in the splitter port identification area identified in the first step, and the border areas of each pigtail connector in the pigtail connector identification area in the third step, it is determined which specific pigtail port border area corresponds to pigtail connector A. That is, the horizontal coordinate of the pixel point in the border area of pigtail connector A is within the range of the horizontal coordinate of which pigtail port. Assuming it is within the position range of pigtail port 3, the correspondence between pigtail connector A and pigtail port 3 is determined.
[0123] Finally, based on the aforementioned pigtail label, the corresponding pigtail port number was determined, which determined which specific port of the splitter the pigtail was plugged into.
[0124] The detection device for occupancy of pigtail ports provided by the present invention will be described below. The detection device for occupancy of pigtail ports described below can be referred to in correspondence with the detection method for occupancy of pigtail ports described above.
[0125] Figure 6 This invention provides a detection device for the occupancy of a fiber optic port, such as... Figure 6 As shown, the device includes:
[0126] The recognition module 601 is used to determine the recognition area of the beam splitter port and the recognition area of the pigtail tag in the image to be detected based on a deep learning target detection algorithm.
[0127] Extraction module 602 is used to determine, based on a color extraction method, the identification area of the splitter port and the identification area of the pigtail connector belonging to the same type of pixel;
[0128] The growth module 603 is used to determine the pigtail cable identification area corresponding to the pigtail tag based on the region growth algorithm.
[0129] The detection module 604 is used to determine the occupied port of the pigtail to which the tag belongs based on the overlapping area of the pigtail connector identification area and the pigtail cable identification area, and the border area of each pigtail port in the splitter port identification area.
[0130] Optionally, the recognition module 601 is further configured to perform binarization and smoothing processing on the image in the recognition area of the pigtail label to obtain a smooth white area corresponding to the pigtail label;
[0131] Based on the number of white pixels on the left and right sides of the smooth white area, determine whether the side with fewer white pixels is the connection part of the pigtail tag, and whether the connection part of the pigtail tag is located on the left or right side of the pigtail tag recognition area.
[0132] The pigtail label includes a content section and a connecting section, wherein the width of the content section is greater than the width of the connecting section.
[0133] Optionally, the growth module 603 is also used to select a seed point above the area outside the connection part of the pigtail tag based on a region growth algorithm, and grow in the horizontal direction to determine the outer boundary point of the pigtail to which the pigtail tag belongs.
[0134] Using the outer boundary point of the pigtail as the seed point and the pixel corresponding to the outer boundary point of the pigtail as the reference pixel, the area with the same pixel as the reference pixel is determined by growing in all directions, and is used as the first fiber identification area.
[0135] Based on the first fiber identification area, a preset number of pixels are extended outwards to determine the pigtail fiber identification area.
[0136] Optionally, the detection module 604 is also used to determine the border area of each pigtail connector in the pigtail connector identification area, the border area of the pigtail cable identification area, and the border area of each pigtail port in the splitter port identification area.
[0137] Based on the overlapping area of the border area of each pigtail connector in the pigtail connector identification area and the border area of the pigtail cable identification area, the correspondence between the pigtail cable and the specific pigtail connector is determined.
[0138] Based on the border area of each pigtail port in the splitter port identification area and the border area of the specific pigtail connector, the pigtail port corresponding to the specific pigtail connector is determined.
[0139] Based on the correspondence between the pigtail cable and the specific pigtail connector, and the pigtail port corresponding to the specific pigtail connector, the occupied port of the pigtail to which the tag belongs is determined.
[0140] Optionally, the recognition module 601 is further configured to perform binarization processing on the images in the pigtail connector recognition area, the pigtail cable recognition area, and the splitter port recognition area to obtain a binarized white area; to perform smoothing processing on the binarized white area to obtain a smoothed white area, and to use the smoothed white area as the corresponding border area.
[0141] Optionally, the recognition module 601 is further configured to perform vertical projection processing on the smooth white area corresponding to the beam splitter port recognition area to obtain a histogram of the number of white pixels after projection, and use the histogram of the number of white pixels as the border area of the beam splitter port recognition area.
[0142] Optionally, the recognition module 601 is also used to adjust the angle of the long side of the square frame of the recognition area of the beam splitter port to the vertical or horizontal direction to adjust the image to be detected.
[0143] It should be noted that the division of units in the embodiments of this application is illustrative and only represents one logical functional division. In actual implementation, other division methods may be used. Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated units described above can be implemented in hardware or as software functional units.
[0144] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a processor-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) or processor to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0145] It should be noted that the apparatus provided in this application embodiment can implement all the method steps implemented in the above method embodiment and can achieve the same technical effect. Here, the parts that are the same as those in the method embodiment and the beneficial effects will not be described in detail.
[0146] Figure 7 An example of an electronic device for detecting occupancy of a pigtail port is provided, such as Figure 7 As shown, the electronic device may include a processor 710, a communication interface 720, a memory 730, and a communication bus 740, wherein the processor 710, the communication interface 720, and the memory 730 communicate with each other via the communication bus 740. The processor 710 can call the computer program in the memory 730 to execute the steps of the fiber optic port occupancy detection method provided by this invention.
[0147] Furthermore, the logical instructions in the aforementioned memory 730 can be implemented as software functional units and, when sold or used as independent products, can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, essentially, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0148] It should be noted that the electronic device for detecting the occupancy of the pigtail port provided in this application embodiment can implement all the method steps implemented in the above method embodiment and can achieve the same technical effect. Here, the parts that are the same as those in the method embodiment and the beneficial effects will not be described in detail.
[0149] On the other hand, the present invention also provides a computer program product, the computer program product comprising a computer program stored on a non-transitory computer-readable storage medium, the computer program comprising program instructions, which, when executed by a computer, enable the computer to perform the steps of the fiber optic port occupancy detection method provided by the above methods, for example including:
[0150] Based on a deep learning object detection algorithm, the recognition areas of the beam splitter port and the pigtail tag in the image to be detected are determined.
[0151] Based on the color extraction method, the identification area of the splitter port is determined to be the identification area of the pigtail connector of the same type of pixel;
[0152] Based on the region growing algorithm, the pigtail cable identification area corresponding to the pigtail tag is determined;
[0153] Based on the overlapping area of the pigtail connector identification area and the pigtail cable identification area, and the border area of each pigtail port in the splitter port identification area, the occupied port of the pigtail to which the tag belongs is determined.
[0154] On the other hand, embodiments of this application also provide a processor-readable storage medium storing a computer program for causing the processor to perform the steps of the methods provided in the above embodiments, such as including:
[0155] Based on a deep learning object detection algorithm, the recognition areas of the beam splitter port and the pigtail tag in the image to be detected are determined.
[0156] Based on the color extraction method, the identification area of the beam splitter port is determined to be the identification area of the pigtail connector of the same type of pixel;
[0157] Based on the region growing algorithm, the pigtail cable identification area corresponding to the pigtail tag is determined;
[0158] Based on the overlapping area of the pigtail connector identification area and the pigtail cable identification area, and the border area of each pigtail port in the splitter port identification area, the occupied port of the pigtail to which the tag belongs is determined.
[0159] The processor-readable storage medium can be any available medium or data storage device that the processor can access, including but not limited to magnetic memory (e.g., floppy disk, hard disk, magnetic tape, magneto-optical disk (MO)), optical memory (e.g., CD, DVD, BD, HVD), and semiconductor memory (e.g., ROM, EPROM, EEPROM, non-volatile memory (NAND FLASH), solid-state drive (SSD)).
[0160] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Those skilled in the art can understand and implement this without any creative effort.
[0161] Through the above description of the embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus necessary general-purpose hardware platforms, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solutions, in essence or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods described in the various embodiments or some parts of the embodiments.
[0162] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A method for detecting occupancy of a fiber optic port, characterized in that, include: Based on a deep learning object detection algorithm, the recognition areas of the beam splitter port and the pigtail tag in the image to be detected are determined. Based on the color extraction method, the identification area of the splitter port is determined to be the identification area of the pigtail connector of the same type of pixel; Based on the region growing algorithm, the pigtail cable identification area corresponding to the pigtail tag is determined; Based on the overlapping area of the pigtail connector identification area and the pigtail cable identification area, and the correspondence between the border area of the pigtail connector in the pigtail connector identification area and the border area of the splitter port in the splitter port identification area, the occupied port of the pigtail to which the tag belongs is determined, including: determining the border area of each pigtail connector in the pigtail connector identification area, determining the border area of the pigtail cable identification area, and determining the border area of each pigtail port in the splitter port identification area; based on the overlapping area of the border areas of each pigtail connector in the pigtail connector identification area and the border area of the pigtail cable identification area, the correspondence between the pigtail cable and the specific pigtail connector is determined. Based on the border area of each pigtail port in the identification area of the splitter port and the border area of the specific pigtail connector, the pigtail port corresponding to the specific pigtail connector is determined; based on the correspondence between the pigtail cable and the specific pigtail connector, and the pigtail port corresponding to the specific pigtail connector, the occupied port of the pigtail to which the tag belongs is determined.
2. The method for detecting occupancy of a pigtail port according to claim 1, characterized in that, Before determining the pigtail cable identification area corresponding to the pigtail tag based on the region growing algorithm, the method further includes: The image in the pigtail tag recognition area is binarized and smoothed to obtain a smooth white area corresponding to the pigtail tag. Based on the number of white pixels on the left and right sides of the smooth white area, determine whether the side with fewer white pixels is the connection part of the pigtail tag, and whether the connection part of the pigtail tag is located on the left or right side of the pigtail tag recognition area. The pigtail label includes a content section and a connecting section, wherein the width of the content section is greater than the width of the connecting section.
3. The method for detecting occupancy of a pigtail port according to claim 1, characterized in that, The process of determining the pigtail cable identification region corresponding to the pigtail tag based on the region growing algorithm includes: Based on the region growth algorithm, a seed point is selected above the area outside the connection part of the pigtail tag, and the growth is carried out in the horizontal direction to determine the outer boundary point of the pigtail to which the pigtail tag belongs. Using the outer boundary point of the pigtail as the seed point and the pixel corresponding to the outer boundary point of the pigtail as the reference pixel, the area with the same pixel as the reference pixel is determined by growing in all directions, and is used as the first fiber identification area. Based on the first fiber identification area, a preset number of pixels are extended outwards to determine the pigtail fiber identification area.
4. The method for detecting occupancy of a pigtail port according to claim 1, characterized in that, The process of determining the border area of each pigtail connector in the pigtail connector identification area, determining the border area of the pigtail cable identification area, and determining the border area of each pigtail port in the splitter port identification area includes: The images in the pigtail connector identification area, the pigtail cable identification area, and the splitter port identification area are binarized to obtain a binarized white area; the binarized white area is smoothed to obtain a smoothed white area, and the smoothed white area is used as the corresponding border area.
5. The method for detecting occupancy of a pigtail port according to claim 4, characterized in that, After determining the smooth white area corresponding to the recognition area of the beam splitter port, the method further includes: A vertical projection process is performed on the smooth white area corresponding to the recognition area of the beam splitter port to obtain a histogram of the number of white pixels after projection. The histogram of the number of white pixels is used as the border area of the recognition area of the beam splitter port.
6. The method for detecting occupancy of a pigtail port according to claim 5, characterized in that, The recognition area of the beam splitter port is marked with a square frame. Before determining the frame area, it also includes: Adjust the angle of the long side of the square frame of the recognition area of the beam splitter port to be vertical or horizontal, and adjust the image to be detected.
7. A device for detecting occupancy of a fiber optic port, characterized in that, include: The recognition module is used to determine the recognition area of the beam splitter port and the recognition area of the pigtail tag in the image to be detected based on a deep learning target detection algorithm. The extraction module is used to determine, based on the color extraction method, the identification area of the fiber optic connector that belongs to the same type of pixel as the identification area of the beam splitter port; The growth module is used to determine the pigtail cable identification area corresponding to the pigtail tag based on the region growth algorithm. The detection module is used to determine the occupied port of the pigtail to which the tag belongs based on the overlapping area of the pigtail connector identification area and the pigtail cable identification area, as well as the correspondence between the border area of the pigtail connector in the pigtail connector identification area and the border area of the splitter port in the splitter port identification area. The detection module is specifically used to determine the border area of each pigtail connector in the pigtail connector identification area, the border area of the pigtail cable identification area, and the border area of each pigtail port in the splitter port identification area; based on the overlapping area of the border areas of each pigtail connector in the pigtail connector identification area and the border areas of the pigtail cable identification area, the module determines the correspondence between the pigtail cable and the specific pigtail connector. Based on the border area of each pigtail port in the identification area of the splitter port and the border area of the specific pigtail connector, the pigtail port corresponding to the specific pigtail connector is determined; based on the correspondence between the pigtail cable and the specific pigtail connector, and the pigtail port corresponding to the specific pigtail connector, the occupied port of the pigtail to which the tag belongs is determined.
8. An electronic device for detecting occupancy of a fiber optic port, comprising a processor and a memory storing a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the detection method for detecting a pigtail occupying a port as described in any one of claims 1 to 6.
9. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the steps of the detection method for occupancy of a pigtail port as described in any one of claims 1 to 6.
Citation Information
Patent Citations
Method for inspecting construction consistency of optical splitter in installation and maintenance quality inspection
CN110956366A
