A method, device, equipment and medium for adjusting hole making parameters

CN122948776APending Publication Date: 2026-10-20SHANGHAI AIRCRAFT MFG
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611049240.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-07-15
Publication Date
2026-10-20

AI Technical Summary

Technical Problem

[0004]然而,试板制孔与实际工件加工环境存在差异,通过试板制孔确定的参数在应用到实际工件上时,会降低制孔精度,在制孔过程中频繁测量制孔窝径以及基于人工经验进行参数调节的方式,会大幅度降低生产效率,并且,窝径的测量精度受测量人员技能或测量设备精度影响,难以保证测量的可靠性,基于此调整的制孔参数可能无法保证制孔精度

Benefits of technology

[0009]根据本发明的另一方面,提供了一种计算机可读存储介质,所述计算机可读存储介质存储有计算机指令,所述计算机指令用于使处理器执行时实现本发明任一实施例所述的制孔参数的调整方法。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure FT_1
    Figure FT_1
  • Figure FT_2
    Figure FT_2
  • Figure FT_3
    Figure FT_3
Patent Text Reader

Abstract

This invention discloses a method, apparatus, device, and medium for adjusting hole-making parameters. The method includes: acquiring an image of the hole diameter to be measured and an initial center; converting the image of the hole diameter to be measured into a polar coordinate image based on the initial center; establishing a radial energy curve based on the polar coordinate image; determining an initial sub-pixel radius and a correction center based on the polar coordinate image and the radial energy curve, and updating the polar coordinate image; re-establishing the radial energy curve based on the updated polar coordinate image, and determining the target sub-pixel radius based on the updated polar coordinate image and the newly established radial energy curve; determining the actual hole diameter based on the target sub-pixel radius and the actual presser foot extension distance; and adjusting the hole-making parameters based on the actual hole diameter and the standard hole diameter. This technical solution can accurately identify the hole diameter size based on image processing methods and automatically adjust the hole-making parameters, thereby significantly improving the accuracy and efficiency of hole-making processing.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of machine vision inspection technology, and in particular to a method, apparatus, equipment and medium for adjusting hole-making parameters. Background Technology

[0002] Robotic end-effector drilling refers to the installation of a dedicated end-effector device on the end flange of an industrial robotic arm. The robot drives the end-effector device to automatically complete the drilling of the workpiece. It is often used in aerospace assembly scenarios such as aircraft fuselage, wings, and cabins.

[0003] In the existing technology, before drilling, a drilling operation is performed on a test plate. Then, by measuring the difference between the actual hole diameter and the preset standard hole diameter, the hole diameter compensation amount is calculated, and the initial parameters of the drilling equipment are determined accordingly. During the drilling process, the size of the hole diameter needs to be measured frequently. If a deviation occurs, the parameters of the drilling equipment need to be adjusted again to ensure the processing quality. Moreover, each adjustment of the drilling parameters relies on human experience.

[0004] However, the drilling environment of the test plate differs from that of the actual workpiece. When the parameters determined by drilling the test plate are applied to the actual workpiece, the drilling accuracy will be reduced. Frequent measurement of the hole diameter and parameter adjustment based on manual experience during the drilling process will significantly reduce production efficiency. Furthermore, the measurement accuracy of the hole diameter is affected by the skill of the measuring personnel or the accuracy of the measuring equipment, making it difficult to guarantee the reliability of the measurement. Drilling parameters adjusted based on this may not guarantee drilling accuracy. Summary of the Invention

[0005] This invention provides a method, apparatus, device, and medium for adjusting hole-making parameters. It can accurately identify the hole diameter based on image processing methods and automatically adjust the hole-making parameters, thereby significantly improving the accuracy and efficiency of hole-making. It is suitable for complex environments where it is difficult to manually measure the hole diameter.

[0006] According to one aspect of the present invention, a method for adjusting hole-making parameters is provided, comprising: Obtain the image of the pit diameter to be measured and the initial center, and convert the image of the pit diameter to be measured into a polar coordinate image based on the initial center; Based on the polar coordinate image, a radial energy curve is established; Based on the polar coordinate image and the radial energy curve, the initial subpixel radius and the correction center are determined, and the polar coordinate image is updated based on the correction center. Based on the updated polar coordinate image, the radial energy curve is re-established, and the target subpixel radius is determined based on the updated polar coordinate image and the newly established radial energy curve. The actual hole diameter is determined based on the target subpixel radius and the actual presser foot extension distance, and the hole-making parameters are adjusted based on the actual hole diameter and the standard hole diameter.

[0007] According to another aspect of the present invention, a device for adjusting hole-making parameters is provided, comprising: The polar coordinate image generation module is used to acquire the image of the dimple diameter to be measured and the initial center, and convert the image of the dimple diameter to be measured into a polar coordinate image based on the initial center. A radial energy curve establishment module is used to establish a radial energy curve based on the polar coordinate image; The polar coordinate image correction module is used to determine the initial subpixel radius and the correction center based on the polar coordinate image and the radial energy curve, and to update the polar coordinate image based on the correction center. The target subpixel radius determination module is used to re-establish the radial energy curve based on the updated polar coordinate image, and determine the target subpixel radius based on the updated polar coordinate image and the newly established radial energy curve. The hole-making parameter adjustment module is used to determine the actual hole diameter based on the target sub-pixel radius and the actual presser foot extension distance, and to adjust the hole-making parameters based on the actual hole diameter and the standard hole diameter.

[0008] According to another aspect of the present invention, an electronic device is provided, the electronic device comprising: At least one processor; and A memory communicatively connected to the at least one processor; wherein, The memory stores a computer program that can be executed by the at least one processor, which enables the at least one processor to perform the hole-making parameter adjustment method according to any embodiment of the present invention.

