Pigtail port occupation detection method, device, electronic device and storage medium

By determining the border area of ​​the pigtail port and label in the pigtail occupancy port detection, using image recognition model and machine learning technology, the accuracy and speed problems of pigtail occupancy port detection are solved, and fast and accurate pigtail port and label area recognition is achieved.

CN115131546BActive Publication Date: 2025-08-22CHINA MOBILE GRP GUANGDONG CO LTD +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202110322117.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-03-25
Publication Date
2025-08-22
Estimated Expiration
2041-03-25

AI Technical Summary

Technical Problem

The existing pigtail occupancy port detection methods have the problems of high target recognition error rate and low detection accuracy. Especially when there are multiple tags in the equipment picture, it is impossible to accurately identify the location of the pigtail label, which affects the accuracy of the detection.

Method used

By determining the border area of ​​the pigtail port and the pigtail label, using image recognition model and machine learning technology, combining binarization and vertical projection processing, the identification area of ​​the pigtail port and label are accurately divided, and aligned and compared according to the preset sorting rules, the specific location of the pigtail occupies the port.

Benefits of technology

The computing speed and accuracy of the pigtail occupancy port detection are improved, and fast and accurate pigtail port and tag area recognition is achieved, and the detection results are returned in real time.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115131546B_ABST
    Figure CN115131546B_ABST
Patent Text Reader

Abstract

The present invention provides a method, device, electronic device, and storage medium for detecting occupied fiber pigtail ports. The method comprises: determining a fiber pigtail port identification area and a fiber pigtail label identification area in an image to be detected; determining a frame area of ​​each fiber pigtail port in the fiber pigtail port identification area, and determining a frame area of ​​the label in the fiber pigtail label identification area; and determining the occupied port of the fiber pigtail to which the label belongs based on the frame area of ​​each fiber pigtail port and the frame area of ​​the label. The method, device, electronic device, and storage medium for detecting occupied fiber pigtail ports provided by the present invention process the image to be detected to quickly identify the areas of the fiber pigtail ports and the fiber pigtail labels, then demarcate the frame positions of each port and label from the area, then align and compare the frame positions to determine the specific position of the fiber pigtail occupied port, and return the detection result in real time, thereby improving the computing speed and accuracy to varying degrees.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of image processing technology, and in particular to a method, device, electronic equipment and storage medium for detecting a pigtail occupied port. Background Art

[0002] The goal of the splitter pigtail occupied port detection method is to detect the port occupancy status of the splitter pigtail in real time by identifying on-site photos taken by installation and maintenance personnel, so as to determine whether the installation and maintenance construction meets the requirements.

[0003] Existing technical solutions use semantic segmentation algorithms to detect splitter pigtail labels. After identifying the label and port location, the algorithm calculates and selects the port with the highest overlap between the target pixel position and the pixels in any port detection area. However, this results in high target recognition error rates and low detection accuracy. If multiple labels are present in a device image, the label position on the pigtail cannot be accurately identified, leading to other labels being mistakenly identified as the target pigtail label. Furthermore, the occupied port number is derived by calculating and selecting the overlap between the target pixel position and the pixels in any port detection area, affecting detection accuracy. Summary of the Invention

[0004] In view of the problems existing in the prior art, the present invention provides a method and device for detecting a pigtail occupied port, an electronic device and a storage medium.

[0005] In a first aspect, the present invention provides a method for detecting a pigtail occupied port, comprising:

[0006] Determine a pigtail port identification area and a pigtail label identification area in the image to be detected; wherein the plurality of pigtail ports in the image to be detected are arranged, the labels in the image to be detected do not overlap, the labels include a content portion and a connecting portion, and the width of the content portion is different from the width of the connecting portion;

[0007] Determine the border area of ​​each pigtail port in the pigtail port identification area, and determine the border area of ​​the label in the pigtail label identification area;

[0008] The occupied port of the pigtail to which the label belongs is determined based on the border area of ​​each pigtail port and the border area of ​​the label.

[0009] In one embodiment, determining the occupied port of the pigtail to which the label belongs based on the border area of ​​each pigtail port and the border area of ​​the label includes:

[0010] If the width of the content portion is greater than the width of the connecting portion, the fiber optic port corresponding to the fiber optic port frame area aligned with the narrow sides of the left and right sides of the label frame area is used as the occupied port of the fiber optic port to which the label belongs, based on the arrangement direction of the fiber optic port;

[0011] If the width of the content portion is smaller than the width of the connecting portion, the fiber optic port corresponding to the frame area of ​​the fiber optic port whose wide sides are aligned with the left and right sides of the frame area of ​​the label shall be used as the occupied port of the fiber optic port to which the label belongs, based on the arrangement direction of the fiber optic port.

[0012] In one embodiment, determining the border area of ​​each pigtail port in the pigtail port identification area and determining the border area of ​​the label in the pigtail label identification area includes:

[0013] The images in the pigtail port identification area and the pigtail label identification area are binarized to obtain a binary white area; the binarized white area is smoothed to obtain a smooth white area, and the smooth white area is used as the corresponding frame area.

[0014] In one embodiment, after obtaining the smooth white area, the method further includes:

[0015] Perform vertical projection processing on the smooth white area to obtain the projected white pixel number histogram, and use the white pixel number histogram as the corresponding border area.

[0016] In one embodiment, determining the pigtail port identification area and the pigtail label identification area in the image to be detected includes:

[0017] Obtaining image features of the image to be detected, inputting the image features into an image recognition model, obtaining a recognition result output by the image recognition model, and using the recognition result to divide the recognition area of ​​the pigtail port and the pigtail label;

[0018] The image recognition model is a model obtained through machine learning training using image features determined based on sample images and identification areas in the sample images as inputs, and is used to divide the pigtail ports and pigtail labels in the images.

[0019] In one embodiment, the identification area is marked with a square frame, and before determining the border area, the following steps are further included:

[0020] Adjust the angle of the long side of the square wireframe of the identification area of ​​the pigtail port to the vertical direction or the horizontal direction, and adjust the image to be detected.

[0021] In one embodiment, after determining the border area of ​​each pigtail port, the method further includes:

[0022] Each border area is numbered according to the preset numbering rules to determine the port number of each pigtail port.

[0023] In a second aspect, the present invention provides a device for detecting a pigtail occupied port, comprising:

[0024] An identification module is configured to determine a pigtail port identification area and a pigtail label identification area in a to-be-detected image; wherein the plurality of pigtail ports in the to-be-detected image are arranged in an array, the labels in the to-be-detected image do not overlap, and the labels include a content portion and a connecting portion, wherein the width of the content portion is different from the width of the connecting portion;

[0025] A processing module, configured to determine a border area of ​​each pigtail port in the pigtail port identification area, and determine a border area of ​​a label in the pigtail label identification area;

[0026] The detection module is used to determine the occupied port of the pigtail to which the label belongs according to the frame area of ​​each pigtail port and the frame area of ​​the label.

[0027] In a third aspect, the present invention provides an electronic device comprising a memory and a memory storing a computer program, wherein when the processor executes the program, the step of detecting the pigtail occupied port as described in the first aspect is implemented.

[0028] In a fourth aspect, the present invention provides a processor-readable storage medium storing a computer program, wherein the computer program is used to enable the processor to execute the steps of the pigtail occupied port detection method according to the first aspect.

[0029] The present invention provides a method, device, electronic device, and storage medium for detecting a pigtail port being occupied. By processing an image to be detected, the method quickly identifies the area of ​​the pigtail port and the pigtail label, then divides the border positions of each port and label from the area, and then aligns and compares the border positions to determine the specific position of the pigtail port being occupied, and returns the detection results in real time, thereby achieving varying degrees of improvement in computing speed and accuracy. BRIEF DESCRIPTION OF THE DRAWINGS

[0030] In order to more clearly illustrate the technical solutions in the present invention or the prior art, a brief introduction is given below to the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0031] Figure 1 1 is a flow chart of a method for detecting a pigtail occupied port provided by the present invention;

[0032] Figure 2 This is one of the detection demonstration diagrams of the method for detecting a pigtail occupied port provided by the present invention;

