Optical fiber diameter measuring method and device
By using multi-view image processing technology in fiber diameter detection, combined with binarization, edge detection and linear fitting algorithms, the measurement inaccuracy caused by fiber concave and convex defects is solved, and higher measurement accuracy and reliability are achieved.
Patent Information
- Application Number
- CN202311049064.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-08-18
- Publication Date
- 2025-02-21
AI Technical Summary
During the optical fiber diameter detection process, the measured diameter is inaccurate due to the optical fiber defects.
By acquiring images of three viewing angles of the optical fiber acquired by the imaging module at different positions, performing binarization processing and edge detection, determining the edge points of the optical fiber, and determining whether there are defects based on the preset defect threshold. A straight line fitting algorithm is used to process edge points where there are no defects, and parallel fiber edge lines are obtained, and the fiber diameter is then calculated, and the true fiber diameter is obtained through multi-view data fusion.
It improves the accuracy of fiber diameter measurement, avoids the impact of fiber concave and convex defects on the measurement results, and provides more accurate and reliable measurement results.
Smart Images

Figure CN119494871A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of optical fiber diameter measurement, and in particular, to an optical fiber diameter measurement method and device. Background Art
[0002] Machine vision enables industrial equipment to have basic recognition and analysis capabilities by analyzing images. With the deepening of industrial digitalization and intelligent transformation and the gradual advancement of intelligent manufacturing, industrial machine vision has gradually formed a large-scale industry, and with the implementation of artificial intelligence technology in the industrial field, it has gradually penetrated into various scenarios of industrial production. As a basic research problem in the field of machine vision, the surface defect detection task aims to automatically distinguish different surface conditions of objects and is applied in many practical tasks, such as fiber optic diameter measurement, fiber optic bump measurement, etc.
[0003] Existing machine vision inspection devices often cause inaccurate diameter measurements during diameter inspection due to concave and convex defects in the optical fiber. Summary of the invention
[0004] The purpose of the embodiments of the present application is to provide a method and device for measuring the diameter of an optical fiber, so as to solve the above-mentioned problems existing in the prior art and improve the accuracy of measuring the diameter of the optical fiber.
[0005] In a first aspect, a method for measuring an optical fiber diameter is provided, and the method may include:
[0006] Obtaining images to be processed of the optical fiber to be measured at three viewing angles at different positions collected by the imaging module;
[0007] For any position, the image to be processed at each of the three viewing angles is binarized to obtain the optical fiber image corresponding to the image to be processed at each viewing angle, and edge detection is performed on the optical fiber image to obtain the optical fiber edge point in the optical fiber image at each viewing angle at the position;
[0008] For any viewing angle, based on the optical fiber edge points at different positions and a preset defect threshold, determine the position where the optical fiber to be measured has defects and the position where there are no defects at the viewing angle;
[0009] A straight line fitting algorithm is used to process the edge points of the optical fiber where there is no defect at the viewing angle, and two parallel optical fiber edge straight lines are obtained;
[0010] Determine the fiber diameter of the optical fiber to be measured at the viewing angle based on the distance between the two optical fiber edge straight lines;
[0011] The optical fiber diameters at each viewing angle are merged to obtain the real optical fiber diameter of the optical fiber to be measured.
[0012] In one possible implementation, the method further includes:
[0013] The optical fiber diameter at each viewing angle of the optical fiber to be measured, the real optical fiber diameter and the defect information at the corresponding viewing angle at the corresponding position are displayed in real time.
[0014] In a possible implementation, binarization is performed on the image to be processed at each viewing angle to obtain the optical fiber image corresponding to the image to be processed at each viewing angle, including:
[0015] A contrast algorithm is used to perform binarization processing on the image to be processed at each viewing angle to obtain the optical fiber image corresponding to the image to be processed at each viewing angle.
[0016] In a possible implementation, the images to be processed at three viewing angles at each position are collected by three cameras with viewing angles of 60 degrees in the imaging module from the optical fiber to be measured in the central area.
[0017] In a possible implementation, the defect threshold includes a concave defect threshold, a convex defect threshold and / or a defect length threshold;
[0018] Based on the optical fiber edge points at different positions and the preset defect threshold, determining the position where the optical fiber to be measured has defects and the position where there are no defects at the viewing angle, including:
[0019] A straight line fitting algorithm is used to process the edge points of the optical fiber at different positions on the viewing angle to obtain two expected edge straight lines;
[0020] A preset defect detection algorithm is adopted to detect the optical fiber edge points at the different positions that do not belong to the two expected edge straight lines based on the concave defect threshold, the convex defect threshold and / or the defect length threshold, so as to determine the positions where the optical fiber to be measured has defects and the positions where there are no defects at this viewing angle.
[0021] In one possible implementation, the method further includes:
[0022] Obtaining a measurement offset parameter, wherein the measurement offset parameter is an error value between a true value and a measured value;
[0023] Determining the fiber diameter of the optical fiber to be measured at the viewing angle based on the distance between the two optical fiber edge straight lines includes:
[0024] Based on the distance between the two optical fiber edge straight lines and the measurement offset parameter, the optical fiber diameter of the optical fiber to be measured at the viewing angle is determined.
[0025] In a possible implementation, the optical fiber diameters at various viewing angles are merged to obtain the real optical fiber diameter of the optical fiber to be measured, including:
[0026] averaging the optical fiber diameters at each viewing angle;
[0027] The average value is determined as the true fiber diameter of the optical fiber to be measured.
[0028] In a second aspect, a device for measuring the diameter of an optical fiber is provided, which may include:
[0029] An acquisition unit, used for acquiring images to be processed of the optical fiber to be measured at three viewing angles at different positions collected by the imaging module;
[0030] And, for any position, the image to be processed at each of the three viewing angles is binarized to obtain the optical fiber image corresponding to the image to be processed at each viewing angle, and edge detection is performed on the optical fiber image to obtain the optical fiber edge point in the optical fiber image at each viewing angle at the position;
[0031] A determination unit, for determining, for any viewing angle, positions where defects exist and positions where defects do not exist for the optical fiber to be measured at the viewing angle based on optical fiber edge points at different positions and a preset defect threshold;
[0032] A fitting unit, used for processing the edge points of the optical fiber where there is no defect at the viewing angle by using a straight line fitting algorithm, to obtain two parallel optical fiber edge straight lines;
[0033] The determination unit is further configured to determine the fiber diameter of the optical fiber to be measured at the viewing angle based on the distance between the two optical fiber edge straight lines;
[0034] The fusion unit is used to fuse the optical fiber diameters of each viewing angle to obtain the real optical fiber diameter of the optical fiber to be measured.
[0035] In a third aspect, an electronic device is provided, the electronic device comprising a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other via the communication bus;
[0036] Memory, used to store computer programs;
[0037] The processor is used to implement any method step described in the first aspect when executing the program stored in the memory.
[0038] In a fourth aspect, a computer-readable storage medium is provided, wherein a computer program is stored in the computer-readable storage medium, and when the computer program is executed by a processor, any method step described in the first aspect is implemented.
[0039] The optical fiber diameter measurement method provided by the present application obtains the processed images of the optical fiber to be measured at three different positions collected by the imaging module, and for any position, performs binarization processing on the processed images of each of the three perspectives to obtain the optical fiber images corresponding to the processed images of each perspective, and performs edge detection on the optical fiber images to obtain the optical fiber edge points in the optical fiber images of each perspective at the position; for any perspective, based on the optical fiber edge points at different positions and the preset defect threshold, the positions where the optical fiber to be measured has defects and the positions where there are no defects at the perspective are determined; the optical fiber edge points at the positions where there are no defects at the perspective are processed by a straight line fitting algorithm to obtain two parallel optical fiber edge lines; based on the distance between the two optical fiber edge lines, the optical fiber diameter of the optical fiber to be measured at the perspective is determined; the optical fiber diameters of each perspective are merged to obtain the real optical fiber diameter of the optical fiber to be measured. The method fits the optical fiber edge based on the real data of adjacent moments, replaces the real defect diameter with the fitted diameter value, avoids the influence of the defective segment optical fiber on the overall diameter value analysis, and improves the accuracy of optical fiber diameter measurement. BRIEF DESCRIPTION OF THE DRAWINGS
[0040] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the embodiments of the present application will be briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present application and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.
[0041] Figure 1 A system architecture diagram of a method for measuring optical fiber diameter provided in an embodiment of the present application;
[0042] Figure 2 A schematic diagram of a process for measuring optical fiber diameter provided in an embodiment of the present application;
[0043] Figure 3 A schematic diagram of an edge expectation straight line provided in an embodiment of the present application;
[0044] Figure 4 A schematic diagram of the structure of an optical fiber diameter measuring device provided in an embodiment of the present application;
[0045] Figure 5 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0046] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments of the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0047] The optical fiber diameter measurement method provided in the embodiment of the present application can be applied to Figure 1 In the system architecture shown in Figure 1 As shown, the system may include: optical fiber drawing equipment, an imaging module and a terminal.
[0048] Fiber drawing equipment, such as a drawing tower, is used to provide the optical fiber to be measured;
[0049] The imaging module mainly includes three cameras with different viewing angles and light sources corresponding to the three viewing angles, which are used to obtain clear images of the optical fiber to be measured;
[0050] The terminal connected to the imaging module for communication is used to execute the optical fiber diameter measurement method of the present application to measure the real optical fiber diameter of the optical fiber to be measured. The terminal can be a user equipment (UE) such as a laptop computer, a personal digital assistant (PDA), a tablet computer (PAD) with strong computing power, a computing device, or other processing devices connected to a wireless modem.
[0051] Among them, the viewing angle of adjacent cameras in the imaging module is 60 degrees. The camera, lens, and light source use stable industrial cameras, industrial lenses, and LED light sources respectively, and the surface image of the optical fiber is obtained based on backlight shooting. In the actual environment, due to the fast speed of the optical fiber and the short exposure time of the camera, it is difficult to obtain the surface image of the optical fiber without adding an active light source. The imaging setting process includes: first, setting the exposure time, shooting frequency and other camera parameters of the three cameras respectively; then setting the illumination intensity and illumination range of the three groups of light sources respectively; finally, adjusting the relative position of the camera and the light source to ensure that the optical fiber is in the center area of the image camera, the imaging is clear, and the imaging has no cross-interference of the optical path.
[0052] Furthermore, in order to improve the measurement accuracy of this application, the following parameters need to be pre-set before executing this application:
[0053] (1) Imaging accuracy parameters
[0054] The imaging accuracy parameter indicates the actual physical size represented by each pixel at the working distance. This parameter is affected by the camera pixel size and lens magnification. The imaging accuracy of the same camera and lens model is fixed.
[0055] (2) Measurement offset parameters
[0056] The measured value of the optical fiber diameter obtained in the process of measuring the optical fiber diameter in this application is slightly offset from the true value. This offset parameter is affected by the processing accuracy of the equipment composed of the imaging module and the terminal during assembly and the installation accuracy during installation, and there is a slight angular offset from the ideal position. In other words, through multiple experiments, the difference between the true value and the measured value measured in each experiment can be used as the measurement offset parameter. Among them, the measurement offset compensates the measured value at each moment, and finally obtains the accurate optical fiber diameter.
[0057] In some embodiments, the measurement offset parameter may also be obtained by:
[0058] Since the offset parameter is affected by the processing accuracy of the equipment composed of the imaging module and the terminal during assembly and the installation accuracy during installation, different methods can be used, such as wireless connection (the imaging module and the terminal are respectively installed with wireless communication modules), wired connection, etc., to assemble the imaging module and the terminal to obtain the equipment composed of the imaging module and the terminal, thereby obtaining different assembly processing accuracy and installation accuracy, and the assembly processing accuracy, installation accuracy, and the difference between the measured value and the true value corresponding to different assembly processing accuracy and installation accuracy are used to train the pre-trained support vector machine to obtain a trained measurement offset model, wherein the input layer of the pre-trained support vector machine can include pre-introduced prior knowledge related to the imaging module and the terminal. In the training process, the pre-trained support vector machine uses a particle swarm optimization method to adjust the parameters in the pre-trained support vector machine.
[0059] (3) Defect threshold
[0060] The defect threshold is determined by the production control link, which may include a concave defect threshold, a convex defect threshold and a defect length threshold. Among them, the concave defect threshold indicates the depth of the optical fiber inward depression. If the inward depression depth is greater than the concave defect threshold, the section of optical fiber is determined to be a concave defect section; the convex defect threshold indicates the height of the optical fiber protruding outward. If the outward protrusion height is greater than the convex defect threshold, the section is determined to be a convex defect section; the defect length threshold indicates whether the continuous protrusions or depressions for a certain section of optical fiber are greater than a certain number, that is, whether the number of consecutive sections judged as concave and convex sections is greater than the defect length threshold. If it is greater than the defect length threshold, the section of optical fiber is determined to be defective.
[0061] (4) Communication related parameters
[0062] The communication related parameters are composed of the diameter measurement value sending frequency and the defect signal sending frequency. The diameter measurement value sending frequency indicates the number of optical fiber diameters sent to the drawing tower per second, and each diameter measurement value indicates the average value of the optical fiber during that period of time; the defect signal sending frequency indicates the number of defect signals sent to the drawing tower per second, and each signal indicates whether there is a defect in the optical fiber during that period of time.
[0063] The optical fiber diameter measurement method provided in the present application uses a defect optimization step in the diameter measurement process, determines the true diameter based on the fitted diameter of the non-defective segment of the optical fiber, avoids the influence of the defective segment of the optical fiber on the overall diameter value analysis, and improves the accuracy of the optical fiber diameter measurement.
[0064] The preferred embodiments of the present application are described below in conjunction with the drawings in the specification. It should be understood that the preferred embodiments described herein are only used to illustrate and explain the present application, and are not used to limit the present application. In addition, the embodiments and features in the embodiments of the present application may be combined with each other if there is no conflict.
[0065] Figure 2 A schematic diagram of a process flow of a method for measuring optical fiber diameter provided in an embodiment of the present application. Figure 2 As shown, the method may include:
[0066] Step S210: obtaining images to be processed at three viewing angles of the optical fiber to be measured at different positions collected by the imaging module.
[0067] In a specific implementation, the imaging module is used to collect images of the optical fiber to be measured in real time, and images to be processed at three viewing angles at different positions are obtained. Since the camera in the imaging module has a certain shooting range, each image to be processed may include an optical fiber image of a section of optical fiber.
[0068] Step S220: Based on the images to be processed at three viewing angles at different positions, determine the edge points of the optical fiber corresponding to the images to be processed.
[0069] In the specific implementation, for any position, the image to be processed at each of the three viewing angles is binarized to obtain the optical fiber image corresponding to the image to be processed at the corresponding viewing angle. Specifically, a contrast algorithm is used to binarize the image to be processed at each viewing angle to obtain the optical fiber image corresponding to the image to be processed at the corresponding viewing angle, that is, the optical fiber and the background in the optical fiber image existing in the image to be processed are segmented.
[0070] The edge detection is performed on the optical fiber image to obtain the optical fiber edge points in the optical fiber image at each viewing angle at the position. Specifically, the optical fiber image can be refined to extract the skeleton image of the optical fiber edge, thereby obtaining the optical fiber edge points in the optical fiber image.
[0071] Based on the above steps, the optical fiber edge point corresponding to any of the three viewing angles at each position can be obtained.
[0072] Step S230: for any viewing angle, based on the optical fiber edge points at different positions and a preset defect threshold, determine the positions where defects exist and the positions where defects do not exist in the optical fiber to be measured at the viewing angle.
[0073] In a specific implementation, the defect threshold may include a concave defect threshold, a convex defect threshold and / or a defect length threshold;
[0074] A straight line fitting algorithm is used to process the fiber edge points at different positions on the viewing angle to obtain two expected edge straight lines. Specifically, the fiber edge points at different positions can be edge points at different positions at multiple moments before the target position at the current moment. A clustering algorithm can be used to cluster the fiber edge points at different positions on the viewing angle to obtain two expected edge straight lines, such as Figure 3 As shown, taking the edge point of the optical fiber on one side of the optical fiber to be measured as an example, the edge point AE of the optical fiber at different positions at the target viewing angle at the historical moment and the edge point F of the optical fiber at the current moment, the edge point AE of the optical fiber can be fitted to form an expected edge straight line L;
[0075] A preset defect detection algorithm is used to detect the fiber edge points at different positions that do not belong to the two expected edge straight lines based on the concave defect threshold, the convex defect threshold and / or the defect length threshold, so as to determine the positions where defects exist and where there are no defects in the optical fiber to be measured at this viewing angle.
[0076] Specifically, the optical fiber edge points to be detected that do not belong to the two expected edge straight lines are obtained from the optical fiber edge points at different positions;
[0077] If the edge point of the optical fiber to be detected is on the inner side of the two expected edge straight lines, it indicates that the edge point of the optical fiber to be detected is concave inward, and the inward concave depth is greater than the concave defect threshold, then it is determined that there is a concave defect at the edge point of the optical fiber to be detected;
[0078] If the edge point of the optical fiber to be detected is outside the two expected edge straight lines, it indicates that the edge point of the optical fiber to be detected is convex outward, and the outward convex height is greater than the convex defect threshold, then it is determined that there is a convex defect at the edge point of the optical fiber to be detected;
[0079] If there are concave defects and / or convex defects at the edge points of the continuous optical fiber to be detected, and the number of the continuous optical fiber edge points to be detected is greater than the defect length threshold, the section of optical fiber corresponding to the continuous optical fiber edge points to be detected is judged as defective.
[0080] Step S240: using a straight line fitting algorithm to process the optical fiber edge points where there is no defect at the viewing angle, to obtain two parallel optical fiber edge lines.
[0081] Step S250: Determine the fiber diameter of the optical fiber to be measured at the viewing angle based on the distance between the two optical fiber edge straight lines.
[0082] Before executing this step, a measurement offset parameter may be obtained, where the measurement offset parameter is an error value between a true value and a measured value.
[0083] Based on the distance between the two optical fiber edge straight lines and the measurement offset parameter, the optical fiber diameter of the optical fiber to be measured at the viewing angle is determined.
[0084] Thus, the optical fiber diameter corresponding to each of the three viewing angles at the same position can be obtained.
[0085] Step S260: The optical fiber diameters at each viewing angle are merged to obtain the actual optical fiber diameter of the optical fiber to be measured.
[0086] In a specific implementation, the average value of the optical fiber diameters corresponding to each of the three viewing angles at the same position is calculated; and the average value is determined as the real optical fiber diameter of the optical fiber to be measured.
[0087] In some embodiments, numerical clustering may be performed on the real optical fiber diameters at different positions, and the cluster center value after clustering may be determined as the target real optical fiber diameter of the optical fiber to be measured.
[0088] Furthermore, a target interface can be displayed to the technicians, which can display in real time the fiber diameter of the optical fiber to be measured at each viewing angle, the actual fiber diameter, and defect information at the corresponding position and viewing angle.
[0089] The optical fiber diameter measurement method provided by the present application obtains the processed images of the optical fiber to be measured at three different positions collected by the imaging module, and for any position, performs binarization processing on the processed images of each of the three perspectives to obtain the optical fiber images corresponding to the processed images of each perspective, and performs edge detection on the optical fiber images to obtain the optical fiber edge points in the optical fiber images of each perspective at the position; for any perspective, based on the optical fiber edge points at different positions and the preset defect threshold, the positions where the optical fiber to be measured has defects and the positions where there are no defects at the perspective are determined; the optical fiber edge points at the positions where there are no defects at the perspective are processed by a straight line fitting algorithm to obtain two parallel optical fiber edge lines; based on the distance between the two optical fiber edge lines, the optical fiber diameter of the optical fiber to be measured at the perspective is determined; the optical fiber diameters of each perspective are merged to obtain the real optical fiber diameter of the optical fiber to be measured. The method fits the optical fiber edge based on the real data of adjacent moments, replaces the real defect diameter with the fitted diameter value, avoids the influence of the defective segment optical fiber on the overall diameter value analysis, and improves the accuracy of optical fiber diameter measurement.
[0090] Corresponding to the above method, the present application embodiment also provides an optical fiber diameter measuring device, such as Figure 4 As shown, the device comprises:
[0091] An acquisition unit 410 is used to acquire images to be processed of the optical fiber to be measured at three viewing angles at different positions collected by the imaging module;
[0092] And, for any position, the image to be processed at each of the three viewing angles is binarized to obtain the optical fiber image corresponding to the image to be processed at each viewing angle, and edge detection is performed on the optical fiber image to obtain the optical fiber edge point in the optical fiber image at each viewing angle at the position;
[0093] A determination unit 420 is used to determine, for any viewing angle, a position where the optical fiber to be measured has defects and a position where there are no defects at the viewing angle based on optical fiber edge points at different positions and a preset defect threshold;
[0094] The fitting unit 430 is used to process the optical fiber edge points where there is no defect position at the viewing angle by using a straight line fitting algorithm to obtain two parallel optical fiber edge straight lines;
[0095] The determination unit 420 is further configured to determine the fiber diameter of the optical fiber to be measured at the viewing angle based on the distance between the two optical fiber edge straight lines;
[0096] The fusion unit 440 is used to fuse the optical fiber diameters of each viewing angle to obtain the real optical fiber diameter of the optical fiber to be measured.
[0097] The functions of the various functional units of the optical fiber diameter measuring device provided in the above embodiments of the present application can be achieved through the above method steps. Therefore, the specific working process and beneficial effects of each unit in the optical fiber diameter measuring device provided in the embodiments of the present application will not be repeated here.
[0098] The present application also provides an electronic device, such as Figure 5 As shown, it includes a processor 510 , a communication interface 520 , a memory 530 and a communication bus 540 , wherein the processor 510 , the communication interface 520 , and the memory 530 communicate with each other via the communication bus 540 .
[0099] A memory 530, for storing computer programs;
[0100] The processor 510 is used to execute the program stored in the memory 530 to implement the following steps:
[0101] Obtaining images to be processed of the optical fiber to be measured at three viewing angles at different positions collected by the imaging module;
[0102] For any position, the image to be processed at each of the three viewing angles is binarized to obtain the optical fiber image corresponding to the image to be processed at each viewing angle, and edge detection is performed on the optical fiber image to obtain the optical fiber edge point in the optical fiber image at each viewing angle at the position;
[0103] For any viewing angle, based on the optical fiber edge points at different positions and a preset defect threshold, determine the position where the optical fiber to be measured has defects and the position where there are no defects at the viewing angle;
[0104] A straight line fitting algorithm is used to process the edge points of the optical fiber where there is no defect at the viewing angle, and two parallel optical fiber edge straight lines are obtained;
[0105] Determine the fiber diameter of the optical fiber to be measured at the viewing angle based on the distance between the two optical fiber edge straight lines;
[0106] The optical fiber diameters at each viewing angle are merged to obtain the real optical fiber diameter of the optical fiber to be measured.
[0107] The communication bus mentioned above can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. The communication bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, only one thick line is used in the figure, but it does not mean that there is only one bus or one type of bus.
[0108] The communication interface is used for communication between the above electronic device and other devices.
[0109] The memory may include a random access memory (RAM) or a non-volatile memory (NVM), such as at least one disk memory. Optionally, the memory may also be at least one storage device located away from the aforementioned processor.
[0110] The above-mentioned processor can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.
[0111] The implementation methods and beneficial effects of the components of the electronic device in the above embodiments to solve the problems can be found in Figure 2 The various steps in the illustrated embodiment are implemented, therefore, the specific working process and beneficial effects of the electronic device provided by the embodiment of the present application are not repeated here.
[0112] In another embodiment provided in the present application, a computer-readable storage medium is provided, in which instructions are stored. When the computer-readable storage medium is run on a computer, the computer executes the optical fiber diameter measurement method described in any of the above embodiments.
[0113] In another embodiment provided in the present application, a computer program product including instructions is also provided, which, when executed on a computer, enables the computer to execute the optical fiber diameter measurement method described in any one of the above embodiments.
[0114] Those skilled in the art will appreciate that the embodiments in the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt a complete hardware embodiment, a complete software embodiment, or a form of an embodiment combining software and hardware. Moreover, the present application may adopt a form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0115] The embodiments of the present application are described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0116] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0117] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0118] Although the preferred embodiments of the present application have been described, those skilled in the art may make additional changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications falling within the scope of the embodiments of the present application.
[0119] Obviously, those skilled in the art can make various changes and modifications to the embodiments in the present application without departing from the spirit and scope of the embodiments in the present application. Thus, if these modifications and variations of the embodiments in the present application fall within the scope of the claims and their equivalents in the embodiments of the present application, the embodiments of the present application are also intended to include these modifications and variations.
Claims
1. A method for measuring optical fiber diameter, characterized in that: The method comprises: Obtaining images to be processed of the optical fiber to be measured at three viewing angles at different positions collected by the imaging module; For any position, the image to be processed at each of the three viewing angles is binarized to obtain the optical fiber image corresponding to the image to be processed at each viewing angle, and edge detection is performed on the optical fiber image to obtain the optical fiber edge point in the optical fiber image at each viewing angle at the position; For any viewing angle, based on the optical fiber edge points at different positions and a preset defect threshold, determine the position where the optical fiber to be measured has defects and the position where there are no defects at the viewing angle; A straight line fitting algorithm is used to process the edge points of the optical fiber where there is no defect at the viewing angle, and two parallel optical fiber edge straight lines are obtained; Determine the fiber diameter of the optical fiber to be measured at the viewing angle based on the distance between the two optical fiber edge straight lines; The optical fiber diameters at each viewing angle are merged to obtain the real optical fiber diameter of the optical fiber to be measured.
2. The method according to claim 1, characterized in that The method further comprises: The optical fiber diameter at each viewing angle of the optical fiber to be measured, the real optical fiber diameter and the defect information at the corresponding viewing angle at the corresponding position are displayed in real time.
3. The method according to claim 1, characterized in that Binarization is performed on the image to be processed at each viewing angle to obtain the optical fiber image corresponding to the image to be processed at each viewing angle, including: A contrast algorithm is used to perform binarization processing on the image to be processed at each viewing angle to obtain the optical fiber image corresponding to the image to be processed at each viewing angle.
4. The method according to claim 1, characterized in that The images to be processed at three viewing angles at each position are collected by three cameras with viewing angles of 60 degrees in the imaging module from the optical fiber to be measured in the central area.
5. The method according to claim 1, characterized in that The defect threshold includes a concave defect threshold, a convex defect threshold and / or a defect length threshold; Based on the optical fiber edge points at different positions and the preset defect threshold, determining the position where the optical fiber to be measured has defects and the position where there are no defects at the viewing angle, including: A straight line fitting algorithm is used to process the edge points of the optical fiber at different positions on the viewing angle to obtain two expected edge straight lines; A preset defect detection algorithm is adopted to detect the optical fiber edge points at the different positions that do not belong to the two expected edge straight lines based on the concave defect threshold, the convex defect threshold and / or the defect length threshold, so as to determine the positions where the optical fiber to be measured has defects and the positions where there are no defects at this viewing angle.
6. The method according to claim 1, characterized in that The method further comprises: Obtaining a measurement offset parameter, wherein the measurement offset parameter is an error value between a true value and a measured value; Determining the fiber diameter of the optical fiber to be measured at the viewing angle based on the distance between the two optical fiber edge straight lines includes: Based on the distance between the two optical fiber edge straight lines and the measurement offset parameter, the optical fiber diameter of the optical fiber to be measured at the viewing angle is determined.
7. The method according to claim 1, characterized in that The optical fiber diameters at each viewing angle are merged to obtain the real optical fiber diameter of the optical fiber to be measured, including: averaging the optical fiber diameters at each viewing angle; The average value is determined as the true fiber diameter of the optical fiber to be measured.
8. An optical fiber diameter measuring device, characterized in that: The device comprises: An acquisition unit, used for acquiring images to be processed of the optical fiber to be measured at three viewing angles at different positions collected by the imaging module; And, for any position, the image to be processed at each of the three viewing angles is binarized to obtain the optical fiber image corresponding to the image to be processed at each viewing angle, and edge detection is performed on the optical fiber image to obtain the optical fiber edge point in the optical fiber image at each viewing angle at the position; A determination unit, for determining, for any viewing angle, positions where defects exist and positions where defects do not exist for the optical fiber to be measured at the viewing angle based on optical fiber edge points at different positions and a preset defect threshold; A fitting unit, used for processing the edge points of the optical fiber where there is no defect at the viewing angle by using a straight line fitting algorithm, to obtain two parallel optical fiber edge straight lines; The determination unit is further configured to determine the fiber diameter of the optical fiber to be measured at the viewing angle based on the distance between the two optical fiber edge straight lines; The fusion unit is used to fuse the optical fiber diameters of each viewing angle to obtain the real optical fiber diameter of the optical fiber to be measured.
9. An electronic device, characterized in that: The electronic device comprises a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other via the communication bus; Memory, used to store computer programs; A processor, for implementing any of the methods described in claims 1-7 when executing a program stored in a memory.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method according to any one of claims 1 to 7 is implemented.