[0009] According to another aspect of the present invention, a computer-readable storage medium is provided, the computer-readable storage medium storing computer instructions for causing a processor to execute and implement the hole-making parameter adjustment method according to any embodiment of the present invention.

[0010] The technical solution of this invention acquires an image of the diameter of the hole to be measured and an initial center, and converts the image of the diameter of the hole to be measured into a polar coordinate image based on the initial center. A radial energy curve is established based on the polar coordinate image. An initial subpixel radius and a correction center are determined based on the polar coordinate image and the radial energy curve, and the polar coordinate image is updated based on the correction center. A new radial energy curve is established based on the updated polar coordinate image, and the target subpixel radius is determined based on the updated polar coordinate image and the newly established radial energy curve. The actual diameter of the hole is determined based on the target subpixel radius and the actual presser foot extension distance. The drilling parameters are adjusted based on the actual diameter and the standard diameter. This method can accurately identify the size of the hole diameter based on image processing, avoiding errors from manual measurement. It is suitable for special processing environments where frequent measurement is difficult. Through multiple calibrations, accurate hole diameter measurements can be obtained, improving the accuracy of hole diameter detection, reducing the false detection rate, and automatically adjusting drilling parameters based on the hole diameter measurement results, thereby significantly improving the accuracy and efficiency of hole drilling.

[0011] It should be understood that the description in this section is not intended to identify key or essential features of the embodiments of the present invention, nor is it intended to limit the scope of the invention. Other features of the invention will become readily apparent from the following description. Attached Figure Description

[0012] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0013] Figure 1 This is a flowchart of a method for adjusting hole-making parameters according to Embodiment 1 of the present invention; Figure 2 This is a flowchart of another method for adjusting hole-making parameters according to Embodiment 2 of the present invention; Figure 3 This is a schematic diagram of the structure of a hole-making parameter adjustment device provided in Embodiment 3 of the present invention; Figure 4 This is a schematic diagram of the structure of an electronic device that implements the hole-making parameter adjustment method of the present invention. Detailed Implementation

[0014] To enable those skilled in the art to better understand the present invention, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of the present invention.

[0015] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this invention are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such terms can be used interchangeably where appropriate so that embodiments of the invention described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover a non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.

[0016] Example 1 Figure 1 This is a flowchart of a method for adjusting drilling parameters according to Embodiment 1 of the present invention. This embodiment is applicable to situations where the hole diameter is detected and the drilling parameters are adjusted based on the detection results. This method can be executed by a drilling parameter adjustment device, which can be implemented in hardware and / or software, and is generally configured in a computer or processor with data processing capabilities. Figure 1 As shown, the method includes: S110. Obtain the image of the pit diameter to be measured and the initial center, and convert the image of the pit diameter to be measured into a polar coordinate image based on the initial center.

[0017] Optionally, the image of the diameter to be tested refers to the effective image area containing the circular features of the diameter to be tested, which is obtained by preprocessing after being acquired by an industrial camera.

[0018] Optionally, the initial center is the reference origin of the polar coordinate transformation. The geometric center of the image of the diameter of the pit to be measured can be used as the initial center, or the initial center can be determined in the image of the diameter of the pit to be measured according to the preset calibration position.

[0019] Optionally, the image of the diameter of the pit to be measured is an image in the Cartesian coordinate system. After mapping the image of the diameter of the pit to be measured with the initial circle center as the origin, a polar coordinate image can be obtained. The two dimensions of the polar coordinate image are the radius and the angle, respectively.

[0020] The process of acquiring the image of the dimple diameter to be measured and the initial center, and converting the image of the dimple diameter to be measured into a polar coordinate image based on the initial center, may include: The product image captured by the camera at the calibrated position is converted into a grayscale image, and the region of interest is determined in the grayscale image. The image of the region of interest is used as the image of the dimple diameter to be measured. The product image contains the circular feature of the dimple diameter to be measured. Determine the initial center of the circle based on the image of the diameter of the depression to be measured; Using the initial circle center as the origin of the polar coordinate transformation, the image of the pit diameter to be measured is converted into a polar coordinate image.

[0021] Optionally, the camera can be an industrial camera capable of outputting color images. The camera can be mounted on an adjustable mechanism that can be raised and lowered, and the adjustable mechanism is mounted on the front side of the hole-making device at the end of the robot.

[0022] Optionally, the product image refers to a color image of the workpiece taken by a camera at an industrial hole-making station, and the image contains a complete hole structure. The hole diameter in the product image is the diameter to be measured, and the hole is obtained by the hole-making equipment based on the initial hole-making parameters.

[0023] Optionally, the single-channel image obtained by grayscale weighted conversion of the product image is a grayscale image, in which each pixel in the grayscale image is represented by a grayscale value of 0-255 to indicate brightness.

[0024] Optionally, the region of interest is an image region in the grayscale image that contains only the diameter of the dimple to be measured, based on prior location information.

[0025] Optionally, the circular edges of the same radius in the image of the dimple diameter to be tested will unfold into an approximate straight line extending along the angular direction in the polar coordinate image, thereby reducing the two-dimensional circle detection problem to a one-dimensional peak search problem in the radial direction, effectively improving the circle detection efficiency.

[0026] S120. Based on the polar coordinate image, establish the radial energy curve.

[0027] Establishing the radial energy curve based on the polar coordinate image may include: The polar coordinate image is smoothed along the radial direction, and the radial gradient response of each sampling radius at each sampling angle is determined in the smoothed polar coordinate image. Based on the radial gradient response of each sampling radius at each sampling angle, the radial energy of each sampling radius is calculated and a radial energy curve is established; wherein, the horizontal axis of the radial energy curve is the radius and the vertical axis is the radial energy.