[0033] Figure 3 This is the second detection illustration of the method for detecting a pigtail occupied port provided by the present invention;

[0034] Figure 4 This is a diagram showing the border area of ​​the port provided by the present invention;

[0035] Figure 5 This is a display diagram of the border area of ​​the label provided by the present invention;

[0036] Figure 6 is a pixel number histogram of the port provided by the present invention;

[0037] Figure 7 is a pixel number histogram of the port provided by the present invention;

[0038] Figure 8 It is a structural schematic diagram of the pigtail occupied port detection device provided by the present invention;

[0039] Figure 9 It is a structural schematic diagram of the electronic device provided by the present invention; DETAILED DESCRIPTION

[0040] To make the objectives, technical solutions, and advantages of the present invention more clear, the technical solutions of the present invention will be clearly and completely described below in conjunction with the accompanying drawings. Obviously, the embodiments described are only some of the embodiments of the present invention, not all of them. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts shall fall within the scope of protection of the present invention.

[0041] The following combination Figures 1-9 The present invention describes a method, device, electronic device and storage medium for detecting a pigtail occupied port.

[0042] Figure 1 A schematic diagram showing a process flow of a method for detecting a pigtail occupied port according to the present invention is shown. Figure 1 , the method comprising:

[0043] 11. Determine a pigtail port identification area and a pigtail label identification area in the image to be inspected; wherein the plurality of pigtail ports in the image to be inspected are arranged, the labels in the image to be inspected do not overlap, the labels include a content portion and a connecting portion, and the width of the content portion is different from the width of the connecting portion;

[0044] 12. Determine the border area of ​​each pigtail port in the pigtail port identification area, and determine the border area of ​​the label in the pigtail label identification area;

[0045] 13. Determine the occupied port of the pigtail to which the label belongs based on the border area of ​​each pigtail port and the border area of ​​the label.

[0046] In this regard, it should be noted that in the present invention, the pigtail is also called a pigtail, which has a connector at only one end, and the other end is the broken end of an optical cable core, which is connected to other optical cable cores by fusion splicing and often appears in optical fiber equipment (such as splitters).

[0047] Fiber optic equipment is equipped with multiple ports that facilitate the insertion of pigtails. Since these ports are used for pigtail insertion, they are referred to as pigtail ports in the description of the present invention. These ports are arranged in sequence. For example, they are placed in sequence from left to right. Fiber optic equipment is an existing product, so the port arrangement on the fiber optic terminal is not shown in the accompanying drawings. In actual applications, these ports are sometimes all plugged into the connectors of the pigtails, and sometimes partially plugged into the connectors of the pigtails. Therefore, when identifying the ports, the identification area includes both ports with connectors plugged in and ports without connectors plugged in.

[0048] The pigtail is equipped with a corresponding label. This label consists of a content section and a connection section. The content section is printed with text describing the pigtail. The connection section is used to loop around the pigtail cable.

[0049] In the present invention, the width of the content portion is different from the width of the connecting portion. The connecting portion mainly plays the role of binding cables, so the width of the connecting portion is narrower than the width of the content portion.

[0050] In this invention, the method uses on-site images captured by installation and maintenance personnel to detect port occupancy at fiber optic terminals in real time, thereby determining whether installation and maintenance work meets requirements. This determination of compliance relies on verifying whether the labeled fiber pigtails are plugged into the correct ports. To achieve this, the labels in the image to be inspected must not overlap. Typically, only one complete label is displayed in the image. This effectively allows for individual determination of the connection status of each fiber pigtail.

[0051] In this method, after acquiring the image to be inspected, it is necessary to analyze the image to identify the pigtail port identification area and the pigtail label identification area. After the area is identified, it is marked with a square wireframe. That is, the image portion showing the port and label is circled with a square wireframe.

[0052] In the present invention, the identification area is larger than the actual size of the port and label. To this end, further analysis and processing are required for each identification area to determine the border area of ​​each pigtail port within the pigtail port identification area, and the border area of ​​each label within the pigtail label identification area. This border area more closely approximates the actual size of the port and label. In other words, the area enclosed by the edge of the port is equivalent to this border area.

