WO2022022310A1 - Method and apparatus for identifying optical splitter ports - Google Patents

Method and apparatus for identifying optical splitter ports Download PDF

Info

Publication number
WO2022022310A1
WO2022022310A1 PCT/CN2021/107074 CN2021107074W WO2022022310A1 WO 2022022310 A1 WO2022022310 A1 WO 2022022310A1 CN 2021107074 W CN2021107074 W CN 2021107074W WO 2022022310 A1 WO2022022310 A1 WO 2022022310A1
Authority
WO
WIPO (PCT)
Prior art keywords
optical splitter
port
ports
image
binarized image
Prior art date
Application number
PCT/CN2021/107074
Other languages
French (fr)
Chinese (zh)
Inventor
龙少宇
贾学刚
王梅行
Original Assignee
北京市天元网络技术股份有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 北京市天元网络技术股份有限公司 filed Critical 北京市天元网络技术股份有限公司
Publication of WO2022022310A1 publication Critical patent/WO2022022310A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/60Analysis of geometric attributes
    • G06T7/66Analysis of geometric attributes of image moments or centre of gravity
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/70Determining position or orientation of objects or cameras
    • G06T7/73Determining position or orientation of objects or cameras using feature-based methods
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/20Image preprocessing
    • G06V10/28Quantising the image, e.g. histogram thresholding for discrimination between background and foreground patterns
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/10Image acquisition modality
    • G06T2207/10004Still image; Photographic image