[0028] It is understandable that polar coordinate images are obtained by extracting regions of interest from grayscale images and transforming them into polar coordinates. Therefore, brightness information of each image location can also be obtained from polar coordinate images.

[0029] Optionally, the radial direction refers to the ray direction from the center of the circle outwards and perpendicular to the tangent of the circle. Smoothing can be achieved by performing a one-dimensional Gaussian convolution filter on the polar coordinate image along the radial direction. Smoothing can suppress radial random noise and local spikes, making gray-level transitions smoother, while not damaging the circumferential edge continuity.

[0030] Optionally, the sampling radius refers to the discrete sampling points in the radial direction of the polar coordinate image, such as radii r=1, r=2, etc., which can all be used as the sampling radius; the sampling angle refers to the discrete sampling points in the angular direction of the polar coordinate image, which are usually uniformly distributed in the range of 0-360 degrees.

[0031] Optionally, the radial gradient response refers to the first derivative of the gray level calculated along the radial direction, which characterizes the severity of the radial gray level abrupt change at that location. At the true edge of the circle, a strong radial gradient response will be exhibited.

[0032] In discrete scenarios where the sampling radius and sampling angle are set, the grayscale difference between adjacent sampling radius pixels can also be used as the discrete gradient at a fixed sampling angle. For example, if r=1 and r=2 are adjacent sampling radii, and the brightness of r=1 is 50 and the brightness of r=2 is 60 when the sampling angle is 0 degrees, then the radial gradient response of sampling radius r=2 at a sampling angle of 0 degrees is 60-50=10. This is only an example.

[0033] Optionally, radial energy can refer to the average value of the radial gradient response corresponding to all sampling angles under a single sampling radius. Radial energy can reflect the overall strength and consistency of the entire perimeter edge at the sampling radius location.

[0034] Optionally, after obtaining the radial energy of each sampling radius, multiple sampling points are determined with the sampling radius as the abscissa and the radial energy of the sampling radius as the ordinate. The curve generated based on all sampling points is the energy curve.

[0035] S130. Based on the polar coordinate image and the radial energy curve, determine the initial subpixel radius and the correction center, and update the polar coordinate image based on the correction center.

[0036] Optionally, the initial sub-pixel radius is the initial sub-pixel radius obtained by peak analysis and center fitting after the first round of polar coordinate transformation, with a higher accuracy than the pixel level; the corrected center is the true center coordinate obtained after correcting the initial center, which is used for the second round of high-precision polar coordinate transformation.

[0037] Optionally, after obtaining the correction center, the image of the pit diameter to be measured is mapped to coordinates with the correction center as the origin to obtain an updated polar coordinate image.

[0038] Determining the initial sub-pixel radius and the corrected center based on the polar coordinate image and the radial energy curve may include: The radial energy curve is smoothed, and the candidate radii corresponding to each effective peak are obtained from the smoothed radial energy curve. The candidate radii are filtered in multiple rounds to obtain the target candidate radius; The target radius range is determined based on the candidate target radius, and edge points at each sampling angle within the target radius range are identified in the polar coordinate image. Polar coordinate sine fitting is performed on each edge point, and the radius of the fitted circle is determined as the initial sub-pixel radius. The center of the corrected circle is determined based on the fitting result.

[0039] Optionally, after smoothing the radial energy curve, all candidate peaks are extracted using the local maximum criterion. That is, if the radial energy of a certain radius is greater than the radial energy of the left and right adjacent radii, then the radius is determined to be a candidate radius.

[0040] Optionally, after obtaining the candidate radii, the optimal target candidate radius can be selected from the candidate radii through a multi-step verification rule.

[0041] Optionally, after obtaining the target candidate radius, a local quadratic interpolation is performed on the target candidate radius based on the radial energy curve, which can be achieved through the following formula: r * =r0+[E(r0-m)-E(r0+m)] / 2[E(r0-m)-2E(r0)+E(r0+m)]; Where r0 is the target candidate radius, r * R is the radius obtained after interpolation, m is the specified subpixel level precision, such as 0.1, 0.5, etc., which is not limited here, E(r0) is the radial energy of the target candidate radius, and E(r0+m) and E(r0-m) are the radial energies of the radii adjacent to the target candidate radius, respectively.

[0042] Optionally, the target radius range refers to the narrow radial interval near the radius obtained after interpolation, which is used to extract the precise edge points of each sampling angle and avoid interference introduced by large-scale search. For example, if the radius obtained after interpolation is r=5.5, the target radius range can be 5.4-5.6. This is only an example.

[0043] Optionally, edge points refer to the points with the largest radial gradient response at each sampling angle. After determining the target radius range, only edge points falling within the target radius range are obtained, and polar coordinate sine fitting is performed on these edge points.

[0044] Optionally, the fitting formula for polar coordinate sine fitting is r(θ)=R+a·cosθ+b·sinθ; Where r(θ) is the edge polar radius at angle θ; R is the average radius when there is no eccentricity; a is the x-axis offset of the true center of the circle relative to the origin; and b is the y-axis offset of the true center of the circle relative to the origin.

[0045] Optionally, the average radius R obtained after fitting without eccentricity is used as the initial sub-pixel radius, and the initial circle center is corrected according to the x-axis offset and y-axis offset to obtain the corrected circle center.

[0046] S140. Based on the updated polar coordinate image, re-establish the radial energy curve, and determine the target sub-pixel radius based on the updated polar coordinate image and the newly established radial energy curve.