[0053] In the present invention, since the identified label represents a unique pigtail, it is necessary to compare the frame area of ​​the label with the frame area of ​​each pigtail port to determine which port on the optical fiber terminal the pigtail to which the label belongs is plugged in.

[0054] The size of the label is much larger than that of the pigtail cable. Therefore, the portion of the label's border area representing the connection portion can be aligned with the border area of ​​each pigtail port, and the port corresponding to the aligned border area is used as the occupied port.

[0055] In addition, it should be noted that since the pigtail cable is a flexible product, the label may deviate during the actual process. In this case, the label in the captured image will correspond to the wrong port, resulting in a violation of the label installation requirements. Therefore, the requirements for capturing the image to be tested are relatively high. In this case, simply straighten the pigtail cable and then take the image, and the resulting image will be relatively consistent with the requirements for the image to be tested.

[0056] The method for detecting pigtail occupied ports provided by the present invention processes the image to be detected, quickly identifies the area of ​​the pigtail port and the pigtail label, then divides the frame position of each port and label from the area, and then aligns and compares the frame position to determine the specific position of the pigtail occupied port, and returns the detection result in real time, which has different degrees of improvement in calculation speed and accuracy.

[0057] In the further description of the above method, the process of determining the occupied port of the pigtail to which the label belongs based on the border area of ​​each pigtail port and the border area of ​​the label is mainly explained as follows:

[0058] If the width of the content portion is greater than the width of the connection portion, the fiber optic port corresponding to the fiber optic port frame area aligned with the narrow sides of the left and right sides of the label's border area is used as the occupied port of the fiber optic port to which the label belongs;

[0059] If the width of the content portion is smaller than the width of the connection portion, the fiber optic port corresponding to the fiber optic port whose border area is aligned with the wide sides of the left and right sides of the label's border area shall be used as the occupied port of the fiber optic port belonging to the label based on the arrangement direction of the fiber optic port.

[0060] In this regard, it should be noted that in the present invention, see Figure 2 and Figure 3 Due to the different shooting angles of maintenance personnel, a row of ports may not be strictly horizontal. If the width of the content of the label is greater than the width of the connection part, the border area of ​​the label will be Figure 2 and Figure 3 The "convex" area at the bottom.

[0061] The label is attached to the cable with the label's content located on the left or right side of the cable. Figure 2 and Figure 3 The narrow side of the label will be located on the left or right side of the border area of ​​the label. In the present invention, the portion of the label's border area that represents the connection portion can be aligned with the border area of ​​each pigtail port, and the port corresponding to the aligned border area is used as the occupied port. To this end, the narrow side represents the outer edge of the connection portion, so based on the arrangement direction of the pigtail port, the system identifies the narrow side of the left and right sides of the label's border area as representing the outer edge of the connection portion, and then the pigtail port corresponding to the border area of ​​the pigtail port aligned with the narrow side is occupied (see Figure 2 and Figure 3 The vertical dotted line in the figure, the port corresponding to the dotted line, is used as the occupied port of the pigtail to which the tag belongs.

[0062] When the width of the content is smaller than the width of the connection, the display method is the same as Figure 2 and Figure 3 Similarly, the attached figure is not used again. In this case, the arrangement direction of the pigtail port is used as a reference, and the pigtail port corresponding to the pigtail port frame area that aligns the wide sides of the left and right sides of the label frame area is used as the occupied port of the pigtail to which the label belongs.

[0063] In addition, it should be noted that since the narrow or wide edge mentioned above may be tilted during the identification process, strictly aligning and searching for the pigtail port according to the dotted line will result in detection errors. Therefore, the starting point, midpoint, or end point of the narrow or wide edge can be used to align and search for the pigtail port.

[0064] A further method of the present invention can align the outer edge of the connection part of the label in the border area of ​​the label with the border area of ​​each fiber optic port according to different label design conditions, and use the port corresponding to the aligned border area as the occupied port to achieve accurate detection.

[0065] In the further description of the above method, the process of determining the border area of ​​each pigtail port in the pigtail port identification area and determining the border area of ​​the label in the pigtail label identification area is mainly explained as follows:

[0066] The images in the pigtail port identification area and the pigtail label identification area are binarized to obtain a binary white area; the binary white area is smoothed to obtain a smooth white area, and the smooth white area is used as the corresponding border area.

[0067] In this regard, it should be noted that in the present invention, see Figure 4 and Figure 5, which respectively display the port and label. Figure 4 The white area and Figure 5 The white areas in the image represent the borders of the ports and labels, respectively, after binarization and / or smoothing of the identified regions. Images outside the identified regions are simply filled with black pixels. In this case, the white areas serve as the borders of the ports and labels.

[0068] A further method of the present invention uses binarization to process the recognition area and reduce the recognition area, which can accurately and quickly divide the ports and labels on the image to obtain the frame areas of the ports and labels.

[0069] In the further description of the above method, the process of continuing to process the smooth white area after obtaining the smooth white area is mainly explained as follows:

[0070] Perform vertical projection processing on the smooth white area to obtain the projected white pixel number histogram, and use the white pixel number histogram as the corresponding border area.

[0071] In this regard, it should be noted that, in the present invention, the divided border area has irregularities, so the border area is projected onto a horizontal baseline in a statistical manner of pixel count to obtain a histogram of the number of white pixels corresponding to each. Figure 6 and Figure 7 The white pixel count histogram is then used as the border area of ​​the port and label.

[0072] A further method of the present invention processes the smoothed white area using a vertical projection method to obtain a histogram of the number of white pixels on a unified baseline, thereby providing a more accurate reference for subsequent alignment between border areas.

[0073] In the further description of the above method, the process of determining the pigtail port identification area and the pigtail label identification area in the image to be detected is mainly explained as follows:

[0074] Obtain image features of the image to be detected, input the image features into the image recognition model, obtain the recognition results output by the image recognition model, and use the recognition results to divide the recognition areas of the pigtail port and the pigtail label;

[0075] Among them, the image recognition model is a model obtained through machine learning training that uses image features determined based on sample images and identification areas in the sample images as input, and is used to divide the fiber pigtail ports and fiber pigtail labels in the image.

[0076] In this regard, it should be noted that, in the present invention, historically stored on-site pictures of ports plugging pigtails are collected, and the pigtail port portion and label portion are annotated using graphic tools as sample pictures.

[0077] For the annotated images, a neural network model is used for training, and the parameters are adjusted according to each detection result to obtain an image recognition model that divides the pigtail ports and pigtail labels in the image.

[0078] Then, the trained model is used to identify the image to be detected and the identification areas of the pigtail port and pigtail label are divided. In the present invention, since the port position and label image features are obvious, the trained image recognition model can detect the identification areas of the port and label with good performance and accuracy.

[0079] In the further description of the above method, the processing before determining the border area is mainly explained, as follows:

[0080] Adjust the angle of the long side of the square wireframe of the identification area of ​​the pigtail port to the vertical direction or the horizontal direction, and adjust the image to be detected.

[0081] In this regard, it should be noted that due to inconsistent shooting angles by installation and maintenance personnel, when the port position is not in a horizontal position, the accuracy of the port position determination will be affected. Therefore, the port image needs to be horizontally corrected. The angle of the long side of the square wireframe in the identification area of ​​the pigtail port is adjusted to the vertical or horizontal direction, and the image to be inspected is adjusted.

[0082] In the present invention, when the port is at the top and the label is at the bottom, the device is viewed from the front. If the port is not above the label, the image is rotated by 90°, 180°, or 270°.

[0083] After the frame area of ​​each pigtail port is determined, each frame area is numbered according to a preset numbering rule to determine the port number of each pigtail port.

[0084] The following describes a device for detecting a pigtail port occupied by a fiber optic cable provided by the present invention. The device for detecting a pigtail port occupied by a fiber optic cable described below and the method for detecting a pigtail port occupied by a fiber optic cable described above can be referred to in correspondence with each other.

[0085] Figure 8 A schematic diagram of the structure of a pigtail port occupied detection device provided by the present invention is shown. Figure 8 The device includes an identification module 81, a processing module 82 and a detection module 83, wherein:

[0086] an identification module 81 for determining a pigtail port identification area and a pigtail label identification area in the image to be detected; wherein the plurality of pigtail ports in the image to be detected are arranged so that the labels in the image to be detected do not overlap, and the labels include a content portion and a connecting portion, and the width of the content portion is different from the width of the connecting portion;

[0087] The processing module 82 is used to determine the border area of ​​each pigtail port in the pigtail port identification area and determine the border area of ​​the label in the pigtail label identification area;

[0088] The detection module 83 is configured to determine the occupied port of the pigtail to which the label belongs based on the frame area of ​​each pigtail port and the frame area of ​​the label.

[0089] In a further description of the above device, the detection module is specifically used to:

[0090] If the width of the content portion is greater than the width of the connecting portion, the fiber optic port corresponding to the fiber optic port frame area aligned with the narrow sides of the left and right sides of the label frame area is used as the occupied port of the fiber optic port to which the label belongs, based on the arrangement direction of the fiber optic port;

[0091] If the width of the content portion is smaller than the width of the connecting portion, the fiber optic port corresponding to the frame area of ​​the fiber optic port whose wide sides are aligned with the left and right sides of the frame area of ​​the label shall be used as the occupied port of the fiber optic port to which the label belongs, based on the arrangement direction of the fiber optic port.

[0092] In a further description of the above device, the processing module is specifically used to:

[0093] The images in the pigtail port identification area and the pigtail label identification area are binarized to obtain a binary white area; the binarized white area is smoothed to obtain a smooth white area, and the smooth white area is used as the corresponding frame area.

[0094] In a further description of the above device, the processing module is specifically used for further processing after obtaining the smooth white area:

[0095] Perform vertical projection processing on the smooth white area to obtain the projected white pixel number histogram, and use the white pixel number histogram as the corresponding border area.

[0096] In a further description of the above device, the identification module is used to determine the pigtail port identification area and the pigtail label identification area in the image to be detected, specifically:

[0097] Obtaining image features of the image to be detected, inputting the image features into an image recognition model, obtaining a recognition result output by the image recognition model, and using the recognition result to divide the recognition area of ​​the pigtail port and the pigtail label;

[0098] The image recognition model is a model obtained through machine learning training using image features determined based on sample images and identification areas in the sample images as inputs, and is used to divide the pigtail ports and pigtail labels in the images.

[0099] In further description of the above device, the identification area is marked with a square frame, and the identification module is further used to:

[0100] Adjust the angle of the long side of the square wireframe of the identification area of ​​the pigtail port to the vertical direction or the horizontal direction, and adjust the image to be detected.

[0101] In a further description of the above device, the processing module is specifically used in the further processing process after determining the border area of ​​each pigtail port:

[0102] Each border area is numbered according to the preset numbering rules to determine the port number of each pigtail port.

[0103] Since the principles of the apparatus described in the embodiment of the present invention are the same as those of the method described in the above embodiment, more detailed explanations are omitted here.

[0104] It should be noted that, in the embodiment of the present invention, relevant functional modules can be implemented by a hardware processor.

[0105] The pigtail port occupied detection device provided by the present invention processes the image to be detected, quickly identifies the area of ​​the pigtail port and the pigtail label, then divides the frame position of each port and label from the area, and then aligns and compares the frame position to determine the specific position of the pigtail occupied port, and returns the detection result in real time, which has different degrees of improvement in calculation speed and accuracy.

[0106] Figure 9 An example of a physical structure diagram of an electronic device is shown below. Figure 9As shown, the electronic device may include: a processor 91, a communication interface 92, a memory 93 and a communication bus 94, wherein the processor 91, the communication interface 92 and the memory 93 communicate with each other via the communication bus 94. The processor 91 may call a computer program in the memory 93 to execute the steps of the pigtail occupied port detection method, for example, including: determining a pigtail port identification area and a pigtail label identification area in the image to be detected; wherein the plurality of pigtail ports in the image to be detected are arranged, the labels in the image to be detected do not overlap, the labels include a content portion and a connection portion, and the width of the content portion is different from the width of the connection portion; determining a frame area of ​​each pigtail port in the pigtail port identification area, and determining a frame area of ​​the label in the pigtail label identification area; determining the occupied port of the pigtail to which the label belongs based on the frame area of ​​each pigtail port and the frame area of ​​the label.