Definitions

  • the present application relates to the field of computer technology, and in particular, to a method and device for identifying a port of an optical splitter.
  • the equipment resources of communication companies include base stations, computer rooms, optical splitters and other resources. Among them, due to the fact that the optical splitter itself is not charged, its port occupancy has been judged by manual review of on-site photos, which is inefficient and expensive.
  • Embodiments of the present application provide a method and device for identifying a splitter port, so as to solve the defect of low efficiency in the prior art and realize efficient splitter port identification.
  • An embodiment of the present application provides a method for identifying a port of an optical splitter, including:
  • the binarized image is scanned according to the arrangement direction of the ports of the optical splitter, and the light splitting ratio and the information of the occupied ports of the optical splitter in the to-be-identified image of the optical splitter are obtained.
  • the specific step of determining the arrangement direction of the optical splitter ports according to the binarized image includes:
  • the arrangement direction of the optical splitter ports is determined according to the abscissa interpolation sequence and the ordinate difference sequence.
  • the binarized image is scanned according to the arrangement direction of the optical splitter ports to obtain the splitting ratio of the optical splitter in the to-be-identified optical splitter picture
  • the specific steps of occupied port information include:
  • the pixel threshold determines the number of ports of the optical splitter and the position coordinates of each port
  • the threshold determines the position coordinates of each occupied port
  • the port number of each occupied port is determined according to the position coordinates of each port and the position coordinates of each occupied port.
  • the first reference row or column of the binarized image is scanned according to the arrangement direction of the optical splitter ports, and the first reference row or column of the first reference row or column is scanned.
  • Delay integration is performed on the pixel value, and after determining the number of ports of the optical splitter and the position coordinates of each port according to the result of the delay integration and the preset pixel threshold, the method further includes:
  • the port number check fails, scan the new first reference row or column of the binarized image according to the arrangement direction of the ports of the optical splitter, and scan the pixels in the new first reference row or column Delay integration is performed on the value, and the number of ports of the optical splitter and the position coordinates of each port are re-determined according to the result of the delay integration and the pixel threshold.
  • the method before acquiring the centroid coordinates of each port-related region in the binarized image, the method further includes:
  • Each port-related region in the binarized image is acquired according to the area of each region in the binarized image.
  • the specific steps of performing image binarization on the image of the optical splitter to be identified, and obtaining the binarized image include:
  • the method before performing image binarization on the image of the optical splitter to be identified and acquiring the binarized image, the method further includes:
  • the normalized original picture is used as the to-be-identified spectroscope picture.
  • optical splitter port identification device including:
  • the image processing module is used to perform image binarization on the image of the spectroscope to be recognized, and obtain the binarized image;
  • a direction judgment module configured to determine the arrangement direction of the ports of the optical splitter according to the binarized image
  • the port analysis module is configured to scan the binarized image according to the arrangement direction of the ports of the optical splitter, and obtain the information of the splitting ratio and the occupied ports of the optical splitter in the picture of the optical splitter to be identified.
  • Embodiments of the present application further provide an electronic device, including a memory, a processor, and a computer program stored in the memory and running on the processor, where the processor implements any of the above-mentioned light splitting when executing the program Steps of the device port identification method.
  • Embodiments of the present application further provide a non-transitory computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, implements the steps of any of the foregoing methods for identifying a port of a splitter.
  • the optical splitter port identification method and device provided in the embodiments of the present application obtain the binarized image by performing image binarization on the image of the optical splitter to be identified, and determine the arrangement direction of the optical splitter ports according to the binarized image. According to the arrangement direction of the splitter ports, the binarized image is scanned to obtain the splitting ratio of the splitter and the information of the occupied ports in the splitter image to be identified, which can realize the automatic identification of the splitter ports, improve the identification efficiency, and reduce the cost.
  • the operation is accurate and the operation speed meets the actual demand, which can improve the management efficiency and management ability of the optical splitter, greatly reduce the personnel input, provide an important basis for the improvement of the data quality of the resource data platform, and improve the efficiency of operation and maintenance image review.
  • FIG. 1 is a schematic flowchart of a method for identifying a splitter port provided by an embodiment of the present application
  • FIG. 2 is a schematic structural diagram of an optical splitter port identification device provided by an embodiment of the present application.
  • FIG. 3 is a schematic structural diagram of an electronic device provided by an embodiment of the present application.
  • the terms “installed”, “connected” and “connected” should be understood in a broad sense, for example, it may be a fixed connection or a Removable connection, or integral connection; can be mechanical connection, can also be electrical connection; can be directly connected, can also be indirectly connected through an intermediate medium, can be internal communication between two components.
  • the embodiments of the present application provide a method and device for identifying a port of an optical splitter. Perform noise filtering on the contour and fit the orientation of the splitter ports. Combined with the orientation of the splitter ports, use the pseudo-TDI imaging algorithm to analyze the port occupancy, output the splitter port occupancy, and give the splitting ratio and occupied port number of the splitter. The algorithm runs fast, the port analysis is accurate, and has a high application prospect.
  • FIG. 1 is a schematic flowchart of a method for identifying a port of an optical splitter provided by an embodiment of the present application.
  • the method for identifying a port of an optical splitter according to an embodiment of the present application is described below with reference to FIG. 1 .
  • the method includes: step S101 , performing image binarization on the image of the spectroscope to be identified to obtain a binarized image.
  • the image of the spectroscope to be identified is binarized, the background is removed, and the position of the spectroscope port is preliminarily determined and extracted to obtain a binarized image.
  • the binarized image includes multiple regions.
  • the above-mentioned multiple areas include port-related areas such as the area corresponding to the port and the area corresponding to the pigtail inserted into the port.
  • Step S102 Determine the arrangement direction of the ports of the optical splitter according to the binarized image.
  • the arrangement direction of the beam splitter ports can be determined according to the distribution of each area in the binarized image, that is, it is determined whether the beam splitter ports are arranged horizontally or vertically in the binarized image.
  • each port corresponds to a region in the binarized image.
  • the port if the port is not occupied, there are no other cables or devices in the direction perpendicular to the arrangement direction of the optical splitter ports, and there is no area in the binarized image; if the port is occupied, the binary value
  • the splitting ratio of common beamsplitters is 1:4, 1:8 or 1:16, etc. Therefore, in the binarized image, there are a large number of areas in the arrangement direction of the beamsplitter ports. A smaller number of areas exist in the direction perpendicular to the direction. Therefore, according to the distribution of each area in the binarized image, the arrangement direction of the beam splitter ports can be determined.
  • Step S103 scan the binarized image according to the arrangement direction of the ports of the optical splitter, and obtain the information of the splitting ratio and the occupied ports of the optical splitter in the image of the optical splitter to be identified.
  • the occupancy status of the ports is analyzed by scanning the lines of the binarized image, the occupancy status of the ports of the beam splitter is output, and the splitting ratio and occupied ports of the beam splitter are given. number (that is, the information about the occupied port).
  • the ports of the splitter are arranged vertically in the binarized image, analyze the port occupancy by scanning the columns of the binarized image, output the port occupancy of the splitter, and give the splitting ratio and occupied port number of the splitter.
  • the area corresponding to each port can be determined; according to the number of areas corresponding to the ports, the light splitting ratio of the spectroscope can be obtained.
  • the splitting ratio of the optical splitter can be obtained as 1:8; if the area corresponding to 5 ports is scanned, the splitting ratio of the optical splitter can be obtained as 1:4.
  • the area corresponding to the pigtail inserted into the port can also be determined; the information of the occupied port can be obtained by comparing the area corresponding to the pigtail inserted into the port with the area corresponding to the port.
  • the method for identifying a port of an optical splitter provided by the embodiment of the present application is suitable for port identification of an optical splitter whose ports are arranged in a single row.
  • the image of the optical splitter to be identified is binarized to obtain a binarized image
  • the arrangement direction of the optical splitter ports is determined according to the binarized image
  • the binarized image is determined according to the arrangement direction of the optical splitter ports.
  • the specific steps of determining the arrangement direction of the ports of the beam splitter include: acquiring the centroid coordinates of each port-related region in the binarized image.
  • a plane rectangular coordinate system is established for the binarized image, the horizontal axis along the row direction is the x axis, and the vertical axis along the column direction is the y axis.
  • Each region in the binarized image can be screened according to a preset standard, and each port-related region therein can be determined.
  • the preset criteria may be the area and/or shape of the region, and the like.
  • the coordinates of the centroid of the region can be obtained according to the position of each pixel included in the region.
  • centroid coordinates (x i , y i ) of each port-related region can be obtained, 2 ⁇ i ⁇ n.
  • n represents the total number of port-related areas.
  • the abscissa difference sequence and the ordinate difference sequence of each centroid are obtained.
  • the abscissa sequence ⁇ x i ⁇ and the ordinate sequence ⁇ y i ⁇ are sorted according to the same order of size, for example, in ascending order, respectively, to obtain new abscissa sequences ⁇ x i ' ⁇ and The new ordinate sequence ⁇ y' i ⁇ .
  • the arrangement direction of the ports of the optical splitter is determined.
  • each element in the abscissa difference sequence ⁇ D xi ⁇ is compared with a preset difference threshold T to obtain the number N of elements smaller than T in the abscissa difference sequence ⁇ D xi ⁇ .
  • Each element in the ordinate difference sequence ⁇ D yi ⁇ is compared with a preset difference threshold T, and the number M of elements smaller than T in the ordinate difference sequence ⁇ D yi ⁇ is obtained.
  • the arrangement direction of the optical splitter ports is the x-axis direction, that is, the lateral direction (or the direction along the row); if N ⁇ M, the arrangement direction of the optical splitter ports is the y-axis direction, that is, the longitudinal direction (or along the column direction). direction).
  • the centroid coordinates of each port-related region are obtained, and according to the coordinates of each centroid, the abscissa difference sequence and the ordinate difference sequence of each centroid are obtained, and the spectrometer is determined according to the abscissa interpolation sequence and the ordinate difference sequence.
  • the arrangement direction of the splitter ports the arrangement direction of the splitter ports can be accurately analyzed, so that the binarized image can be scanned according to the arrangement direction of the splitter ports, and the splitting ratio and The information of the occupied port can realize automatic identification of the optical splitter port, which can improve the identification efficiency and reduce the cost.
  • the binarized image is scanned according to the arrangement direction of the ports of the optical splitter, and the specific steps of obtaining the splitting ratio of the optical splitter and the information of the occupied ports in the image of the optical splitter to be identified include: Arrangement direction of the ports, scan the first reference row or column of the binarized image, perform delay integration on the pixel values of the first reference row or column, and determine the number of ports and The location coordinates of each port.
  • the binarized image is scanned according to the arrangement direction of the beamsplitter ports, and the algorithm to obtain the splitting ratio of the beamsplitter and the information of the occupied ports in the beamsplitter image to be identified is based on a CCD camera imaging method.
  • - TDI algorithm which can be called quasi-TDI imaging algorithm.
  • TDI Time Delay Integration
  • N*N image of size N*N
  • TDI CCD is a process of continuous accumulation of charges, and it is difficult to tell the relationship between the pixel value and the number of charges at a certain pixel position.
  • the TDI algorithm is suitable for the imaging of high-speed moving objects.
  • CCD devices are usually suitable for imaging some high-speed moving objects.
  • One advantage of the TDI algorithm is that the same scene is imaged by adding multiple lines of linear array pixel signals, and the equivalent charge number of the output signal is the total number of charges in the M series, which is compared with ordinary linear array CCDs (especially area array CCDs) The non-uniformity of response between cells is reduced. Due to the influence of the non-uniformity of the camera system, under the same uniform light radiation of the remote sensing camera, the video output signal amplitudes of different pixels of the linear array TDI CCD are different, which is the so-called non-uniformity of the system response.
  • the ordinate of the first reference line is y
  • the coordinate of the pixel initially scanned on the first reference line is (0,y)
  • the pixel value of the pixel is V (0,y) .
  • V (i,y) is the pixel value of the pixel traversed by scanning on the first reference line.
  • Bucketj be a counter
  • K represents the number of pixels in each row of the binarized image
  • L represents the number of pixels in each column.
  • the steps for delayed integration include:
  • V (i, y) > 0, and V (i+1, y) 0, the integration ends, and the current Bucket j and coordinate values (i, y) are saved.
  • the result of delayed integration can be obtained as a plurality of coordinate values (i, y) and a plurality of count values (integration values) Bucket j .
  • the number of ports k of the optical splitter and the position coordinates B k (i, y of each port) can be obtained ).
  • the preset pixel threshold indicates the number of pixels occupied by one beam splitter port in general.
  • the specific value of the pixel threshold may be determined according to the actual situation, which is not specifically limited in this embodiment of the present application.
  • the number of ports included between the start and end abscissas corresponding to the Bucket j is equal to the nearest integer of the result of dividing the Bucket j by the pixel threshold.
  • the position coordinate B k (i, y) of each port can be determined.
  • the coordinates of the center position of each port can be determined as the position coordinates of the port.
  • the port number check If the port number check is passed, scan the second reference row or column of the binarized image, perform delay integration on the pixel values of the second reference row or column, and determine the position coordinates of each occupied port according to the result of the delay integration and the pixel threshold. .
  • the split ratio in the resource system is used as a check code to check the port number k of the splitter.
  • the splitting ratio in the resource system includes 1:4, 1:8 or 1:16, etc.
  • the splitter must include an input port, so check whether the port number k is the last term of the splitting ratio such as 4, 8 and 16 plus 1.
  • the light splitting ratio of the light splitter in the to-be-identified light splitter picture can be determined as 1:(k-1).
  • the ordinate of the second reference line is y', and the pixel coordinates of the initial scan on the second reference line are (0, y').
  • the position coordinates B' k (i, y) of each occupied port can be obtained.
  • next line of the first reference line is used as the second reference line
  • the obtained position coordinates B' k (i, y) of each occupied port and the position coordinates B k (i, y) of each port is the same, then take the next line of the second reference line as a new second reference line, and re-acquire the position coordinates B' k (i, y) of each occupied port until the position coordinates B' k (i, y) of each occupied port y) is different from the position coordinate B k (i, y) of each port; if it reaches the row where the maximum value of the ordinate is located in the pixel points included in the relevant area of each port, the obtained position coordinate B' k (i , y) is still the same as the position coordinate B k (i, y) of each port, it means that the ports of the optical splitter are all occupied.
  • the specific steps of performing delayed integration on the pixel values of the second reference row or column are similar to the specific steps of performing delayed integration on the pixel values of the first reference row or column, and will not be repeated here.
  • the port number of each occupied port is determined according to the position coordinates of each port and the position coordinates of each occupied port.
  • the occupied port number can be obtained.
  • delay integration is performed on the pixel values of the first reference row or column and the pixel values of the second reference row or column, and the splitting ratio and occupancy of the beam splitter in the to-be-identified beam splitter picture are obtained according to the result of the delay integration.
  • the port information can realize the automatic identification of the splitter port, can improve the identification efficiency, reduce the cost, run accurately, and the running speed can meet the actual needs, can improve the management efficiency and control ability of the splitter, can greatly reduce the personnel input, can It provides an important basis for improving the data quality of the resource data platform.
  • the first reference row or column of the binarized image is scanned according to the arrangement direction of the beam splitter ports, and the pixel values of the first reference row or column are delayed and integrated.
  • the set pixel threshold determines the number of ports of the beam splitter and the position coordinates of each port, it also includes: if the port number check fails, scan the new first reference line of the binarized image according to the arrangement direction of the ports of the beam splitter. Or column, delay integration is performed on the pixel values of the new first reference row or column, and the number of ports of the optical splitter and the position coordinates of each port are re-determined according to the result of the delay integration and the pixel threshold.
  • the port number check obtained by delaying the integration of the pixel values of the first reference row or column fails, it means that the row is not the area corresponding to each port If all passes, the new first reference line is determined.
  • Any row through which the area corresponding to each port passes or the row next to the original first reference row may be determined as a new first reference row.
  • Delay integration is performed on the pixel values of the new first reference row or column, and the number of ports of the optical splitter and the position coordinates of each port are re-determined according to the result of the delay integration and the pixel threshold until the port number verification is passed.
  • the embodiment of the present application scans the new first reference row or column of the binarized image according to the arrangement direction of the ports of the optical splitter when the port number check fails, and delays the pixel values of the new first reference row or column Integrate, re-determine the number of ports of the beam splitter and the position coordinates of each port according to the result of the delay integration and the pixel threshold, which can realize the automatic identification of the ports of the beam splitter, improve the identification efficiency, reduce the cost, run accurately, and meet the actual needs of the running speed , can improve the management efficiency and control ability of the optical splitter, can greatly reduce the personnel input, and can provide an important basis for the improvement of the data quality of the resource data platform.
  • the method before acquiring the centroid coordinates of each port related region in the binarized image, the method further includes: acquiring each port related region in the binarized image according to the area of each region in the binarized image.
  • the information of each region in the binarized image includes connectivity attributes, area, Hu moments, convex hull analysis, and the like.
  • each area can be screened, and each port-related area can be deleted.
  • Port-related area with a certain area range.
  • the area range can be set according to the actual situation.
  • the specific value of the area interval is not specifically limited in the embodiment of the present application.
  • the area of the area is too small, it means that the area is noise and other noise points; if the area of the area is too large, it means that the area is not a port-related area.
  • each port-related region in the binarized image can be obtained according to the area of each region in the binarized image, and each port-related region can be extracted, so that the optical splitter to be identified can be obtained by analysis according to each port-related region
  • the splitting ratio of the optical splitter and the information of the occupied ports in the picture can realize the automatic identification of the optical splitter port, which can improve the identification efficiency and reduce the cost.
  • the image of the beam splitter to be identified is image binarized, and the specific steps of obtaining the binarized image include: converting the beam splitter image into the HSV color space, performing binarization and mathematical morphology Operation to obtain a binarized image.
  • the beam splitter image can be converted to the HSV color space first.
  • the binarization is performed in the HSV color space, the position of the beam splitter port is preliminarily determined, and the original binarized image is obtained.
  • HSV Hue, Saturation, Value
  • S Saturation
  • V Lightness
  • the original binarized image may contain irregular holes, which is not conducive to the analysis of the area in the image, we can perform mathematical morphological operations on the original binarized image to fill the holes and obtain the binarized image to ensure the port of the beam splitter. Integrity of connected domains.
  • a closing operation can be used to fill the holes.
  • the closing operation is a mathematical morphological operation that dilates and then corrodes the image. Its role is to fill small holes in objects, connect adjacent objects, connect disconnected contour lines, and smooth its boundaries without changing the area.
  • the closing operation can be performed using a 5*5 all-one structure.
  • the beam splitter image by converting the beam splitter image into the HSV color space, performing binarization and mathematical morphological operations, and obtaining a binarized image, a more complete area can be obtained, so that analysis based on the area in the binarized image can be achieved.
  • Obtaining the information of the splitting ratio of the optical splitter and the information of the occupied ports in the picture of the optical splitter to be identified can realize the automatic identification of the optical splitter port, which can improve the identification efficiency and reduce the cost.
  • the size of the original image of the spectroscope collected in the field is different, and due to factors such as the on-site environment and the photography level of the collector, the original image of the spectroscope collected on-site may exist. Too bright, too dark, single scene, blur, etc. do not meet the requirements. Therefore, you can first normalize the original image, adjust the size of the original image to the preset size, and carry out the process according to the preset gray level. convert.
  • the preset size can be set according to the actual situation, such as 720*1024 or 1024*720 (determined according to the shooting direction).
  • the specific numerical value of the preset size is not limited in this embodiment of the present application.
  • the preset gray level can be set according to the actual situation, such as 8-bit gray level.
  • the specific value of the preset gray level is not limited in this embodiment of the present application.
  • Appropriate parameters can be used as image features, for example, at least one of gray mean (Mean), standard deviation (Std), and image entropy (Entropy) can be used as image features to judge whether the normalized original image is qualified or not. .
  • the inter-class variance method can be used as a threshold selection method to select a feature threshold for determining whether the normalized original image is qualified.
  • the gray mean value of the pre-acquired black image library and the qualified image library are respectively extracted, and the value with the largest variance between the two types of pictures is used as the threshold.
  • the normalized original picture is a qualified picture
  • the normalized original picture is used as a to-be-identified beam splitter picture, and step S101 is performed to identify a beam splitter port for the to-be-identified beam splitter picture.
  • the normalized original picture is an unqualified picture, the normalized original picture is not used as the optical splitter picture to be identified, and the optical splitter port is not identified for the normalized original picture.
  • the normalized original picture is a qualified picture according to the image features, and the normalized original picture is used as the to-be-identified beam splitter picture, so as to avoid the unqualified picture being subjected to optical splitter port identification.
  • Identification can avoid invalid identification work and save software and hardware resources.
  • the port identification is performed on the above-mentioned 6660 pictures of the optical splitter to be identified. From the 238 pictures containing the optical splitter, 216 pictures of the splitting ratio of the optical splitter are successfully identified, including 1:4 and 1:8 two kinds of ports; 205 sheets of the port number occupied by the optical splitter are correctly identified, with an accuracy rate of 94.9% and a standard deviation of 0.19.
  • the laptop computer with CPU i5-6300HQ and 8G memory takes 10 pictures as the unit, the picture resolution is 1024*768, the picture format is JPG, and the optical splitter port is identified.
  • the statistical processing time (unit: s) is shown in Table 1. Show.
  • optical splitter port identification apparatus provided by the embodiments of the present application, and the optical splitter port identification apparatus described below and the optical splitter port identification method described above may refer to each other correspondingly.
  • FIG. 2 is a schematic structural diagram of an apparatus for identifying a port of an optical splitter according to an embodiment of the present application. Based on the contents of the above-mentioned embodiments, as shown in FIG. 2 , the apparatus includes an image processing module 201, a direction judgment module 202 and a port analysis module 203:
  • the image processing module 201 is configured to perform image binarization on the to-be-recognized spectrometer picture to obtain a binarized image;
  • the direction judgment module 202 is used for determining the arrangement direction of the ports of the optical splitter according to the binarized image
  • the port analysis module 203 is configured to scan the binarized image according to the arrangement direction of the ports of the optical splitter to obtain the splitting ratio of the optical splitter and the information of the occupied ports in the image of the optical splitter to be identified.
  • the image processing module 201 the direction determination module 202 and the port analysis module 203 are electrically connected in sequence.
  • the image processing module 201 performs image binarization on the image of the spectroscope to be recognized, removes the background, and realizes preliminary determination and extraction of the position of the spectroscope port to obtain a binarized image.
  • the direction determination module 202 can determine the arrangement direction of the beam splitter ports according to the distribution of each area in the binarized image, that is, determine whether the beam splitter ports are arranged horizontally or vertically in the binarized image.
  • the port analysis module 203 can determine the area corresponding to each port by scanning the row or column of the binarized image; according to the number of areas corresponding to the port, the spectroscopic ratio of the spectroscope can be obtained; by scanning the row or column of the binarized image; You can also determine the area corresponding to the pigtail inserted into the port; by comparing the area corresponding to the pigtail inserted into the port with the area corresponding to the port, you can obtain information about the occupied port.
  • optical splitter port identification device provided by the embodiment of the present application is used to execute the optical splitter port identification method provided by the above-mentioned embodiments of the present application.
  • specific methods and processes of the modules included in the optical splitter port identification device to implement corresponding functions please refer to the above-mentioned details. Embodiments of the optical splitter port identification method are not repeated here.
  • optical splitter port identification device is used in the optical splitter port identification methods of the foregoing embodiments. Therefore, the descriptions and definitions in the optical splitter port identification methods in the foregoing embodiments can be used for the understanding of each execution module in the embodiments of the present application.
  • the image of the optical splitter to be identified is binarized to obtain a binarized image
  • the arrangement direction of the optical splitter ports is determined according to the binarized image
  • the binarized image is determined according to the arrangement direction of the optical splitter ports.
  • FIG. 3 illustrates a schematic diagram of the physical structure of an electronic device.
  • the electronic device may include: a processor (processor) 301, a memory (memory) 302, and a bus 303; wherein, the processor 301 and the memory 302 pass through The bus 303 completes mutual communication; the processor 301 is configured to call computer program instructions stored in the memory 302 and run on the processor 301 to execute the optical splitter port identification method provided by the above method embodiments, the method comprising: : Binarize the image of the spectroscope to be identified to obtain a binarized image; determine the arrangement direction of the spectroscope ports according to the binarized image; scan the binarized image according to the arrangement direction of the spectroscope ports, Obtain the splitting ratio and occupied port information of the splitter in the picture of the splitter to be identified.
  • the above-mentioned logic instructions in the memory 302 can be implemented in the form of software functional units and can be stored in a computer-readable storage medium when sold or used as an independent product.
  • the technical solution of the present application can be embodied in the form of a software product in essence, or the part that contributes to the prior art or the part of the technical solution, and the computer software product is stored in a storage medium, including Several instructions are used to cause a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present application.
  • the aforementioned storage medium includes: U disk, mobile hard disk, Read-Only Memory (ROM, Read-Only Memory), Random Access Memory (RAM, Random Access Memory), magnetic disk or optical disk and other media that can store program codes .
  • an embodiment of the present application further provides a computer program product
  • the computer program product includes a computer program stored on a non-transitory computer-readable storage medium
  • the computer program includes program instructions, when the program instructions When executed by a computer, the computer can execute the optical splitter port identification method provided by the above method embodiments.
  • the method includes: performing image binarization on the image of the optical splitter to be identified, and obtaining a binarized image; according to the binarized image , determine the arrangement direction of the optical splitter ports; scan the binarized image according to the arrangement direction of the optical splitter ports to obtain the splitting ratio of the optical splitter and the information of the occupied ports in the optical splitter picture to be identified.
  • the embodiments of the present application further provide a non-transitory computer-readable storage medium on which a computer program is stored, and the computer program is implemented when executed by a processor to execute the optical splitter port identification method provided by the above embodiments , the method includes: performing image binarization on the image of the optical splitter to be identified to obtain a binarized image; determining the arrangement direction of the optical splitter ports according to the binarized image; The image is scanned to obtain the light splitting ratio and occupied port information of the light splitter in the picture of the light splitter to be identified.
  • the device embodiments described above are only illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in One place, or it can be distributed over multiple network elements. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution in this embodiment. Those of ordinary skill in the art can understand and implement it without creative effort.
  • each embodiment can be implemented by means of software plus a necessary general hardware platform, and certainly can also be implemented by hardware.
  • the above-mentioned technical solutions can be embodied in the form of software products in essence or the parts that make contributions to the prior art, and the computer software products can be stored in computer-readable storage media, such as ROM/RAM, magnetic A disc, an optical disc, etc., includes several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to perform the methods described in various embodiments or some parts of the embodiments.