[0047] Optionally, the method for establishing the radial energy curve based on the updated polar coordinate image is exactly the same as the method for establishing the radial energy curve based on the polar coordinate image in step S120, and will not be described in detail here.

[0048] The advantage of this setting is that it allows for the reconstruction of the polar coordinate image using the corrected center, which can further reduce the impact of initial center estimation error, discrete sampling error, and local edge inhomogeneity on the final hole diameter measurement result.

[0049] Optionally, the method for determining the target subpixel radius based on the updated polar coordinate image and the newly established radial energy curve is completely consistent with the method for obtaining the initial subpixel radius in step S130. The radius R obtained by fitting the updated polar coordinate image and the newly established radial energy curve in the same way as in step S130 is the target subpixel radius.

[0050] Furthermore, according to step S130, after fitting, the x-axis offset and y-axis offset can be obtained. The center of the correction circle is further corrected based on the x-axis offset and y-axis offset to obtain the target center. Then, the detection result can be generated by combining the target center, the target sub-pixel radius and other information obtained during the detection process. The detection result is then visualized and annotated in the product image or the image of the hole diameter to be tested.

[0051] S150. Determine the actual hole diameter based on the target sub-pixel radius and the actual presser foot extension distance, and adjust the hole-making parameters based on the actual hole diameter and the standard hole diameter.

[0052] Optionally, the socket diameter measurement value can be obtained by converting the target subpixel radius, and the socket diameter measurement value can be corrected according to the actual presser foot extension distance to determine the actual socket diameter.

[0053] Optionally, the actual presser foot extension distance refers to the actual extension length of the presser foot in the hole-making device at the end of the robot.

[0054] Optionally, the actual die diameter refers to the true physical size of the die diameter under the current working conditions after compensation for the presser foot position, while the standard die diameter refers to the target die diameter size required by the process.

[0055] The process of determining the actual notch diameter based on the target sub-pixel radius and the actual presser foot extension distance, and adjusting the hole-making parameters based on the actual notch diameter and the standard notch diameter, may include: Based on the target subpixel radius and camera calibration parameters, the measured value of the notch diameter is determined, and the measured value of the notch diameter is compensated based on the actual presser foot extension distance and the standard presser foot extension distance to determine the actual notch diameter; Based on the actual and standard notch diameters, determine the notch diameter deviation, determine the hole-making parameter compensation based on the notch diameter deviation, and adjust the hole-making parameters based on the hole-making parameter compensation.

[0056] Optionally, camera calibration parameters can refer to intrinsic parameters obtained through camera calibration, including pixel equivalent, focal length, distortion coefficient, etc. Based on the camera calibration parameters, the target subpixel radius can be converted from pixel size to physical size to obtain the hole diameter measurement value.

[0057] Optionally, in actual production, the presser foot extension distance will change with the workpiece surface height, causing the camera object distance to deviate from the calibration reference, the imaging magnification to change, and the socket diameter measurement value to have systematic errors. Therefore, the socket diameter measurement value can be compensated according to the difference between the actual extension distance and the standard presser foot extension distance, based on the preset pose and magnification correction relationship, to obtain the actual socket diameter under the current working conditions.

[0058] Optionally, the hole diameter deviation refers to the difference between the actual hole diameter and the standard hole diameter. Based on the pre-calibrated hole-making parameter conversion ratio, the hole diameter deviation is converted into a hole-making parameter compensation amount, and the initial hole-making parameters are compensated. The compensated hole-making parameters can ensure that the hole diameter of subsequent holes meets the process requirements.

[0059] Optionally, the hole-making parameters may include, but are not limited to, tool feed rate and machining depth.

[0060] The technical solution of this invention acquires an image of the diameter of the hole to be measured and an initial center, and converts the image of the diameter of the hole to be measured into a polar coordinate image based on the initial center. A radial energy curve is established based on the polar coordinate image. An initial subpixel radius and a correction center are determined based on the polar coordinate image and the radial energy curve, and the polar coordinate image is updated based on the correction center. A new radial energy curve is established based on the updated polar coordinate image, and the target subpixel radius is determined based on the updated polar coordinate image and the newly established radial energy curve. The actual diameter of the hole is determined based on the target subpixel radius and the actual presser foot extension distance. The drilling parameters are adjusted based on the actual diameter and the standard diameter. This method can accurately identify the size of the hole diameter based on image processing, avoiding errors from manual measurement. It is suitable for special processing environments where frequent measurement is difficult. Through multiple calibrations, accurate hole diameter measurements can be obtained, improving the accuracy of hole diameter detection, reducing the false detection rate, and automatically adjusting drilling parameters based on the hole diameter measurement results, thereby significantly improving the accuracy and efficiency of hole drilling.

[0061] Example 2 Figure 2 This is a flowchart of a method for adjusting hole-making parameters according to Embodiment 2 of the present invention. Based on the above embodiments, this embodiment specifically describes a method for selecting a target candidate radius from candidate radii. For example... Figure 2 As shown, the method includes: S210. Convert the product image captured by the camera at the calibrated position into a grayscale image, determine the region of interest in the grayscale image, and use the image of the region of interest as the image of the diameter to be measured.

[0062] The product image contains a circular feature representing the diameter of the socket to be measured.

[0063] S220. Determine the initial center of the circle based on the image of the diameter of the pore to be measured.

[0064] S230. Using the initial center of the circle as the origin of the polar coordinate transformation, convert the image of the diameter of the pit to be measured into a polar coordinate image.

[0065] S240. Smooth the polar coordinate image along the radial direction, and determine the radial gradient response of each sampling radius at each sampling angle in the smoothed polar coordinate image.

