A method and system for detecting optical fiber geometric dimensions based on image recognition
By segmenting and identifying the images of the end face of the fiber, determining the detection factor and correcting it, the problem of degradation of the detection accuracy of the end face diameter of the fiber caused by uneven shooting angles is solved, and the accuracy of the detection is improved.
Patent Information
- Application Number
- CN202411711601.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-27
- Publication Date
- 2025-02-28
- Estimated Expiration
- 2044-11-27
AI Technical Summary
When the shooting angle is not flush with the end surface of the optical fiber to be measured, the accuracy of the end surface diameter detection will decrease.
By acquiring the end face image of the optical fiber to be measured, segmenting based on a preset segmentation strategy, selecting the target end face area in the second and third end face sub-images, determining the detection factor, and determining whether it is greater than the preset threshold. If it is greater than the threshold, the corresponding sub-image is input to the image recognition model to obtain the end face diameter and correct it according to the detection factor and the end face diameter.
The problem of degradation of the end surface diameter detection accuracy due to unevenness of the shooting angle and the end surface of the optical fiber to be measured is effectively reduced, and the detection accuracy is improved.
Smart Images

Figure 00000000_0000_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of optical fiber identification, and in particular relates to an optical fiber geometric dimension detection method and system based on image recognition. Background Art
[0002] Optical fiber is one of the main transmission media in modern communications. The geometric parameters of optical fiber are related to the performance of light coupling, transmission, and splicing in optical communications. Measuring the geometric parameters of optical fiber has become one of the necessary items in optical fiber testing.
[0003] However, currently when detecting the end face diameter of the optical fiber to be tested, when the shooting angle is not flush with the end face of the optical fiber to be tested, the accuracy of the end face diameter detection will decrease. Therefore, the end face of the optical fiber to be tested needs to be parallel to the shooting plane to avoid the generation of an end face image that is larger near and smaller far away. However, this will increase the burden of shooting and is not a good way to solve the low accuracy of end face diameter detection. Summary of the invention
[0004] The present invention provides an optical fiber geometric dimension detection method and system based on image recognition, which are used to solve the technical problem that when the shooting angle is not flush with the end face of the optical fiber to be detected, the accuracy of end face diameter detection is reduced.
[0005] In a first aspect, the present invention provides a method for detecting optical fiber geometric dimensions based on image recognition, comprising:
[0006] Acquire an end face image of the optical fiber to be tested, wherein the end face image includes at least one end face region of the optical fiber to be tested;
[0007] Segmenting the end face image based on a preset segmentation strategy to obtain a first end face sub-image, and a second end face sub-image and a third end face sub-image respectively adjacent to the first end face sub-image;
[0008] Selecting a second target end surface region in the second end surface sub-image and a third target end surface region in the third end surface sub-image, and determining a detection factor according to the second target end surface region and the third target end surface region;
[0009] Determining whether the detection factor is greater than a preset threshold;
[0010] If it is greater than a preset threshold, the first end face sub-image, the second end face sub-image and the third end face sub-image are input into a preset image recognition model to obtain the first end face diameter of each optical fiber to be tested in the first end face sub-image, the second end face diameter of each optical fiber to be tested in the second end face sub-image and the third end face diameter of each optical fiber to be tested in the third end face sub-image respectively;
[0011] According to the first end face diameter and the detection factor, the second end face diameter and the third end face diameter are corrected using a preset correction rule to obtain a second target end face diameter of each optical fiber to be tested in the second end face sub-image and a third target end face diameter of each optical fiber to be tested in the third end face sub-image.
[0012] In a second aspect, the present invention provides an optical fiber geometric dimension detection system based on image recognition, comprising:
[0013] An acquisition module, configured to acquire an end face image of the optical fiber to be tested, wherein the end face image includes at least one end face region of the optical fiber to be tested;
[0014] a segmentation module configured to segment the end face image based on a preset segmentation strategy to obtain a first end face sub-image, and a second end face sub-image and a third end face sub-image respectively adjacent to the first end face sub-image;
[0015] a selection module configured to select a second target end surface region in the second end surface sub-image and a third target end surface region in the third end surface sub-image, and determine a detection factor according to the second target end surface region and the third target end surface region;
[0016] A judging module, configured to judge whether the detection factor is greater than a preset threshold;
[0017] an identification module, configured to input the first end face sub-image, the second end face sub-image and the third end face sub-image into a preset image recognition model if the diameter is greater than a preset threshold, and obtain the first end face diameter of each optical fiber to be tested in the first end face sub-image, the second end face diameter of each optical fiber to be tested in the second end face sub-image and the third end face diameter of each optical fiber to be tested in the third end face sub-image respectively;
[0018] The correction module is configured to correct the second end face diameter and the third end face diameter according to the first end face diameter and the detection factor using a preset correction rule to obtain a second target end face diameter of each optical fiber to be tested in the second end face sub-image and a third target end face diameter of each optical fiber to be tested in the third end face sub-image.
[0019] According to a third aspect, an electronic device is provided, comprising: at least one processor, and a memory communicatively connected to the at least one processor, wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can perform the steps of the optical fiber geometric dimension detection method based on image recognition according to any embodiment of the present invention.
[0020] In a fourth aspect, the present invention further provides a computer-readable storage medium having a computer program stored thereon, wherein when the program instructions are executed by a processor, the processor executes the steps of the optical fiber geometric dimension detection method based on image recognition according to any embodiment of the present invention.
[0021] The optical fiber geometric dimension detection method and system based on image recognition of the present application selects the second target end face area in the second end face sub-image and the third target end face area in the third end face sub-image, and determines the detection factor according to the second target end face area and the third target end face area, and judges whether the detection factor is greater than a preset threshold value. If it is greater than the preset threshold value, the first end face sub-image, the second end face sub-image and the third end face sub-image are input into a preset image recognition model, and the first end face diameter of each optical fiber to be tested in the first end face sub-image, the second end face diameter of each optical fiber to be tested in the second end face sub-image and the third end face diameter of each optical fiber to be tested in the third end face sub-image are respectively obtained. According to the first end face diameter and the detection factor, the second end face diameter and the third end face diameter are corrected by using a preset correction rule, and the second target end face diameter of each optical fiber to be tested in the second end face sub-image and the third target end face diameter of each optical fiber to be tested in the third end face sub-image are obtained. This can minimize the phenomenon that the accuracy of end face diameter detection decreases due to the shooting angle not being flush with the end face of the optical fiber to be tested. BRIEF DESCRIPTION OF THE DRAWINGS
[0022] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0023] Figure 1 A flowchart of a method for detecting optical fiber geometric dimensions based on image recognition provided by one embodiment of the present invention;
[0024] Figure 2 A structural block diagram of an optical fiber geometric dimension detection system based on image recognition provided by one embodiment of the present invention;
[0025] Figure 3 It is a schematic diagram of the structure of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0026] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0027] See also Figure 1 , which shows a flow chart of an optical fiber geometric dimension detection method based on image recognition of the present application.
[0028] like Figure 1 As shown, the optical fiber geometric dimension detection method based on image recognition specifically includes the following steps:
[0029] Step S101, obtaining an end face image of an optical fiber to be tested, wherein the end face image includes at least one end face region of the optical fiber to be tested.
[0030] In this step, a camera device with an image acquisition function is used to capture the end face of the optical fiber to be tested in real time to obtain an end face image of the optical fiber to be tested.
[0031] Step S102 : segmenting the end face image based on a preset segmentation strategy to obtain a first end face sub-image, and a second end face sub-image and a third end face sub-image respectively adjacent to the first end face sub-image.
[0032] In this step, an end face image is obtained along a center line perpendicular to a shooting direction, wherein the shooting direction is a direction in which an area in the end face image changes from large to small; the end face image is recognized according to a preset image recognition model to obtain at least one end face area, and each first end face area on the center line is intercepted based on a preset sliding window to obtain a first end face sub-image including the first end face area, and a second end face sub-image and a third end face sub-image adjacent to the first end face sub-image on the left and right, respectively.
[0033] For example, assuming that each optical fiber to be tested is placed horizontally along the length direction of the optical fiber to be tested, then the end face of each optical fiber to be tested is flush with the vertical direction. If the camera angle of the camera device is looking up compared to the vertical plane at this time, then the shooting direction is from bottom to top. If the camera angle of the camera device is looking down compared to the vertical plane at this time, then the shooting direction is from top to bottom.
[0034] Step S103 , selecting a second target end face region in the second end face sub-image and a third target end face region in the third end face sub-image, and determining a detection factor according to the second target end face region and the third target end face region.
[0035] In this step, each second end face area in the second end face sub-image and each third end face area in the third end face sub-image are obtained according to a preset image recognition model; a complete second end face area is selected in the second end face sub-image as the second target end face area, and a complete third end face area is selected in the third end face sub-image as the third target end face area, wherein the complete second end face area and the complete third end face area are both annular areas.
[0036] It should be noted that the image recognition model can be a model obtained by iteratively training the end face image of the optical fiber to be tested and the end face annotation corresponding to the end face image into a neural network, and the neural network can be a VGGNet network or other convolutional neural networks.
[0037] Specifically, determining the detection factor based on the second target end face area and the third target end face area includes: obtaining at least one group of target end face areas, wherein a group of target end face areas only includes a second target end face area and a third target end face area that are equidistant from the center line; calculating the end face diameter difference of each group of target end face areas, and averaging the end face diameter differences to obtain an average value, which is the detection factor, wherein the end face diameter difference of a group of target end face areas is: the difference between the second end face diameter corresponding to a second target end face area and the third end face diameter corresponding to a third target end face area.
[0038] Step S104, determining whether the detection factor is greater than a preset threshold.
[0039] In this step, by detecting whether the factor is greater than a preset threshold, it can be more clearly determined whether the current end face image is taken when there is an angle deviation. For example, when the end face image is taken at an upward angle, due to the phenomenon of shooting near larger and far smaller, the end face diameter shot below the end face image is larger than the actual end face diameter, while the end face diameter shot above the end face image is smaller than the actual end face diameter. Therefore, the detection factor obtained by subtracting the end face diameter shot below the end face image from the end face diameter shot above the end face image can further amplify the angle deviation, thereby more intuitively determining whether the current end face image is taken when there is an angle deviation.
[0040] In a specific embodiment, after determining whether the detection factor is greater than a preset threshold, if it is not greater than the preset threshold, the end face image captured at this time is likely to have no angle deviation, so that the first end face sub-image, the second end face sub-image and the third end face sub-image are directly input into the preset image recognition model to obtain the first end face diameter of each optical fiber to be tested in the first end face sub-image, the second end face diameter of each optical fiber to be tested in the second end face sub-image, and the third end face diameter of each optical fiber to be tested in the third end face sub-image.
[0041] Step S105: If it is greater than a preset threshold, the first end face sub-image, the second end face sub-image and the third end face sub-image are input into a preset image recognition model to obtain the first end face diameter of each optical fiber to be tested in the first end face sub-image, the second end face diameter of each optical fiber to be tested in the second end face sub-image and the third end face diameter of each optical fiber to be tested in the third end face sub-image.
[0042] In this step, the first end face sub-image, the second end face sub-image and the third end face sub-image are input into a preset image recognition model, and the image recognition model outputs each end face area, determines the distance between any two pixel points in a certain end face area, and defines the maximum distance as the end face diameter, thereby obtaining the first end face diameter of each optical fiber to be tested in the first end face sub-image, the second end face diameter of each optical fiber to be tested in the second end face sub-image, and the third end face diameter of each optical fiber to be tested in the third end face sub-image.
[0043] Step S106, based on the first end face diameter and the detection factor, the second end face diameter and the third end face diameter are corrected using a preset correction rule to obtain a second target end face diameter of each optical fiber to be tested in the second end face sub-image and a third target end face diameter of each optical fiber to be tested in the third end face sub-image.
[0044] In this step, a second end surface area corresponding to a second end surface diameter is obtained, and a perpendicular line is drawn from the center point of the second end surface area and intersects the center line to obtain a target intersection point, and a first end surface diameter corresponding to the first end surface area is determined according to the first end surface area where the target intersection point is located;
[0045] A second end face diameter is corrected according to a first end face diameter and the detection factor to obtain a second target end face diameter corresponding to a second end face region, wherein the second end face region is a region away from the shooting point along the shooting direction, and the expression for correcting the second end face diameter is:
[0046] ,
[0047] In the formula, is a second target end face diameter, is a second end diameter, is a certain end diameter, is the detection factor, is the distance from the center point of a second end surface area to the center line;
[0048] Obtain a third end surface area corresponding to a third end surface diameter, and make a perpendicular line from the center point of the third end surface area intersecting the center line to obtain a target intersection point, and determine a first end surface diameter corresponding to the first end surface area according to a first end surface area where the target intersection point is located;
[0049] A third end face diameter is corrected according to a certain end face diameter and a detection factor to obtain a third target end face diameter corresponding to a certain third end face area, wherein a certain third end face area is an area close to the shooting point along the shooting direction, and the expression for correcting a certain third end face diameter is:
[0050] ,
[0051] In the formula, is a third target end face diameter, is a third end diameter, is a certain end diameter, is the detection factor, It is the distance from the center point to the center line of a third end surface area.
[0052] For example, assuming that when photographing parallel to a vertical plane, the diameters of the first end surface area A, the second end surface area B, and the third end surface area C are all equal (the diameter is 2 mm), and when photographing not parallel to the vertical plane, the diameter of the first end surface area A on the center line is 2 mm, the diameter of the second end surface area B on both sides of the center line is 1 mm, the diameter of the third end surface area C is 3 mm, and the center point of the second end surface area B is 1 mm away from the center line, and the center point of the third end surface area C is also 1 mm away from the center line.
[0053] According to the modified formula After the second end surface area B is corrected, the diameter of the second end surface area B becomes 2 mm. According to the correction formula After the third end surface area C is corrected, the diameter of the second end surface area C becomes 2 mm, which is more in line with the actual situation. Therefore, compared with the prior art, the method of the present application does not require too strict shooting angles.
[0054] In summary, the method of the present application selects the second target end face area in the second end face sub-image and the third target end face area in the third end face sub-image, and determines the detection factor according to the second target end face area and the third target end face area, and judges whether the detection factor is greater than a preset threshold value. If it is greater than the preset threshold value, the first end face sub-image, the second end face sub-image and the third end face sub-image are input into a preset image recognition model, and the first end face diameter of each optical fiber to be tested in the first end face sub-image, the second end face diameter of each optical fiber to be tested in the second end face sub-image and the third end face diameter of each optical fiber to be tested in the third end face sub-image are respectively obtained. According to the first end face diameter and the detection factor, the second end face diameter and the third end face diameter are corrected by using a preset correction rule to obtain the second target end face diameter of each optical fiber to be tested in the second end face sub-image and the third target end face diameter of each optical fiber to be tested in the third end face sub-image, which can minimize the phenomenon of decreased accuracy of end face diameter detection caused by the shooting angle being not flush with the end face of the optical fiber to be tested.
[0055] See also Figure 2 , which shows a structural block diagram of an optical fiber geometric dimension detection system based on image recognition in the present application.
[0056] like Figure 2 As shown, the optical fiber geometric dimension detection system 200 includes an acquisition module 210, a segmentation module 220, a selection module 230, a judgment module 240, an identification module 250 and a correction module 260.
[0057] Among them, the acquisition module 210 is configured to acquire an end face image of the optical fiber to be tested, wherein the end face image contains at least one end face region of the optical fiber to be tested; the segmentation module 220 is configured to segment the end face image based on a preset segmentation strategy to obtain a first end face sub-image, and a second end face sub-image and a third end face sub-image respectively adjacent to the first end face sub-image; the selection module 230 is configured to select a second target end face region in the second end face sub-image, and a third target end face region in the third end face sub-image, and determine a detection factor based on the second target end face region and the third target end face region; the judgment module 240 is configured to judge whether the detection factor is greater than a preset threshold; the identification module 250 is configured If it is greater than a preset threshold, the first end face sub-image, the second end face sub-image and the third end face sub-image are input into a preset image recognition model to obtain the first end face diameter of each optical fiber to be tested in the first end face sub-image, the second end face diameter of each optical fiber to be tested in the second end face sub-image and the third end face diameter of each optical fiber to be tested in the third end face sub-image respectively; the correction module 260 is configured to correct the second end face diameter and the third end face diameter according to the first end face diameter and the detection factor using a preset correction rule to obtain the second target end face diameter of each optical fiber to be tested in the second end face sub-image and the third target end face diameter of each optical fiber to be tested in the third end face sub-image.
[0058] It should be understood that Figure 2 Modules and references documented in Figure 1 Therefore, the operations and features described above for the method and the corresponding technical effects are also applicable to Figure 2 The modules in it will not be described in detail here.
[0059] In some other embodiments, the embodiments of the present invention further provide a computer-readable storage medium having a computer program stored thereon, wherein when the program instructions are executed by a processor, the processor is caused to execute the optical fiber geometric dimension detection method based on image recognition in any of the above method embodiments;
[0060] As an implementation mode, the computer-readable storage medium of the present invention stores computer-executable instructions, and the computer-executable instructions are configured as follows:
[0061] Acquire an end face image of the optical fiber to be tested, wherein the end face image includes at least one end face region of the optical fiber to be tested;
[0062] Segmenting the end face image based on a preset segmentation strategy to obtain a first end face sub-image, and a second end face sub-image and a third end face sub-image respectively adjacent to the first end face sub-image;
[0063] Selecting a second target end surface region in the second end surface sub-image and a third target end surface region in the third end surface sub-image, and determining a detection factor according to the second target end surface region and the third target end surface region;
[0064] Determining whether the detection factor is greater than a preset threshold;
[0065] If it is greater than a preset threshold, the first end face sub-image, the second end face sub-image and the third end face sub-image are input into a preset image recognition model to obtain the first end face diameter of each optical fiber to be tested in the first end face sub-image, the second end face diameter of each optical fiber to be tested in the second end face sub-image and the third end face diameter of each optical fiber to be tested in the third end face sub-image respectively;
[0066] According to the first end face diameter and the detection factor, the second end face diameter and the third end face diameter are corrected using a preset correction rule to obtain a second target end face diameter of each optical fiber to be tested in the second end face sub-image and a third target end face diameter of each optical fiber to be tested in the third end face sub-image.
[0067] The computer-readable storage medium may include a program storage area and a data storage area, wherein the program storage area may store an operating system and an application required by at least one function; the data storage area may store data created according to the use of the optical fiber geometry detection system based on image recognition, etc. In addition, the computer-readable storage medium may include a high-speed random access memory, and may also include a memory, such as at least one disk storage device, a flash memory device, or other non-volatile solid-state storage device. In some embodiments, the computer-readable storage medium may optionally include a memory remotely arranged relative to the processor, and these remote memories may be connected to the optical fiber geometry detection system based on image recognition via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0068] Figure 3 is a schematic diagram of the structure of an electronic device provided by an embodiment of the present invention, such as Figure 3 As shown, the device includes: a processor 310 and a memory 320. The electronic device may also include: an input device 330 and an output device 340. The processor 310, the memory 320, the input device 330 and the output device 340 may be connected via a bus or other means. Figure 3The example of the bus connection is taken. The memory 320 is the computer-readable storage medium mentioned above. The processor 310 executes various functional applications and data processing of the server by running the non-volatile software programs, instructions and modules stored in the memory 320, that is, the optical fiber geometric dimension detection method based on image recognition of the above method embodiment is realized. The input device 330 can receive input digital or character information, and generate key signal input related to user settings and function control of the optical fiber geometric dimension detection system based on image recognition. The output device 340 may include display devices such as display screens.
[0069] The electronic device can execute the method provided by the embodiment of the present invention, and has the functional modules and beneficial effects corresponding to the execution method. For technical details not described in detail in this embodiment, please refer to the method provided by the embodiment of the present invention.
[0070] As an implementation mode, the electronic device is applied to an optical fiber geometric dimension detection system based on image recognition, and is used for a client, and includes: at least one processor; and a memory connected to the at least one processor in communication; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can:
[0071] Acquire an end face image of the optical fiber to be tested, wherein the end face image includes at least one end face region of the optical fiber to be tested;
[0072] Segmenting the end face image based on a preset segmentation strategy to obtain a first end face sub-image, and a second end face sub-image and a third end face sub-image respectively adjacent to the first end face sub-image;
[0073] Selecting a second target end surface region in the second end surface sub-image and a third target end surface region in the third end surface sub-image, and determining a detection factor according to the second target end surface region and the third target end surface region;
[0074] Determining whether the detection factor is greater than a preset threshold;
[0075] If it is greater than a preset threshold, the first end face sub-image, the second end face sub-image and the third end face sub-image are input into a preset image recognition model to obtain the first end face diameter of each optical fiber to be tested in the first end face sub-image, the second end face diameter of each optical fiber to be tested in the second end face sub-image and the third end face diameter of each optical fiber to be tested in the third end face sub-image respectively;
[0076] According to the first end face diameter and the detection factor, the second end face diameter and the third end face diameter are corrected using a preset correction rule to obtain a second target end face diameter of each optical fiber to be tested in the second end face sub-image and a third target end face diameter of each optical fiber to be tested in the third end face sub-image.
[0077] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods of each embodiment or some parts of the embodiment.
[0078] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A method for detecting optical fiber geometric dimensions based on image recognition, characterized in that: include: Acquire an end face image of the optical fiber to be tested, wherein the end face image includes at least one end face region of the optical fiber to be tested; The end face image is segmented based on a preset segmentation strategy to obtain a first end face sub-image, and a second end face sub-image and a third end face sub-image respectively adjacent to the first end face sub-image, wherein the end face image is segmented based on a preset segmentation strategy to obtain the first end face sub-image, and the second end face sub-image and the third end face sub-image respectively adjacent to the first end face sub-image include: Acquire the end face image along a center line perpendicular to a shooting direction, wherein the shooting direction is a direction in which an area in the end face image changes from large to small; Recognize the end face image according to a preset image recognition model to obtain at least one end face region, and intercept each first end face region on the center line based on a preset sliding window to obtain a first end face sub-image including the first end face region, and a second end face sub-image and a third end face sub-image respectively adjacent to the first end face sub-image on the left and right; A second target end surface region in the second end surface sub-image and a third target end surface region in the third end surface sub-image are selected, and a detection factor is determined according to the second target end surface region and the third target end surface region, wherein the determining the detection factor according to the second target end surface region and the third target end surface region comprises: Acquire at least one group of target end surface regions, wherein the group of target end surface regions only includes a second target end surface region and a third target end surface region that are equidistant from the center line; Calculate the end face diameter difference of each group of target end face areas, and average the end face diameter differences to obtain the average value, which is the detection factor, wherein the end face diameter difference of a group of target end face areas is: the difference between the second end face diameter corresponding to a second target end face area and the third end face diameter corresponding to a third target end face area; Determining whether the detection factor is greater than a preset threshold; If it is greater than a preset threshold, the first end face sub-image, the second end face sub-image and the third end face sub-image are input into a preset image recognition model to obtain the first end face diameter of each optical fiber to be tested in the first end face sub-image, the second end face diameter of each optical fiber to be tested in the second end face sub-image and the third end face diameter of each optical fiber to be tested in the third end face sub-image respectively; According to the first end face diameter and the detection factor, the second end face diameter and the third end face diameter are corrected using a preset correction rule to obtain a second target end face diameter of each optical fiber to be tested in the second end face sub-image and a third target end face diameter of each optical fiber to be tested in the third end face sub-image.
2. The optical fiber geometric dimension detection method based on image recognition according to claim 1, characterized in that: The selecting of the second target end surface region in the second end surface sub-image and the third target end surface region in the third end surface sub-image comprises: Acquire each second end surface region in the second end surface sub-image and each third end surface region in the third end surface sub-image according to a preset image recognition model; A complete second end face area is selected in the second end face sub-image as the second target end face area, and a complete third end face area is selected in the third end face sub-image as the third target end face area, wherein the complete second end face area and the complete third end face area are both annular areas.
3. The optical fiber geometric dimension detection method based on image recognition according to claim 1, characterized in that: After determining whether the detection factor is greater than a preset threshold, the method further includes: If it is not greater than a preset threshold, the first end face sub-image, the second end face sub-image and the third end face sub-image are directly input into a preset image recognition model to obtain the first end face diameter of each optical fiber to be tested in the first end face sub-image, the second end face diameter of each optical fiber to be tested in the second end face sub-image, and the third end face diameter of each optical fiber to be tested in the third end face sub-image, respectively.
4. The optical fiber geometric dimension detection method based on image recognition according to claim 1, characterized in that: The method of correcting the second end face diameter and the third end face diameter by using a preset correction rule according to the first end face diameter and the detection factor to obtain the second target end face diameter of each optical fiber to be tested in the second end face sub-image and the third target end face diameter of each optical fiber to be tested in the third end face sub-image includes: Obtain a second end surface area corresponding to a second end surface diameter, and make a perpendicular line from the center point of the second end surface area to intersect the center line to obtain a target intersection point, and determine a first end surface diameter corresponding to the first end surface area according to the first end surface area where the target intersection point is located; The second end face diameter is corrected according to the first end face diameter and the detection factor to obtain a second target end face diameter corresponding to the second end face area, wherein the second end face area is an area away from the shooting point along the shooting direction, and the expression for correcting the second end face diameter is: , In the formula, is a second target end face diameter, is a second end diameter, is a certain end diameter, is the detection factor, is the distance from the center point of a second end surface area to the center line; Obtain a certain third end surface area corresponding to a certain third end surface diameter, and make a perpendicular line from the center point of the certain third end surface area to intersect the center line to obtain a certain target intersection point, and determine a certain first end surface diameter corresponding to the certain first end surface area according to a certain first end surface area where the certain target intersection point is located; The third end face diameter is corrected according to the end face diameter and the detection factor to obtain a third target end face diameter corresponding to the third end face area, wherein the third end face area is an area close to the shooting point along the shooting direction, and the expression for correcting the third end face diameter is: , In the formula, is a third target end face diameter, is a third end diameter, is a certain end diameter, is the detection factor, It is the distance from the center point to the center line of a third end surface area.
5. An optical fiber geometric dimension detection system based on image recognition, characterized in that: include: An acquisition module, configured to acquire an end face image of the optical fiber to be tested, wherein the end face image includes at least one end face region of the optical fiber to be tested; A segmentation module is configured to segment the end face image based on a preset segmentation strategy to obtain a first end face sub-image, and a second end face sub-image and a third end face sub-image respectively adjacent to the first end face sub-image, wherein the segmentation of the end face image based on the preset segmentation strategy to obtain the first end face sub-image, and the second end face sub-image and the third end face sub-image respectively adjacent to the first end face sub-image comprises: Acquire the end face image along a center line perpendicular to a shooting direction, wherein the shooting direction is a direction in which an area in the end face image changes from large to small; Recognize the end face image according to a preset image recognition model to obtain at least one end face region, and intercept each first end face region on the center line based on a preset sliding window to obtain a first end face sub-image including the first end face region, and a second end face sub-image and a third end face sub-image respectively adjacent to the first end face sub-image on the left and right; A selection module is configured to select a second target end surface area in the second end surface sub-image and a third target end surface area in the third end surface sub-image, and determine a detection factor according to the second target end surface area and the third target end surface area, wherein determining the detection factor according to the second target end surface area and the third target end surface area includes: Acquire at least one group of target end surface regions, wherein the group of target end surface regions only includes a second target end surface region and a third target end surface region that are equidistant from the center line; Calculate the end face diameter difference of each group of target end face areas, and average the end face diameter differences to obtain the average value, which is the detection factor, wherein the end face diameter difference of a group of target end face areas is: the difference between the second end face diameter corresponding to a second target end face area and the third end face diameter corresponding to a third target end face area; A judging module, configured to judge whether the detection factor is greater than a preset threshold; an identification module, configured to input the first end face sub-image, the second end face sub-image and the third end face sub-image into a preset image recognition model if the diameter is greater than a preset threshold, and obtain the first end face diameter of each optical fiber to be tested in the first end face sub-image, the second end face diameter of each optical fiber to be tested in the second end face sub-image and the third end face diameter of each optical fiber to be tested in the third end face sub-image respectively; The correction module is configured to correct the second end face diameter and the third end face diameter according to the first end face diameter and the detection factor using a preset correction rule to obtain a second target end face diameter of each optical fiber to be tested in the second end face sub-image and a third target end face diameter of each optical fiber to be tested in the third end face sub-image.
6. An electronic device, characterized in that: include: At least one processor, and a memory communicatively connected to the at least one processor, wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method described in any one of claims 1 to 4.
7. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the method according to any one of claims 1 to 4 is implemented.
Citation Information
Patent Citations
Method and device for repairing image deformation
CN107818542A
Optical fiber drawing surface defect visual detection method and system
CN118587208A