[0107] In addition, the logic instructions in the above-mentioned memory 93 can be implemented in the form of a software functional unit and can be stored in a computer-readable storage medium when sold or used as an independent product. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes several instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, and other media that can store program code.

[0108] On the other hand, the present invention also provides a computer program product, which includes a computer program stored on a non-transitory computer-readable storage medium, and the computer program includes program instructions. When the program instructions are executed by a computer, the computer can execute the fiber pigtail occupied port detection method provided by the above methods, the method including: determining the fiber pigtail port identification area and the fiber pigtail label identification area in the image to be detected; wherein, the multiple fiber pigtail ports in the image to be detected are arranged, and the labels in the image to be detected do not overlap, and the label includes a content part and a connection part, and the width of the content part is different from the width of the connection part; determining the border area of ​​each fiber pigtail port in the fiber pigtail port identification area, and determining the border area of ​​the label in the fiber pigtail label identification area; determining the occupied port of the fiber pigtail to which the label belongs based on the border area of ​​each fiber pigtail port and the border area of ​​the label.

[0109] On the other hand, an embodiment of the present application also provides a processor-readable storage medium, which stores a computer program, and the computer program is used to enable the processor to execute the fiber pigtail occupied port detection method provided by the above-mentioned embodiments, for example, including: determining the fiber pigtail port identification area and the fiber pigtail label identification area in the image to be detected; wherein, the multiple fiber pigtail ports in the image to be detected are arranged, and the labels in the image to be detected do not overlap, and the label includes a content part and a connection part, and the width of the content part is different from the width of the connection part; determining the border area of ​​each fiber pigtail port in the fiber pigtail port identification area, and determining the border area of ​​the label in the fiber pigtail label identification area; determining the occupied port of the fiber pigtail to which the label belongs based on the border area of ​​each fiber pigtail port and the border area of ​​the label.

[0110] The processor-readable storage medium can be any available medium or data storage device that can be accessed by the processor, including but not limited to magnetic storage (such as floppy disks, hard disks, magnetic tapes, magneto-optical disks (MO)), optical storage (such as CDs, DVDs, BDs, HVDs, etc.), and semiconductor storage (such as ROMs, EPROMs, EEPROMs, non-volatile memories (NANDFLASH), solid-state drives (SSDs)), etc.

[0111] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, i.e., they may be located in one location or distributed across multiple network units. Some or all of the modules may be selected based on actual needs to achieve the objectives of the present embodiment. Persons of ordinary skill in the art will be able to understand and implement the present invention without inventive effort.

[0112] Through the description of the above embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus a necessary general hardware platform, or of course, by hardware. Based on this understanding, the essence of the above technical solution or the part that contributes to the existing technology can be embodied in the form of a software product. The computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a magnetic disk, an optical disk, etc., and includes a number of instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or certain parts of the embodiments.

[0113] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the various embodiments of the present invention.

Claims

1. A method for detecting a pigtail occupied port, characterized in that: include: Determine a pigtail port identification area and a pigtail label identification area in the image to be detected; wherein the plurality of pigtail ports in the image to be detected are arranged, the labels in the image to be detected do not overlap, the labels include a content portion and a connecting portion, and the width of the content portion is different from the width of the connecting portion; Determine the border area of ​​each pigtail port in the pigtail port identification area, and determine the border area of ​​the label in the pigtail label identification area; Determine the occupied port of the pigtail to which the label belongs based on the border area of ​​each pigtail port and the border area of ​​the label; The step of determining the occupied port of the pigtail to which the label belongs based on the frame area of ​​each pigtail port and the frame area of ​​the label includes: If the width of the content portion is greater than the width of the connecting portion, the fiber optic port corresponding to the fiber optic port frame area aligned with the narrow sides of the left and right sides of the label frame area is used as the occupied port of the fiber optic port to which the label belongs, based on the arrangement direction of the fiber optic port; If the width of the content portion is smaller than the width of the connecting portion, the fiber optic port corresponding to the frame area of ​​the fiber optic port whose wide sides are aligned with the left and right sides of the frame area of ​​the label shall be used as the occupied port of the fiber optic port to which the label belongs, based on the arrangement direction of the fiber optic port.