[0066] S250. Based on the radial gradient response of each sampling radius at each sampling angle, calculate the radial energy of each sampling radius and establish the radial energy curve.

[0067] S260. Smooth the radial energy curve and obtain the candidate radius corresponding to each effective peak in the smoothed radial energy curve.

[0068] S270. Perform multiple rounds of screening on the candidate radii to obtain the target candidate radius.

[0069] The process of performing multiple rounds of screening on candidate radii to obtain the target candidate radius may include: Based on the maximum radial energy in the radial energy curve, determine the radial energy threshold and determine whether the number of candidate radii exceeds the preset upper limit of the number of candidates; If so, then only the candidate radius with the highest radial energy is retained in each radius neighborhood window, and the process is returned to re-evaluate whether the number of candidate radii exceeds the preset upper limit of the number of candidates; If not, then determine the first candidate radius whose radial energy is higher than the radial energy threshold from the currently retained candidate radii; Obtain the candidate circle corresponding to each first candidate radius, and verify the edge integrity and radius stability of each candidate circle. Based on the verification results, determine the target candidate radius among each first candidate radius.

[0070] Optionally, the radial energy threshold refers to a proportional threshold set based on the global maximum energy value, used to eliminate weak spurious peaks with excessively low energy or generated by random noise. For example, if the maximum energy in the radial energy curve is Emax and the preset proportion is 80%, then the product result is the radial energy threshold.

[0071] Optionally, the upper limit of the number of candidates is a preset maximum number of candidate radii, which is used to limit the candidate size and avoid invalid calculations. If the number of candidate radii initially determined exceeds the upper limit of the number of candidates, the candidate radii are screened out by means of radius neighborhood non-maximum suppression.

[0072] Specifically, within a set radius neighborhood window, only the candidate radius with the highest energy is retained, thereby eliminating duplicate peaks that are too close and preventing the same circle from being detected multiple times.

[0073] Optionally, when the number of candidate radii is less than the upper limit of the number of candidates, candidate radii below the radial energy threshold are further screened out, and candidate radii with radial energy above the radial energy threshold are determined as the first candidate radii.

[0074] Furthermore, the edge integrity and radius stability of the candidate circles corresponding to each first candidate radius are determined, and a score is generated. The first candidate radius with the highest score is determined as the target candidate radius.

[0075] Optionally, edge integrity can represent the coverage ratio of effective edges on the candidate circumference; radius stability can represent the degree of dispersion of the edge point to the first candidate radius.

[0076] The advantage of this setup is that, through multi-level peak filtering, it is possible to reliably distinguish between real aperture edges and false features in complex industrial scenarios, thus avoiding false detections.

[0077] Furthermore, the edge integrity and radius stability of each candidate circle are verified separately. Based on the verification results, the target candidate radius is determined from each first candidate radius, which may include: The associated region of the candidate circle is determined based on the first candidate radius, and multiple edge points are determined within the associated region of the candidate circle. The edge integrity is determined based on the number of edge points, and the radius stability is determined based on the radius corresponding to each edge point. Based on edge integrity and radius stability, the score of the first candidate radius is determined, and the first candidate radius with the highest score is determined as the target candidate radius.

[0078] Optionally, the associated region of the candidate circle refers to a radially narrow band region centered on the first candidate radius. For example, the interval of ±5 pixels of the first candidate radius can be taken as the associated region of the candidate circle.

[0079] Optionally, determine whether the edge point of each sampling angle is within the associated region of the candidate circle. If so, obtain the radius corresponding to the edge point; otherwise, proceed to the next sampling angle to continue determining the edge point.

[0080] Optionally, the quotient of the number of edge points in the associated region to the total sampling angle can be calculated, and the result can be used as the edge integrity; the standard deviation of the radius corresponding to each edge point in the associated region can be calculated, and the standard deviation result can be used as the radius stability.

[0081] Furthermore, the edge integrity and radius stability are normalized, and the score of the first candidate radius is obtained by weighted calculation after normalization.

[0082] S280. Determine the target radius range based on the target candidate radius, and identify the edge points at each sampling angle within the target radius range in the polar coordinate image.

[0083] S290. Perform polar coordinate sine fitting on each edge point, determine the radius of the fitted circle as the initial sub-pixel radius, and determine the corrected circle center based on the fitting result.

[0084] S2100. Update the polar coordinate image based on the corrected center.

[0085] S2110. Based on the updated polar coordinate image, re-establish the radial energy curve, and determine the target sub-pixel radius based on the updated polar coordinate image and the newly established radial energy curve.

[0086] S2120. Based on the target subpixel radius and camera calibration parameters, determine the measured value of the socket diameter, and compensate for the measured value of the socket diameter based on the actual presser foot extension distance and the standard presser foot extension distance to determine the actual socket diameter.

[0087] S2130. Determine the diameter deviation based on the actual diameter and the standard diameter, and determine the hole-making parameter compensation based on the diameter deviation. Adjust the hole-making parameters according to the hole-making parameter compensation.

[0088] The technical solution of this invention acquires an image of the diameter of the hole to be measured and an initial center, and converts the image of the diameter of the hole to be measured into a polar coordinate image based on the initial center. A radial energy curve is established based on the polar coordinate image. An initial subpixel radius and a correction center are determined based on the polar coordinate image and the radial energy curve, and the polar coordinate image is updated based on the correction center. A new radial energy curve is established based on the updated polar coordinate image, and the target subpixel radius is determined based on the updated polar coordinate image and the newly established radial energy curve. The actual diameter of the hole is determined based on the target subpixel radius and the actual presser foot extension distance. The drilling parameters are adjusted based on the actual diameter and the standard diameter. This method can accurately identify the size of the hole diameter based on image processing, avoiding errors from manual measurement. It is suitable for special processing environments where frequent measurement is difficult. Through multiple calibrations, accurate hole diameter measurements can be obtained, improving the accuracy of hole diameter detection, reducing the false detection rate, and automatically adjusting drilling parameters based on the hole diameter measurement results, thereby significantly improving the accuracy and efficiency of hole drilling.