Abstract

Provided are a method and apparatus for identifying optical splitter ports. The method comprises: performing image binarization on an optical splitter picture to be subjected to identification, so as to acquire a binarized image; determining an arrangement direction of optical splitter ports according to the binarized image; and scanning the binarized image according to the arrangement direction of the optical splitter ports, so as to acquire the splitting ratio of an optical splitter in said optical splitter picture, and information of an occupied port. According to the method and apparatus for identifying optical splitter ports, which are provided in embodiments of the present application, by means of performing image binarization on an optical splitter picture to be subjected to identification, so as to acquire a binarized image, determining an arrangement direction of optical splitter ports according to the binarized image, and scanning the binarized image according to the arrangement direction of the optical splitter ports, in order to acquire the splitting ratio of an optical splitter in said optical splitter picture, and information of an occupied port, an optical splitter port can be automatically identified, the identification efficiency can be improved, and costs can be reduced.

Description

分光器端口识别方法及装置Optical splitter port identification method and device
相关申请的交叉引用CROSS-REFERENCE TO RELATED APPLICATIONS
本申请要求于2020年7月27日提交的申请号为202010733053.X,发明名称为“分光器端口识别方法及装置”的中国专利申请的优先权,其通过引用方式全部并入本文。This application claims the priority of the Chinese patent application with the application number 202010733053.X, filed on July 27, 2020, and the invention title is "Method and Device for Identifying Optical Splitter Ports", which is incorporated herein by reference in its entirety.
技术领域technical field
本申请涉及计算机技术领域,尤其涉及一种分光器端口识别方法及装置。The present application relates to the field of computer technology, and in particular, to a method and device for identifying a port of an optical splitter.
背景技术Background technique
通信公司的设备资源包括基站、机房、分光器等各类资源。其中,由于分光器自身不带电的特性,其端口占用情况一直靠人工审核现场照片判断,效率低下,成本高昂。The equipment resources of communication companies include base stations, computer rooms, optical splitters and other resources. Among them, due to the fact that the optical splitter itself is not charged, its port occupancy has been judged by manual review of on-site photos, which is inefficient and expensive.
发明内容SUMMARY OF THE INVENTION
本申请实施例提供一种分光器端口识别方法及装置,用以解决现有技术中效率低下的缺陷,实现高效的分光器端口识别。Embodiments of the present application provide a method and device for identifying a splitter port, so as to solve the defect of low efficiency in the prior art and realize efficient splitter port identification.
本申请实施例提供一种分光器端口识别方法,包括:An embodiment of the present application provides a method for identifying a port of an optical splitter, including:
将待识别的分光器图片进行图像二值化,获取二值化图像;Perform image binarization on the image of the spectroscope to be identified to obtain a binarized image;
根据所述二值化图像,确定分光器端口的排列方向;determining the arrangement direction of the ports of the optical splitter according to the binarized image;
按照所述分光器端口的排列方向,对所述二值化图像进行扫描,获取所述待识别的分光器图片中分光器的分光比和占用端口的信息。The binarized image is scanned according to the arrangement direction of the ports of the optical splitter, and the light splitting ratio and the information of the occupied ports of the optical splitter in the to-be-identified image of the optical splitter are obtained.
根据本申请一个实施例的分光器端口识别方法,所述根据所述二值化图像,确定分光器端口的排列方向的具体步骤包括:According to the optical splitter port identification method according to an embodiment of the present application, the specific step of determining the arrangement direction of the optical splitter ports according to the binarized image includes:
获取所述二值化图像中每个端口相关区域的质心坐标;obtaining the centroid coordinates of each port-related region in the binarized image;
根据各所述质心坐标,获取各所述质心的横坐标差值序列和纵坐标差值序列;According to each of the centroid coordinates, obtain the abscissa difference sequence and the ordinate difference sequence of each of the centroids;
根据所述横坐标插值序列和纵坐标差值序列,确定所述分光器端口的 排列方向。The arrangement direction of the optical splitter ports is determined according to the abscissa interpolation sequence and the ordinate difference sequence.
根据本申请一个实施例的分光器端口识别方法,所述按照所述分光器端口的排列方向,对所述二值化图像进行扫描,获取所述待识别的分光器图片中分光器的分光比和占用端口的信息的具体步骤包括:According to the optical splitter port identification method according to an embodiment of the present application, the binarized image is scanned according to the arrangement direction of the optical splitter ports to obtain the splitting ratio of the optical splitter in the to-be-identified optical splitter picture And the specific steps of occupied port information include:
按照所述分光器端口的排列方向,扫描所述二值化图像的第一基准行或列,对所述第一基准行或列的像素值进行延迟积分,根据延迟积分的结果和预设的像素阈值确定所述分光器的端口数和每个端口的位置坐标;Scan the first reference row or column of the binarized image according to the arrangement direction of the beam splitter ports, and perform delay integration on the pixel values of the first reference row or column. The pixel threshold determines the number of ports of the optical splitter and the position coordinates of each port;
若所述端口数校验通过,则扫描所述二值化图像的第二基准行或列,对所述第二基准行或列的像素值进行延迟积分,根据延迟积分的结果和所述像素阈值确定各占用端口的位置坐标;If the port number check is passed, scan the second reference row or column of the binarized image, perform delay integration on the pixel values of the second reference row or column, and perform delay integration on the pixel values of the second reference row or column. The threshold determines the position coordinates of each occupied port;
根据所述每个端口的位置坐标和所述各占用端口的位置坐标,确定所述各占用端口的端口号。The port number of each occupied port is determined according to the position coordinates of each port and the position coordinates of each occupied port.
根据本申请一个实施例的分光器端口识别方法,所述按照所述分光器端口的排列方向,扫描所述二值化图像的第一基准行或列,对所述第一基准行或列的像素值进行延迟积分,根据延迟积分的结果和预设的像素阈值确定所述分光器的端口数和每个端口的位置坐标之后,还包括:According to the optical splitter port identification method according to an embodiment of the present application, the first reference row or column of the binarized image is scanned according to the arrangement direction of the optical splitter ports, and the first reference row or column of the first reference row or column is scanned. Delay integration is performed on the pixel value, and after determining the number of ports of the optical splitter and the position coordinates of each port according to the result of the delay integration and the preset pixel threshold, the method further includes:
若所述端口数校验未通过,则按照所述分光器端口的排列方向,扫描所述二值化图像新的第一基准行或列,对所述新的第一基准行或列的像素值进行延迟积分,根据延迟积分的结果和所述像素阈值重新确定所述分光器的端口数和每个端口的位置坐标。If the port number check fails, scan the new first reference row or column of the binarized image according to the arrangement direction of the ports of the optical splitter, and scan the pixels in the new first reference row or column Delay integration is performed on the value, and the number of ports of the optical splitter and the position coordinates of each port are re-determined according to the result of the delay integration and the pixel threshold.
根据本申请一个实施例的分光器端口识别方法,所述获取所述二值化图像中每个端口相关区域的质心坐标之前,还包括:According to the optical splitter port identification method according to an embodiment of the present application, before acquiring the centroid coordinates of each port-related region in the binarized image, the method further includes:
根据所述二值化图像中各区域的面积,获取所述二值化图像中的各端口相关区域。Each port-related region in the binarized image is acquired according to the area of each region in the binarized image.
根据本申请一个实施例的分光器端口识别方法,所述将待识别的分光器图片进行图像二值化,获取二值化图像的具体步骤包括:According to the optical splitter port identification method according to an embodiment of the present application, the specific steps of performing image binarization on the image of the optical splitter to be identified, and obtaining the binarized image include:
将所述分光器图片转换至HSV颜色空间中,进行二值化和数学形态学运算,获取所述二值化图像。Convert the spectroscope image into the HSV color space, perform binarization and mathematical morphological operations, and obtain the binarized image.
根据本申请一个实施例的分光器端口识别方法,所述将待识别的分光器图片进行图像二值化,获取二值化图像之前,还包括:According to the method for identifying a port of an optical splitter according to an embodiment of the present application, before performing image binarization on the image of the optical splitter to be identified and acquiring the binarized image, the method further includes:
若根据图像特征判断获知进行归一化后的原始图片为合格图片,则将所述归一化后的原始图片,作为所述待识别的分光器图片。If it is determined according to the image features that the normalized original picture is a qualified picture, the normalized original picture is used as the to-be-identified spectroscope picture.
本申请实施例还提供一种分光器端口识别装置,包括:The embodiment of the present application also provides an optical splitter port identification device, including:
图像处理模块,用于将待识别的分光器图片进行图像二值化,获取二值化图像;The image processing module is used to perform image binarization on the image of the spectroscope to be recognized, and obtain the binarized image;
方向判断模块,用于根据所述二值化图像,确定分光器端口的排列方向;a direction judgment module, configured to determine the arrangement direction of the ports of the optical splitter according to the binarized image;
端口解析模块,用于按照所述分光器端口的排列方向,对所述二值化图像进行扫描,获取所述待识别的分光器图片中分光器的分光比和占用端口的信息。The port analysis module is configured to scan the binarized image according to the arrangement direction of the ports of the optical splitter, and obtain the information of the splitting ratio and the occupied ports of the optical splitter in the picture of the optical splitter to be identified.
本申请实施例还提供一种电子设备,包括存储器、处理器及存储在存储器上并可在处理器上运行的计算机程序,所述处理器执行所述程序时实现如上述任一种所述分光器端口识别方法的步骤。Embodiments of the present application further provide an electronic device, including a memory, a processor, and a computer program stored in the memory and running on the processor, where the processor implements any of the above-mentioned light splitting when executing the program Steps of the device port identification method.
本申请实施例还提供一种非暂态计算机可读存储介质,其上存储有计算机程序,该计算机程序被处理器执行时实现如上述任一种所述分光器端口识别方法的步骤。Embodiments of the present application further provide a non-transitory computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, implements the steps of any of the foregoing methods for identifying a port of a splitter.
本申请实施例提供的分光器端口识别方法及装置,通过将待识别的分光器图片进行图像二值化,获取二值化图像,根据二值化图像,确定分光器端口的排列方向,按照分光器端口的排列方向,对二值化图像进行扫描,获取待识别的分光器图片中分光器的分光比和占用端口的信息,能实现分光器端口的自动识别,能提高识别效率、降低成本,运行准确,运行速度满足实际需求,能提高对分光器的管理效率和管理能力,能大大降低人员投入,能为资源数据平台数据质量提升提供重要依据,能提高运维图像审核的效率。The optical splitter port identification method and device provided in the embodiments of the present application obtain the binarized image by performing image binarization on the image of the optical splitter to be identified, and determine the arrangement direction of the optical splitter ports according to the binarized image. According to the arrangement direction of the splitter ports, the binarized image is scanned to obtain the splitting ratio of the splitter and the information of the occupied ports in the splitter image to be identified, which can realize the automatic identification of the splitter ports, improve the identification efficiency, and reduce the cost. The operation is accurate and the operation speed meets the actual demand, which can improve the management efficiency and management ability of the optical splitter, greatly reduce the personnel input, provide an important basis for the improvement of the data quality of the resource data platform, and improve the efficiency of operation and maintenance image review.
附图说明Description of drawings
为了更清楚地说明本申请实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作一简单地介绍,显而易见地,下面描述中的附图是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附 图。In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the following will briefly introduce the accompanying drawings used in the description of the embodiments or the prior art. Obviously, the accompanying drawings in the following description These are some embodiments of the present application. For those of ordinary skill in the art, other drawings can also be obtained based on these drawings without any creative effort.
图1是本申请实施例提供的一种分光器端口识别方法的流程示意图;1 is a schematic flowchart of a method for identifying a splitter port provided by an embodiment of the present application;
图2是本申请实施例提供的一种分光器端口识别装置的结构示意图;2 is a schematic structural diagram of an optical splitter port identification device provided by an embodiment of the present application;
图3是本申请实施例提供的一种电子设备的结构示意图。FIG. 3 is a schematic structural diagram of an electronic device provided by an embodiment of the present application.
具体实施方式detailed description
为使本申请实施例的目的、技术方案和优点更加清楚,下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。In order to make the purposes, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be described clearly and completely below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments It is a part of the embodiments of the present application, but not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative work fall within the protection scope of the present application.
在本申请实施例的描述中,需要说明的是,术语“中心”、“上”、“下”、“左”、“右”、“竖直”、“水平”、“内”、“外”等指示的方位或位置关系为基于附图所示的方位或位置关系,仅是为了便于描述本申请实施例和简化描述,而不是指示或暗示所指的装置或元件必须具有特定的方位、以特定的方位构造和操作,因此不能理解为对本申请实施例的限制。此外,术语“第一”、“第二”、“第三”仅用于描述目的,而不能理解为指示或暗示相对重要性。In the description of the embodiments of the present application, it should be noted that the terms "center", "upper", "lower", "left", "right", "vertical", "horizontal", "inner", "outer" The orientation or positional relationship indicated by ” etc. is based on the orientation or positional relationship shown in the accompanying drawings, which is only for the convenience of describing the embodiments of the present application and simplifying the description, rather than indicating or implying that the indicated device or element must have a specific orientation, It is constructed and operated in a specific orientation, and therefore should not be construed as a limitation on the embodiments of the present application. Furthermore, the terms "first", "second", and "third" are used for descriptive purposes only and should not be construed to indicate or imply relative importance.
在本申请实施例的描述中,需要说明的是,除非另有明确的规定和限定,术语“安装”、“相连”、“连接”应做广义理解,例如,可以是固定连接,也可以是可拆卸连接,或一体地连接;可以是机械连接,也可以是电连接;可以是直接相连,也可以通过中间媒介间接相连,可以是两个元件内部的连通。对于本领域的普通技术人员而言,可以具体情况理解上述术语在本申请实施例中的具体含义。In the description of the embodiments of the present application, it should be noted that, unless otherwise expressly specified and limited, the terms "installed", "connected" and "connected" should be understood in a broad sense, for example, it may be a fixed connection or a Removable connection, or integral connection; can be mechanical connection, can also be electrical connection; can be directly connected, can also be indirectly connected through an intermediate medium, can be internal communication between two components. Those of ordinary skill in the art can understand the specific meanings of the above terms in the embodiments of the present application in specific situations.
为了克服现有技术的上述问题,本申请实施例提供一种分光器端口识别方法及装置,其发明构思是,基于图像识别方法,根据分光器图片对分光器端口位置和轮廓进行提取,根据端口轮廓进行杂点过滤和分光器端口排列方向拟合,结合分光器端口排列方向,使用拟TDI成像算法解析端口占用情况,输出分光器端口占用情况,给出分光器的分光比和占用端口号,算法运行速度快,端口分析准确,具有较高的应用前景。In order to overcome the above-mentioned problems of the prior art, the embodiments of the present application provide a method and device for identifying a port of an optical splitter. Perform noise filtering on the contour and fit the orientation of the splitter ports. Combined with the orientation of the splitter ports, use the pseudo-TDI imaging algorithm to analyze the port occupancy, output the splitter port occupancy, and give the splitting ratio and occupied port number of the splitter. The algorithm runs fast, the port analysis is accurate, and has a high application prospect.
图1是本申请实施例提供的一种分光器端口识别方法的流程示意图。下面结合图1描述本申请实施例的分光器端口识别方法。如图1所示,该方法包括:步骤S101、将待识别的分光器图片进行图像二值化,获取二值化图像。FIG. 1 is a schematic flowchart of a method for identifying a port of an optical splitter provided by an embodiment of the present application. The method for identifying a port of an optical splitter according to an embodiment of the present application is described below with reference to FIG. 1 . As shown in FIG. 1 , the method includes: step S101 , performing image binarization on the image of the spectroscope to be identified to obtain a binarized image.
具体地,对待识别的分光器图片进行图像二值化,去除背景,实现对分光器端口的位置进行初步判定和提取,获得二值化图像。Specifically, the image of the spectroscope to be identified is binarized, the background is removed, and the position of the spectroscope port is preliminarily determined and extracted to obtain a binarized image.
可以理解的是,该二值化图像中,包括了多个区域。上述多个区域,包括了端口对应的区域和插入端口的尾纤对应的区域等端口相关区域。It can be understood that the binarized image includes multiple regions. The above-mentioned multiple areas include port-related areas such as the area corresponding to the port and the area corresponding to the pigtail inserted into the port.
步骤S102、根据二值化图像,确定分光器端口的排列方向。Step S102: Determine the arrangement direction of the ports of the optical splitter according to the binarized image.
具体地,可以根据二值化图像中各个区域的分布,确定分光器端口的排列方向,即确定在二值化图像中分光器端口是横向排列还是纵向排列。Specifically, the arrangement direction of the beam splitter ports can be determined according to the distribution of each area in the binarized image, that is, it is determined whether the beam splitter ports are arranged horizontally or vertically in the binarized image.
通常情况下,相邻两个分光器端口之间存在间隙,因而每个端口对应二值化图像中的一个区域。对于任一端口,若该端口未被占用,则与分光器端口的排列方向垂直的方向上没有其他线缆或器件,二值化图像中也不存在区域;若该端口被占用,则二值化图像中与分光器端口的排列方向垂直的方向上存在尾纤对应的区域。常见的分光器的分光比为1:4、1:8或1:16等,因而二值化图像中在分光器端口的排列方向上存在数量较多的区域,而在与分光器端口的排列方向垂直的方向上存在数量较少的区域。因此,根据二值化图像中各个区域的分布,可以确定分光器端口的排列方向。Usually, there is a gap between two adjacent beamsplitter ports, so each port corresponds to a region in the binarized image. For any port, if the port is not occupied, there are no other cables or devices in the direction perpendicular to the arrangement direction of the optical splitter ports, and there is no area in the binarized image; if the port is occupied, the binary value There is an area corresponding to pigtails in the image in the direction perpendicular to the arrangement direction of the splitter ports. The splitting ratio of common beamsplitters is 1:4, 1:8 or 1:16, etc. Therefore, in the binarized image, there are a large number of areas in the arrangement direction of the beamsplitter ports. A smaller number of areas exist in the direction perpendicular to the direction. Therefore, according to the distribution of each area in the binarized image, the arrangement direction of the beam splitter ports can be determined.
步骤S103、按照分光器端口的排列方向,对二值化图像进行扫描,获取待识别的分光器图片中分光器的分光比和占用端口的信息。Step S103 , scan the binarized image according to the arrangement direction of the ports of the optical splitter, and obtain the information of the splitting ratio and the occupied ports of the optical splitter in the image of the optical splitter to be identified.
具体地,若在二值化图像中分光器端口是横向排列,则通过扫描该二值化图像的行来解析端口占用情况,输出分光器端口占用情况,给出分光器的分光比和占用端口号(即占用端口的信息)。Specifically, if the ports of the beam splitter are arranged horizontally in the binarized image, the occupancy status of the ports is analyzed by scanning the lines of the binarized image, the occupancy status of the ports of the beam splitter is output, and the splitting ratio and occupied ports of the beam splitter are given. number (that is, the information about the occupied port).
若在二值化图像中分光器端口是纵向排列,则通过扫描该二值化图像的列来解析端口占用情况,输出分光器端口占用情况,给出分光器的分光比和占用端口号。If the ports of the splitter are arranged vertically in the binarized image, analyze the port occupancy by scanning the columns of the binarized image, output the port occupancy of the splitter, and give the splitting ratio and occupied port number of the splitter.
以扫描该二值化图像的行的方式为例,通过扫描该二值化图像的行,可以确定各端口对应的区域;根据端口对应的区域的数量,可以获取分光器的分光比。Taking the method of scanning the lines of the binarized image as an example, by scanning the lines of the binarized image, the area corresponding to each port can be determined; according to the number of areas corresponding to the ports, the light splitting ratio of the spectroscope can be obtained.
例如:若扫描到9个端口对应的区域,则可以获取分光器的分光比为1:8;若扫描到5个端口对应的区域,则可以获取分光器的分光比为1:4。For example, if the area corresponding to 9 ports is scanned, the splitting ratio of the optical splitter can be obtained as 1:8; if the area corresponding to 5 ports is scanned, the splitting ratio of the optical splitter can be obtained as 1:4.
通过扫描该二值化图像的行,还可以确定插入端口的尾纤对应的区域;将插入端口的尾纤对应的区域与端口对应的区域进行对比,可以获取占用端口的信息。By scanning the lines of the binarized image, the area corresponding to the pigtail inserted into the port can also be determined; the information of the occupied port can be obtained by comparing the area corresponding to the pigtail inserted into the port with the area corresponding to the port.
可以理解的是,扫描该二值化图像的列的过程,与上述扫描该二值化图像的行的过程类似,此处不再赘述。It can be understood that the process of scanning the columns of the binarized image is similar to the above-mentioned process of scanning the rows of the binarized image, and details are not repeated here.
需要说明的是,本申请实施例提供的分光器端口识别方法,适用于对端口为单排排列的分光器进行端口识别。It should be noted that the method for identifying a port of an optical splitter provided by the embodiment of the present application is suitable for port identification of an optical splitter whose ports are arranged in a single row.
本申请实施例通过将待识别的分光器图片进行图像二值化,获取二值化图像,根据二值化图像,确定分光器端口的排列方向,按照分光器端口的排列方向,对二值化图像进行扫描,获取待识别的分光器图片中分光器的分光比和占用端口的信息,能实现分光器端口的自动识别,能提高识别效率、降低成本,运行准确,运行速度满足实际需求,能提高对分光器的管理效率和管理能力,能大大降低人员投入,能为资源数据平台数据质量提升提供重要依据,能提高运维图像审核的效率。In this embodiment of the present application, the image of the optical splitter to be identified is binarized to obtain a binarized image, the arrangement direction of the optical splitter ports is determined according to the binarized image, and the binarized image is determined according to the arrangement direction of the optical splitter ports. Scan the image to obtain the splitting ratio of the optical splitter and the information of the occupied ports in the image of the optical splitter to be identified, which can realize the automatic identification of the optical splitter port, can improve the identification efficiency, reduce the cost, run accurately, and the running speed can meet the actual needs. Improving the management efficiency and management ability of the optical splitter can greatly reduce the personnel investment, provide an important basis for the improvement of the data quality of the resource data platform, and improve the efficiency of operation and maintenance image review.
基于上述各实施例的内容,根据二值化图像,确定分光器端口的排列方向的具体步骤包括:获取二值化图像中每个端口相关区域的质心坐标。Based on the contents of the above embodiments, and according to the binarized image, the specific steps of determining the arrangement direction of the ports of the beam splitter include: acquiring the centroid coordinates of each port-related region in the binarized image.
具体地,针对二值化图像建立平面直角坐标系,沿行的方向的横轴为x轴,沿列的方向的纵轴为y轴。Specifically, a plane rectangular coordinate system is established for the binarized image, the horizontal axis along the row direction is the x axis, and the vertical axis along the column direction is the y axis.
可以根据预设的标准,对二值化图像中的各区域进行筛选,确定其中的各端口相关区域。Each region in the binarized image can be screened according to a preset standard, and each port-related region therein can be determined.
预设的标准可以为区域的面积和/或形状等。The preset criteria may be the area and/or shape of the region, and the like.
对于每一端口相关区域,可以根据该区域包括的各像素的位置,获取该区域的质心的坐标。For each port-related region, the coordinates of the centroid of the region can be obtained according to the position of each pixel included in the region.
通过上述操作,可以获得各端口相关区域的质心坐标(x i,y i),2≤i≤n。其中,n表示端口相关区域的总数。 Through the above operations, the centroid coordinates (x i , y i ) of each port-related region can be obtained, 2≤i≤n. Among them, n represents the total number of port-related areas.
根据各质心坐标,获取各质心的横坐标差值序列和纵坐标差值序列。According to the coordinates of each centroid, the abscissa difference sequence and the ordinate difference sequence of each centroid are obtained.
具体地,将横坐标序列{x i}和纵坐标序列{y i}分别按照相同的大小排序顺序进行排序,例如分别按照从小到大的顺序,获得新的横坐标序列{x i'}和 新的纵坐标序列{y' i}。 Specifically, the abscissa sequence {x i } and the ordinate sequence {y i } are sorted according to the same order of size, for example, in ascending order, respectively, to obtain new abscissa sequences {x i '} and The new ordinate sequence {y' i }.
对于新的横坐标序列{x' i},依次获取序列中相邻两个元素的差D xi=x' i-x' i-1,获得横坐标差值序列{D xi}。 For the new abscissa sequence {x' i }, the difference D xi =x' i -x' i-1 of two adjacent elements in the sequence is sequentially obtained, and the abscissa difference sequence {D xi } is obtained.
对于新的纵坐标序列{y' i},依次获取序列中相邻两个元素的差D yi=y' i-y' i-1,获得纵坐标差值序列{D yi}。 For the new ordinate sequence {y' i }, the difference D yi =y' i -y' i-1 of two adjacent elements in the sequence is sequentially obtained, and the ordinate difference sequence {D yi } is obtained.
根据横坐标插值序列和纵坐标差值序列,确定分光器端口的排列方向。According to the abscissa interpolation sequence and the ordinate difference sequence, the arrangement direction of the ports of the optical splitter is determined.
具体地,将横坐标差值序列{D xi}中的每个元素与预设的差值阈值T进行比较,获取横坐标差值序列{D xi}中小于T的元素的个数N。 Specifically, each element in the abscissa difference sequence {D xi } is compared with a preset difference threshold T to obtain the number N of elements smaller than T in the abscissa difference sequence {D xi }.
将纵坐标差值序列{D yi}中的每个元素与预设的差值阈值T进行比较,获取纵坐标差值序列{D yi}中小于T的元素的个数M。 Each element in the ordinate difference sequence {D yi } is compared with a preset difference threshold T, and the number M of elements smaller than T in the ordinate difference sequence {D yi } is obtained.
若N>M,则分光器端口的排列方向为x轴方向,即横向(或沿行的方向);若N<M,则分光器端口的排列方向为y轴方向,即纵向(或沿列的方向)。If N>M, the arrangement direction of the optical splitter ports is the x-axis direction, that is, the lateral direction (or the direction along the row); if N<M, the arrangement direction of the optical splitter ports is the y-axis direction, that is, the longitudinal direction (or along the column direction). direction).
本申请实施例通过获取每个端口相关区域的质心坐标,根据各质心坐标,获取各质心的横坐标差值序列和纵坐标差值序列,根据横坐标插值序列和纵坐标差值序列,确定分光器端口的排列方向,能准确地解析出分光器端口的排列方向,从而能按照分光器端口的排列方向,对二值化图像进行扫描,获取待识别的分光器图片中分光器的分光比和占用端口的信息,能实现分光器端口的自动识别,能提高识别效率、降低成本。In this embodiment of the present application, the centroid coordinates of each port-related region are obtained, and according to the coordinates of each centroid, the abscissa difference sequence and the ordinate difference sequence of each centroid are obtained, and the spectrometer is determined according to the abscissa interpolation sequence and the ordinate difference sequence. According to the arrangement direction of the splitter ports, the arrangement direction of the splitter ports can be accurately analyzed, so that the binarized image can be scanned according to the arrangement direction of the splitter ports, and the splitting ratio and The information of the occupied port can realize automatic identification of the optical splitter port, which can improve the identification efficiency and reduce the cost.
基于上述各实施例的内容,按照分光器端口的排列方向,对二值化图像进行扫描,获取待识别的分光器图片中分光器的分光比和占用端口的信息的具体步骤包括:按照分光器端口的排列方向,扫描二值化图像的第一基准行或列,对第一基准行或列的像素值进行延迟积分,根据延迟积分的结果和预设的像素阈值确定分光器的端口数和每个端口的位置坐标。Based on the contents of the above-mentioned embodiments, the binarized image is scanned according to the arrangement direction of the ports of the optical splitter, and the specific steps of obtaining the splitting ratio of the optical splitter and the information of the occupied ports in the image of the optical splitter to be identified include: Arrangement direction of the ports, scan the first reference row or column of the binarized image, perform delay integration on the pixel values of the first reference row or column, and determine the number of ports and The location coordinates of each port.
需要说明的是,按照分光器端口的排列方向,对二值化图像进行扫描,获取待识别的分光器图片中分光器的分光比和占用端口的信息的算法,借鉴了一种CCD相机成像方法——TDI算法,因而可以被称为拟TDI成像算法。It should be noted that the binarized image is scanned according to the arrangement direction of the beamsplitter ports, and the algorithm to obtain the splitting ratio of the beamsplitter and the information of the occupied ports in the beamsplitter image to be identified is based on a CCD camera imaging method. - TDI algorithm, which can be called quasi-TDI imaging algorithm.
TDI(Time Delay Integration,时间延迟积分)是一种CCD相机成像 方法,其电荷转移方式对分光器端口识别具有启发意义。传统CCD成像结束后,直接输出N*N大小的图像,其像素值和CCD像元的电荷数有一一对应关系。但TDI CCD则是电荷不断累积的过程,很难说清楚像素值和某像元位置电荷数的关系。TDI (Time Delay Integration) is a CCD camera imaging method, and its charge transfer method is instructive for the port identification of the beam splitter. After the traditional CCD imaging is completed, an image of size N*N is directly output, and its pixel value has a one-to-one correspondence with the number of charges of the CCD pixel. However, TDI CCD is a process of continuous accumulation of charges, and it is difficult to tell the relationship between the pixel value and the number of charges at a certain pixel position.
TDI算法适用于高速移动的物体的成像。CCD器件通常适用于对一些高速移动的物体来成像。TDI算法的一个优势是同一景物对多行线阵像元信号相加成像,输出信号等效电荷数为M级数中的总电荷数,与普通线阵CCD(尤其是面阵CCD)相比较减小了像元之间响应的不均匀性。由于相机系统非均匀性的影响使遥感相机在同一均匀的光辐射下,线阵TDI CCD不同像元的视频输出信号幅度不同,这就是所谓的系统响应的非均匀性(non-uniformity)。The TDI algorithm is suitable for the imaging of high-speed moving objects. CCD devices are usually suitable for imaging some high-speed moving objects. One advantage of the TDI algorithm is that the same scene is imaged by adding multiple lines of linear array pixel signals, and the equivalent charge number of the output signal is the total number of charges in the M series, which is compared with ordinary linear array CCDs (especially area array CCDs) The non-uniformity of response between cells is reduced. Due to the influence of the non-uniformity of the camera system, under the same uniform light radiation of the remote sensing camera, the video output signal amplitudes of different pixels of the linear array TDI CCD are different, which is the so-called non-uniformity of the system response.
以扫描该二值化图像的行的方式为例,可以根据各端口相关区域的分布,确定各端口对应的区域均通过的任一行或各端口相关区域包括的像素点中纵坐标的最小值所在的行,作为第一基准行。Taking the method of scanning the lines of the binarized image as an example, according to the distribution of the relevant areas of each port, it is possible to determine the minimum value of the ordinate in any row through which the area corresponding to each port passes or the pixels included in the relevant area of each port. line as the first reference line.
第一基准行的纵坐标为y,则第一基准行上初始扫描的像素坐标为(0,y),该像素的像素值为V (0,y)。V (i,y)为第一基准行上通过扫描遍历到的像素的像素值。令Bucketj为计数器,初始值为0,0≤i≤K-1,j=0,1,2,3,…。其中,K表示二值化图像每行的像素的数量;L表示每列的像素的数量。 The ordinate of the first reference line is y, the coordinate of the pixel initially scanned on the first reference line is (0,y), and the pixel value of the pixel is V (0,y) . V (i,y) is the pixel value of the pixel traversed by scanning on the first reference line. Let Bucketj be a counter, the initial value is 0, 0≤i≤K-1, j=0,1,2,3,…. Among them, K represents the number of pixels in each row of the binarized image; L represents the number of pixels in each column.
延迟积分的步骤包括:The steps for delayed integration include:
若V (i,y)=0,且V (i+1,y)>0,则新建Bucket j=0,准备开始积分,并保存此时的坐标值(i,y); If V (i, y) = 0, and V (i+1, y) > 0, then create a new Bucket j = 0, prepare to start integration, and save the coordinate value (i, y) at this time;
若V (i,y)>0,且V (i+1,y)>0,则Bucket j=Bucket j+1,进行像素值的累加积分; If V (i, y) > 0, and V (i+1, y) > 0, then Bucket j = Bucket j +1, and the cumulative integration of pixel values is performed;
若V (i,y)>0,且V (i+1,y)=0,则积分结束,保存此时的Bucket j和坐标值(i,y)。 If V (i, y) > 0, and V (i+1, y) = 0, the integration ends, and the current Bucket j and coordinate values (i, y) are saved.
通过上述延迟积分的步骤,可以获得延迟积分的结果为多个坐标值(i,y)和多个计数值(积分值)Bucket jThrough the above steps of delayed integration, the result of delayed integration can be obtained as a plurality of coordinate values (i, y) and a plurality of count values (integration values) Bucket j .
根据多个坐标值(i,y)和多个计数值(积分值)Bucket j,以及预设的像素阈值,可以获取分光器的端口数k和每个端口的位置坐标B k(i,y)。 According to multiple coordinate values (i, y) and multiple count values (integral values) Bucket j , as well as the preset pixel threshold, the number of ports k of the optical splitter and the position coordinates B k (i, y of each port) can be obtained ).
预设的像素阈值,表示一般情况下一个分光器端口所占像素数。像素阈值的具体取值可以根据实际情况确定,本申请实施例对此不作具体限制。The preset pixel threshold indicates the number of pixels occupied by one beam splitter port in general. The specific value of the pixel threshold may be determined according to the actual situation, which is not specifically limited in this embodiment of the present application.
对于任一Bucket j,该Bucket j对应的起止横坐标之间包括端口的数量,等于该Bucket j除以像素阈值的结果最接近的整数。 For any Bucket j , the number of ports included between the start and end abscissas corresponding to the Bucket j is equal to the nearest integer of the result of dividing the Bucket j by the pixel threshold.
根据延迟积分记录的多个坐标值(i,y),端口数k,以及像素阈值,可以确定每个端口的位置坐标B k(i,y)。 According to the multiple coordinate values (i, y) recorded by the delay integration, the number of ports k, and the pixel threshold, the position coordinate B k (i, y) of each port can be determined.
优选地,可以确定每个端口的中心位置的坐标,作为该端口的位置坐标。Preferably, the coordinates of the center position of each port can be determined as the position coordinates of the port.
若端口数校验通过,则扫描二值化图像的第二基准行或列,对第二基准行或列的像素值进行延迟积分,根据延迟积分的结果和像素阈值确定各占用端口的位置坐标。If the port number check is passed, scan the second reference row or column of the binarized image, perform delay integration on the pixel values of the second reference row or column, and determine the position coordinates of each occupied port according to the result of the delay integration and the pixel threshold. .
具体地,将资源系统中的分光比作为校验码,检验分光器的端口数k。Specifically, the split ratio in the resource system is used as a check code to check the port number k of the splitter.
资源系统中的分光比包括1:4、1:8或1:16等,分光器必然包括一个输入端口,因而校验端口数k是否为4、8和16等分光比的后项加1。The splitting ratio in the resource system includes 1:4, 1:8 or 1:16, etc. The splitter must include an input port, so check whether the port number k is the last term of the splitting ratio such as 4, 8 and 16 plus 1.
若是,则校验通过;若否,则校验不通过。If so, the verification passes; if not, the verification fails.
校验通过,则可以确定各插入端口的尾纤对应的区域均通过的任一行或第一基准行的下一行,作为第二基准行。If the verification is passed, it can be determined that any row corresponding to the area corresponding to the pigtail fiber inserted into each port passes through or the next row of the first reference row is used as the second reference row.
校验通过,则可以将待识别的分光器图片中分光器的分光比确定为1:(k-1)。If the verification is passed, the light splitting ratio of the light splitter in the to-be-identified light splitter picture can be determined as 1:(k-1).
第二基准行的纵坐标为y’,则第二基准行上初始扫描的像素坐标为(0,y')。The ordinate of the second reference line is y', and the pixel coordinates of the initial scan on the second reference line are (0, y').
对第二基准行或列的像素值进行延迟积分,可以获得各占用端口的位置坐标B' k(i,y)。 By performing delay integration on the pixel values of the second reference row or column, the position coordinates B' k (i, y) of each occupied port can be obtained.
需要说明的是,将第一基准行的下一行,作为第二基准行时,若获得的各占用端口的位置坐标B' k(i,y)与各端口的位置坐标B k(i,y)相同,则将第二基准行的下一行作为新的第二基准行,重新获取各占用端口的位置坐标B' k(i,y),直至各占用端口的位置坐标B' k(i,y)与各端口的位置坐标B k(i,y)不同;若直至各端口相关区域包括的像素点中纵坐标的最大值所在的行,获取的各占用端口的位置坐标B' k(i,y)与各端口的位置坐标B k(i,y)仍然相同,则说明该分光器的端口均被占用。 It should be noted that when the next line of the first reference line is used as the second reference line, if the obtained position coordinates B' k (i, y) of each occupied port and the position coordinates B k (i, y) of each port ) is the same, then take the next line of the second reference line as a new second reference line, and re-acquire the position coordinates B' k (i, y) of each occupied port until the position coordinates B' k (i, y) of each occupied port y) is different from the position coordinate B k (i, y) of each port; if it reaches the row where the maximum value of the ordinate is located in the pixel points included in the relevant area of each port, the obtained position coordinate B' k (i , y) is still the same as the position coordinate B k (i, y) of each port, it means that the ports of the optical splitter are all occupied.
对第二基准行或列的像素值进行延迟积分的具体步骤,与对第一基准行或列的像素值进行延迟积分的具体步骤类似,此处不再赘述。The specific steps of performing delayed integration on the pixel values of the second reference row or column are similar to the specific steps of performing delayed integration on the pixel values of the first reference row or column, and will not be repeated here.
根据每个端口的位置坐标和各占用端口的位置坐标,确定各占用端口的端口号。The port number of each occupied port is determined according to the position coordinates of each port and the position coordinates of each occupied port.
具体地,比对每个端口的位置坐标B k(i,y)和各占用端口的位置坐标B' k(i,y),可以获取被占用的端口号。 Specifically, by comparing the position coordinates B k (i, y) of each port with the position coordinates B' k ( i, y) of each occupied port, the occupied port number can be obtained.
可以理解的是,扫描该二值化图像的列的过程,与上述扫描该二值化图像的行的过程类似,此处不再赘述。It can be understood that the process of scanning the columns of the binarized image is similar to the above-mentioned process of scanning the rows of the binarized image, and details are not repeated here.
本申请实施例通过对第一基准行或列的像素值,以及第二基准行或列的像素值进行延迟积分,根据延迟积分的结果获取待识别的分光器图片中分光器的分光比和占用端口的信息,能实现分光器端口的自动识别,能提高识别效率、降低成本,运行准确,运行速度满足实际需求,能提高对分光器的管理效率和把控能力,能大大降低人员投入,能为资源数据平台数据质量提升提供重要依据。In this embodiment of the present application, delay integration is performed on the pixel values of the first reference row or column and the pixel values of the second reference row or column, and the splitting ratio and occupancy of the beam splitter in the to-be-identified beam splitter picture are obtained according to the result of the delay integration. The port information can realize the automatic identification of the splitter port, can improve the identification efficiency, reduce the cost, run accurately, and the running speed can meet the actual needs, can improve the management efficiency and control ability of the splitter, can greatly reduce the personnel input, can It provides an important basis for improving the data quality of the resource data platform.
基于上述各实施例的内容,按照分光器端口的排列方向,扫描二值化图像的第一基准行或列,对第一基准行或列的像素值进行延迟积分,根据延迟积分的结果和预设的像素阈值确定分光器的端口数和每个端口的位置坐标之后,还包括:若端口数校验未通过,则按照分光器端口的排列方向,扫描二值化图像新的第一基准行或列,对新的第一基准行或列的像素值进行延迟积分,根据延迟积分的结果和像素阈值重新确定分光器的端口数和每个端口的位置坐标。Based on the contents of the above embodiments, the first reference row or column of the binarized image is scanned according to the arrangement direction of the beam splitter ports, and the pixel values of the first reference row or column are delayed and integrated. After the set pixel threshold determines the number of ports of the beam splitter and the position coordinates of each port, it also includes: if the port number check fails, scan the new first reference line of the binarized image according to the arrangement direction of the ports of the beam splitter. Or column, delay integration is performed on the pixel values of the new first reference row or column, and the number of ports of the optical splitter and the position coordinates of each port are re-determined according to the result of the delay integration and the pixel threshold.
具体地,以扫描该二值化图像的行的方式为例,若通过对第一基准行或列的像素值进行延迟积分获得的端口数校验未通过,说明该行不是各端口对应的区域均通过的行,则确定新的第一基准行。Specifically, taking the method of scanning the row of the binarized image as an example, if the port number check obtained by delaying the integration of the pixel values of the first reference row or column fails, it means that the row is not the area corresponding to each port If all passes, the new first reference line is determined.
可以确定各端口对应的区域均通过的任一行或原第一基准行的下一行,作为新的第一基准行。Any row through which the area corresponding to each port passes or the row next to the original first reference row may be determined as a new first reference row.
对新的第一基准行或列的像素值进行延迟积分,根据延迟积分的结果和像素阈值重新确定分光器的端口数和每个端口的位置坐标,直至端口数校验通过。Delay integration is performed on the pixel values of the new first reference row or column, and the number of ports of the optical splitter and the position coordinates of each port are re-determined according to the result of the delay integration and the pixel threshold until the port number verification is passed.
本申请实施例通过在端口数校验未通过时,按照分光器端口的排列方向,扫描二值化图像新的第一基准行或列,对新的第一基准行或列的像素值进行延迟积分,根据延迟积分的结果和像素阈值重新确定分光器的端口 数和每个端口的位置坐标,能实现分光器端口的自动识别,能提高识别效率、降低成本,运行准确,运行速度满足实际需求,能提高对分光器的管理效率和把控能力,能大大降低人员投入,能为资源数据平台数据质量提升提供重要依据。The embodiment of the present application scans the new first reference row or column of the binarized image according to the arrangement direction of the ports of the optical splitter when the port number check fails, and delays the pixel values of the new first reference row or column Integrate, re-determine the number of ports of the beam splitter and the position coordinates of each port according to the result of the delay integration and the pixel threshold, which can realize the automatic identification of the ports of the beam splitter, improve the identification efficiency, reduce the cost, run accurately, and meet the actual needs of the running speed , can improve the management efficiency and control ability of the optical splitter, can greatly reduce the personnel input, and can provide an important basis for the improvement of the data quality of the resource data platform.
基于上述各实施例的内容,获取二值化图像中每个端口相关区域的质心坐标之前,还包括:根据二值化图像中各区域的面积,获取二值化图像中的各端口相关区域。Based on the contents of the above embodiments, before acquiring the centroid coordinates of each port related region in the binarized image, the method further includes: acquiring each port related region in the binarized image according to the area of each region in the binarized image.
具体地,二值化图像中各区域的信息扩包括连通属性、面积、Hu矩、凸包分析等。Specifically, the information of each region in the binarized image includes connectivity attributes, area, Hu moments, convex hull analysis, and the like.
可以根据二值化图像中各区域的面积和预设的面积区间,对各区域进行筛选,删选出各端口相关区域。According to the area of each area in the binarized image and the preset area interval, each area can be screened, and each port-related area can be deleted.
端口相关区域,具有一定的面积范围。Port-related area, with a certain area range.
可以根据实际情况设定面积区间。对于面积区间的具体取值,本申请实施例不作具体限制。The area range can be set according to the actual situation. The specific value of the area interval is not specifically limited in the embodiment of the present application.
区域的面积过小,说明该区域是噪声等杂点;区域的面积过大,说明该区域也不是端口相关区域。If the area of the area is too small, it means that the area is noise and other noise points; if the area of the area is too large, it means that the area is not a port-related area.
本申请实施例根据二值化图像中各区域的面积,获取二值化图像中的各端口相关区域,能提取出各端口相关区域,从而能根据各端口相关区域,解析获得待识别的分光器图片中分光器的分光比和占用端口的信息,能实现分光器端口的自动识别,能提高识别效率、降低成本。In this embodiment of the present application, each port-related region in the binarized image can be obtained according to the area of each region in the binarized image, and each port-related region can be extracted, so that the optical splitter to be identified can be obtained by analysis according to each port-related region The splitting ratio of the optical splitter and the information of the occupied ports in the picture can realize the automatic identification of the optical splitter port, which can improve the identification efficiency and reduce the cost.
基于上述各实施例的内容,将待识别的分光器图片进行图像二值化,获取二值化图像的具体步骤包括:将分光器图片转换至HSV颜色空间中,进行二值化和数学形态学运算,获取二值化图像。Based on the contents of the above embodiments, the image of the beam splitter to be identified is image binarized, and the specific steps of obtaining the binarized image include: converting the beam splitter image into the HSV color space, performing binarization and mathematical morphology Operation to obtain a binarized image.
具体地,由于分光器的端口颜色具有规律性,多为蓝色或绿色等,为了使通过二值化初步提取分光器端口的位置的结果更准确,可以先将分光器图片转换至HSV颜色空间中,则HSV颜色空间中进行二值化,对分光器端口的位置进行初步判定,获得原始二值化图像。Specifically, since the port color of the beam splitter has regularity, most of which are blue or green, in order to make the result of the preliminary extraction of the position of the beam splitter port through binarization more accurate, the beam splitter image can be converted to the HSV color space first. , the binarization is performed in the HSV color space, the position of the beam splitter port is preliminarily determined, and the original binarized image is obtained.
HSV(Hue,Saturation,Value)是根据颜色的直观特性创建的一种颜色空间,也称六角锥体模型(Hexcone Model)。这个模型中颜色的参数分别是:色调(H),饱和度(S),明度(V)。HSV (Hue, Saturation, Value) is a color space created according to the intuitive characteristics of color, also known as the Hexcone Model. The parameters of the color in this model are: Hue (H), Saturation (S), Lightness (V).
由于原始二值化图像可能含有不规则孔洞,不利于对图像中的区域的分析,可以通过对原始二值化图像进行数学形态学运算,填补孔洞,获取二值化图像,以保证分光器端口连通域的完整性。Since the original binarized image may contain irregular holes, which is not conducive to the analysis of the area in the image, we can perform mathematical morphological operations on the original binarized image to fill the holes and obtain the binarized image to ensure the port of the beam splitter. Integrity of connected domains.
优选地,可以采用闭运算填补孔洞。Preferably, a closing operation can be used to fill the holes.
闭运算是先对图像膨胀后腐蚀的一种数学形态学运算。其作用是用来填充物体内的小空洞,连接邻近的物体,连接断开的轮廓线,平滑其边界的同时不改变面积。The closing operation is a mathematical morphological operation that dilates and then corrodes the image. Its role is to fill small holes in objects, connect adjacent objects, connect disconnected contour lines, and smooth its boundaries without changing the area.
优选地,可以使用5*5的全1结构体进行闭运算。Preferably, the closing operation can be performed using a 5*5 all-one structure.
本申请实施例通过将分光器图片转换至HSV颜色空间中,进行二值化和数学形态学运算,获取二值化图像,能获得更完整的区域,从而能基于二值化图像中的区域解析获取待识别的分光器图片中分光器的分光比和占用端口的信息,能实现分光器端口的自动识别,能提高识别效率、降低成本。In the embodiment of the present application, by converting the beam splitter image into the HSV color space, performing binarization and mathematical morphological operations, and obtaining a binarized image, a more complete area can be obtained, so that analysis based on the area in the binarized image can be achieved. Obtaining the information of the splitting ratio of the optical splitter and the information of the occupied ports in the picture of the optical splitter to be identified can realize the automatic identification of the optical splitter port, which can improve the identification efficiency and reduce the cost.
基于上述各实施例的内容,将待识别的分光器图片进行图像二值化,获取二值化图像之前,还包括:若根据图像特征判断获知进行归一化后的原始图片为合格图片,则将归一化后的原始图片,作为待识别的分光器图片。Based on the contents of the foregoing embodiments, performing image binarization on the image of the spectroscope to be identified, and before acquiring the binarized image, the method further includes: if it is determined according to the image features that the normalized original image is a qualified image, then The normalized original picture is used as the light splitter picture to be identified.
可以理解的是,由于图像采集设备不定,采集人员不同,场采集的分光器的原始图片的尺寸不同,且由于现场环境、采集人员的摄影水平等因素,现场采集的分光器的原始图片可能存在过亮、过暗、场景单一、模糊等不符合要求的情况,因此,可以先对原始图片进行归一化,将原始图片的尺寸调整为预设的尺寸,并按照预设的灰度级进行转换。It can be understood that due to the uncertainty of the image acquisition equipment and the different acquisition personnel, the size of the original image of the spectroscope collected in the field is different, and due to factors such as the on-site environment and the photography level of the collector, the original image of the spectroscope collected on-site may exist. Too bright, too dark, single scene, blur, etc. do not meet the requirements. Therefore, you can first normalize the original image, adjust the size of the original image to the preset size, and carry out the process according to the preset gray level. convert.
预设的尺寸,可以根据实际情况进行设置,例如720*1024或1024*720(根据拍摄方向来确定)。对于预设的尺寸的具体数值,本申请实施例不作限制。The preset size can be set according to the actual situation, such as 720*1024 or 1024*720 (determined according to the shooting direction). The specific numerical value of the preset size is not limited in this embodiment of the present application.
预设的灰度级,可以根据实际情况进行设置,例如8位灰度。对于预设的灰度级的具体数值,本申请实施例不作限制。The preset gray level can be set according to the actual situation, such as 8-bit gray level. The specific value of the preset gray level is not limited in this embodiment of the present application.
可以使用合适的参数作为图像特征,例如使用灰度均值(Mean)、标准差(Std)和图像熵(Entropy)中的至少一种作为图像特征,对归一化后的原始图片是否合格进行判定。Appropriate parameters can be used as image features, for example, at least one of gray mean (Mean), standard deviation (Std), and image entropy (Entropy) can be used as image features to judge whether the normalized original image is qualified or not. .
可以使用类间方差法作为阈值选取方法,选取用于判定归一化后的原始图片是否合格的特征阈值。The inter-class variance method can be used as a threshold selection method to select a feature threshold for determining whether the normalized original image is qualified.
例如,以灰度均值为例,分别提取预先获取的过黑图片库和合格图片库的灰度均值,将两类图片类间方差最大的值作为阈值。For example, taking the gray mean value as an example, the gray mean value of the pre-acquired black image library and the qualified image library are respectively extracted, and the value with the largest variance between the two types of pictures is used as the threshold.
若归一化后的原始图片为合格图片,则将该归一化后的原始图片作为待识别的分光器图片,执行步骤S101,针对该待识别的分光器图片进行分光器端口的识别。If the normalized original picture is a qualified picture, the normalized original picture is used as a to-be-identified beam splitter picture, and step S101 is performed to identify a beam splitter port for the to-be-identified beam splitter picture.
若归一化后的原始图片为不合格图片,则不将该归一化后的原始图片作为待识别的分光器图片,不针对该归一化后的原始图片进行分光器端口的识别。If the normalized original picture is an unqualified picture, the normalized original picture is not used as the optical splitter picture to be identified, and the optical splitter port is not identified for the normalized original picture.
本申请实施例根据图像特征判断获知进行归一化后的原始图片为合格图片,将归一化后的原始图片,作为待识别的分光器图片,能避免对不合格的图片进行分光器端口的识别,能避免无效的识别工作,能节省软硬件资源。In the embodiment of the present application, it is judged that the normalized original picture is a qualified picture according to the image features, and the normalized original picture is used as the to-be-identified beam splitter picture, so as to avoid the unqualified picture being subjected to optical splitter port identification. Identification can avoid invalid identification work and save software and hardware resources.
为了便于对本申请上述各实施例的理解,下面通过一个实例说明本申请上述各实施例提供的分光器端口识别方法进行说明。In order to facilitate the understanding of the above-mentioned embodiments of the present application, an example is used to describe the optical splitter port identification methods provided by the above-mentioned embodiments of the present application.
对于某日的运维图片库中的17965张图片,通过归一化和图像预处理,筛选出6660张合格图片作为待识别的分光器图片,过滤掉11305张不合格图片,待识别图片的占比降低了60%以上,极大地减少了人工干预,提高了运维效率。For the 17,965 pictures in the operation and maintenance picture library on a certain day, through normalization and image preprocessing, 6,660 qualified pictures were filtered out as the beam splitter pictures to be identified, and 11,305 unqualified pictures were filtered out. The ratio is reduced by more than 60%, which greatly reduces manual intervention and improves operation and maintenance efficiency.
然后根据本申请上述各实施例提供的分光器端口识别方法,对上述6660张待识别的分光器图片进行端口识别,从238张含有分光器的图片中,成功识别分光器分光比216张,包括1:4和1:8两种端口;正确识别分光器占用端口号的有205张,准确率达到94.9%,标准差为0.19。Then, according to the optical splitter port identification method provided by the above-mentioned embodiments of the present application, the port identification is performed on the above-mentioned 6660 pictures of the optical splitter to be identified. From the 238 pictures containing the optical splitter, 216 pictures of the splitting ratio of the optical splitter are successfully identified, including 1:4 and 1:8 two kinds of ports; 205 sheets of the port number occupied by the optical splitter are correctly identified, with an accuracy rate of 94.9% and a standard deviation of 0.19.
通过上述实例,说明本申请实施例具有很高的识别准确率。The above examples illustrate that the embodiments of the present application have high recognition accuracy.
采用CPU为i5-6300HQ,8G内存的笔记本电脑以10张图片为单位,图片分辨率为1024*768,图像格式为JPG,进行分光器端口识别,统计处理时间(单位:s)如表1所示。The laptop computer with CPU i5-6300HQ and 8G memory takes 10 pictures as the unit, the picture resolution is 1024*768, the picture format is JPG, and the optical splitter port is identified. The statistical processing time (unit: s) is shown in Table 1. Show.
表1 分光器端口识别运行时间统计表Table 1 Optical splitter port identification running time statistics
图片编号picture number 11 22 33 44 55 66 77 88 99 1010
运行时间operation hours 7.87.8 6.36.3 5.65.6 5.75.7 5.95.9 5.85.8 6.26.2 5.75.7 5.25.2 7.27.2
从表1可以看出本申请上述各实施例提供的分光器端口识别方法运行速度满足实际需求。It can be seen from Table 1 that the operating speed of the optical splitter port identification method provided by the above-mentioned embodiments of the present application satisfies actual requirements.
下面对本申请实施例提供的分光器端口识别装置进行描述,下文描述的分光器端口识别装置与上文描述的分光器端口识别方法可相互对应参照。The following describes the optical splitter port identification apparatus provided by the embodiments of the present application, and the optical splitter port identification apparatus described below and the optical splitter port identification method described above may refer to each other correspondingly.
图2是根据本申请实施例提供的分光器端口识别装置的结构示意图。基于上述各实施例的内容,如图2所示,该装置包括,其中图像处理模块201、方向判断模块202和端口解析模块203:FIG. 2 is a schematic structural diagram of an apparatus for identifying a port of an optical splitter according to an embodiment of the present application. Based on the contents of the above-mentioned embodiments, as shown in FIG. 2 , the apparatus includes an image processing module 201, a direction judgment module 202 and a port analysis module 203:
图像处理模块201,用于将待识别的分光器图片进行图像二值化,获取二值化图像;The image processing module 201 is configured to perform image binarization on the to-be-recognized spectrometer picture to obtain a binarized image;
方向判断模块202,用于根据二值化图像,确定分光器端口的排列方向;The direction judgment module 202 is used for determining the arrangement direction of the ports of the optical splitter according to the binarized image;
端口解析模块203,用于按照分光器端口的排列方向,对二值化图像进行扫描,获取待识别的分光器图片中分光器的分光比和占用端口的信息。The port analysis module 203 is configured to scan the binarized image according to the arrangement direction of the ports of the optical splitter to obtain the splitting ratio of the optical splitter and the information of the occupied ports in the image of the optical splitter to be identified.
具体地,图像处理模块201、方向判断模块202和端口解析模块203依次电连接。Specifically, the image processing module 201 , the direction determination module 202 and the port analysis module 203 are electrically connected in sequence.
图像处理模块201对待识别的分光器图片进行图像二值化,去除背景,实现对分光器端口的位置进行初步判定和提取,获得二值化图像。The image processing module 201 performs image binarization on the image of the spectroscope to be recognized, removes the background, and realizes preliminary determination and extraction of the position of the spectroscope port to obtain a binarized image.
方向判断模块202可以根据二值化图像中各个区域的分布,确定分光器端口的排列方向,即确定在二值化图像中分光器端口是横向排列还是纵向排列。The direction determination module 202 can determine the arrangement direction of the beam splitter ports according to the distribution of each area in the binarized image, that is, determine whether the beam splitter ports are arranged horizontally or vertically in the binarized image.
端口解析模块203通过扫描该二值化图像的行或列,可以确定各端口对应的区域;根据端口对应的区域的数量,可以获取分光器的分光比;通过扫描该二值化图像的行或列,还可以确定插入端口的尾纤对应的区域;将插入端口的尾纤对应的区域与端口对应的区域进行对比,可以获取占用端口的信息。The port analysis module 203 can determine the area corresponding to each port by scanning the row or column of the binarized image; according to the number of areas corresponding to the port, the spectroscopic ratio of the spectroscope can be obtained; by scanning the row or column of the binarized image; You can also determine the area corresponding to the pigtail inserted into the port; by comparing the area corresponding to the pigtail inserted into the port with the area corresponding to the port, you can obtain information about the occupied port.
本申请实施例提供的分光器端口识别装置,用于执行本申请上述各实 施例提供的分光器端口识别方法,该分光器端口识别装置包括的各模块实现相应功能的具体方法和流程详见上述分光器端口识别方法的实施例,此处不再赘述。The optical splitter port identification device provided by the embodiment of the present application is used to execute the optical splitter port identification method provided by the above-mentioned embodiments of the present application. For the specific methods and processes of the modules included in the optical splitter port identification device to implement corresponding functions, please refer to the above-mentioned details. Embodiments of the optical splitter port identification method are not repeated here.
该分光器端口识别装置用于前述各实施例的分光器端口识别方法。因此,在前述各实施例中的分光器端口识别方法中的描述和定义,可以用于本申请实施例中各执行模块的理解。The optical splitter port identification device is used in the optical splitter port identification methods of the foregoing embodiments. Therefore, the descriptions and definitions in the optical splitter port identification methods in the foregoing embodiments can be used for the understanding of each execution module in the embodiments of the present application.
本申请实施例通过将待识别的分光器图片进行图像二值化,获取二值化图像,根据二值化图像,确定分光器端口的排列方向,按照分光器端口的排列方向,对二值化图像进行扫描,获取待识别的分光器图片中分光器的分光比和占用端口的信息,能实现分光器端口的自动识别,能提高识别效率、降低成本,运行准确,运行速度满足实际需求,能提高对分光器的管理效率和管理能力,能大大降低人员投入,能为资源数据平台数据质量提升提供重要依据,能提高运维图像审核的效率。In this embodiment of the present application, the image of the optical splitter to be identified is binarized to obtain a binarized image, the arrangement direction of the optical splitter ports is determined according to the binarized image, and the binarized image is determined according to the arrangement direction of the optical splitter ports. Scan the image to obtain the splitting ratio of the optical splitter and the information of the occupied ports in the image of the optical splitter to be identified, which can realize the automatic identification of the optical splitter port, can improve the identification efficiency, reduce the cost, run accurately, and the running speed can meet the actual needs. Improving the management efficiency and management ability of the optical splitter can greatly reduce the personnel investment, provide an important basis for the improvement of the data quality of the resource data platform, and improve the efficiency of operation and maintenance image review.
图3示例了一种电子设备的实体结构示意图,如图3所示,该电子设备可以包括:处理器(processor)301、存储器(memory)302和总线303;其中,处理器301和存储器302通过总线303完成相互间的通信;处理器301用于调用存储在存储器302中并可在处理器301上运行的计算机程序指令,以执行上述各方法实施例供的分光器端口识别方法,该方法包括:将待识别的分光器图片进行图像二值化,获取二值化图像;根据二值化图像,确定分光器端口的排列方向;按照分光器端口的排列方向,对二值化图像进行扫描,获取待识别的分光器图片中分光器的分光比和占用端口的信息。FIG. 3 illustrates a schematic diagram of the physical structure of an electronic device. As shown in FIG. 3, the electronic device may include: a processor (processor) 301, a memory (memory) 302, and a bus 303; wherein, the processor 301 and the memory 302 pass through The bus 303 completes mutual communication; the processor 301 is configured to call computer program instructions stored in the memory 302 and run on the processor 301 to execute the optical splitter port identification method provided by the above method embodiments, the method comprising: : Binarize the image of the spectroscope to be identified to obtain a binarized image; determine the arrangement direction of the spectroscope ports according to the binarized image; scan the binarized image according to the arrangement direction of the spectroscope ports, Obtain the splitting ratio and occupied port information of the splitter in the picture of the splitter to be identified.
此外,上述的存储器302中的逻辑指令可以通过软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本申请各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(ROM,Read-Only Memory)、随机存取存储器(RAM,Random Access Memory)、磁碟或者光盘等各种可以存储程序代码的介质。In addition, the above-mentioned logic instructions in the memory 302 can be implemented in the form of software functional units 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 application can be embodied in the form of a software product in essence, or the part that contributes to the prior art or the part of the technical solution, and the computer software product is stored in a storage medium, including Several instructions are used to cause a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, Read-Only Memory (ROM, Read-Only Memory), Random Access Memory (RAM, Random Access Memory), magnetic disk or optical disk and other media that can store program codes .
另一方面,本申请实施例还提供一种计算机程序产品,所述计算机程序产品包括存储在非暂态计算机可读存储介质上的计算机程序,所述计算机程序包括程序指令,当所述程序指令被计算机执行时,计算机能够执行上述各方法实施例所提供的分光器端口识别方法,该方法包括:将待识别的分光器图片进行图像二值化,获取二值化图像;根据二值化图像,确定分光器端口的排列方向;按照分光器端口的排列方向,对二值化图像进行扫描,获取待识别的分光器图片中分光器的分光比和占用端口的信息。On the other hand, an embodiment of the present application further provides a computer program product, the computer program product includes a computer program stored on a non-transitory computer-readable storage medium, the computer program includes program instructions, when the program instructions When executed by a computer, the computer can execute the optical splitter port identification method provided by the above method embodiments. The method includes: performing image binarization on the image of the optical splitter to be identified, and obtaining a binarized image; according to the binarized image , determine the arrangement direction of the optical splitter ports; scan the binarized image according to the arrangement direction of the optical splitter ports to obtain the splitting ratio of the optical splitter and the information of the occupied ports in the optical splitter picture to be identified.
又一方面,本申请实施例还提供一种非暂态计算机可读存储介质,其上存储有计算机程序,该计算机程序被处理器执行时实现以执行上述各实施例提供的分光器端口识别方法,该方法包括:将待识别的分光器图片进行图像二值化,获取二值化图像;根据二值化图像,确定分光器端口的排列方向;按照分光器端口的排列方向,对二值化图像进行扫描,获取待识别的分光器图片中分光器的分光比和占用端口的信息。In yet another aspect, the embodiments of the present application further provide a non-transitory computer-readable storage medium on which a computer program is stored, and the computer program is implemented when executed by a processor to execute the optical splitter port identification method provided by the above embodiments , the method includes: performing image binarization on the image of the optical splitter to be identified to obtain a binarized image; determining the arrangement direction of the optical splitter ports according to the binarized image; The image is scanned to obtain the light splitting ratio and occupied port information of the light splitter in the picture of the light splitter to be identified.
以上所描述的装置实施例仅仅是示意性的,其中所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部模块来实现本实施例方案的目的。本领域普通技术人员在不付出创造性的劳动的情况下,即可以理解并实施。The device embodiments described above are only illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in One place, or it can be distributed over multiple network elements. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution in this embodiment. Those of ordinary skill in the art can understand and implement it without creative effort.
通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到各实施方式可借助软件加必需的通用硬件平台的方式来实现,当然也可以通过硬件。基于这样的理解,上述技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品可以存储在计算机可读存储介质中,如ROM/RAM、磁碟、光盘等,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行各个实施例或者实施例的某些部分所述的方法。From 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, and certainly can also be implemented by hardware. Based on this understanding, the above-mentioned technical solutions can be embodied in the form of software products in essence or the parts that make contributions to the prior art, and the computer software products can be stored in computer-readable storage media, such as ROM/RAM, magnetic A disc, an optical disc, etc., includes several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to perform the methods described in various embodiments or some parts of the embodiments.
最后应说明的是:以上实施例仅用以说明本申请的技术方案,而非对其限制;尽管参照前述实施例对本申请进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本申请各实施例技术方案的精神和范围。Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, but not to limit them; although the present application has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that: it can still be Modifications are made to the technical solutions recorded in the foregoing embodiments, or some technical features thereof are equivalently replaced; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present application.

Claims (10)

  1. 一种分光器端口识别方法,包括:An optical splitter port identification method, comprising:
    将待识别的分光器图片进行图像二值化,获取二值化图像;Perform image binarization on the image of the spectroscope to be identified to obtain a binarized image;
    根据所述二值化图像,确定分光器端口的排列方向;determining the arrangement direction of the ports of the optical splitter according to the binarized image;
    按照所述分光器端口的排列方向,对所述二值化图像进行扫描,获取所述待识别的分光器图片中分光器的分光比和占用端口的信息。The binarized image is scanned according to the arrangement direction of the ports of the optical splitter, and the light splitting ratio and the information of the occupied ports of the optical splitter in the to-be-identified image of the optical splitter are obtained.
  2. 根据权利要求1所述的分光器端口识别方法,其特征在于,所述根据所述二值化图像,确定分光器端口的排列方向的具体步骤包括:The optical splitter port identification method according to claim 1, wherein the specific step of determining the arrangement direction of the optical splitter ports according to the binarized image comprises:
    获取所述二值化图像中每个端口相关区域的质心坐标;obtaining the centroid coordinates of each port-related region in the binarized image;
    根据各所述质心坐标,获取各所述质心的横坐标差值序列和纵坐标差值序列;According to each of the centroid coordinates, obtain the abscissa difference sequence and the ordinate difference sequence of each of the centroids;
    根据所述横坐标插值序列和纵坐标差值序列,确定所述分光器端口的排列方向。The arrangement direction of the optical splitter ports is determined according to the abscissa interpolation sequence and the ordinate difference sequence.
  3. 根据权利要求1所述的分光器端口识别方法,其中所述按照所述分光器端口的排列方向,对所述二值化图像进行扫描,获取所述待识别的分光器图片中分光器的分光比和占用端口的信息的具体步骤包括:The optical splitter port identification method according to claim 1, wherein the binarized image is scanned according to the arrangement direction of the optical splitter ports to obtain the light splitting of the optical splitter in the to-be-identified optical splitter picture The specific steps for comparing and occupying port information include:
    按照所述分光器端口的排列方向,扫描所述二值化图像的第一基准行或列,对所述第一基准行或列的像素值进行延迟积分,根据延迟积分的结果和预设的像素阈值确定所述分光器的端口数和每个端口的位置坐标;Scan the first reference row or column of the binarized image according to the arrangement direction of the beam splitter ports, and perform delay integration on the pixel values of the first reference row or column. The pixel threshold determines the number of ports of the optical splitter and the position coordinates of each port;
    若所述端口数校验通过,则扫描所述二值化图像的第二基准行或列,对所述第二基准行或列的像素值进行延迟积分,根据延迟积分的结果和所述像素阈值确定各占用端口的位置坐标;If the port number check is passed, scan the second reference row or column of the binarized image, perform delay integration on the pixel values of the second reference row or column, and perform delay integration on the pixel values of the second reference row or column. The threshold determines the position coordinates of each occupied port;
    根据所述每个端口的位置坐标和所述各占用端口的位置坐标,确定所述各占用端口的端口号。The port number of each occupied port is determined according to the position coordinates of each port and the position coordinates of each occupied port.
  4. 根据权利要求3所述的分光器端口识别方法,其中所述按照所述分光器端口的排列方向,扫描所述二值化图像的第一基准行或列,对所述第一基准行或列的像素值进行延迟积分,根据延迟积分的结果和预设的像素阈值确定所述分光器的端口数和每个端口的位置坐标之后,还包括:The optical splitter port identification method according to claim 3, wherein according to the arrangement direction of the optical splitter ports, the first reference row or column of the binarized image is scanned, and the first reference row or column is scanned for the first reference row or column. Delay integration is performed on the pixel value of the optical splitter, and after determining the number of ports of the optical splitter and the position coordinates of each port according to the result of the delay integration and the preset pixel threshold, it also includes:
    若所述端口数校验未通过,则按照所述分光器端口的排列方向,扫描所述二值化图像新的第一基准行或列,对所述新的第一基准行或列的像素 值进行延迟积分,根据延迟积分的结果和所述像素阈值重新确定所述分光器的端口数和每个端口的位置坐标。If the port number check fails, scan the new first reference row or column of the binarized image according to the arrangement direction of the ports of the optical splitter, and scan the pixels in the new first reference row or column Delay integration is performed on the value, and the number of ports of the optical splitter and the position coordinates of each port are re-determined according to the result of the delay integration and the pixel threshold.
  5. 根据权利要求2所述的分光器端口识别方法,其中所述获取所述二值化图像中每个端口相关区域的质心坐标之前,还包括:The optical splitter port identification method according to claim 2, wherein before acquiring the centroid coordinates of each port-related region in the binarized image, the method further comprises:
    根据所述二值化图像中各区域的面积,获取所述二值化图像中的各端口相关区域。Each port-related region in the binarized image is acquired according to the area of each region in the binarized image.
  6. 根据权利要求1所述的分光器端口识别方法,其中所述将待识别的分光器图片进行图像二值化,获取二值化图像的具体步骤包括:The optical splitter port identification method according to claim 1, wherein the specific steps of performing image binarization on the image of the optical splitter to be identified, and obtaining the binarized image include:
    将所述分光器图片转换至HSV颜色空间中,进行二值化和数学形态学运算,获取所述二值化图像。Convert the spectroscope image into the HSV color space, perform binarization and mathematical morphological operations, and obtain the binarized image.
  7. 根据权利要求1至6任一所述的分光器端口识别方法,其中所述将待识别的分光器图片进行图像二值化,获取二值化图像之前,还包括:The optical splitter port identification method according to any one of claims 1 to 6, wherein the performing image binarization on the image of the optical splitter to be identified, before acquiring the binarized image, further comprising:
    若根据图像特征判断获知进行归一化后的原始图片为合格图片,则将所述归一化后的原始图片,作为所述待识别的分光器图片。If it is determined according to the image features that the normalized original picture is a qualified picture, the normalized original picture is used as the to-be-identified spectroscope picture.
  8. 一种分光器端口识别装置,包括:An optical splitter port identification device, comprising:
    图像处理模块,用于将待识别的分光器图片进行图像二值化,获取二值化图像;The image processing module is used to perform image binarization on the image of the spectroscope to be recognized, and obtain the binarized image;
    方向判断模块,用于根据所述二值化图像,确定分光器端口的排列方向;a direction judgment module, configured to determine the arrangement direction of the ports of the optical splitter according to the binarized image;
    端口解析模块,用于按照所述分光器端口的排列方向,对所述二值化图像进行扫描,获取所述待识别的分光器图片中分光器的分光比和占用端口的信息。The port analysis module is configured to scan the binarized image according to the arrangement direction of the ports of the optical splitter, and obtain the information of the splitting ratio and the occupied ports of the optical splitter in the picture of the optical splitter to be identified.
  9. 一种电子设备,包括存储器、处理器及存储在存储器上并可在处理器上运行的计算机程序,其特征在于,所述处理器执行所述程序时实现如权利要求1至7任一项所述的分光器端口识别方法的步骤。An electronic device, comprising a memory, a processor and a computer program stored on the memory and running on the processor, characterized in that, when the processor executes the program, the program as claimed in any one of claims 1 to 7 is implemented. The steps of the optical splitter port identification method described above.
  10. 一种非暂态计算机可读存储介质,其上存储有计算机程序,其特征在于,该计算机程序被处理器执行时实现如权利要求1至7任一项所述的分光器端口识别方法的步骤。A non-transitory computer-readable storage medium on which a computer program is stored, characterized in that, when the computer program is executed by a processor, the steps of the optical splitter port identification method according to any one of claims 1 to 7 are implemented .
PCT/CN2021/107074 2020-07-27 2021-07-19 Method and apparatus for identifying optical splitter ports WO2022022310A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202010733053.X 2020-07-27
CN202010733053.XA CN113989512A (en) 2020-07-27 2020-07-27 Optical splitter port identification method and device

Publications (1)

Publication Number Publication Date
WO2022022310A1 true WO2022022310A1 (en) 2022-02-03

Family

ID=79731557

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/107074 WO2022022310A1 (en) 2020-07-27 2021-07-19 Method and apparatus for identifying optical splitter ports

Country Status (2)

Country Link
CN (1) CN113989512A (en)
WO (1) WO2022022310A1 (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109190439A (en) * 2018-09-21 2019-01-11 南京机灵侠软件技术有限公司 A kind of image-recognizing method of optical splitter port lines and its two-dimension code label
CN110909694A (en) * 2019-11-27 2020-03-24 中移(杭州)信息技术有限公司 Method, device, terminal and storage medium for acquiring port information of optical splitter
CN110956366A (en) * 2019-11-13 2020-04-03 科大国创软件股份有限公司 Method for testing construction consistency of optical splitter in dimensional quality inspection

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109190439A (en) * 2018-09-21 2019-01-11 南京机灵侠软件技术有限公司 A kind of image-recognizing method of optical splitter port lines and its two-dimension code label
CN110956366A (en) * 2019-11-13 2020-04-03 科大国创软件股份有限公司 Method for testing construction consistency of optical splitter in dimensional quality inspection
CN110909694A (en) * 2019-11-27 2020-03-24 中移(杭州)信息技术有限公司 Method, device, terminal and storage medium for acquiring port information of optical splitter

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
DU, CHUANYE ET AL.: "OSP Recognition Analysis Method Based on Image Recognition", JOURNAL OF DATA ACQUISITION AND PROCESSING, vol. 34, no. 1, 15 January 2019 (2019-01-15), pages 183 - 188, XP055892080, ISSN: 1004-9037 *

Also Published As

Publication number Publication date
CN113989512A (en) 2022-01-28

Similar Documents

Publication Publication Date Title
WO2020224458A1 (en) Method for detecting corona discharge employing image processing
US11080894B2 (en) Skin color detection method, skin color detection apparatus, and storage medium
CN105339951A (en) Method for detecting a document boundary
CN101076831A (en) Pseudoscopic image reduction of digital video
CN109461133B (en) Bridge bolt falling detection method and terminal equipment
WO2019210707A1 (en) Image sharpness evaluation method, device and electronic device
US11922598B2 (en) Image processing apparatus, image processing method, and storage medium
CN110879131B (en) Imaging quality testing method and imaging quality testing device for visual optical system, and electronic apparatus
US20140341466A1 (en) Noise estimation for images
CN106682670B (en) Station caption identification method and system
KR101541384B1 (en) Device for Recognition of Object and method
JP6065656B2 (en) Pattern processing apparatus, pattern processing method, and pattern processing program
WO2022022310A1 (en) Method and apparatus for identifying optical splitter ports
CN117197691A (en) Vision-based photovoltaic module statistics method and system
US20220327862A1 (en) Method for detecting whether a face is masked, masked-face recognition device, and computer storage medium
CN108830834B (en) Automatic extraction method for video defect information of cable climbing robot
CN116993654A (en) Camera module defect detection method, device, equipment, storage medium and product
CN111182293A (en) Method and system for detecting lens shadow correction data
CN112836759B (en) Machine-selected picture evaluation method and device, storage medium and electronic equipment
US20060001833A1 (en) Moving picture search apparatus
CN110956640B (en) Heterogeneous image edge point detection and registration method
CN110310341B (en) Method, device, equipment and storage medium for generating default parameters in color algorithm
WO2020151529A1 (en) Clothing image classification and image classification methods and apparatuses, and device
CN113840135A (en) Color cast detection method, device, equipment and storage medium
CN113965814A (en) Multi-meeting-place key frame extraction method and system based on video meeting scene

Legal Events

Date Code Title Description
NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 21849700

Country of ref document: EP

Kind code of ref document: A1