Glass tube processing parameter detection method and device
Through automated image processing technology, edge binary images are generated using the end face image of glass tubes, which solves the problem of low detection efficiency in the prior art and realizes efficient and automated glass tube processing parameter detection.
Patent Information
- Application Number
- CN202411851882.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-16
- Publication Date
- 2025-04-29
AI Technical Summary
The prior art requires manual rotation of the glass tube or laser multiple times when detecting the processing parameters of glass tubes, resulting in low detection efficiency and a large amount of time and labor costs.
By acquiring the end face image of the glass tube, using preset rules and multiple preset mask matrices to generate edge binary images, determine the machining diameter and concentricity deviation values of the inner circle and the outer circle, and realize automated detection.
The glass tube processing parameter detection can be completed without manual intervention, significantly reducing time and labor costs and improving detection efficiency.
Smart Images

Figure CN119904417A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of glass tube processing, and in particular to a method and device for detecting glass tube processing parameters. Background Art
[0002] Fiber optic image transmission components (such as fiber optic panels, image invertors, light cones, etc.) are fiber optic material rod bundles composed of tens to hundreds of thousands of micron-level optical fibers. Among them, the optical fiber that constitutes the fiber optic image transmission component is drawn by sheathing a hollow glass tube on a core glass rod, that is, the processing quality of the optical fiber depends on the processing quality of the glass tube. Only glass tubes that meet the processing quality requirements can produce optical fibers that meet the processing quality requirements. Therefore, in order to ensure the processing quality of the optical fiber, it is necessary to detect the processing quality of the glass tube.
[0003] Among them, usually the error value between the machining diameter of the inner edge (i.e., inner circle) of the glass tube and the diameter on the drawing, the error value between the machining diameter of the outer edge (i.e., outer circle) of the glass tube and the diameter on the drawing, and the concentricity deviation value between the inner circle and the outer circle of the glass tube are detected first, and then the machining quality of the glass tube is judged based on the error value between the machining diameter of the inner circle of the glass tube and the diameter on the drawing, the error value between the machining diameter of the outer circle of the glass tube and the diameter on the drawing, and the concentricity deviation value between the inner circle and the outer circle of the glass tube.
[0004] At present, laser detection is usually used to detect the error between the inner diameter of the glass tube and the diameter on the drawing, the error between the outer diameter of the glass tube and the diameter on the drawing, and the concentricity deviation between the inner and outer circles of the glass tube. In the process of detecting the processing parameters of the glass tube by laser detection, two lasers are required to perform multiple point scanning operations on the glass tube. However, only when the staff manually rotates the glass tube or the laser multiple times can the operation of multiple point scanning of the glass tube be completed. Therefore, the detection of the processing parameters of the glass tube by laser detection requires a lot of time and labor costs, and the detection efficiency is low. Summary of the invention
[0005] The embodiments of the present application provide a method and device for detecting glass tube processing parameters, the main purpose of which is to improve the detection efficiency of glass tube processing parameters.
[0006] In order to solve the above technical problems, the embodiments of the present application provide the following technical solutions:
[0007] In a first aspect, the present application provides a method for detecting processing parameters of a glass tube, the method comprising:
[0008] Acquire an end face image corresponding to a glass tube to be inspected, wherein the glass tube to be inspected is a glass tube used for manufacturing optical fibers;
[0009] Generate an edge binary image corresponding to the glass tube to be detected according to preset rules, a plurality of preset mask matrices and the end face image, wherein the edge binary image includes a first circular ring composed of a plurality of first pixel points and a second circular ring composed of a plurality of second pixel points;
[0010] Determine the coordinates of the center of the first circle according to the coordinates corresponding to each of the first pixel points, and determine the coordinates of the center of the second circle according to the coordinates corresponding to each of the second pixel points;
[0011] Determine the inner circle machining diameter and the outer circle machining diameter corresponding to the glass tube to be inspected according to the coordinates corresponding to each of the first pixel points, the coordinates corresponding to each of the second pixel points, the coordinates of the center of the first circle ring, and the coordinates of the center of the second circle ring;
[0012] The concentricity deviation value corresponding to the glass tube to be inspected is determined according to the center coordinates corresponding to the first circle and the center coordinates corresponding to the second circle.
[0013] In a second aspect, the present application further provides a glass tube processing parameter detection device, the device comprising:
[0014] An acquisition unit, used for acquiring an end face image corresponding to a glass tube to be detected, wherein the glass tube to be detected is a glass tube used for manufacturing optical fibers;
[0015] A generating unit, configured to generate an edge binary image corresponding to the glass tube to be detected according to a preset rule, a plurality of preset mask matrices and the end face image, wherein the edge binary image includes a first circular ring composed of a plurality of first pixel points and a second circular ring composed of a plurality of second pixel points;
[0016] A first determining unit, configured to determine the coordinates of the center of the first circle according to the coordinates corresponding to each of the first pixel points, and to determine the coordinates of the center of the second circle according to the coordinates corresponding to each of the second pixel points;
[0017] A second determining unit is used to determine the inner circle machining diameter and the outer circle machining diameter corresponding to the glass tube to be inspected according to the coordinates corresponding to each of the first pixel points, the coordinates corresponding to each of the second pixel points, the coordinates of the center of the first circle ring, and the coordinates of the center of the second circle ring;
[0018] The third determination unit is used to determine the concentricity deviation value corresponding to the glass tube to be detected according to the center coordinates corresponding to the first circle and the center coordinates corresponding to the second circle.
[0019] In a third aspect, an embodiment of the present application provides a storage medium, wherein the storage medium includes a stored program, wherein when the program is running, the device where the storage medium is located is controlled to execute the glass tube processing parameter detection method described in the first aspect.
[0020] In a fourth aspect, an embodiment of the present application provides a glass tube processing parameter detection device, the device comprising a storage medium; and one or more processors, the storage medium is coupled to the processor, and the processor is configured to execute program instructions stored in the storage medium; when the program instructions are executed, the glass tube processing parameter detection method described in the first aspect is executed.
[0021] By means of the above technical solution, the technical solution provided by this application has at least the following advantages:
[0022] The present application provides a method and device for detecting processing parameters of a glass tube. The present application can obtain an end face image corresponding to a glass tube to be detected in a glass tube processing parameter detection application, and then the glass tube processing parameter detection application first generates an edge binary image corresponding to the glass tube to be detected according to preset rules, multiple preset mask matrices and the end face image, wherein the edge binary image includes a first circular ring composed of multiple first pixel points and a second circular ring composed of multiple second pixel points; then, the center coordinates corresponding to the first circular ring are determined according to the coordinates corresponding to each first pixel point, and the center coordinates corresponding to the second circular ring are determined according to the coordinates corresponding to each second pixel point; then, the inner circle processing diameter and the outer circle processing diameter corresponding to the glass tube to be detected are determined according to the coordinates corresponding to each first pixel point, the coordinates corresponding to each second pixel point, the center coordinates corresponding to the first circular ring and the center coordinates corresponding to the second circular ring; finally, the concentricity deviation value corresponding to the glass tube to be detected is determined according to the center coordinates corresponding to the first circular ring and the center coordinates corresponding to the second circular ring. Because, in the present application, the inspection staff only needs to take a picture of the end face image corresponding to the glass tube to be inspected in advance, and the glass tube processing parameter detection application can detect the processing parameters corresponding to the glass tube to be inspected based on the end face image corresponding to the glass tube to be inspected. The inspection staff does not need to intervene in the whole process. Therefore, it can effectively reduce the time cost and labor cost consumed in detecting the processing parameters of the glass tube to be inspected, thereby effectively improving the detection efficiency.
[0023] The above description is only an overview of the technical solution of the present application. In order to more clearly understand the technical means of the present application, it can be implemented in accordance with the contents of the specification. In order to make the above and other purposes, features and advantages of the present application more obvious and easy to understand, the specific implementation methods of the present application are listed below. BRIEF DESCRIPTION OF THE DRAWINGS
[0024] By reading the detailed description below with reference to the accompanying drawings, the above and other purposes, features and advantages of the exemplary embodiments of the present application will become easy to understand. In the accompanying drawings, several embodiments of the present application are shown in an exemplary and non-limiting manner, and the same or corresponding reference numerals represent the same or corresponding parts, wherein:
[0025] Figure 1 A flow chart of a method for detecting processing parameters of a glass tube provided in an embodiment of the present application is shown;
[0026] Figure 2a A schematic diagram showing an end face image corresponding to a glass tube to be inspected provided in an embodiment of the present application is shown;
[0027] Figure 2b A schematic diagram showing an edge binary image corresponding to a glass tube to be detected provided in an embodiment of the present application is shown;
[0028] Figure 2c A schematic diagram showing a noise reduction image corresponding to a glass tube to be inspected provided in an embodiment of the present application is shown;
[0029] Figure 2d A schematic diagram showing a slope image corresponding to a glass tube to be inspected provided in an embodiment of the present application is shown;
[0030] Figure 2e A schematic diagram showing an edge image corresponding to a glass tube to be inspected provided in an embodiment of the present application is shown;
[0031] Figure 3 A flow chart of another method for detecting glass tube processing parameters provided in an embodiment of the present application is shown;
[0032] Figure 4 A block diagram showing a glass tube processing parameter detection device provided in an embodiment of the present application is shown;
[0033] Figure 5 A block diagram of another glass tube processing parameter detection device provided in an embodiment of the present application is shown. DETAILED DESCRIPTION
[0034] The exemplary embodiments of the present application will be described in more detail below with reference to the accompanying drawings. Although the exemplary embodiments of the present application are shown in the accompanying drawings, it should be understood that the present application can be implemented in various forms and should not be limited by the embodiments described herein. On the contrary, these embodiments are provided in order to enable a more thorough understanding of the present application and to fully convey the scope of the present application to those skilled in the art.
[0035] In addition, the words “first”, “second” and the like used in the present application do not indicate any order, quantity or importance, but are only used to distinguish different parts.
[0036] It should be noted that, unless otherwise specified, the technical terms or scientific terms used in this application should have the common meanings understood by technicians in the field to which this application belongs.
[0037] At present, laser detection is usually used to detect the error value between the inner circle machining diameter of the glass tube and the diameter on the drawing, the error value between the outer circle machining diameter of the glass tube and the diameter on the drawing, and the concentricity deviation value between the inner circle and the outer circle of the glass tube. In the process of detecting the processing parameters of the glass tube by laser detection, it is necessary to use two lasers to perform multiple point scanning operations on the glass tube. However, only when the staff manually rotates the glass tube multiple times or manually rotates the laser multiple times can the operation of using the laser to perform multiple point scanning on the glass tube be completed. Therefore, the use of laser detection to detect the processing parameters of the glass tube requires a lot of time and labor costs, and the detection efficiency is low. Therefore, in order to improve the detection efficiency of the glass tube processing parameters, the embodiment of the present application provides a glass tube processing parameter detection method, such as Figure 1 As shown, the method at least includes 101-105.
[0038] 101. Obtain an end face image corresponding to the glass tube to be inspected.
[0039] The glass tube to be inspected is a glass tube used to manufacture optical fibers; the end face image corresponding to the glass tube to be inspected is an image obtained by photographing the end face of the glass tube to be inspected using an industrial camera in advance. The end face image corresponding to the glass tube to be inspected is specifically as follows: Figure 2a shown.
[0040] In the embodiment of the present application, the executor in each step is a glass tube processing parameter detection application running in a target terminal device, wherein the target terminal device may be, but is not limited to, a computer, a tablet computer, a laptop computer, and the like.
[0041] The inspection staff will use an industrial camera to photograph the end face of the glass tube to be inspected in advance to obtain the end face image corresponding to the glass tube to be inspected, and store the end face image corresponding to the glass tube to be inspected in the local storage space of the target terminal device; when it is necessary to detect the processing parameters corresponding to the glass tube to be inspected, the glass tube processing parameter detection application can obtain the end face image corresponding to the glass tube to be inspected in the local storage space of the target terminal device.
[0042] 102. Generate an edge binary image corresponding to the glass tube to be inspected according to preset rules, multiple preset mask matrices and the end face image.
[0043] The edge binary image includes a first circular ring composed of a plurality of first pixel points and a second circular ring composed of a plurality of second pixel points. The first circular ring is the inner edge of the glass tube to be detected, and the second circular ring is the outer edge of the glass tube to be detected. The edge binary image is specifically as follows: Figure 2b As shown; wherein, the grayscale values of multiple first pixel points and multiple second pixel points are 1, and the grayscale values of other pixel points in the edge binary image are 0.
[0044] After obtaining the end face image corresponding to the glass tube to be inspected, the glass tube processing parameter detection application can generate an edge binary image corresponding to the glass tube to be inspected according to preset rules, multiple preset mask matrices and the end face image.
[0045] Specifically, in this step, the specific process of the glass tube processing parameter detection application generating an edge binary image corresponding to the glass tube to be detected according to preset rules, multiple preset mask matrices and end face images is: using multiple preset mask matrices to perform a series of convolution operations on the end face image, and then generating an edge binary image based on the grayscale value of each pixel in the end face image after the convolution operation, but not limited to this.
[0046] 103. Determine the coordinates of the center of the first circle according to the coordinates corresponding to each first pixel point, and determine the coordinates of the center of the second circle according to the coordinates corresponding to each second pixel point.
[0047] The center coordinates corresponding to the first circle are the coordinates corresponding to the center point of the first circle in the edge binary image, and the center coordinates corresponding to the second circle are the coordinates corresponding to the center point of the second circle in the edge binary image.
[0048] After the glass tube processing parameter detection application generates an edge binary image corresponding to the glass tube to be detected, it can determine the center coordinates of the first circle according to the coordinates of each first pixel point in the edge binary image, and determine the center coordinates of the second circle according to the coordinates of each second pixel point.
[0049] 104. Determine the inner circle machining diameter and the outer circle machining diameter corresponding to the glass tube to be inspected according to the coordinates corresponding to each first pixel point, the coordinates corresponding to each second pixel point, the center coordinates corresponding to the first circle ring, and the center coordinates corresponding to the second circle ring.
[0050] After determining the center coordinates corresponding to the first circle and the second circle coordinates corresponding to the second circle, the glass tube processing parameter detection application can determine the inner circle processing diameter and the outer circle processing diameter corresponding to the glass tube to be detected according to the coordinates corresponding to each first pixel point, the coordinates corresponding to each second pixel point, the center coordinates corresponding to the first circle and the second circle coordinates.
[0051] Specifically, in this step, the glass tube processing parameter detection application can first determine the image radius corresponding to the first circle (i.e., the radius corresponding to the first circle in the edge binary image) according to the coordinates corresponding to each first pixel point and the center coordinates corresponding to the first circle, and determine the image radius corresponding to the second circle (i.e., the radius corresponding to the second circle in the edge binary image) according to the coordinates corresponding to each second pixel point and the center coordinates corresponding to the second circle, and then determine the image diameter corresponding to the first circle according to the image radius corresponding to the first circle, and determine the image diameter corresponding to the second circle according to the image radius corresponding to the second circle, and finally, according to the size of the pixel points in the edge binary image, perform unit conversion on the image diameter corresponding to the first circle and the image diameter corresponding to the second circle to obtain the inner circle processing diameter and the outer circle processing diameter corresponding to the glass tube to be detected, but not limited to this.
[0052] 105. Determine the concentricity deviation value corresponding to the glass tube to be tested according to the center coordinates corresponding to the first circle and the center coordinates corresponding to the second circle.
[0053] After determining the center coordinates of the first circle and the second circle, the glass tube processing parameter detection application can determine the concentricity deviation value corresponding to the glass tube to be detected based on the center coordinates of the first circle and the second circle.
[0054] Specifically, in this step, the glass tube processing parameter detection application can first determine the concentricity deviation value between the first circle and the second circle based on the center coordinates corresponding to the first circle and the center coordinates corresponding to the second circle, and then perform unit conversion on the concentricity deviation value between the first circle and the second circle based on the size of the pixel points in the edge binary image to obtain the concentricity deviation value corresponding to the glass tube to be detected.
[0055] It should be noted that in the embodiment of the present application, the execution order of step 104 and step 105 is not specifically limited, that is, step 104 can be executed first, and then step 105, or step 105 can be executed first, and then step 104.
[0056] The embodiment of the present application provides a glass tube processing parameter detection method. The embodiment of the present application can, after the glass tube processing parameter detection application obtains the end face image corresponding to the glass tube to be detected, generate an edge binary image corresponding to the glass tube to be detected according to preset rules, multiple preset mask matrices and the end face image by the glass tube processing parameter detection application, wherein the edge binary image includes a first circular ring composed of multiple first pixel points and a second circular ring composed of multiple second pixel points; then, the center coordinates corresponding to the first circular ring are determined according to the coordinates corresponding to each first pixel point, and the center coordinates corresponding to the second circular ring are determined according to the coordinates corresponding to each second pixel point; then, the inner circle processing diameter and the outer circle processing diameter corresponding to the glass tube to be detected are determined according to the coordinates corresponding to each first pixel point, the coordinates corresponding to each second pixel point, the center coordinates corresponding to the first circular ring and the center coordinates corresponding to the second circular ring; finally, the concentricity deviation value corresponding to the glass tube to be detected is determined according to the center coordinates corresponding to the first circular ring and the center coordinates corresponding to the second circular ring. Because, in the embodiment of the present application, the inspection staff only needs to take a picture of the end face image corresponding to the glass tube to be inspected in advance, and the glass tube processing parameter detection application can detect the processing parameters corresponding to the glass tube to be inspected based on the end face image corresponding to the glass tube to be inspected. The inspection staff does not need to intervene in the whole process. Therefore, the time cost and labor cost consumed in detecting the processing parameters of the glass tube to be inspected can be effectively reduced, thereby effectively improving the detection efficiency.
[0057] To explain in more detail below, the present application provides another method for detecting glass tube processing parameters. Figure 3 As shown, the method includes at least 201-206.
[0058] 201. Obtain an end face image corresponding to the glass tube to be inspected.
[0059] Regarding step 201, obtaining the end face image corresponding to the glass tube to be inspected, please refer to Figure 1 The description of the corresponding parts will not be repeated here in the embodiments of the present application.
[0060] 202. Generate an edge binary image corresponding to the glass tube to be inspected according to preset rules, multiple preset mask matrices and the end face image.
[0061] After obtaining the end face image corresponding to the glass tube to be detected, the glass tube processing parameter detection application can generate an edge binary image corresponding to the glass tube to be detected according to preset rules, multiple preset mask matrices and the end face image. The following will explain in detail how the glass tube processing parameter detection application generates an edge binary image corresponding to the glass tube to be detected according to preset rules, multiple preset mask matrices and the end face image.
[0062] (1) Using multiple preset mask matrices to perform convolution operations on the end face image to obtain an edge image corresponding to the glass tube to be detected.
[0063] Wherein, the plurality of preset mask matrices include a noise reduction mask matrix, a slope mask matrix and an edge mask matrix;
[0064] After obtaining the end face image corresponding to the glass tube to be detected, the glass tube processing parameter detection application can first use multiple preset mask matrices to perform convolution operations on the end face image to obtain the edge image corresponding to the glass tube to be detected. The specific process is: first, use the denoising mask matrix to perform convolution operations on the end face image to obtain the denoised image corresponding to the glass tube to be detected; secondly, use the slope mask matrix to perform convolution operations on the denoised image to obtain the slope image corresponding to the glass tube to be detected; finally, use the edge mask matrix to perform convolution operations on the slope image to obtain the edge image corresponding to the glass tube to be detected.
[0065] It should be noted that using a denoising mask matrix to perform convolution operations on the end face image can improve the imaging quality of the end face image and suppress noise points in the end face image; using a slope mask matrix to perform convolution operations on the denoised image can ensure that the overall grayscale of the denoised image is not changed while being sensitive to the grayscale value of the edge of the glass tube in the denoised image, so that the grayscale value of the edge of the glass tube is retained as much as possible, and the grayscale value of the background color is effectively suppressed; using an edge mask matrix to perform convolution operations on the slope image can enhance the grayscale value of the center point of the edge of the glass tube in the slope image.
[0066] It should be noted that the type of convolution operation performed in the above process can specifically be the same convolution operation, that is, using the denoising mask matrix to perform the same convolution operation on the end face image, using the slope mask matrix to perform the same convolution operation on the denoised image, and using the edge mask matrix to perform the same convolution operation on the slope image.
[0067] The denoised image is as follows: Figure 2c As shown, the slope image is as follows Figure 2d As shown, the edge image is as follows Figure 2e As shown;
[0068] The denoising mask matrix is specifically:
[0069]
[0070] The slope mask matrix is specifically:
[0071]
[0072] The edge mask matrix is specifically:
[0073]
[0074] (2) Generate an edge binary image corresponding to the glass tube to be detected according to the grayscale value corresponding to each pixel in the edge image.
[0075] After obtaining the edge image corresponding to the glass tube to be detected, the glass tube processing parameter detection application can generate an edge binary image corresponding to the glass tube to be detected according to the grayscale value corresponding to each pixel in the edge image. The specific process is as follows: first, the maximum value of the grayscale values corresponding to each pixel in the edge image is divided by 2 to obtain the target grayscale value; secondly, the pixel point in the edge image whose grayscale value is greater than the target grayscale value is determined as the third pixel point, and the pixel point in the edge image whose grayscale value is less than or equal to the target grayscale value is determined as the fourth pixel point; thirdly, the target image is generated, wherein the grayscale value in the target image is The multiple pixel points of the target image correspond one to one with the multiple pixel points in the edge image; finally, the grayscale value of the pixel point corresponding to each third pixel point in the target image is set to 1, and the grayscale value of the pixel point corresponding to each fourth pixel point in the target image is set to 0 to obtain an edge binary image. For example, if the pixel point in the 3rd row and 5th column in the edge image is determined to be the third pixel point, the grayscale value of the pixel point in the 3rd row and 15th column in the target image is set to 1, and if the pixel point in the 5th row and 5th column in the edge image is determined to be the fourth pixel point, the grayscale value of the pixel point in the 5th row and 5th column in the target image is set to 0….
[0076] 203. Determine the coordinates of the center of the first circle according to the coordinates corresponding to each first pixel point, and determine the coordinates of the center of the second circle according to the coordinates corresponding to each second pixel point.
[0077] After the glass tube processing parameter detection application generates an edge binary image corresponding to the glass tube to be detected, it can determine the center coordinates of the first circle according to the coordinates of each first pixel point in the edge binary image, and determine the center coordinates of the second circle according to the coordinates of each second pixel point.
[0078] Specifically, in this step, the glass tube processing parameter detection application determines the coordinates of the center of the first circle according to the coordinates corresponding to each first pixel point, and determines the coordinates of the center of the second circle according to the coordinates corresponding to each second pixel point. The specific process is as follows:
[0079] (1) For any pixel point in the edge binary image, the distance from the pixel point to each first pixel point is calculated according to the coordinates corresponding to the pixel point and the coordinates corresponding to each first pixel point, and the maximum value among the calculated multiple distances is determined as the first maximum distance corresponding to the pixel point, so that the first maximum distance corresponding to each pixel point in the edge binary image can be determined; the pixel point corresponding to the minimum value among the determined multiple first maximum distances is determined as the center point corresponding to the first circular ring, and the coordinates corresponding to the center point are determined as the center coordinates corresponding to the first circular ring;
[0080] (2) For any pixel point in the edge binary image, the distance from the pixel point to each second pixel point is calculated according to the coordinates corresponding to the pixel point and the coordinates corresponding to each second pixel point, and the maximum value among the calculated multiple distances is determined as the second maximum distance corresponding to the pixel point, so that the second maximum distance corresponding to each pixel point in the edge binary image can be determined; the pixel point corresponding to the minimum value among the determined multiple second maximum distances is determined as the center point corresponding to the second circular ring, and the coordinates corresponding to the center point are determined as the center coordinates corresponding to the second circular ring.
[0081] It should be noted that for a plane containing a circle, when a point in the plane is outside the circle, the maximum distance from the point to the circle is the shortest distance from the point to the circle plus the diameter of the circle; when a point in the plane is on the circle, the maximum distance from the point to the circle is the diameter of the circle; when a point in the plane is inside the circle and not at the center of the circle, the maximum distance from the point to the circle is the distance from the point to the center of the circle plus the radius of the circle; when a point in the plane is at the center of the circle, the maximum distance from the point to the circle is the radius of the circle. Therefore, after determining the maximum distance from each point in the plane to the circle, the point corresponding to the minimum value of the multiple maximum distances is the center of the circle.
[0082] 204. Determine the inner circle machining diameter and the outer circle machining diameter corresponding to the glass tube to be inspected according to the coordinates corresponding to each first pixel point, the coordinates corresponding to each second pixel point, the center coordinates corresponding to the first circle ring, and the center coordinates corresponding to the second circle ring.
[0083] After determining the center coordinates corresponding to the first circle and the second circle coordinates corresponding to the second circle, the glass tube processing parameter detection application can determine the inner circle processing diameter and the outer circle processing diameter corresponding to the glass tube to be detected according to the coordinates corresponding to each first pixel point, the coordinates corresponding to each second pixel point, the center coordinates corresponding to the first circle and the second circle coordinates.
[0084] Specifically, in this step, the glass tube processing parameter detection application determines the inner circle processing diameter and the outer circle processing diameter corresponding to the glass tube to be detected according to the coordinates corresponding to each first pixel point, the coordinates corresponding to each second pixel point, the center coordinates corresponding to the first circle ring, and the center coordinates corresponding to the second circle ring. The specific process is:
[0085] (1) First, according to the coordinates corresponding to each first pixel point and the coordinates of the center point of the first circle corresponding to the first circle, the radius corresponding to each first pixel point is calculated, that is, for any first pixel point, according to the coordinates of the first pixel point in the edge binary image and the coordinates of the center point of the first circle in the edge binary image (that is, the coordinates of the center point of the first circle corresponding to the first circle), the distance from the first pixel point to the center point of the first circle in the edge binary image is calculated, and the distance is determined as the radius corresponding to the first pixel point; secondly, the radius corresponding to each first pixel point is rounded to obtain a candidate radius corresponding to each first pixel point; thirdly, according to the candidate radius corresponding to each first pixel point, a plurality of first pixels are grouped to obtain a plurality of first groups, wherein, for any first group, the first group contains a plurality of first pixels, and the candidate radii corresponding to the plurality of first pixels are the same; finally, the candidate radius corresponding to the group containing the largest number of first pixels is determined as the inner circle image radius corresponding to the glass tube to be detected (that is, the radius corresponding to the first circle in the edge binary image);
[0086] (2) First, according to the coordinates corresponding to each second pixel point and the coordinates of the center point of the second circle corresponding to the second circle, the radius corresponding to each second pixel point is calculated, that is, for any second pixel point, according to the coordinates of the second pixel point in the edge binary image and the coordinates of the center point of the second circle in the edge binary image (that is, the coordinates of the center point of the second circle corresponding to the second circle), the distance from the second pixel point to the center point of the second circle in the edge binary image is calculated, and the distance is determined as the radius corresponding to the second pixel point; secondly, the radius corresponding to each second pixel point is rounded to obtain a candidate radius corresponding to each second pixel point; thirdly, according to the candidate radius corresponding to each second pixel point, multiple second pixels are grouped to obtain multiple second groups, wherein, for any second group, the second group contains multiple second pixels, and the candidate radii corresponding to the multiple second pixels are the same; finally, the candidate radius corresponding to the group containing the largest number of second pixels is determined as the radius of the outer circle image corresponding to the glass tube to be detected (that is, the radius corresponding to the second circle in the edge binary image);
[0087] (3) firstly, according to step (1), the inner circle image radius is calculated to determine the inner circle image diameter corresponding to the glass tube to be inspected, that is, after multiplying the inner circle image radius by 2, the calculation result is determined as the inner circle image diameter; then, according to step (2), the outer circle image radius is calculated to determine the outer circle image diameter corresponding to the glass tube to be inspected, that is, after multiplying the outer circle image radius by 2, the calculation result is determined as the outer circle image diameter;
[0088] (4) According to the pixel size, inner circle image diameter and outer circle image diameter corresponding to the edge binary image, the inner circle processing diameter and outer circle processing diameter corresponding to the glass tube to be detected are determined, that is, the inner circle image diameter is multiplied by the pixel size corresponding to the edge binary image to obtain the inner circle processing diameter corresponding to the glass tube to be detected, and the outer circle image diameter is multiplied by the pixel size corresponding to the edge binary image to obtain the outer circle processing diameter corresponding to the glass tube to be detected. For example, if the pixel size corresponding to the edge binary image is 0.1 mm and the inner circle image diameter is 288 pixels, then the inner circle processing diameter corresponding to the glass tube to be detected is 28.8 mm, and the outer circle image diameter is 358 pixels, then the outer circle processing diameter corresponding to the glass tube to be detected is 35.8 mm.
[0089] The pixel size corresponding to the edge binary image is the side length of any pixel in the edge binary image.
[0090] 205. Determine the concentricity deviation value corresponding to the glass tube to be tested according to the center coordinates corresponding to the first circle and the center coordinates corresponding to the second circle.
[0091] After determining the center coordinates of the first circle and the second circle, the glass tube processing parameter detection application can determine the concentricity deviation value corresponding to the glass tube to be detected based on the center coordinates of the first circle and the second circle.
[0092] Specifically, in this step, the specific process of the glass tube processing parameter detection application determining the concentricity deviation value corresponding to the glass tube to be detected according to the center coordinates corresponding to the first circle and the center coordinates corresponding to the second circle is as follows:
[0093] Firstly, according to the center coordinates corresponding to the first circular ring and the center coordinates corresponding to the second circular ring, the image concentricity deviation value corresponding to the glass tube to be detected is calculated, that is, according to the coordinates of the center point of the first circular ring in the edge binary image (that is, the center coordinates corresponding to the first circular ring) and the coordinates of the center point of the second circular ring in the edge binary image (that is, the center coordinates corresponding to the second circular ring), the distance between the center point of the first circular ring and the center point of the second circular ring in the edge binary image is calculated, and the distance is determined as the concentricity deviation value between the first circular ring and the second circular ring (that is, the image concentricity deviation value corresponding to the glass tube to be detected); secondly, according to the pixel size corresponding to the edge binary image and the image concentricity deviation value, the concentricity deviation value corresponding to the glass tube to be detected is determined, that is, the image concentricity deviation value is multiplied by the pixel size corresponding to the edge binary image to obtain the concentricity deviation value corresponding to the glass tube to be detected.
[0094] It should be noted that in the embodiment of the present application, the execution order of step 204 and step 205 is not specifically limited, that is, step 204 can be executed first, and then step 205, or step 205 can be executed first, and then step 204.
[0095] 206. Determine the processing grade corresponding to the glass tube to be tested according to the inner circle processing diameter, outer circle processing diameter and concentricity deviation value corresponding to the glass tube to be tested.
[0096] After determining the inner circle machining diameter, outer circle machining diameter and concentricity deviation value corresponding to the glass tube to be tested, the glass tube processing parameter detection application can determine the corresponding processing grade of the glass tube to be tested according to the inner circle machining diameter, outer circle machining diameter and concentricity deviation value corresponding to the glass tube to be tested. The specific process is as follows:
[0097] (1) According to the inner circle machining diameter and the inner circle drawing diameter corresponding to the glass tube to be detected, a first relative error value corresponding to the glass tube to be detected is calculated, that is, the inner circle machining diameter and the inner circle drawing diameter corresponding to the glass tube to be detected are substituted into a first formula to calculate the first relative error value corresponding to the glass tube to be detected, wherein the first formula is specifically:
[0098] The first relative error value = |inner circle machining diameter - inner circle drawing diameter| / inner circle drawing diameter
[0099] (2) According to the outer circle processing diameter and the outer circle drawing diameter corresponding to the glass tube to be detected, the second relative error value corresponding to the glass tube to be detected is calculated, that is, the outer circle processing diameter and the outer circle drawing diameter corresponding to the glass tube to be detected are substituted into the second formula to calculate the second relative error value corresponding to the glass tube to be detected, wherein the second formula is specifically:
[0100] The second relative error value = |external machining diameter-external drawing diameter| / external drawing diameter
[0101] (3) determining the inner diameter processing grade and outer diameter processing grade corresponding to the glass tube to be detected according to the first relative error value and the second relative error value, that is, when the first relative error value is less than the first threshold value, determining the inner diameter processing grade corresponding to the glass tube to be detected as the first grade; when the first relative error value is greater than or equal to the first threshold value and the first relative error value is less than the second threshold value, determining the inner diameter processing grade corresponding to the glass tube to be detected as the second grade; when the first relative error value is greater than or equal to the second threshold value, determining the inner diameter processing grade corresponding to the glass tube to be detected as the third grade; when the second relative error value is less than the first threshold value, determining the outer diameter processing grade corresponding to the glass tube to be detected as the first grade; when the second relative error value is greater than or equal to the first threshold value and the second relative error value is less than the second threshold value, determining the outer diameter processing grade corresponding to the glass tube to be detected as the second grade; when the second relative error value is greater than or equal to the second threshold value, determining the outer diameter processing grade corresponding to the glass tube to be detected as the third grade, wherein the first threshold value may be, but not limited to, 2%, 2.5%, 3%, etc., and the second threshold value may be, but not limited to, 5%, 5.5%, 6%, etc., and the second threshold value is greater than the first threshold value;
[0102] (4) calculating the evaluation standard value according to the first relative error value and the second relative error value, that is, first calculating the sum of the first relative error value and the second relative error value to obtain a first calculation result, then multiplying the first calculation result by 5 to obtain a second calculation result, and determining the second calculation result as the evaluation standard value;
[0103] (5) calculating the inner and outer diameter difference of the glass tube to be tested according to the inner circle processing diameter and the outer circle processing diameter, that is, after subtracting the inner circle processing diameter from the outer circle processing diameter, the calculated result is determined as the inner and outer diameter difference of the glass tube to be tested;
[0104] (6) Determine the concentricity processing grade corresponding to the glass tube to be tested based on the concentricity deviation value, the judgment standard value and the difference between the inner and outer diameters, that is, after dividing the concentricity deviation value by the difference between the inner and outer diameters, compare the calculated result with the judgment standard value. When the calculated result is less than the judgment standard value, the concentricity processing grade corresponding to the glass tube to be tested is determined to be first class. When the calculated result is greater than or equal to the judgment standard value and the calculated result is less than twice the judgment standard value, the concentricity processing grade corresponding to the glass tube to be tested is determined to be second class. When the calculated result is greater than twice the judgment standard value, the concentricity processing grade corresponding to the glass tube to be tested is determined to be third class.
[0105] Furthermore, as a response to the above Figure 1 and Figure 3In order to realize the method shown in the figure, another embodiment of the present application also provides a glass tube processing parameter detection device. This device embodiment corresponds to the aforementioned method embodiment. For ease of reading, this device embodiment will not repeat the details of the aforementioned method embodiment one by one, but it should be clear that the device in this embodiment can correspond to all the contents of the aforementioned method embodiment. This device is used to improve the detection efficiency of glass tube processing parameters, specifically as follows Figure 4 As shown, the device comprises:
[0106] An acquisition unit 31 is used to acquire an end face image corresponding to a glass tube to be detected, wherein the glass tube to be detected is a glass tube used for manufacturing optical fibers;
[0107] A generating unit 32, configured to generate an edge binary image corresponding to the glass tube to be detected according to a preset rule, a plurality of preset mask matrices and the end face image, wherein the edge binary image includes a first circular ring composed of a plurality of first pixel points and a second circular ring composed of a plurality of second pixel points;
[0108] A first determining unit 33, configured to determine the coordinates of the center of the first circle according to the coordinates corresponding to each of the first pixel points, and to determine the coordinates of the center of the second circle according to the coordinates corresponding to each of the second pixel points;
[0109] A second determining unit 34 is used to determine the inner circle machining diameter and the outer circle machining diameter corresponding to the glass tube to be inspected according to the coordinates corresponding to each of the first pixel points, the coordinates corresponding to each of the second pixel points, the coordinates of the center of the first circle ring, and the coordinates of the center of the second circle ring;
[0110] The third determination unit 35 is used to determine the concentricity deviation value corresponding to the glass tube to be detected according to the center coordinates corresponding to the first circle and the center coordinates corresponding to the second circle.
[0111] Further, such as Figure 5 As shown, the generating unit 32 includes:
[0112] A processing module 321 is used to perform convolution operation processing on the end surface image using a plurality of preset mask matrices to obtain an edge image corresponding to the glass tube to be detected;
[0113] The generating module 322 is used to generate an edge binary image corresponding to the glass tube to be detected according to the gray value corresponding to each pixel point in the edge image.
[0114] Further, such as Figure 5As shown, the multiple preset mask matrices include a noise reduction mask matrix, a slope mask matrix and an edge mask matrix; the processing module 321 is specifically used to use the noise reduction mask matrix to perform convolution operation processing on the end face image to obtain the noise reduction image corresponding to the glass tube to be detected; use the slope mask matrix to perform convolution operation processing on the noise reduction image to obtain the slope image corresponding to the glass tube to be detected; use the edge mask matrix to perform convolution operation processing on the slope image to obtain the edge image corresponding to the glass tube to be detected.
[0115] Further, such as Figure 5 As shown, the generating module 322 is specifically used to divide the maximum value of the grayscale values corresponding to each pixel point in the edge image by 2 to obtain the target grayscale value; determine the pixel point in the edge image whose grayscale value is greater than the target grayscale value as the third pixel point, and determine the pixel point in the edge image whose grayscale value is less than or equal to the target grayscale value as the fourth pixel point; generate a target image, wherein a plurality of pixel points in the target image correspond one-to-one to a plurality of pixel points in the edge image; set the grayscale value of the pixel point in the target image corresponding to each of the third pixel points to 1, and set the grayscale value of the pixel point in the target image corresponding to each of the fourth pixel points to 0, to obtain the edge binary image.
[0116] Further, such as Figure 5 As shown, the first determination unit 33 is specifically used to calculate, for any pixel point in the edge binary image, the distance from the pixel point to each of the first pixel points according to the coordinates corresponding to the pixel point and the coordinates corresponding to each of the first pixel points, and determine the maximum value of the multiple distances as the first maximum distance corresponding to the pixel point; determine the pixel point corresponding to the minimum value of the multiple first maximum distances as the center point of the first circular ring, and determine the coordinates corresponding to the center point as the center coordinates corresponding to the first circular ring; for any pixel point in the edge binary image, calculate the distance from the pixel point to each of the second pixel points according to the coordinates corresponding to the pixel point and the coordinates corresponding to each of the second pixel points, and determine the maximum value of the multiple distances as the second maximum distance corresponding to the pixel point; determine the pixel point corresponding to the minimum value of the multiple second maximum distances as the center point of the second circular ring, and determine the coordinates corresponding to the center point as the center coordinates corresponding to the second circular ring.
[0117] Further, such as Figure 5As shown, the second determination unit 34 is specifically used to calculate the radius corresponding to each first pixel point according to the coordinates corresponding to each first pixel point and the coordinates of the center of the circle corresponding to the first ring; round the radius corresponding to each first pixel point to obtain the candidate radius corresponding to each first pixel point; group multiple first pixel points according to the candidate radius corresponding to each first pixel point to obtain multiple first groups, wherein, for any first group, the first group contains multiple first pixel points, and the candidate radii corresponding to the multiple first pixel points are the same; determine the candidate radius corresponding to the group containing the largest number of first pixel points as the inner circle image radius corresponding to the glass tube to be detected; calculate the radius corresponding to each second pixel point according to the coordinates corresponding to each second pixel point and the coordinates of the center of the circle corresponding to the second ring; and The radii corresponding to two pixel points are rounded to obtain the candidate radius corresponding to each second pixel point; the multiple second pixel points are grouped according to the candidate radius corresponding to each second pixel point to obtain multiple second groups, wherein, for any second group, the second group contains multiple second pixel points, and the candidate radii corresponding to the multiple second pixel points are the same; the candidate radius corresponding to the group containing the largest number of second pixel points is determined as the outer circle image radius corresponding to the glass tube to be detected; the inner circle image diameter corresponding to the glass tube to be detected is determined according to the inner circle image radius, and the outer circle image diameter corresponding to the glass tube to be detected is determined according to the outer circle image radius; the inner circle machining diameter and the outer circle machining diameter corresponding to the glass tube to be detected are determined according to the pixel size corresponding to the edge binary image, the inner circle image diameter and the outer circle image diameter.
[0118] Further, such as Figure 5 As shown, the third determination unit 35 is specifically used to calculate the image concentricity deviation value corresponding to the glass tube to be detected according to the center coordinates corresponding to the first circle and the center coordinates corresponding to the second circle; and determine the concentricity deviation value corresponding to the glass tube to be detected according to the pixel size corresponding to the edge binary image and the image concentricity deviation value.
[0119] Further, such as Figure 5 As shown, the device also includes:
[0120] The evaluation unit 36 is used to calculate a first relative error value corresponding to the glass tube to be detected according to the inner circle processing diameter and the inner circle drawing diameter corresponding to the glass tube to be detected; calculate a second relative error value corresponding to the glass tube to be detected according to the outer circle processing diameter and the outer circle drawing diameter corresponding to the glass tube to be detected; determine the inner diameter processing grade and the outer diameter processing grade corresponding to the glass tube to be detected according to the first relative error value and the second relative error value; calculate a judgment standard value according to the first relative error value and the second relative error value; calculate the inner and outer diameter difference corresponding to the glass tube to be detected according to the inner circle processing diameter and the outer circle processing diameter; determine the concentricity processing grade corresponding to the glass tube to be detected according to the concentricity deviation value, the judgment standard value and the inner and outer diameter difference.
[0121] The embodiment of the present application provides a method and device for detecting processing parameters of a glass tube. The embodiment of the present application can, after the end face image corresponding to the glass tube to be detected is obtained by the glass tube processing parameter detection application, firstly generate an edge binary image corresponding to the glass tube to be detected according to preset rules, multiple preset mask matrices and the end face image by the glass tube processing parameter detection application, wherein the edge binary image includes a first circular ring composed of multiple first pixel points and a second circular ring composed of multiple second pixel points; then, determine the center coordinates of the first circular ring according to the coordinates corresponding to each first pixel point, and determine the center coordinates of the second circular ring according to the coordinates corresponding to each second pixel point; then, determine the inner circle processing diameter and the outer circle processing diameter corresponding to the glass tube to be detected according to the coordinates corresponding to each first pixel point, the coordinates corresponding to each second pixel point, the center coordinates of the first circular ring and the center coordinates of the second circular ring; finally, determine the concentricity deviation value corresponding to the glass tube to be detected according to the center coordinates of the first circular ring and the center coordinates of the second circular ring. Because, in the embodiment of the present application, the inspection staff only needs to take a picture of the end face image corresponding to the glass tube to be inspected in advance, and the glass tube processing parameter detection application can detect the processing parameters corresponding to the glass tube to be inspected based on the end face image corresponding to the glass tube to be inspected. The inspection staff does not need to intervene in the whole process. Therefore, the time cost and labor cost consumed in detecting the processing parameters of the glass tube to be inspected can be effectively reduced, thereby effectively improving the detection efficiency.
[0122] An embodiment of the present application provides a storage medium, which includes a stored program, wherein when the program is executed, the device where the storage medium is located is controlled to execute the above-mentioned glass tube processing parameter detection method.
[0123] The storage medium may include non-permanent memory in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM, and the memory includes at least one storage chip.
[0124] An embodiment of the present application also provides a glass tube processing parameter detection device, which includes a storage medium; and one or more processors, wherein the storage medium is coupled to the processor, and the processor is configured to execute program instructions stored in the storage medium; when the program instructions are executed, the above-mentioned glass tube processing parameter detection method is executed.
[0125] The embodiment of the present application provides a device, which includes a processor, a memory, and a program stored in the memory and executable on the processor. When the processor executes the program, the following steps are implemented:
[0126] Acquire an end face image corresponding to a glass tube to be inspected, wherein the glass tube to be inspected is a glass tube used for manufacturing optical fibers;
[0127] Generate an edge binary image corresponding to the glass tube to be detected according to preset rules, a plurality of preset mask matrices and the end face image, wherein the edge binary image includes a first circular ring composed of a plurality of first pixel points and a second circular ring composed of a plurality of second pixel points;
[0128] Determine the coordinates of the center of the first circle according to the coordinates corresponding to each of the first pixel points, and determine the coordinates of the center of the second circle according to the coordinates corresponding to each of the second pixel points;
[0129] Determine the inner circle machining diameter and the outer circle machining diameter corresponding to the glass tube to be inspected according to the coordinates corresponding to each of the first pixel points, the coordinates corresponding to each of the second pixel points, the coordinates of the center of the first circle ring, and the coordinates of the center of the second circle ring;
[0130] The concentricity deviation value corresponding to the glass tube to be inspected is determined according to the center coordinates corresponding to the first circle and the center coordinates corresponding to the second circle.
[0131] Furthermore, the step of generating an edge binary image corresponding to the glass tube to be detected according to preset rules, a plurality of preset mask matrices and the end face image includes:
[0132] Using a plurality of preset mask matrices to perform convolution operation processing on the end face image to obtain an edge image corresponding to the glass tube to be detected;
[0133] An edge binary image corresponding to the glass tube to be detected is generated according to the grayscale value corresponding to each pixel in the edge image.
[0134] Furthermore, the plurality of preset mask matrices include a noise reduction mask matrix, a slope mask matrix, and an edge mask matrix; and the convolution operation processing is performed on the end face image using the plurality of preset mask matrices to obtain an edge image corresponding to the glass tube to be detected, including:
[0135] Using the noise reduction mask matrix to perform convolution operation on the end face image to obtain a noise reduction image corresponding to the glass tube to be inspected;
[0136] Using the slope mask matrix to perform convolution operation on the denoised image to obtain a slope image corresponding to the glass tube to be detected;
[0137] The slope image is processed by convolution operation using the edge mask matrix to obtain an edge image corresponding to the glass tube to be detected.
[0138] Furthermore, the step of generating an edge binary image corresponding to the glass tube to be detected according to the grayscale value corresponding to each pixel in the edge image includes:
[0139] Divide the maximum value of the grayscale values corresponding to each pixel in the edge image by 2 to obtain a target grayscale value;
[0140] Determine a pixel point in the edge image whose grayscale value is greater than the target grayscale value as a third pixel point, and determine a pixel point in the edge image whose grayscale value is less than or equal to the target grayscale value as a fourth pixel point;
[0141] Generate a target image, wherein a plurality of pixel points in the target image correspond one-to-one to a plurality of pixel points in the edge image;
[0142] The grayscale value of each pixel point in the target image corresponding to the third pixel point is set to 1, and the grayscale value of each pixel point in the target image corresponding to the fourth pixel point is set to 0 to obtain the edge binary image.
[0143] Further, the determining the coordinates of the center of the first circle corresponding to each of the coordinates corresponding to the first pixel points, and determining the coordinates of the center of the second circle corresponding to each of the coordinates corresponding to the second pixel points, includes:
[0144] For any pixel point in the edge binary image, calculate the distance from the pixel point to each of the first pixel points according to the coordinates corresponding to the pixel point and the coordinates corresponding to each of the first pixel points, and determine the maximum value of the multiple distances as the first maximum distance corresponding to the pixel point;
[0145] Determine a pixel point corresponding to a minimum value among the plurality of first maximum distances as a center point corresponding to the first circle ring, and determine coordinates corresponding to the center point as coordinates of the center point corresponding to the first circle ring;
[0146] For any pixel point in the edge binary image, calculate the distance from the pixel point to each of the second pixel points according to the coordinates corresponding to the pixel point and the coordinates corresponding to each of the second pixel points, and determine the maximum value of the multiple distances as the second maximum distance corresponding to the pixel point;
[0147] The pixel point corresponding to the minimum value among the plurality of second maximum distances is determined as the center point corresponding to the second circle ring, and the coordinates corresponding to the center point are determined as the center coordinates corresponding to the second circle ring.
[0148] Further, determining the inner circle machining diameter and the outer circle machining diameter corresponding to the glass tube to be inspected according to the coordinates corresponding to each of the first pixel points, the coordinates corresponding to each of the second pixel points, the coordinates of the center of the first circle ring, and the coordinates of the center of the second circle ring includes:
[0149] Calculate the radius corresponding to each of the first pixel points according to the coordinates corresponding to each of the first pixel points and the coordinates of the center of the circle corresponding to the first ring;
[0150] Rounding the radius corresponding to each of the first pixel points to obtain a candidate radius corresponding to each of the first pixel points;
[0151] The plurality of first pixel points are grouped according to the candidate radius corresponding to each of the first pixel points to obtain a plurality of first groups, wherein, for any one of the first groups, the first group contains a plurality of first pixel points, and the candidate radius corresponding to the plurality of first pixel points is the same;
[0152] Determine the candidate radius corresponding to the group containing the largest number of the first pixel points as the inner circle image radius corresponding to the glass tube to be detected;
[0153] Calculate the radius corresponding to each second pixel point according to the coordinates corresponding to each second pixel point and the coordinates of the center of the circle corresponding to the second circle ring;
[0154] Rounding the radius corresponding to each of the second pixel points to obtain a candidate radius corresponding to each of the second pixel points;
[0155] The plurality of second pixel points are grouped according to the candidate radius corresponding to each of the second pixel points to obtain a plurality of second groups, wherein, for any one of the second groups, the second group contains a plurality of second pixel points, and the candidate radius corresponding to the plurality of second pixel points is the same;
[0156] Determine the candidate radius corresponding to the group containing the largest number of the second pixel points as the radius of the outer circle image corresponding to the glass tube to be detected;
[0157] Determine the inner circle image diameter corresponding to the glass tube to be detected according to the inner circle image radius, and determine the outer circle image diameter corresponding to the glass tube to be detected according to the outer circle image radius;
[0158] The inner circle machining diameter and the outer circle machining diameter corresponding to the glass tube to be inspected are determined according to the pixel size corresponding to the edge binary image, the inner circle image diameter and the outer circle image diameter.
[0159] Further, the determining the concentricity deviation value corresponding to the glass tube to be inspected according to the center coordinates corresponding to the first circle and the center coordinates corresponding to the second circle includes:
[0160] Calculating the image concentricity deviation value corresponding to the glass tube to be inspected according to the center coordinates corresponding to the first circle and the center coordinates corresponding to the second circle;
[0161] The concentricity deviation value corresponding to the glass tube to be inspected is determined according to the pixel size corresponding to the edge binary image and the image concentricity deviation value.
[0162] Furthermore, the method further comprises:
[0163] Calculating a first relative error value corresponding to the glass tube to be inspected according to the inner circle machining diameter and the inner circle drawing diameter corresponding to the glass tube to be inspected;
[0164] Calculating a second relative error value corresponding to the glass tube to be inspected according to the outer circle machining diameter and the outer circle drawing diameter corresponding to the glass tube to be inspected;
[0165] Determining an inner diameter processing grade and an outer diameter processing grade corresponding to the glass tube to be inspected according to the first relative error value and the second relative error value;
[0166] Calculating a judgment standard value according to the first relative error value and the second relative error value;
[0167] Calculating the difference between the inner and outer diameters of the glass tube to be inspected according to the inner circle machining diameter and the outer circle machining diameter;
[0168] The concentricity processing grade corresponding to the glass tube to be tested is determined according to the concentricity deviation value, the judgment standard value and the inner and outer diameter difference.
[0169] The present application also provides a computer program product, which, when executed on a data processing device, is suitable for executing a program code that is initialized with the following method steps: obtaining an end face image corresponding to a glass tube to be detected, wherein the glass tube to be detected is a glass tube used to manufacture optical fibers; generating an edge binary image corresponding to the glass tube to be detected according to preset rules, multiple preset mask matrices and the end face image, wherein the edge binary image includes a first circular ring composed of multiple first pixel points and a second circular ring composed of multiple second pixel points; determining the center coordinates of the first circular ring according to the coordinates corresponding to each of the first pixel points, and determining the center coordinates of the second circular ring according to the coordinates corresponding to each of the second pixel points; determining the inner circle machining diameter and the outer circle machining diameter corresponding to the glass tube to be detected according to the coordinates corresponding to each of the first pixel points, the coordinates corresponding to each of the second pixel points, the center coordinates of the first circular ring and the center coordinates of the second circular ring; determining the concentricity deviation value corresponding to the glass tube to be detected according to the center coordinates of the first circular ring and the center coordinates of the second circular ring.
[0170] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented in one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that include computer-usable program code.
[0171] The present application is 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 and / or block diagram. 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.
[0172] 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.
[0173] 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.
[0174] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.
[0175] The memory may include non-permanent memory in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.
[0176] Computer readable media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include temporary computer readable media (transitory media), such as modulated data signals and carrier waves.
[0177] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.
[0178] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment or an embodiment in combination with software and hardware. Moreover, the present application may adopt the 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.) that contain computer-usable program code.
[0179] The above are only embodiments of the present application and are not intended to limit the present application. For those skilled in the art, the present application may have various changes and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included within the scope of the claims of the present application.
Claims
1. A method for detecting processing parameters of a glass tube, characterized in that: The method comprises: Acquire an end face image corresponding to a glass tube to be inspected, wherein the glass tube to be inspected is a glass tube used for manufacturing optical fibers; Generate an edge binary image corresponding to the glass tube to be detected according to preset rules, a plurality of preset mask matrices and the end face image, wherein the edge binary image includes a first circular ring composed of a plurality of first pixel points and a second circular ring composed of a plurality of second pixel points; Determine the coordinates of the center of the first circle according to the coordinates corresponding to each of the first pixel points, and determine the coordinates of the center of the second circle according to the coordinates corresponding to each of the second pixel points; Determine the inner circle machining diameter and the outer circle machining diameter corresponding to the glass tube to be inspected according to the coordinates corresponding to each of the first pixel points, the coordinates corresponding to each of the second pixel points, the coordinates of the center of the first circle ring, and the coordinates of the center of the second circle ring; The concentricity deviation value corresponding to the glass tube to be inspected is determined according to the center coordinates corresponding to the first circle and the center coordinates corresponding to the second circle.
2. The method according to claim 1, characterized in that The step of generating an edge binary image corresponding to the glass tube to be detected according to preset rules, a plurality of preset mask matrices and the end face image comprises: Using a plurality of preset mask matrices to perform convolution operation processing on the end face image to obtain an edge image corresponding to the glass tube to be detected; An edge binary image corresponding to the glass tube to be detected is generated according to the grayscale value corresponding to each pixel in the edge image.
3. The method according to claim 2, characterized in that The plurality of preset mask matrices include a noise reduction mask matrix, a slope mask matrix and an edge mask matrix; The method of using a plurality of preset mask matrices to perform convolution operation processing on the end face image to obtain an edge image corresponding to the glass tube to be detected includes: Using the noise reduction mask matrix to perform convolution operation on the end face image to obtain a noise reduction image corresponding to the glass tube to be inspected; Using the slope mask matrix to perform convolution operation on the denoised image to obtain a slope image corresponding to the glass tube to be detected; The slope image is processed by convolution operation using the edge mask matrix to obtain an edge image corresponding to the glass tube to be detected.
4. The method according to claim 2, characterized in that: The step of generating an edge binary image corresponding to the glass tube to be detected according to the grayscale value corresponding to each pixel point in the edge image comprises: Divide the maximum value of the grayscale values corresponding to each pixel in the edge image by 2 to obtain a target grayscale value; Determine a pixel point in the edge image whose grayscale value is greater than the target grayscale value as a third pixel point, and determine a pixel point in the edge image whose grayscale value is less than or equal to the target grayscale value as a fourth pixel point; Generate a target image, wherein a plurality of pixel points in the target image correspond one-to-one to a plurality of pixel points in the edge image; The grayscale value of each pixel point in the target image corresponding to the third pixel point is set to 1, and the grayscale value of each pixel point in the target image corresponding to the fourth pixel point is set to 0 to obtain the edge binary image.
5. The method according to claim 1, characterized in that The step of determining the coordinates of the center of the first circle according to the coordinates corresponding to each of the first pixel points, and determining the coordinates of the center of the second circle according to the coordinates corresponding to each of the second pixel points, includes: For any pixel point in the edge binary image, calculate the distance from the pixel point to each of the first pixel points according to the coordinates corresponding to the pixel point and the coordinates corresponding to each of the first pixel points, and determine the maximum value of the multiple distances as the first maximum distance corresponding to the pixel point; Determine a pixel point corresponding to a minimum value among the plurality of first maximum distances as a center point corresponding to the first circle ring, and determine coordinates corresponding to the center point as coordinates of the center point corresponding to the first circle ring; For any pixel point in the edge binary image, calculate the distance from the pixel point to each of the second pixel points according to the coordinates corresponding to the pixel point and the coordinates corresponding to each of the second pixel points, and determine the maximum value of the multiple distances as the second maximum distance corresponding to the pixel point; The pixel point corresponding to the minimum value among the plurality of second maximum distances is determined as the center point corresponding to the second circle ring, and the coordinates corresponding to the center point are determined as the center coordinates corresponding to the second circle ring.
6. The method according to claim 1, characterized in that Determining the inner circle machining diameter and the outer circle machining diameter corresponding to the glass tube to be inspected according to the coordinates corresponding to each of the first pixel points, the coordinates corresponding to each of the second pixel points, the coordinates of the center of the first circle ring, and the coordinates of the center of the second circle ring includes: Calculate the radius corresponding to each of the first pixel points according to the coordinates corresponding to each of the first pixel points and the coordinates of the center of the circle corresponding to the first ring; Rounding the radius corresponding to each of the first pixel points to obtain a candidate radius corresponding to each of the first pixel points; The plurality of first pixel points are grouped according to the candidate radius corresponding to each of the first pixel points to obtain a plurality of first groups, wherein, for any one of the first groups, the first group contains a plurality of first pixel points, and the candidate radius corresponding to the plurality of first pixel points is the same; Determine the candidate radius corresponding to the group containing the largest number of the first pixel points as the inner circle image radius corresponding to the glass tube to be detected; Calculate the radius corresponding to each second pixel point according to the coordinates corresponding to each second pixel point and the coordinates of the center of the circle corresponding to the second circle ring; Rounding the radius corresponding to each of the second pixel points to obtain a candidate radius corresponding to each of the second pixel points; The plurality of second pixel points are grouped according to the candidate radius corresponding to each of the second pixel points to obtain a plurality of second groups, wherein, for any one of the second groups, the second group contains a plurality of second pixel points, and the candidate radius corresponding to the plurality of second pixel points is the same; Determine the candidate radius corresponding to the group containing the largest number of the second pixel points as the radius of the outer circle image corresponding to the glass tube to be detected; Determine the inner circle image diameter corresponding to the glass tube to be detected according to the inner circle image radius, and determine the outer circle image diameter corresponding to the glass tube to be detected according to the outer circle image radius; The inner circle machining diameter and the outer circle machining diameter corresponding to the glass tube to be inspected are determined according to the pixel size corresponding to the edge binary image, the inner circle image diameter and the outer circle image diameter.
7. The method according to claim 1, characterized in that The step of determining the concentricity deviation value corresponding to the glass tube to be inspected according to the center coordinates corresponding to the first circle and the center coordinates corresponding to the second circle, comprises: Calculating the image concentricity deviation value corresponding to the glass tube to be inspected according to the center coordinates corresponding to the first circle and the center coordinates corresponding to the second circle; The concentricity deviation value corresponding to the glass tube to be inspected is determined according to the pixel size corresponding to the edge binary image and the image concentricity deviation value.
8. The method according to any one of claims 1 to 7, characterized in that The method further comprises: Calculating a first relative error value corresponding to the glass tube to be inspected according to the inner circle machining diameter and the inner circle drawing diameter corresponding to the glass tube to be inspected; Calculating a second relative error value corresponding to the glass tube to be inspected according to the outer circle machining diameter and the outer circle drawing diameter corresponding to the glass tube to be inspected; Determining an inner diameter processing grade and an outer diameter processing grade corresponding to the glass tube to be inspected according to the first relative error value and the second relative error value; Calculating a judgment standard value according to the first relative error value and the second relative error value; Calculating the difference between the inner and outer diameters of the glass tube to be inspected according to the inner circle machining diameter and the outer circle machining diameter; The concentricity processing grade corresponding to the glass tube to be tested is determined according to the concentricity deviation value, the judgment standard value and the inner and outer diameter difference.
9. A glass tube processing parameter detection device, characterized in that: The device comprises: An acquisition unit, used for acquiring an end face image corresponding to a glass tube to be detected, wherein the glass tube to be detected is a glass tube used for manufacturing optical fibers; A generating unit, configured to generate an edge binary image corresponding to the glass tube to be detected according to a preset rule, a plurality of preset mask matrices and the end face image, wherein the edge binary image includes a first circular ring composed of a plurality of first pixel points and a second circular ring composed of a plurality of second pixel points; A first determining unit, configured to determine the coordinates of the center of the first circle according to the coordinates corresponding to each of the first pixel points, and to determine the coordinates of the center of the second circle according to the coordinates corresponding to each of the second pixel points; A second determining unit is used to determine the inner circle machining diameter and the outer circle machining diameter corresponding to the glass tube to be inspected according to the coordinates corresponding to each of the first pixel points, the coordinates corresponding to each of the second pixel points, the coordinates of the center of the first circle ring, and the coordinates of the center of the second circle ring; The third determination unit is used to determine the concentricity deviation value corresponding to the glass tube to be detected according to the center coordinates corresponding to the first circle and the center coordinates corresponding to the second circle.
10. A storage medium, characterized in that: The storage medium includes a stored program, wherein when the program is executed, the device where the storage medium is located is controlled to execute the glass tube processing parameter detection method according to any one of claims 1 to 8.
Citation Information
Patent Citations
Docking ring circle center extraction method based on close-range short-arc image
CN105261047A
Moving posture visual measurement method of circular ring identifier and application thereof
CN110415292A
High-precision small-caliber pipe groove detection method and device based on three-dimensional imaging
CN118225794A
Dimension detection method, device and equipment of micro part, medium and program product
CN118429303A
Image processing method and apparatus
WO2019196542A1