[0089] Example 3 Figure 3 This is a schematic diagram of a hole-making parameter adjustment device provided in Embodiment 3 of the present invention. Figure 3 As shown, the device includes: a polar coordinate image generation module 310, a radial energy curve establishment module 320, a polar coordinate image correction module 330, a target subpixel radius determination module 340, and a hole-making parameter adjustment module 350.

[0090] The polar coordinate image generation module 310 is used to acquire the image of the diameter of the pit to be measured and the initial center, and convert the image of the diameter of the pit to be measured into a polar coordinate image based on the initial center.

[0091] Radial energy curve establishment module 320 is used to establish a radial energy curve based on the polar coordinate image.

[0092] The polar coordinate image correction module 330 is used to determine the initial subpixel radius and the correction center based on the polar coordinate image and the radial energy curve, and to update the polar coordinate image based on the correction center.

[0093] The target subpixel radius determination module 340 is used to re-establish the radial energy curve based on the updated polar coordinate image, and determine the target subpixel radius based on the updated polar coordinate image and the newly established radial energy curve.

[0094] The hole-making parameter adjustment module 350 is used to determine the actual hole diameter based on the target sub-pixel radius and the actual presser foot extension distance, and to adjust the hole-making parameters based on the actual hole diameter and the standard hole diameter.

[0095] The technical solution of this invention acquires an image of the diameter of the hole to be measured and an initial center, and converts the image of the diameter of the hole to be measured into a polar coordinate image based on the initial center. A radial energy curve is established based on the polar coordinate image. An initial subpixel radius and a correction center are determined based on the polar coordinate image and the radial energy curve, and the polar coordinate image is updated based on the correction center. A new radial energy curve is established based on the updated polar coordinate image, and the target subpixel radius is determined based on the updated polar coordinate image and the newly established radial energy curve. The actual diameter of the hole is determined based on the target subpixel radius and the actual presser foot extension distance. The drilling parameters are adjusted based on the actual diameter and the standard diameter. This method can accurately identify the size of the hole diameter based on image processing, avoiding errors from manual measurement. It is suitable for special processing environments where frequent measurement is difficult. Through multiple calibrations, accurate hole diameter measurements can be obtained, improving the accuracy of hole diameter detection, reducing the false detection rate, and automatically adjusting drilling parameters based on the hole diameter measurement results, thereby significantly improving the accuracy and efficiency of hole drilling.

[0096] Based on the above embodiments, the polar coordinate image generation module 310 can be specifically used for: The product image captured by the camera at the calibrated position is converted into a grayscale image, and the region of interest is determined in the grayscale image. The image of the region of interest is used as the image of the dimple diameter to be measured. The product image contains the circular feature of the dimple diameter to be measured. Determine the initial center of the circle based on the image of the diameter of the depression to be measured; Using the initial circle center as the origin of the polar coordinate transformation, the image of the pit diameter to be measured is converted into a polar coordinate image.

[0097] Based on the above embodiments, the radial energy curve establishment module 320 can be specifically used for: The polar coordinate image is smoothed along the radial direction, and the radial gradient response of each sampling radius at each sampling angle is determined in the smoothed polar coordinate image. Based on the radial gradient response of each sampling radius at each sampling angle, the radial energy of each sampling radius is calculated and a radial energy curve is established; wherein, the horizontal axis of the radial energy curve is the radius and the vertical axis is the radial energy.

[0098] Based on the above embodiments, the polar coordinate image correction module 330 may include: The candidate radius acquisition unit is used to smooth the radial energy curve and obtain the candidate radius corresponding to each effective peak in the smoothed radial energy curve. The target candidate radius determination unit is used to perform multiple rounds of screening on the candidate radii to obtain the target candidate radius; An edge point recognition unit is used to determine the target radius range based on the target candidate radius, and to identify edge points at each sampling angle within the target radius range in the polar coordinate image; The circle fitting unit is used to perform polar coordinate sine fitting based on each edge point, determine the radius of the fitted circle as the initial sub-pixel radius, and determine the corrected circle center based on the fitting result.

[0099] Based on the above embodiments, the target candidate radius determination unit can be specifically used for: Based on the maximum radial energy in the radial energy curve, determine the radial energy threshold and determine whether the number of candidate radii exceeds the preset upper limit of the number of candidates; If so, then only the candidate radius with the highest radial energy is retained in each radius neighborhood window, and the process is returned to re-evaluate whether the number of candidate radii exceeds the preset upper limit of the number of candidates; If not, then determine the first candidate radius whose radial energy is higher than the radial energy threshold from the currently retained candidate radii; Obtain the candidate circle corresponding to each first candidate radius, and verify the edge integrity and radius stability of each candidate circle. Based on the verification results, determine the target candidate radius among each first candidate radius.

[0100] Based on the above embodiments, the target candidate radius determination unit can be further specifically used for: The associated region of the candidate circle is determined based on the first candidate radius, and multiple edge points are determined within the associated region of the candidate circle. The edge integrity is determined based on the number of edge points, and the radius stability is determined based on the radius corresponding to each edge point. Based on edge integrity and radius stability, the score of the first candidate radius is determined, and the first candidate radius with the highest score is determined as the target candidate radius.

