Bending radius detection method, device, equipment, storage and program product
By obtaining the target fitting curve control points from the image to be detected and performing curve fitting, the problem of low bending radius detection efficiency and low accuracy in the existing technology is solved, and efficient and accurate bending radius detection in a variety of scenarios is achieved. detection.
Patent Information
- Application Number
- CN202410655110.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-24
- Publication Date
- 2024-09-06
AI Technical Summary
The existing bending radius detection method has low measurement efficiency and low accuracy when the space is limited and the technical level of the construction personnel is insufficient. It cannot be applied to a variety of bending radius detection scenarios, and the operation is complex.
By obtaining the control points of the target fitting curve from the image to be detected, performing curve fitting on the arc of the bending part of the target material based on these control points, calculating the bending radius, and providing a bending radius detection method, device, equipment and program The product is suitable for a variety of bending radius detection scenarios, and is easy to operate and efficient.
It achieves easy and efficient operation to obtain accurate bending radius detection results in various bending radius detection scenarios, avoids the problems of space limitations and insufficient technical level, and improves measurement efficiency and accuracy.
Smart Images

Figure CN118608593A
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of material detection, and in particular to a bending radius detection method, device, equipment, storage medium and program product. Background Art
[0002] The bending radius standard of a material refers to the minimum bending radius allowed when the material is bent. The bending radius of the material has a great influence on the performance and service life of the material. In practical applications, there are often situations where the bending radius of the material does not meet the requirements due to irregular operations during installation or repair. Therefore, it is necessary to test the bending radius of the material after installation or repair.
[0003] When the bending radius detection method commonly used in the prior art is applied, due to the possible space limitations and insufficient technical level of construction personnel in actual scenarios, and the complex calculation of the detection method, when measuring the bending radius of the material, there may be problems such as inability to implement, complex operation, low measurement efficiency and low accuracy of measurement results. Summary of the invention
[0004] The embodiment of the present invention provides a bending radius detection method, which can be generally applied to a variety of bending radius detection scenarios, and the corresponding operation is convenient and fast, and accurate full radius detection results can be obtained efficiently.
[0005] In a first aspect, an embodiment of the present invention provides a bending radius detection method, comprising: obtaining control points of a target fitting curve from an image to be detected to obtain target control points, wherein the image to be detected includes a target material for which bending radius measurement is required, and the target fitting curve is a fitting curve corresponding to an arc of a bending portion of the target material;
[0006] Performing curve fitting on the curved part arc of the target material based on the target control point to obtain the target fitting curve; and
[0007] The bending radius of the target material is calculated based on the target fitting curve.
[0008] In a second aspect, an embodiment of the present invention provides a bending radius detection device, comprising:
[0009] A target control point acquisition module is used to acquire the control points of a target fitting curve from an image to be detected to obtain the target control points, wherein the image to be detected includes a target material for which a bending radius measurement is required, and the target fitting curve is a fitting curve corresponding to an arc of a bending part of the target material;
[0010] A curve fitting module, used for performing curve fitting on the curved part arc of the target material based on the target control point to obtain the target fitting curve; and
[0011] A bending radius calculation module is used to calculate the bending radius of the target material based on the target fitting curve.
[0012] In a third aspect, an embodiment of the present invention provides a bending radius detection device, comprising: a photographing device and a bending radius measuring device,
[0013] The photographing device is used to photograph and obtain an image to be detected, wherein the image to be detected includes a target material for which a bending radius measurement is required;
[0014] The bending radius measuring device is used to execute the bending radius detection method described in any one of the embodiments of the present invention.
[0015] In a fourth aspect, an embodiment of the present invention further provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, a bending radius detection method as described in any one of the embodiments of the present invention is implemented.
[0016] In a fifth aspect, an embodiment of the present invention further provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements a bending radius detection method as described in any one of the embodiments of the present invention.
[0017] In a sixth aspect, an embodiment of the present invention further provides a computer program product, including a computer program, which, when executed by a processor, implements any bending radius detection method described in the embodiments of the present invention.
[0018] The bending radius detection method, device, equipment, storage medium and program product provided by the embodiments of the present invention obtain target control points from the image to be detected including the target material for which the bending radius measurement is required, and fit the arc of the bending part of the target material based on the target control points, and then calculate the bending radius of the target material according to the fitted target fitting arc. This makes the bending radius detection method provided by the embodiments of the present invention not limited by space and generally applicable to various bending radius detection scenarios. The measurement process is easy to operate and can conveniently and efficiently obtain bending radius detection results with high accuracy. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] In order to more clearly illustrate the technical solution of the present invention, the drawings required for use in the embodiments are briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present invention and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.
[0020] Figure 1 It is a schematic diagram of a complete radius detection method commonly used in the prior art;
[0021] Figure 2 is a flow chart of a bending radius detection method provided by an embodiment of the present invention;
[0022] Figure 3 is a schematic diagram of a target fitting curve and target control points in a bending radius detection method provided by an embodiment of the present invention;
[0023] Figure 4 is another schematic flow chart of the bending radius detection method provided by an embodiment of the present invention;
[0024] Figure 5 is another schematic flow chart of the bending radius detection method provided by an embodiment of the present invention;
[0025] Figure 6 It is a schematic diagram of the span length and arc height of the target fitting curve in the bending radius detection method provided by an embodiment of the present invention;
[0026] Figure 7 is another schematic flow chart of the bending radius detection method provided by an embodiment of the present invention;
[0027] Figure 8 is another schematic diagram of a target fitting curve and a target control point in a bending radius detection method provided by an embodiment of the present invention;
[0028] Fig. 9 is a schematic diagram of a third target line in the bending radius detection method provided by an embodiment of the present invention;
[0029] Fig.10 is a structural schematic diagram of a bending radius detection device provided by an embodiment of the present invention;
[0030] Fig.11 It is a structural schematic diagram of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0031] The material bending radius standard refers to the minimum bending radius allowed when the material is bent. The bending radius of the material has a great influence on the performance and service life of the material. For example, for hose materials that are particularly widely used in the industry, first of all, the smaller the bending radius, the shorter the load-bearing capacity and service life of the hose. This is because when bending, the inner side of the hose will be stretched and squeezed, and a smaller bending radius will aggravate these effects, causing stress concentration, fracture or fatigue damage to the hose; secondly, the bending radius affects the fluid resistance of the hose. The smaller the bending radius, the greater the resistance on the inner surface of the hose, thereby reducing the flow and efficiency of the hose; in addition, the bending radius also affects the fluctuation and vibration of the hose. A hose with a smaller bending radius is prone to fluctuation and vibration, which will affect the stability and continuity of the hose.
[0032] In practical applications, there are often situations where the bending radius of the material does not meet the requirements due to improper operation during installation or repair. Therefore, it is necessary to detect the bending radius of the material after installation or repair. The commonly used bending radius detection methods in the prior art include: Figure 1 The medial method, lateral method, and three-point method are shown.
[0033] In many scenarios, such as scenarios with narrow spaces, such as inside an engine compartment, the above three methods cannot be carried out. There are many line segments that need to be measured, which can easily lead to error accumulation and inaccurate results. There are also many steps and complex calculations, which require a high level of technical skills from the construction workers.
[0034] The bending radius detection method provided by the embodiment of the present invention obtains target control points from the image to be detected including the target material whose bending radius needs to be measured, and fits the arc of the bending part of the target material based on the target control points, and then calculates the bending radius of the target material according to the fitted target fitting arc. Therefore, the bending radius detection method provided by the embodiment of the present invention is not limited by space and is generally applicable to various bending radius detection scenarios. The measurement process is easy to operate and a bending radius detection result with high accuracy can be obtained conveniently and efficiently.
[0035] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.
[0036] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0037] Figure 2 A flow chart of a bending radius detection method provided in an embodiment of the present invention is provided. The method can be performed by a bending radius detection device provided in an embodiment of the present invention. The device can be implemented in software and / or hardware. In a specific embodiment, the device can be integrated in an electronic device, such as a computer, a server, etc. The following embodiments will be described by taking the device integrated in an electronic device as an example. Figure 2 , the method may specifically include the following steps:
[0038] Step 201, obtaining the control points of the target fitting curve from the image to be detected to obtain the target control points, the image to be detected includes the target material for which the bending radius measurement is required, and the target fitting curve is a fitting curve corresponding to the arc of the bending part of the target material. This step can facilitate curve fitting of the arc of the bending part of the target material based on the target control points.
[0039] Specifically, the target materials may include steel pipes, cables, steel plates, and / or hose materials. The hose materials may include brake hoses and dump hydraulic hoses used in automobile production lines, automobiles and other platforms.
[0040] Specifically, the image to be detected may be obtained by photographing the target material with a photographing device to obtain an original image, and then preprocessing the original image.
[0041] Specifically, the preprocessing of the original image may include adjusting the size of the original image.
[0042] Optionally, the process of obtaining the control points of the target fitting curve from the image to be detected to obtain the target control points includes: based on a convolutional neural network, obtaining the control points of the target fitting curve from the image to be detected to obtain the target control points.
[0043] Specifically, the above-mentioned convolutional neural network can be selected from convolutional neural networks such as residual network (ResNet), lightweight neural network (MobileNet) and visual geometry group (Visual Geometry Group, VGG) according to the computing power design of the corresponding computing platform.
[0044] Optionally, the above-mentioned adjusting the size of the original image includes adjusting the size of the original image according to the requirements of the convolutional neural network.
[0045] Specifically, the control points of the target fitting curve may also be obtained from the above-mentioned image to be detected by other methods in the prior art.
[0046] Optionally, the process of obtaining the control points of the target fitting curve from the image to be detected to obtain the target control points includes: obtaining coordinate values of each target control point, and the coordinate values specifically include the horizontal coordinate x and the vertical coordinate y of each control point.
[0047] Step 202: curve fitting is performed on the arc of the bending part of the target material based on the target control point to obtain a target fitting curve. This step can be helpful for obtaining the bending radius of the target material at the bending part based on the target fitting curve.
[0048] Optionally, the process of performing curve fitting on the curved part arc of the target material based on the target control point to obtain the target fitting curve includes:
[0049] A first Bezier curve formula is obtained and established according to the coordinate value of the target control point, and according to the first Bezier curve formula, a curve fitting is performed on the arc of the curved part of the target material based on the target control point to obtain a target fitting curve.
[0050] Optionally, the process of performing curve fitting on the curved part arc of the target material based on the target control points includes: performing third-order Bezier curve fitting on the curved part arc based on the target control points.
[0051] Specifically, other types of curve fitting may be performed on the curved part arc, for example, Hermite curve fitting.
[0052] Optional, such as Figure 3 As shown, for each target fitting curve obtained by fitting a third-order Bezier curve, the four control points included in the target control points can be represented by P0, P1, P2, and P3, respectively, where P0 represents the starting point and P3 represents the ending point. Then the first Bezier curve formula can be expressed as:
[0053] B(t)=P0(1-t) 3 +3P1t(1-t) 2 +3P2t 2(1-t)+P3t 3 , t∈[0,1]
[0054] Among them, P0, P1, P2, and P3 represent the coordinate values of the corresponding control points, and t represents the time parameter.
[0055] Step 203, calculate the bending radius of the target material based on the target fitting curve. Based on step 201 and step 202, this step obtains the target control point from the image to be detected including the target material to be measured for the bending radius, and fits the arc of the bending part of the target material based on the target control point, and then calculates the bending radius of the target material according to the fitted target fitting arc, so that the bending radius detection method provided by the embodiment of the present invention is not limited by space, and is generally applicable to various bending radius detection scenarios, and the measurement process is easy to operate, and a bending radius detection result with high accuracy can be obtained conveniently and efficiently.
[0056] Optionally, the bending radius detection method provided by the embodiment of the present invention further includes: judging whether the bending radius of the target material meets the requirements according to the corresponding minimum bending radius standard.
[0057] Specifically, the above minimum bending radius standard may be obtained before the step of judging whether the bending radius of the target material meets the prescribed requirements according to the corresponding minimum bending radius standard, or may be obtained in advance.
[0058] Specifically, the minimum bending radius standards for different materials are also different. For example, for hydraulic oil high-pressure pipes, the minimum bending radius standard is not less than 2 to 3 times the inner diameter of the pipe; for open-laid sleeve-type galvanized steel conduits (JDG pipes), the minimum bending radius standard is not less than 6 times the outer diameter of the pipe.
[0059] Optionally, for a tubular material, the process of judging whether the bending radius of the target material meets the requirements according to the corresponding minimum bending radius standard includes:
[0060] The above minimum bending radius standard is calculated according to the inner diameter of the target material, and based on the above minimum bending radius standard, it is judged whether the bending radius of the target material meets the requirements.
[0061] The bending radius detection method provided by the embodiment of the present invention is further described below. Figure 4 As shown, Figure 1 Step 101 in the method may include the following steps:
[0062] Step 1011, obtaining control points corresponding to the suspected target materials in the image to be detected and the confidence of the suspected target materials.
[0063] Step 1012, determining whether the suspected target material is the target material according to the confidence level of the suspected target material.
[0064] Optionally, the process of determining whether the suspected target material is the target material based on the confidence of the suspected target material includes: judging whether the confidence of the suspected target material is greater than a preset confidence threshold; if so, judging the suspected target material as the target material; otherwise, not judging the suspected target material as the target material.
[0065] Step 1013: when the suspected target material is determined to be the target material, the corresponding control points are acquired to obtain the target control points.
[0066] The embodiment of the present invention can avoid subsequent curve fitting and bending radius calculation for non-target materials, reduce the amount of calculation, and improve the detection and calculation efficiency of the bending radius of the target material. It can also help to accurately judge whether the calculated bending radius meets the regulations according to the corresponding minimum bending radius standard.
[0067] The following further describes the bending radius detection method provided by the embodiment of the present invention. In the embodiment of the present invention, Figure 5 As shown, Figure 1 Step 103 in the above may include the following steps:
[0068] Step 1031, obtaining the arc height starting point corresponding to the point on the target fitting curve when the time parameter of the first Bezier curve formula is 0.5.
[0069] Step 1032: Obtain a line connecting the start point and the end point of the target fitting curve to obtain a first target line, and calculate the length of the first target line to obtain the span length of the target fitting curve.
[0070] Step 1033, obtaining a line connecting the arc height starting point and the midpoint of the first target line to obtain a second target line, and calculating the length of the second target line to obtain the arc height of the target fitting curve.
[0071] Step 1034 , calculating the radius of the target fitting curve based on the span length and the arc height.
[0072] In a specific example, if Figure 6 As shown, the span length can be represented by s and the arc height can be represented by h. The radius of the target fitting curve can be calculated based on the following formula:
[0073]
[0074] Step 1035 , determining the bending radius of the target material based on the radius of the target fitting curve and the inner diameter of the target material.
[0075] Optionally, for plates such as steel plates, the process of determining the bending radius of the target material based on the radius of the target fitting curve and the inner diameter of the target material includes: determining the radius of the target fitting curve as the bending radius of the target material.
[0076] Optionally, for pipe materials, the process of determining the bending radius of the target material based on the radius of the target fitting curve and the inner diameter of the target material includes: calculating the bending radius of the target material according to the radius of the target fitting curve and the inner diameter of the target material.
[0077] The embodiment of the present invention determines and calculates the radius of the target fitting curve using the span length and the arc height, and then determines the bending radius of the target material based on the radius of the target fitting curve, so that the bending radius of the target material can be obtained conveniently, efficiently and accurately.
[0078] The bending radius detection method provided by the embodiment of the present invention is further described below.
[0079] In the bending radius detection method provided by the embodiment of the present invention, the target material includes a pipe material, the curved part arc of the target material includes an outer arc and an inner arc, and the target fitting curve includes an outer fitting curve corresponding to the outer arc and an inner fitting curve corresponding to the inner arc. Figure 7 As shown, the following steps may be included:
[0080] Step 701 : acquiring target control points of the outer fitting curve and the inner fitting curve from the image to be detected.
[0081] Step 702 , curve fitting is performed on the outer arc based on the target control points corresponding to the outer fitting curve to obtain the outer fitting curve, and curve fitting is performed on the inner arc based on the target control points corresponding to the inner fitting curve to obtain the inner fitting curve.
[0082] Optionally, the process of performing curve fitting on the outer arc based on the target control points corresponding to the outer fitting curve to obtain the outer fitting curve, and performing curve fitting on the inner arc based on the target control points corresponding to the inner fitting curve to obtain the inner fitting curve includes:
[0083] A second Bezier curve formula is obtained and established according to the coordinate value of the target control point corresponding to the outer fitting curve; a third Bezier curve formula is obtained and established according to the coordinate value of the target control point corresponding to the inner fitting curve; and according to the second Bezier curve formula, a curve fitting is performed on the outer arc based on the target control point corresponding to the outer fitting curve to obtain the outer fitting curve, and according to the third Bezier curve formula, a curve fitting is performed on the inner arc based on the target control point corresponding to the inner fitting curve to obtain the inner fitting curve.
[0084] Optionally, the outer fitting curve and the inner fitting curve are as follows: Figure 8 As shown in , the target control points corresponding to the outer fitting curve are as follows Figure 8 As shown in points A, B, C and D in the figure, the target control points corresponding to the inner fitting curve are as follows: Figure 8 As shown in E, H, J and K.
[0085] Specifically, the second Bezier curve formula can be expressed as:
[0086] B(t)=A(1-t) 3 +3Bt(1-t) 2 +3Ct 2 (1-t)+Dt 3 , t∈[0,1]
[0087] Among them, A, B, C, and D represent the coordinate values of the corresponding control points respectively, and t represents the time parameter.
[0088] Specifically, the third Bezier curve formula can be expressed as:
[0089] B(t)=E(1-t) 3 +3Ht(1-t) 2 +3Jt 2 (1-t)+Kt 3 , t∈[0,1]
[0090] Among them, E, H, J and K represent the coordinate values of the corresponding control points respectively, and t represents the time parameter.
[0091] Step 703: Calculate the bending radius of the target material based on the outer fitting curve and the inner fitting curve.
[0092] Optionally, the process of calculating the bending radius of the target material based on the outer fitting curve and the inner fitting curve includes:
[0093] When the same time parameter is obtained for the second Bezier curve formula and the third Bezier curve formula, a third target line is obtained by connecting the corresponding points on the outer fitting curve and the points on the inner fitting curve; the inner diameter of the target material is determined based on the length of the third target line; and the bending radius of the target material is calculated based on the inner diameter of the target material and the radius of the outer fitting curve and / or the inner fitting curve.
[0094] Optionally, the process of determining the inner diameter of the target material based on the length of the third target line includes: directly determining the length of the third target line as the inner diameter of the target material.
[0095] Optionally, the third target line includes a plurality of third target lines. The process of determining the inner diameter of the target material based on the length of the third target line includes: calculating an average value of the lengths of the plurality of third target lines to obtain the inner diameter of the target material.
[0096] Specifically, the third target connection can be as follows Fig. 9 As shown by the dotted line in .
[0097] Optionally, the process of calculating the bending radius of the target material based on the inner diameter of the target material and the radius of the outer fitting curve and / or the inner fitting curve includes:
[0098] The bending radius of the target material is calculated based on the inner diameter of the target material and the radius of the inner fitting curve. Specifically, it can be calculated based on the following formula:
[0099] R=r+(d / 2)
[0100] Wherein, R represents the bending radius of the target material, r represents the radius of the inner fitting curve, and d represents the inner diameter of the target material.
[0101] Optionally, the bending radius of the target material is calculated based on the inner diameter of the target material and the radius of the outer fitting curve.
[0102] Optionally, a first calculated value of the bending radius of the target material is calculated based on the inner diameter of the target material and the radius of the outer fitting curve, a second calculated value of the bending radius of the target material is calculated based on the inner diameter of the target material and the radius of the inner fitting curve, and the first calculated value and the second calculated value of the bending radius of the target material are averaged to obtain the bending radius of the target material.
[0103] The embodiment of the present invention obtains the target fitting arcs of the outer arc line and the inner arc line of the target pipe material, and calculates the bending radius of the target pipe material based on the target fitting arc line of the outer arc line and the inner arc line, so as to conveniently, efficiently and accurately detect the bending radius of the target pipe material in various scenarios.
[0104] Fig.10 FIG. 1 is a structural diagram of a bending radius detection device provided in an embodiment of the present invention, and the device is suitable for executing the bending radius detection method provided in an embodiment of the present invention. Fig.10 As shown, the device may specifically include:
[0105] The target control point acquisition module 1001 is used to acquire the control points of the target fitting curve from the image to be detected to obtain the target control points, wherein the image to be detected includes the target material to be subjected to bending radius measurement, and the target fitting curve is a fitting curve corresponding to the arc of the bending part of the target material. It is possible to perform curve fitting on the arc of the bending part of the target material based on the target control points.
[0106] Optionally, the above-mentioned target control point acquisition module 1001 can be specifically used to obtain control points corresponding to suspected target materials in the image to be detected and the confidence of the suspected target materials; determine whether the suspected target materials are the target materials according to the confidence of the suspected target materials; and when the suspected target materials are determined to be the target materials, obtain the corresponding control points to obtain the target control points.
[0107] Optionally, the target material includes a pipe material, the arc line of the bending part of the target material includes an outer arc line and an inner arc line, and the target fitting curve includes an outer fitting curve corresponding to the outer arc line and an inner fitting curve corresponding to the inner arc line.
[0108] Optionally, the target control point acquisition module 1001 can be specifically used to respectively acquire target control points of the outer fitting curve and the inner fitting curve from the image to be detected.
[0109] Optionally, the target control point acquisition module 1001 can be specifically used to obtain the target control points by acquiring the control points of the target fitting curve from the image to be detected based on a convolutional neural network.
[0110] The curve fitting module 1002 is used to perform curve fitting on the curved part arc of the target material based on the target control point to obtain a target fitting curve, which can be used to obtain the bending radius of the target material at the curved part based on the target fitting curve.
[0111] The curve fitting module 1002 can be specifically used to obtain and establish a first Bezier curve formula according to the coordinate values of the target control points; and to perform curve fitting on the curved part arc of the target material based on the target control points according to the first Bezier curve formula to obtain a target fitting curve.
[0112] Optionally, the curve fitting module 1002 can be specifically used to perform curve fitting on the outer arc based on the target control points corresponding to the outer fitting curve to obtain the outer fitting curve, and perform curve fitting on the inner arc based on the target control points corresponding to the inner fitting curve to obtain the inner fitting curve.
[0113] Optionally, the above-mentioned curve fitting module 1002 can be specifically used to obtain and establish a second Bezier curve formula based on the coordinate value of the target control point corresponding to the outer fitting curve; obtain and establish a third Bezier curve formula based on the coordinate value of the target control point corresponding to the inner fitting curve; and according to the second Bezier curve formula, perform curve fitting on the outer arc based on the target control point corresponding to the outer fitting curve to obtain the outer fitting curve, and according to the third Bezier curve formula, perform curve fitting on the inner arc based on the target control point corresponding to the inner fitting curve to obtain the inner fitting curve.
[0114] The bending radius calculation module 1003 is used to calculate the bending radius of the target material based on the target fitting curve. The module 1001 and the module 1002 can be combined to obtain the target control points from the image to be detected including the target material to be measured for the bending radius, and the arc of the bending part of the target material is fitted based on the target control points, and then the bending radius of the target material is calculated according to the fitted target fitting arc, so that the bending radius detection method provided by the embodiment of the present invention can be free from space restrictions and can be generally applicable to various bending radius detection scenarios. The operation is convenient during the measurement process, and a bending radius detection result with high accuracy can be obtained conveniently and efficiently.
[0115] The above-mentioned bending radius calculation module 1003 can be specifically used to obtain the arc height starting point corresponding to the point on the target fitting curve when the time parameter of the first Bezier curve formula is 0.5; obtain the connection line of the starting point and the end point of the target fitting curve to obtain the first target connection line, and calculate the length of the first target connection line to obtain the span length of the target fitting curve; obtain the connection line of the arc height starting point and the midpoint of the first target connection line to obtain the second target connection line, and calculate the length of the second target connection line to obtain the arc height of the target fitting curve; calculate the radius of the target fitting curve based on the span length and the arc height; and determine the bending radius of the target material based on the radius of the target fitting curve and the inner diameter of the target material.
[0116] Optionally, the bending radius calculation module 1003 can be specifically used to calculate the bending radius of the target material based on the outer fitting curve and the inner fitting curve.
[0117] Optionally, the above-mentioned bending radius calculation module 1003 can be specifically used to obtain a third target line by connecting the corresponding points on the outer fitting curve and the points on the inner fitting curve when the same time parameters are taken for the second Bezier curve formula and the third Bezier curve formula; determine the inner diameter of the target material based on the length of the third target line; and calculate the bending radius of the target material based on the inner diameter of the target material, and the radius of the outer fitting curve and / or the inner fitting curve.
[0118] Optionally, the third target line includes multiple third target lines, and the bending radius calculation module 1003 can be specifically used to calculate the average value of the lengths of the multiple third target lines to obtain the inner diameter of the target material.
[0119] Optionally, the bending radius detection method provided by the embodiment of the present invention further includes: a compliance judgment module, used to judge whether the bending radius of the target material complies with the regulations based on the corresponding minimum bending radius standard.
[0120] The bending radius detection device provided in the embodiment of the present invention can be integrated in a handheld device, so that it can be generally applicable to various bending radius detection scenarios, is not limited by space, is easy to operate during the measurement process, and can conveniently and efficiently obtain bending radius detection results with high accuracy.
[0121] An embodiment of the present invention also provides a bending radius detection device, including: a shooting device and a bending radius measuring device, the shooting device is used to capture an image to be detected, the image to be detected includes a target material for which a bending radius measurement is required; the bending radius measuring device is used to execute the bending radius detection method provided in any of the above embodiments.
[0122] Specifically, the bending radius detection device may be a handheld device.
[0123] The bending radius detection device provided by the embodiment of the present invention can be generally applied to various bending radius detection scenarios, is not limited by space, is easy to operate during the measurement process, and can conveniently and efficiently obtain bending radius detection results with high accuracy.
[0124] Those skilled in the art can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional modules is used as an example for illustration. In actual applications, the above-mentioned functions can be assigned to different functional modules as needed, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above. The specific working process of the functional modules described above can refer to the corresponding process in the aforementioned method embodiment, and will not be repeated here.
[0125] An embodiment of the present invention further provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the bending radius detection method provided in any of the above embodiments is implemented.
[0126] An embodiment of the present invention further provides a computer-readable medium on which a computer program is stored. When the program is executed by a processor, the bending radius detection method provided by any of the above embodiments is implemented.
[0127] An embodiment of the present invention further provides a computer program product, including a computer program, which implements the bending radius detection method described in any one of the above embodiments when executed by a processor.
[0128] Reference below Fig.11 , which shows a schematic diagram of the structure of a computer system 1100 of an electronic device suitable for implementing an embodiment of the present invention. Fig.11 The electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present invention.
[0129] like Fig.11 As shown, the computer system 1100 includes a central processing unit (CPU) 1101, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 1102 or a program loaded from a storage part 1108 into a random access memory (RAM) 1103. In the RAM 1103, various programs and data required for the operation of the system 1100 are also stored. The CPU 1101, the ROM 1102, and the RAM 1103 are connected to each other via a bus 1104. An input / output (I / O) interface 1105 is also connected to the bus 1104.
[0130] The following components are connected to the I / O interface 1105: an input section 1106 including a keyboard, a mouse, etc.; an output section 1107 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage section 1108 including a hard disk, etc.; and a communication section 1109 including a network interface card such as a LAN card, a modem, etc. The communication section 1109 performs communication processing via a network such as the Internet. A drive 1110 is also connected to the I / O interface 1105 as needed. A removable medium 1111, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 1110 as needed, so that a computer program read therefrom is installed into the storage section 1108 as needed.
[0131] In particular, according to the embodiments disclosed in the present invention, the process described above with reference to the flowchart can be implemented as a computer software program. For example, the embodiments disclosed in the present invention include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program contains program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from the network through the communication part 1109, and / or installed from the removable medium 1111. When the computer program is executed by the central processing unit (CPU) 1101, the above-mentioned functions defined in the system of the present invention are executed.
[0132] It should be noted that the computer-readable medium shown in the present invention may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present invention, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, device or device. In the present invention, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, which carries a computer-readable program code. This propagated data signal may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Computer-readable signal media may also be any computer-readable medium other than computer-readable storage media, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer-readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, optical cable, RF, etc., or any suitable combination of the above.
[0133] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present invention. In this regard, each box in the flow chart or block diagram can represent a module, a program segment, or a part of a code, and the above-mentioned module, program segment, or a part of a code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram or flow chart, and the combination of the boxes in the block diagram or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0134] The modules and / or units involved in the embodiments of the present invention may be implemented in software or hardware. The modules and / or units described may also be set in a processor, for example, it may be described as: a processor includes a target control point acquisition module, a curve fitting module and a bending radius calculation module. The names of these modules do not, in some cases, constitute limitations on the modules themselves.
[0135] As another aspect, the present invention further provides a computer-readable medium, which may be included in the device described in the above embodiment; or may exist independently without being assembled into the device. The above computer-readable medium carries one or more programs, and when the above one or more programs are executed by a device, the device includes: obtaining control points of a target fitting curve from an image to be detected to obtain target control points, the image to be detected includes a target material to be measured for bending radius, and the target fitting curve is a fitting curve corresponding to the arc of the bending part of the target material; curve fitting is performed on the arc of the bending part of the target material based on the target control points to obtain a target fitting curve; and the bending radius of the target material is calculated based on the target fitting curve.
[0136] The above specific implementations do not constitute a limitation on the protection scope of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions may occur depending on design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.
Claims
1. A bending radius detection method, characterized in that: include: Obtaining control points of a target fitting curve from an image to be detected to obtain target control points, wherein the image to be detected includes a target material for which bending radius measurement is required, and the target fitting curve is a fitting curve corresponding to an arc of a bending portion of the target material; Performing curve fitting on the curved part arc of the target material based on the target control point to obtain the target fitting curve; as well as The bending radius of the target material is calculated based on the target fitting curve.
2. The bending radius detection method according to claim 1, characterized in that: The step of acquiring the control points of the target fitting curve from the image to be detected to obtain the target control points includes: Acquire the control points corresponding to the suspected target materials in the image to be detected and the confidence of the suspected target materials; determining whether the suspected target material is the target material according to the confidence level of the suspected target material; and When the suspected target material is determined to be the target material, the corresponding control point is acquired to obtain the target control point.
3. The bending radius detection method according to claim 1, characterized in that: The step of performing curve fitting on the curved part arc of the target material based on the target control point to obtain the target fitting curve comprises: Acquire and establish a first Bezier curve formula according to the coordinate value of the target control point; and According to the first Bezier curve formula, a curve fitting is performed on the curved part arc of the target material based on the target control point to obtain the target fitting curve.
4. The bending radius detection method according to claim 3, characterized in that: The step of calculating the bending radius of the target material based on the target fitting curve includes: When the time parameter of the first Bezier curve formula is 0.5, the arc height starting point corresponding to the point on the target fitting curve is obtained; Obtaining a line connecting the starting point and the end point of the target fitting curve to obtain a first target line, and calculating the length of the first target line to obtain the span length of the target fitting curve; Obtaining a line connecting the arc height starting point and the midpoint of the first target line to obtain a second target line, and calculating the length of the second target line to obtain the arc height of the target fitting curve; Calculating the radius of the target fitting curve based on the span length and the arc height; and The bending radius of the target material is determined based on the radius of the target fitting curve and the inner diameter of the target material.
5. The bending radius detection method according to claim 1, characterized in that: The target material includes a pipe material, the arc line of the bending part of the target material includes an outer arc line and an inner arc line, and the target fitting curve includes an outer fitting curve corresponding to the outer arc line and an inner fitting curve corresponding to the inner arc line; The step of acquiring the control points of the target fitting curve from the image to be detected to obtain the target control points includes: acquiring the target control points of the outer fitting curve and the inner fitting curve from the image to be detected respectively; The step of performing curve fitting on the curved part arc of the target material based on the target control points to obtain the target fitting curve comprises: performing curve fitting on the outer arc based on the target control points corresponding to the outer fitting curve to obtain the outer fitting curve, and performing curve fitting on the inner arc based on the target control points corresponding to the inner fitting curve to obtain the inner fitting curve; The step of calculating the bending radius of the target material based on the target fitting curve includes: The bending radius of the target material is calculated based on the outer fitting curve and the inner fitting curve.
6. The bending radius detection method according to claim 5, characterized in that: The step of performing curve fitting on the outer arc based on the target control point corresponding to the outer fitting curve to obtain the outer fitting curve, and performing curve fitting on the inner arc based on the target control point corresponding to the inner fitting curve to obtain the inner fitting curve, comprises: Acquire and establish a second Bezier curve formula according to the coordinate value of the target control point corresponding to the outer fitting curve; Acquire and establish a third Bezier curve formula according to the coordinate value of the target control point corresponding to the inner fitting curve; and According to the second Bezier curve formula, curve fitting is performed on the outer arc based on the target control point corresponding to the outer fitting curve to obtain the outer fitting curve, and according to the third Bezier curve formula, curve fitting is performed on the inner arc based on the target control point corresponding to the inner fitting curve to obtain the inner fitting curve; The step of calculating the bending radius of the target material based on the outer fitting curve and the inner fitting curve includes: When the second Bezier curve formula and the third Bezier curve formula have the same time parameter, a third target line is obtained by connecting the corresponding points on the outer fitting curve and the points on the inner fitting curve; determining an inner diameter of the target material based on the length of the third target line; and The bending radius of the target material is calculated based on the inner diameter of the target material and the radius of the outer fitting curve and / or the inner fitting curve.
7. The bending radius detection method according to claim 6, characterized in that: The third target connection includes a plurality of third target connections; The determining the inner diameter of the target material based on the length of the third target line comprises: The inner diameter of the target material is obtained by calculating an average value of the lengths of the plurality of third target connecting lines.
8. The bending radius detection method according to claim 1, characterized in that: The step of acquiring the control points of the target fitting curve from the image to be detected to obtain the target control points includes: Based on a convolutional neural network, control points of the target fitting curve are acquired from the image to be detected to obtain the target control points.
9. The bending radius detection method according to claim 1, characterized in that: Also includes: It is determined whether the bending radius of the target material meets the requirements according to the corresponding minimum bending radius standard.
10. A bending radius detection device, characterized in that: include: A target control point acquisition module is used to acquire the control points of a target fitting curve from an image to be detected to obtain the target control points, wherein the image to be detected includes a target material for which a bending radius measurement is required, and the target fitting curve is a fitting curve corresponding to an arc of a bending part of the target material; A curve fitting module, used for performing curve fitting on the curved part arc of the target material based on the target control point to obtain the target fitting curve; as well as A bending radius calculation module is used to calculate the bending radius of the target material based on the target fitting curve.
11. A bending radius detection device, characterized in that: include: A photographing device and a bending radius measuring device; The photographing device is used to photograph and obtain an image to be detected, wherein the image to be detected includes a target material for which a bending radius measurement is required; The bending radius measuring device is used to perform the bending radius detection method as described in any one of claims 1 to 9.
12. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the program, the bending radius detection method according to any one of claims 1 to 9 is implemented.
13. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the bending radius detection method as claimed in any one of claims 1 to 9 is implemented.
14. A computer program product, comprising a computer program, wherein when the computer program is executed by a processor, the computer program implements the bending radius detection method according to any one of claims 1 to 9.
