Optical fiber geometric dimension detection method and system based on image recognition
Through the image recognition method, the optical fiber end face image is segmented, the detection factor is calculated and the diameter is corrected, which solves the accuracy problem of the optical fiber end face diameter detection when the shooting angle is not flush, and the detection efficiency and accuracy are improved.
Patent Information
- Application Number
- CN202411711601.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-27
- Publication Date
- 2024-12-27
- Estimated Expiration
- 2044-11-27
AI Technical Summary
In the detection of the end surface diameter of the optical fiber, when the shooting angle is not flush with the end surface of the optical fiber to be measured, the detection accuracy is reduced. The existing methods increase the shooting burden but fail to effectively solve the problem.
Using an image recognition method, by acquiring the end face image of the optical fiber, segmenting it into sub-images, selecting the target area, and calculating the detection factor. If the threshold is exceeded, input the image recognition model to obtain the diameter, and adjust the diameter according to the correction rules to improve detection accuracy.
The reduction in the accuracy of end surface diameter detection due to uneven shooting angles is reduced, the accuracy and efficiency of detection is improved, and the shooting burden is reduced.
Smart Images

Figure CN119205884A_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: 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; 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; 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; 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.
[0006] In a second aspect, the present invention provides an optical fiber geometric dimension detection system based on image recognition, comprising: 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 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; 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; 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.
[0007] 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.
[0008] 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.
[0009] 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
[0010] 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.
[0011] 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; 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; Figure 3 It is a schematic diagram of the structure of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0012] 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.
[0013] 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.
[0014] like Figure 1 As shown, the optical fiber geometric dimension detection method based on image recognition specifically includes the following steps: 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.
[0015] 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.
[0016] 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.
[0017] 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.
[0018] 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.
[0019] 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.
[0020] 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.
[0021] 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.
[0022] 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.
[0023] Step S104, determining whether the detection factor is greater than a preset threshold.
[0024] 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.
[0025] 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.
[0026] 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.
[0027] 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.
[0028] 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.
[0029] 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; 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: , 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 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; 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: , 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.
[0030] 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.
[0031] 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.
[0032] 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.
[0033] 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.
[0034] like Figure 2As 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. 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.
[0035] 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.
[0036] 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; 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: 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; 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; 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; 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.
[0037] 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.
[0038] 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.
[0039] 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.
[0040] 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: 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; 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; 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; 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.
[0041] Through the description of the above implementation modes, those skilled in the art can clearly understand that each implementation mode can be implemented by means of software plus a necessary general hardware platform, or of course by hardware. Based on such an understanding, the above technical solution can essentially or in other words be embodied in the form of a software product that contributes to the prior art. The computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a magnetic disk, an optical disk, etc., and includes a number of instructions for 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.
[0042] 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; 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; 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; 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 step of 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 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; 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 respectively adjacent to the first end face sub-image on the left and right.
3. 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.
4. The optical fiber geometric dimension detection method based on image recognition according to claim 2, characterized in that: Determining the detection factor according to the second target end surface area and the third target end surface area 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.
5. 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.
6. The optical fiber geometric dimension detection method based on image recognition according to claim 2, 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.
7. 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 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; 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; 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.
8. 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 6.
9. 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 6 is implemented.
Citation Information
Patent Citations
Method and device for repairing image deformation
CN107818542A
Image deformation correction method
CN109872290A
Bolt looseness detection method, device and equipment and storage medium
CN112419297A
Method and device for identifying size of graphite through AI, computer equipment and storage medium
CN113112514A
Image correction method and device, computer equipment and storage medium
CN115511717A