[0101] Based on the above embodiments, the hole-making parameter adjustment module 350 can be specifically used for: Based on the target subpixel radius and camera calibration parameters, the measured value of the notch diameter is determined, and the measured value of the notch diameter is compensated based on the actual presser foot extension distance and the standard presser foot extension distance to determine the actual notch diameter; Based on the actual and standard notch diameters, determine the notch diameter deviation, determine the hole-making parameter compensation based on the notch diameter deviation, and adjust the hole-making parameters based on the hole-making parameter compensation.

[0102] The hole-making parameter adjustment device provided in this embodiment of the invention can execute the hole-making parameter adjustment method provided in any embodiment of the invention, and has the corresponding functional modules and beneficial effects of the method.

[0103] Example 4 Figure 4 A schematic diagram of an electronic device 10, which can be used to implement embodiments of the present invention, is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processors, cellular phones, smartphones, wearable devices (e.g., helmets, glasses, watches, etc.), and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the invention described and / or claimed herein.

[0104] like Figure 4 As shown, the electronic device 10 includes at least one processor 11 and a memory, such as a read-only memory (ROM) 12 or a random access memory (RAM) 13, communicatively connected to the at least one processor 11. The memory stores computer programs executable by the at least one processor. The processor 11 can perform various appropriate actions and processes based on the computer program stored in the ROM 12 or loaded from storage unit 18 into the RAM 13. The RAM 13 can also store various programs and data required for the operation of the electronic device 10. The processor 11, ROM 12, and RAM 13 are interconnected via a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.

[0105] Multiple components in electronic device 10 are connected to I / O interface 15, including: input unit 16, such as keyboard, mouse, etc.; output unit 17, such as various types of displays, speakers, etc.; storage unit 18, such as disk, optical disk, etc.; and communication unit 19, such as network card, modem, wireless transceiver, etc. Communication unit 19 allows electronic device 10 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks.

[0106] Processor 11 can be various general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of processor 11 include, but are not limited to, central processing unit (CPU), graphics processing unit (GPU), various special-purpose artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, digital signal processors (DSPs), and any suitable processor, controller, microcontroller, etc. Processor 11 performs the various methods and processes described above, such as the hole parameter adjustment method described in the embodiments of the present invention. That is: Obtain the image of the pit diameter to be measured and the initial center, and convert the image of the pit diameter to be measured into a polar coordinate image based on the initial center; Based on the polar coordinate image, a radial energy curve is established; Based on the polar coordinate image and the radial energy curve, the initial subpixel radius and the correction center are determined, and the polar coordinate image is updated based on the correction center. Based on the updated polar coordinate image, the radial energy curve is re-established, and the target subpixel radius is determined based on the updated polar coordinate image and the newly established radial energy curve. The actual hole diameter is determined based on the target subpixel radius and the actual presser foot extension distance, and the hole-making parameters are adjusted based on the actual hole diameter and the standard hole diameter.

[0107] In some embodiments, the method for adjusting the drilling parameters may be implemented as a computer program tangibly contained in a computer-readable storage medium, such as storage unit 18. In some embodiments, part or all of the computer program may be loaded and / or installed on electronic device 10 via ROM 12 and / or communication unit 19. When the computer program is loaded into RAM 13 and executed by processor 11, one or more steps of the drilling parameter adjustment method described above may be performed. Alternatively, in other embodiments, processor 11 may be configured to perform the drilling parameter adjustment method by any other suitable means (e.g., by means of firmware).

[0108] Various embodiments of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field-programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standard products (ASSPs), system-on-a-chip (SoCs), complex programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments may include implementations in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which may be a dedicated or general-purpose programmable processor, capable of receiving data and instructions from a storage system, at least one input device, and at least one output device, and transmitting data and instructions to the storage system, the at least one input device, and the at least one output device.

[0109] Computer programs used to implement the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, such that when executed by the processor, the computer programs cause the functions / operations specified in the flowcharts and / or block diagrams to be performed. The computer programs may be executed entirely on a machine, partially on a machine, or as a standalone software package, partially on a machine and partially on a remote machine, or entirely on a remote machine or server.

[0110] In the context of this invention, a computer-readable storage medium can be a tangible medium that may contain or store a computer program for use by or in conjunction with an instruction execution system, apparatus, or device. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination thereof. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fibers, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof.

[0111] To provide interaction with a user, the systems and techniques described herein can be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user provides input to the electronic device. Other types of devices can also be used to provide interaction with the user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including sound input, voice input, or tactile input).

[0112] The systems and technologies described herein can be implemented in computing systems that include backend components (e.g., as data servers), or middleware components (e.g., application servers), or frontend components (e.g., user computers with graphical user interfaces or web browsers through which users can interact with implementations of the systems and technologies described herein), or any combination of such backend, middleware, or frontend components. The components of the system can be interconnected via digital data communication of any form or medium (e.g., communication networks). Examples of communication networks include local area networks (LANs), wide area networks (WANs), blockchain networks, and the Internet.

[0113] A computing system can include clients and servers. Clients and servers are generally located far apart and typically interact through communication networks. The client-server relationship is created by computer programs running on the respective computers and having a client-server relationship with each other. The server can be a cloud server, also known as a cloud computing server or cloud host, which is a hosting product within the cloud computing service system to address the shortcomings of traditional physical hosts and VPS services, such as high management difficulty and weak business scalability.

[0114] It should be understood that the various forms of processes shown above can be used, with steps reordered, added, or deleted. For example, the steps described in this invention can be executed in parallel, sequentially, or in different orders, as long as the desired result of the technical solution of this invention can be achieved, and this is not limited herein.

[0115] The specific embodiments described above do not constitute a limitation on the scope of protection of this invention. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this invention should be included within the scope of protection of this invention.

Claims