2. The method for detecting a pigtail occupied port according to claim 1, wherein: The determining of the border area of ​​each pigtail port in the pigtail port identification area and the determining of the border area of ​​the label in the pigtail label identification area include: The images in the pigtail port identification area and the pigtail label identification area are binarized to obtain a binary white area; the binarized white area is smoothed to obtain a smooth white area, and the smooth white area is used as the corresponding frame area.

3. The method for detecting a pigtail occupied port according to claim 2, wherein: After obtaining the smooth white area, also include: Perform vertical projection processing on the smooth white area to obtain the projected white pixel number histogram, and use the white pixel number histogram as the corresponding border area.

4. The method for detecting a pigtail occupied port according to claim 1, wherein: The step of determining the pigtail port identification area and the pigtail label identification area in the image to be detected includes: Obtaining image features of the image to be detected, inputting the image features into an image recognition model, obtaining a recognition result output by the image recognition model, and using the recognition result to divide the recognition area of ​​the pigtail port and the pigtail label; The image recognition model is a model obtained through machine learning training using image features determined based on sample images and identification areas in the sample images as inputs, and is used to divide the pigtail ports and pigtail labels in the images.

5. The method for detecting a pigtail occupied port according to claim 1 or 4, wherein: The identification area is marked with a square frame. Before determining the border area, it also includes: Adjust the angle of the long side of the square wireframe of the identification area of ​​the pigtail port to the vertical direction or the horizontal direction, and adjust the image to be detected.

6. The method for detecting a pigtail occupied port according to claim 1, wherein: After determining the border area of ​​each pigtail port, it also includes: Each border area is numbered according to the preset numbering rules to determine the port number of each pigtail port.

7. A pigtail occupied port detection device, characterized in that: include: An identification module is configured to determine a pigtail port identification area and a pigtail label identification area in a to-be-detected image; wherein the plurality of pigtail ports in the to-be-detected image are arranged in an array, the labels in the to-be-detected image do not overlap, and the labels include a content portion and a connecting portion, wherein the width of the content portion is different from the width of the connecting portion; A processing module, configured to determine a border area of ​​each pigtail port in the pigtail port identification area, and determine a border area of ​​a label in the pigtail label identification area; A detection module, configured to determine the occupied port of the pigtail to which the label belongs based on the frame area of ​​each pigtail port and the frame area of ​​the label; The step of determining the occupied port of the pigtail to which the label belongs based on the frame area of ​​each pigtail port and the frame area of ​​the label includes: If the width of the content portion is greater than the width of the connecting portion, the fiber optic port corresponding to the fiber optic port frame area aligned with the narrow sides of the left and right sides of the label frame area is used as the occupied port of the fiber optic port to which the label belongs, based on the arrangement direction of the fiber optic port; If the width of the content portion is smaller than the width of the connecting portion, the fiber optic port corresponding to the frame area of ​​the fiber optic port whose wide sides are aligned with the left and right sides of the frame area of ​​the label shall be used as the occupied port of the fiber optic port to which the label belongs, based on the arrangement direction of the fiber optic port.

8. An electronic device comprising a processor and a memory storing a computer program, characterized in that: When the processor executes the computer program, the steps of the method for detecting a pigtail occupied port according to any one of claims 1 to 6 are implemented.

9. A processor-readable storage medium, characterized in that: The processor-readable storage medium stores a computer program, and the computer program is used to enable the processor to execute the steps of the pigtail occupied port detection method according to any one of claims 1 to 6.

Citation Information

Patent Citations

  • Fiber insertion identifying method and system

    CN108682016A

  • An image recognition method of a beam splitter port line and a two-dimensional code label thereof

    CN109190439A