1. A method for adjusting hole-making parameters, characterized in that, include: Obtain the image of the pit diameter to be measured and the initial center, and convert the image of the pit diameter to be measured into a polar coordinate image based on the initial center; Based on the polar coordinate image, a radial energy curve is established; Based on the polar coordinate image and the radial energy curve, the initial subpixel radius and the correction center are determined, and the polar coordinate image is updated based on the correction center. Based on the updated polar coordinate image, the radial energy curve is re-established, and the target subpixel radius is determined based on the updated polar coordinate image and the newly established radial energy curve. The actual hole diameter is determined based on the target subpixel radius and the actual presser foot extension distance, and the hole-making parameters are adjusted based on the actual hole diameter and the standard hole diameter.

2. The method according to claim 1, characterized in that, Acquire the image of the pit diameter to be measured and the initial center, and convert the image of the pit diameter to be measured into a polar coordinate image based on the initial center, including: The product image captured by the camera at the calibrated position is converted into a grayscale image, and the region of interest is determined in the grayscale image. The image of the region of interest is used as the image of the dimple diameter to be measured. The product image contains the circular feature of the dimple diameter to be measured. Determine the initial center of the circle based on the image of the diameter of the depression to be measured; Using the initial circle center as the origin of the polar coordinate transformation, the image of the pit diameter to be measured is converted into a polar coordinate image.

3. The method according to claim 1, characterized in that, Based on the polar coordinate image, a radial energy curve is established, including: The polar coordinate image is smoothed along the radial direction, and the radial gradient response of each sampling radius at each sampling angle is determined in the smoothed polar coordinate image. Based on the radial gradient response of each sampling radius at each sampling angle, the radial energy of each sampling radius is calculated and a radial energy curve is established; wherein, the horizontal axis of the radial energy curve is the radius and the vertical axis is the radial energy.

4. The method according to claim 1, characterized in that, Based on the polar coordinate image and the radial energy curve, the initial sub-pixel radius and the corrected center are determined, including: The radial energy curve is smoothed, and the candidate radii corresponding to each effective peak are obtained from the smoothed radial energy curve. The candidate radii are filtered in multiple rounds to obtain the target candidate radius; The target radius range is determined based on the candidate target radius, and edge points at each sampling angle within the target radius range are identified in the polar coordinate image. Polar coordinate sine fitting is performed on each edge point, and the radius of the fitted circle is determined as the initial sub-pixel radius. The center of the corrected circle is determined based on the fitting result.

5. The method according to claim 4, characterized in that, The candidate radii are filtered through multiple rounds to obtain the target candidate radius, including: Based on the maximum radial energy in the radial energy curve, determine the radial energy threshold and determine whether the number of candidate radii exceeds the preset upper limit of the number of candidates; If so, then only the candidate radius with the highest radial energy is retained in each radius neighborhood window, and the process is returned to re-evaluate whether the number of candidate radii exceeds the preset upper limit of the number of candidates; If not, then determine the first candidate radius whose radial energy is higher than the radial energy threshold from the currently retained candidate radii; Obtain the candidate circle corresponding to each first candidate radius, and verify the edge integrity and radius stability of each candidate circle. Based on the verification results, determine the target candidate radius among each first candidate radius.

6. The method according to claim 5, characterized in that, For each candidate circle, the edge integrity and radius stability are verified. Based on the verification results, the target candidate radius is determined from each first candidate radius, including: The associated region of the candidate circle is determined based on the first candidate radius, and multiple edge points are determined within the associated region of the candidate circle. The edge integrity is determined based on the number of edge points, and the radius stability is determined based on the radius corresponding to each edge point. Based on edge integrity and radius stability, the score of the first candidate radius is determined, and the first candidate radius with the highest score is determined as the target candidate radius.

7. The method according to claim 1, characterized in that, Based on the target sub-pixel radius and the actual presser foot extension distance, the actual notch diameter is determined, and the hole-making parameters are adjusted based on the actual notch diameter and the standard notch diameter, including: Based on the target subpixel radius and camera calibration parameters, the measured value of the notch diameter is determined, and the measured value of the notch diameter is compensated based on the actual presser foot extension distance and the standard presser foot extension distance to determine the actual notch diameter; Based on the actual and standard notch diameters, determine the notch diameter deviation, determine the hole-making parameter compensation based on the notch diameter deviation, and adjust the hole-making parameters based on the hole-making parameter compensation.

8. A device for adjusting hole-making parameters, characterized in that, include: The polar coordinate image generation module is used to acquire the image of the dimple diameter to be measured and the initial center, and convert the image of the dimple diameter to be measured into a polar coordinate image based on the initial center. A radial energy curve establishment module is used to establish a radial energy curve based on the polar coordinate image; The polar coordinate image correction module is used to determine the initial subpixel radius and the correction center based on the polar coordinate image and the radial energy curve, and to update the polar coordinate image based on the correction center. The target subpixel radius determination module is used to re-establish the radial energy curve based on the updated polar coordinate image, and determine the target subpixel radius based on the updated polar coordinate image and the newly established radial energy curve. The hole-making parameter adjustment module is used to determine the actual hole diameter based on the target sub-pixel radius and the actual presser foot extension distance, and to adjust the hole-making parameters based on the actual hole diameter and the standard hole diameter.

9. An electronic device, characterized in that, The electronic device includes: At least one processor; and A memory communicatively connected to the at least one processor; wherein, The memory stores a computer program executable by the at least one processor, which enables the at least one processor to perform the method for adjusting the hole-making parameters according to any one of claims 1-7.

10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer instructions that, when executed by a processor, implement the method for adjusting the hole-making parameters according to any one of claims 1-7.