A method, apparatus, storage medium, and electronic device for evaluating the quality of multi-hole machining.
By merging and cropping the digital projection images of the target parts in two dimensions, and using the area intersection-union ratio to evaluate the hole machining quality, the problem of low quality assessment level of group hole machining in the existing technology is solved, and efficient and accurate quality assessment is achieved, supporting the intelligent transformation and upgrading of aerospace manufacturing enterprises.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-09-11
- Publication Date
- 2026-03-06
AI Technical Summary
The current technology has a low level of quality assessment for multi-hole processing. Manual inspection methods cannot meet the needs of efficient and high-speed real-time inspection, resulting in reduced inspection reliability and failing to meet the needs of intelligent transformation and upgrading of aerospace manufacturing enterprises.
By merging the two-dimensional projection images of the target part's digital model, cropping the feature images and the merged images, and using the area intersection-union ratio to evaluate the hole machining quality, a fast and accurate assessment of the machining quality of multiple holes can be achieved.
It achieves efficient and accurate assessment of the quality of multi-hole machining, can quickly identify abnormal hole positions, reduce quality risks, and support the intelligent transformation and upgrading of aerospace manufacturing enterprises.
Smart Images

Figure CN117350950B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of aerospace structural component processing technology, specifically to a method, apparatus, storage medium, and electronic device for evaluating the quality of multi-hole processing. Background Technology
[0002] In the field of aerospace component manufacturing, there are scenarios and demands for using multi-hole drilling to complete the machining of multiple holes. However, in actual machining processes, anomalies such as holes not being machined or incomplete machining occur, which form the basis for evaluating the quality of multi-hole machining. Currently, anomaly identification and detection are still mainly carried out manually. This type of detection method can no longer meet the needs of efficient and high-speed real-time detection. Furthermore, when dealing with multi-hole machining processes involving hundreds of thousands of holes, the reliability of manual inspection is greatly reduced, further lowering the evaluation level of multi-hole machining quality. Summary of the Invention
[0003] The main objective of this application is to provide a method, apparatus, storage medium, and electronic device for evaluating the quality of multi-hole machining, aiming to solve the problem of low evaluation level of multi-hole machining quality in the prior art.
[0004] To achieve the above objectives, the technical solutions adopted in the embodiments of this application are as follows:
[0005] In a first aspect, embodiments of this application provide a method for evaluating the quality of multi-hole machining, comprising the following steps:
[0006] A merged image is obtained by merging several digital model projection images of the target part in two dimensions; wherein, the digital model projection images are obtained based on the traversal positions on the traversal path;
[0007] The feature image and the merged image of the target part are cropped separately to obtain a feature cropped image and a merged cropped image. The feature image has hole position features, which represent the effective holes on the target part. The pixels of the hole position feature region on the feature image are the same as the pixels of the effective hole position region on the merged image.
[0008] Based on the area intersection ratio between the hole region in the merged cropped image and the feature cropped image, the hole machining quality information of the target part is obtained.
[0009] In one possible implementation of the first aspect, before cropping the feature image and the merged image of the target part to obtain the feature-cropped image and the merged-cropped image, the method for evaluating the machining quality of the group holes further includes:
[0010] The effective hole location area is obtained based on the effective hole location data on the merged image;
[0011] Perform grayscale transformation on the effective aperture region to make the pixels in the effective aperture region the same as the pixels in the aperture feature region on the feature image.
[0012] In one possible implementation of the first aspect, a merged image is obtained by merging several digital model projection images of the target part in two dimensions, including:
[0013] Matching of several digital projection images yields matching features;
[0014] Based on the matching features, the transformation structure between the digital-analog projection images obtained at adjacent traversal positions is obtained;
[0015] The transformed image is obtained by mapping the digital-analog projection image according to the transformation structure.
[0016] The transformed images are overlaid and registered, and then merged in two dimensions to obtain the merged image.
[0017] In one possible implementation of the first aspect, before cropping the feature image and the merged image of the target part to obtain the feature-cropped image and the merged-cropped image, the method for evaluating the machining quality of the group holes further includes:
[0018] Effective hole features are extracted from the original image of the target part to obtain the feature image of the target part.
[0019] In one possible implementation of the first aspect, before effectively extracting hole features from the original image of the target part to obtain a feature image of the target part, the method for evaluating the machining quality of multiple holes further includes:
[0020] The camera position is corrected so that the initial position, which has been calibrated, is close to the center of the original image based on the original image captured by the camera.
[0021] In one possible implementation of the first aspect, the camera position is corrected, including:
[0022] The distance deviation is obtained by comparing the center coordinates of the effective holes in the original image with the center of the original image.
[0023] The machine tool spindle is corrected based on the distance deviation in order to correct the position of the camera.
[0024] In one possible implementation of the first aspect, before the camera is positionally corrected so that the calibrated initial position on the original image obtained from the camera is close to the center of the original image, the method for evaluating the quality of the multi-hole machining further includes:
[0025] Obtain the valid holes at the starting position of the traversal path;
[0026] A marking strategy is used to cover the valid holes at the starting position of the traversal path to obtain the marked initial position.
[0027] Secondly, embodiments of this application provide a device for evaluating the quality of multi-hole machining, comprising:
[0028] The merging module is used to merge several digital model projection images of the target part in two dimensions to obtain a merged image; wherein, the digital model projection images are obtained based on the traversal positions on the traversal path;
[0029] The cropping module is used to crop the feature image and the merged image of the target part respectively to obtain the feature cropped image and the merged cropped image. The feature image has hole position features, which are the representation of the effective holes on the target part. The pixels of the hole position feature area on the feature image are the same as the pixels of the effective hole position area on the merged image.
[0030] The evaluation module is used to obtain hole processing quality information of the target part based on the area intersection ratio of the hole area on the merged cropped image and the feature cropped image.
[0031] Thirdly, embodiments of this application provide a computer-readable storage medium storing a computer program, which, when loaded and executed by a processor, implements the method for evaluating the quality of multi-hole machining as provided in any of the first aspects above.
[0032] Fourthly, embodiments of this application provide an electronic device, including a processor and a memory, wherein,
[0033] Memory is used to store computer programs;
[0034] The processor is used to load and execute computer programs to cause electronic devices to perform a method for evaluating the quality of hole machining as provided in any of the first aspects above.
[0035] Compared with the prior art, the beneficial effects of this application are:
[0036] This application proposes a method, apparatus, storage medium, and electronic device for evaluating the quality of hole machining. The method includes: merging several digital projection images of a target part in two dimensions to obtain a merged image; wherein the digital projection images are obtained based on traversal positions on a traversal path; cropping the feature image and the merged image of the target part respectively to obtain a feature-cropped image and a merged-cropped image; wherein the feature image has hole position features, which represent the effective holes on the target part, and the pixels of the area of the hole position features on the feature image are the same as the pixels of the effective hole position area on the merged image; and obtaining the hole machining quality information of the target part based on the area intersection-union ratio of the hole position area on the merged-cropped image and the feature-cropped image. This application merges the projected images obtained at all traversed positions in two dimensions, so that all hole positions can be presented in one image. In order to achieve the matching of the degree of overlap, the pixels of the effective hole position area on the merged image are set to be the same as the pixels of the hole position feature area on the feature image. Since the feature image and the merged image obtained based on the projected image have different scales, it is necessary to uniform the size and ensure the preservation of abnormal hole positions by cropping. Then, by the intersection and union ratio of the area of the hole position area on the merged cropped image and the feature cropped image, that is, by overlaying and comparing the feature map under the actual situation with the standard image represented by the projected image, the abnormal hole positions can be obtained quickly and accurately, thereby completing the evaluation of the processing quality of the group holes. Attached Figure Description
[0037] Figure 1 This is a schematic diagram of the electronic device structure of the hardware operating environment involved in the embodiments of this application;
[0038] Figure 2 A schematic flowchart illustrating the method for evaluating the quality of multi-hole machining provided in this application embodiment;
[0039] Figure 3 A flowchart illustrating one implementation of the method for evaluating the quality of multi-hole machining provided in this application.
[0040] Figure 4 A schematic diagram of the original image in the group hole processing quality evaluation method provided in the embodiments of this application;
[0041] Figure 5 A schematic diagram of eight directional substructures with reference to the center point of the metric matrix S in the group hole processing quality evaluation method provided in the embodiments of this application;
[0042] Figure 6 A schematic diagram showing the coordinate positions of standard holes in the group hole machining quality evaluation method provided in the embodiments of this application;
[0043] Figure 7 A schematic diagram of abnormal hole positions in the group hole processing quality evaluation method provided in the embodiments of this application;
[0044] Figure 8 A schematic diagram of the module for evaluating the quality of multi-hole machining provided in this application embodiment;
[0045] The diagram is labeled as follows: 101-Processor, 102-Communication bus, 103-Network interface, 104-User interface, 105-Memory. Detailed Implementation
[0046] It should be understood that the specific embodiments described herein are merely illustrative of this application and are not intended to limit this application.
[0047] The main solution of this application embodiment is as follows: A two-dimensional merge is performed on several digital model projection images of the target part to obtain a merged image; wherein, the digital model projection images are obtained based on the traversal positions on the traversal path; the feature images and the merged image of the target part are respectively cropped to obtain a feature cropped image and a merged cropped image; wherein, the feature image has hole position features, which represent the effective holes on the target part, and the pixels of the hole position feature region on the feature image are the same as the pixels of the effective hole position region on the merged image; the hole position processing quality information of the target part is obtained based on the area intersection-union ratio of the hole position region on the merged cropped image and the feature cropped image.
[0048] In the field of aerospace component manufacturing, there are scenarios and demands for using multi-hole drilling to complete the machining of multiple holes. However, during actual machining processes, abnormal situations such as holes not being machined or incomplete machining occur, leading to machining quality problems. These potentially defective holes may prevent parts from being properly installed and assembled, and may also cause significant quality and safety hazards and risks.
[0049] Therefore, dynamically locating and identifying abnormal areas is an effective way to reduce quality risks. However, with hundreds of thousands of holes in a group, the current method of identifying and detecting abnormalities still mainly relies on manual judgment, which greatly reduces the reliability of the detection. Furthermore, this type of detection method can no longer meet the needs of efficient and high-speed real-time detection. The evaluation level of the processing quality of the group holes is low, which seriously restricts the intelligent transformation and upgrading of aerospace manufacturing enterprises.
[0050] For the analysis of hole machining quality, the direct method is a superior approach, as it can directly obtain the state characteristic information data of the hole surface. With a reasonable algorithm design, it can achieve high-precision, efficient, and rapid hole surface quality analysis. Therefore, the rationality of the algorithm design is crucial for accurate detection and analysis. However, currently, the industry still lacks reliable detection and analysis techniques. Analysis of existing hole analysis methods shows that manual inspection remains the primary means of detection and analysis, which can no longer meet the needs of high-quality development in the industry. Hole surface characteristic data is the foundation of analysis, while reliable analysis methods are the core.
[0051] To address this, this application provides a solution that involves merging the projected images obtained at all traversed locations in two dimensions, allowing all hole positions to be presented in a single image. To achieve matching of overlap, the pixels of the effective hole position region in the merged image are set to be the same as the pixels of the hole position feature region in the feature image. Since the feature image and the merged image obtained based on the projected image have different scales, cropping is required to unify the size and ensure the retention of abnormal hole positions. Then, by comparing the area intersection and union ratio of the hole position region on the merged cropped image with that of the feature cropped image, i.e., by overlaying and comparing the feature image under actual conditions with the standard image represented by the projected image, the abnormal hole positions can be quickly and accurately obtained, thereby completing the evaluation of the processing quality of the group holes.
[0052] See attached document Figure 1 , attached Figure 1 This is a schematic diagram of the electronic device structure of the hardware operating environment involved in the embodiments of this application. The electronic device may include: a processor 101, such as a central processing unit (CPU), a communication bus 102, a user interface 104, a network interface 103, and a memory 105. The communication bus 102 is used to realize the connection and communication between these components. The user interface 104 may include a display screen and an input unit such as a keyboard. Optionally, the user interface 104 may also include a standard wired interface and a wireless interface. The network interface 103 may optionally include a standard wired interface and a wireless interface (such as a Wi-Fi interface). The memory 105 may be a storage device independent of the aforementioned processor 101. The memory 105 may be a high-speed random access memory (RAM) or a stable non-volatile memory (NVM), such as at least one disk storage device. The processor 101 may be a general-purpose processor, including a central processing unit, a network processor, etc., or it may be a digital signal processor, an application-specific integrated circuit, a field-programmable gate array or other programmable logic device, discrete gate or transistor logic device, or discrete hardware component.
[0053] Those skilled in the art will understand that the appendix Figure 1 The structure shown does not constitute a limitation on the electronic device and may include more or fewer components than shown, or combine certain components, or have different component arrangements.
[0054] As attached Figure 1As shown, the memory 105, which serves as a storage medium, may include an operating system, a network communication module, a user interface module, and a hole processing quality evaluation device.
[0055] In the appendix Figure 1 In the electronic device shown, the network interface 103 is mainly used for data communication with the network server; the user interface 104 is mainly used for data interaction with the user; the processor 101 and the memory 105 in this application can be set in the electronic device. The electronic device calls the group hole processing quality evaluation device stored in the memory 105 through the processor 101 and executes the group hole processing quality evaluation method provided in the embodiment of this application.
[0056] See attached document Figure 2 Based on the hardware device described in the foregoing embodiments, embodiments of this application provide a method for evaluating the quality of multi-hole machining, comprising the following steps:
[0057] S10: Perform two-dimensional merging of several digital model projection images of the target part to obtain a merged image; wherein, the digital model projection images are obtained based on the traversal positions on the traversal path.
[0058] In the specific implementation process, the target part is the aerospace structural component to be evaluated. The digital model projection image is equivalent to the standard image used for comparison. For different types of structural components, such as planar plates and cylindrical components, there are different ways to obtain their projection images.
[0059] For the acquisition method of the group hole projection image on the planar plate: Based on the 3D processing software, a projection image acquisition tool is developed. In the 3D digital model, the area where the image hole is located has high grayscale, the outline has low grayscale, and the background area is located between high and low grayscale. The grayscale value of each channel is the same at each point. The upper and lower edges of the planar plate are parallel to the upper and lower edges of the screen projection window. The scaling factor of the digital model along the screen direction is times to ensure that the local details of the hole can be clearly imaged in the view on the screen. Taking the drafter's perspective as the reference, the planar plate model is translated along the traversal path. In this embodiment, it is translated from left to right and from top to bottom. The translation from top to bottom should make the image after translation contain the features of the group hole image in the previous step. The step size of the translation between the two images is such that the overlapping area of the two images is greater than 1 / Ns of the total projection area. Each time the image is moved according to the step size, a traversal position is obtained, and the image in the screen direction is captured in real time and recorded as pic.
[0060] For the acquisition method of the group hole projection image of the cylindrical part: The acquisition method of the group hole projection image on the cylindrical part is as follows: Based on the 3D processing software, a projection image acquisition tool is developed. In the 3D digital model, the area where the image hole is located has high grayscale, the outline has low grayscale, and the background area is located between high and low grayscale. The grayscale value of each channel is the same at each point. The entire circumference of the cylinder is set to the range of 0°-360°. Taking any angle position as the starting point, it is regarded as 0°. The upper and lower edges of the cylinder are parallel to the upper and lower edges of the screen projection window. The scaling factor of the digital model along the screen direction is times to ensure that the view on the screen can clearly image the local details of the hole. Taking the drafter's perspective as the standard, the cylindrical part model is rotated from 0° to 360°. The angle interval between adjacent images is 1°. After rotating one revolution, it is translated from top to bottom. After translation, the translation step size of the first image and the first image corresponding to 0° is such that the overlapping area of the two images is greater than 1 / Ns of the total projection area. The image is denoted as pic.
[0061] For other types of parts, the acquisition of group hole images should meet the following requirements: clear imaging is possible; adjacent images of the last area of the previous row and the first area of the next row should not have overlapping features, meaning that holes from the same batch should appear in both the previous and next images; the area where the holes are located in the 3D digital model should have high grayscale, the outline should have low grayscale, and the background area should be located between high and low grayscale; the grayscale value of each point in each channel should be the same; at the same time, the integrity of the imaging of all holes should be met; for arc-shaped surfaces, the angle between the sampling time of the previous and subsequent images should not be too large.
[0062] In one embodiment, a merged image is obtained by merging several digital model projection images of the target part in two dimensions, including:
[0063] Matching of several digital projection images yields matching features;
[0064] Based on the matching features, the transformation structure between the digital-analog projection images obtained at adjacent traversal positions is obtained;
[0065] The transformed image is obtained by mapping the digital-analog projection image according to the transformation structure.
[0066] The transformed images are overlaid and registered, and then merged in two dimensions to obtain the merged image.
[0067] In the specific implementation process, all acquired pic projection images are merged in two dimensions, that is, all holes can be fully presented in one image. The similarity and correlation of feature points and regions of the pic images are matched. Based on the obtained matching features, the transformation structure between adjacent images is calculated. Based on the transformation structure, the images are mapped and transformed. The transformed images are superimposed and the APAP image stitching algorithm is used to perform key alignment and registration of the images. The stitching seam is obtained based on the image segmentation method, and two-dimensional merging is achieved according to the blending strategy to obtain the pic_com merged image.
[0068] S20: Crop the feature image and the merged image of the target part respectively to obtain a feature-cropped image and a merged-cropped image; wherein, the feature image has hole position features, which are representations of effective holes on the target part, and the pixels of the hole position feature region on the feature image are the same as the pixels of the effective hole position region on the merged image.
[0069] In practice, the feature image is a visual data feature that records the hole feature data, equivalent to the actual image used for comparison, as shown in the attached image. Figure 6 The image shows the effective hole location data. The point coordinates are based on the effective hole P_obj position. If a hole is identified in a local area, a solid circle is constructed using the point location and radius to obtain the feature image result_img. The grayscale value of the corresponding area is h, and the background is a solid color. That is, before obtaining the feature image and the merged image of the target part, the method for evaluating the processing quality of multiple holes also includes:
[0070] The effective hole location area is obtained based on the effective hole location data on the merged image;
[0071] Perform grayscale transformation on the effective aperture region to make the pixels in the effective aperture region the same as the pixels in the aperture feature region on the feature image.
[0072] Based on the corresponding points of the top left, bottom left, top right, and bottom right corners of the images pic_com and result_img, rectangular regions are cropped from each image pic_com and result_img respectively. The cropped data are denoted as the merged cropped image Cp and the feature cropped image Cr respectively. Image Cr is subjected to equal-scale ratio scaling transformation in the X and Y axes so that the size of the processed image is consistent with that of Cp.
[0073] S30: Obtain the hole processing quality information of the target part based on the area intersection ratio of the hole area on the merged cropped image and the feature cropped image.
[0074] In the specific implementation process, based on the image Cp, the Cr image is overlaid on Cp, and the intersection over union ratio IOU(num) = U_size(num) / (HOLECp(num) + HOLECr(num)) between the area of all holes contained in Cp and Cr is directly calculated. If the IOU(num) of a single hole < Tiou, then IOU(num) is set to zero; otherwise, it is set to one. Here, U_size(num) represents the intersection area, and num represents the number of holes contained in Cp. The sum of the IOU(num) obtained for each hole in Cp is accumulated and denoted as sum(num). If num ≠ sum(num), it indicates that there are quality problems in the processed group of holes; otherwise, there are no quality problems. Based on the coordinates of the holes in Cp, the holes with abnormal processing quality can be accurately positioned, and the corresponding data can be reflected onto the original image N_org to achieve real-time dynamic display, as Figure 7 shown, which is conducive to the rapid and accurate re-inspection by inspectors.
[0075] In this embodiment, by performing two-dimensional merging on the projection images obtained at all traversed positions, all hole positions can be presented in a single image. To achieve the matching of the coincidence degree, the pixels of the effective hole position area on the merged image are set to be the same as the pixels of the hole position feature area on the feature image. Since the scales of the feature image and the merged image obtained based on the projection image are different, it is necessary to unify the dimensions through cropping and ensure the retention of abnormal hole positions. Then, by calculating the intersection over union ratio of the hole position area on the merged cropped image and the feature cropped image, that is, by overlapping and comparing the feature map in the actual situation with the standard image represented by the projection image, the hole positions with abnormalities can be obtained quickly and accurately to complete the evaluation of the processing quality of the group of holes.
[0076] In one embodiment, before cropping the feature image and the merged image of the target part to obtain the feature cropped image and the merged cropped image, the method for evaluating the processing quality of the group of holes further includes:
[0077] Extract the effective hole features from the original image of the target part to obtain the feature image of the target part.
[0078] In the specific implementation process, a camera fixed on the machine tool spindle is used to obtain clear image data of the group of holes on the surface of the processed part (applicable to flat plate parts, circular arc parts, etc.), that is, the original image, as Figure 4As shown, denoted as I_org, the image acquisition method is designed as follows: the imaging optical axis of the camera lens is perpendicular to the surface of the holes; the camera resolution remains unchanged during image acquisition; the brightness and color of the light source do not change drastically; the camera's intrinsic parameters are fixed and remain unchanged; there is no spatial interference between the imaging device such as the lens and the test piece containing the holes; the distance from the lens to the virtual plane where the test piece is located remains relatively constant; the camera has a large depth of field to ensure clear imaging; diffuse reflection global unidirectional lighting is used; at the same time, the upper left corner of the first acquired image, i.e., the starting position of the traversal path, contains the complete hole features (i.e., the image does not contain local hole features); the first imaging area is located at the upper left corner of the hole area of the workpiece; if the workpiece is an arc structure, the area is located at the edge of the hole area on the upper side of the workpiece; the entire imaging device is installed on the machine tool spindle.
[0079] In one embodiment, before extracting effective hole features from the original image of the target part to obtain the feature image of the target part, the method for evaluating the quality of hole processing further includes:
[0080] The camera position is corrected so that the initial position, which has been calibrated, is close to the center of the original image based on the original image captured by the camera.
[0081] In practice, to ensure that the effective aperture position calibrated in image N_org is closer to the geometric center of the image, the camera position needs to be corrected. (See attached diagram.) Figure 3 The initial position calibration method is as follows: The hole with complete features corresponding to the upper left corner of the initially acquired image I_org is selected as the calibration hole. A circular marking strategy (denoted as l_c) is used to cover the entire hole area, and the radius of the corresponding marking circle is greater than one unit pixel length from the hole center to the outer edge of the hole area. A square (rectangular calibration) calibration strategy is used to cover the entire hole area, while the hole edge contour is located inside the square calibration frame (denoted as l_r). That is, before the camera position is corrected so that the calibrated initial position on the original image obtained by the camera is close to the center of the original image, the group hole processing quality evaluation method also includes:
[0082] Obtain the valid holes at the starting position of the traversal path;
[0083] A marking strategy is used to cover the valid holes at the starting position of the traversal path to obtain the marked initial position. Specifically:
[0084] Specifically, the camera correction method is as follows: Predefined feature data is acquired to determine the initial calibration deviation. The method for acquiring the predefined feature data is as follows: using the data corresponding to the circular marker result l_c as the label, the regions in image I_org that are not circular marker results l_c undergo color transformation, with the color values of each channel directly set to zero. The color values of the regions within the marker results remain unchanged. The calibration aperture center coordinates uj are obtained based on the following formula:
[0085]
[0086] Where j represents the corresponding hole center number; x(i) represents the coordinates of the point that satisfies the condition, specifically the point located inside the circular marking result l_c. Based on the calculation of uj and l_c, the specific value of u1 is obtained, where u1 represents the hole center coordinate value of the calibrated hole in the global image I_org, and is also the obtained standardized feature data Fu. At the same time, the hole data of the corresponding region extracted from I_org based on the circular marking strategy l_c is also regarded as standardized feature data Fi.
[0087] Calculate the distance deviations between u1 and the geometric center of image I_org on the X and Y axes, i.e., I_org.x - u1.x is the corresponding x-deviation, and I_org.y - u1.y is the corresponding y-deviation. Based on the obtained deviation values and combined with the physical length represented by each pixel, obtain the corresponding numerical value V(x,y) on the two-dimensional plane. Transmit the V(x,y) value to the machine tool to correct the spindle, minimizing the deviation between the camera's geometric axis and the initially calibrated hole position. Based on the corrected camera position, re-acquire the group hole image. The calibrated position P_obj in the newly acquired image is closer to the center of image N_org, which can significantly reduce the problem of target hole position loss during dynamic positioning analysis. Arbitrarily extract a grayscale channel from image N_org to represent its feature image, and the corresponding grayscale result is reassigned to N_org with a single channel.
[0088] Since the location of P_obj, calibrated in the corrected image N_org, is only approximate (close to the geometric center of the image), but its exact coordinates are unknown, it is necessary to determine and identify effective aperture features. The method for determining effective aperture features is based on the formula... Remove local low-grayscale regions in the low-grayscale region N_org, where C represents the set of pixels in image N_org, and D represents the constructed structure for removing low-grayscale regions. Let (D)e represent the removal operation, where (D)e represents the set of points in structure D whose coordinates (x, y) are replaced by (x+e1, y+e2), e1 and e2 represent the translation distances on the X and Y axes, respectively, and Cs is the complement of C. This indicates that the value is not empty; the result of the previous step is also based on the formula. The N_org parameter is processed to handle the local low-grayscale features of N_org. Represents the reflection of set D; based on the formula Remove locally high grayscale regions in the low N_org; design a local region correlation metric S, where S can be represented by a matrix with the same number of rows and columns, and an odd number n. The value of n is greater than the diameter of the region represented by the hole in the image. With the center point of the metric matrix S as a reference, there are eight directional substructures: 0°, 45°, 90°, 135°, 180°, 225°, 270°, and 315°. Figure 5 As shown.
[0089] The correlation metric S slides across the image N_org. Initially, the top-left corner of S is aligned with the top-left corner of image N_org. It slides from left to right and from top to bottom, with a step size of one pixel. The coordinates of the center point of the metric matrix S across eight corresponding points in eight directions and their corresponding grayscale values in image N_org are recorded, denoted as data(i,j,h), where i represents the X-axis direction (horizontal to the right), j represents the Y-axis direction (vertical downward), and h represents the grayscale value. Based on the obtained data(i,j,h), a feature image I is drawn. The drawn I_fe has the characteristic that the number of columns in the image is equal to half of n. Each row records points in the sub-direction whose distance from the center point gradually increases from left to right. The gray value of the corresponding point in I_fe corresponds to the h value. Obtain the gray values of all points in the n / 2±k columns of the image I_fe, where m represents the total number of columns. Calculate the mean Vave(m) and variance Vdiv(m) of the values in each column. Statistically calculate the mean Vave-in and variance Vdiv-in of the gray values corresponding to the hole region, and the Vave-on and variance Vdiv-on of the gray values corresponding to the hole contour region.
[0090] Simultaneously, the thresholds Tave and Tdiv are statistically obtained; the mean Vave(m) and variance Vdiv(m) of m groups are compared. If the corresponding m columns satisfy |Vave(m)-Vave-in|≤Tave and |Vdiv(m)-Vdiv-in|≤Tdiv, and the m+1 column satisfies |Vave(m+1)-Vave-in|≤Tave and |Vdiv(m+1)-Vdiv-in|≤Tdiv, or the m+2 column satisfies |Vave(m+2)-Vave-in|≤Tave and |Vdiv(m+2)-Vdiv-in|≤Tdiv, then the point (i,j) corresponding to data(i,j,h) is the coordinate of the hole center. All data in the data are processed in the same way, and the judgment is performed to obtain the coordinate data C(i,j) of the hole center in the image N_org for all holes. The corresponding data C(i,j) is represented graphically, such as... Figure 6 As shown.
[0091] Identification and determination of effective hole feature locations P_obj in image N_org: In the obtained data C(i,j)), each effective data point may be an effective hole P_obj. The single-channel N_org suffers from feature information loss due to reduced data dimensionality. Therefore, P_obj is identified and determined based on the original acquired N_org: Based on l_r, the calibration hole features are extracted from I_org using a direct cropping method to extract Sobj. Based on the point data in C(i,j)), Sobj is used to cover each corresponding region in N_org, with the corresponding number being a. The formula... Feature comparison is performed, where O(i+i',j+j') represents the corresponding region in N_org. The region with the smallest corresponding sim value after comparing the calculated values of the regions corresponding to the a holes is the new effective hole feature P_obj position in the image N_org.
[0092] The data C(i,j) and the corresponding position P_obj in the image N_org are calculated using the direction vector from P_obj to the right. (Allowing an angular deviation from the horizontal to the right), this vector represents the direction in which the camera (main axis) moves to the right during correction and positioning. The endpoints of the vector satisfy the property of having the shortest distance from P_obj to the right within ±β angles. Based on the vector... The membrane L can be used to obtain the horizontal spacing between the pores. This is to prevent abnormal pores on the right side of P_obj from causing... As the membrane grows larger, a membrane length threshold needs to be set. If the initial judgment is that L is greater than the threshold, then the corresponding region has an anomaly of missing pores.
[0093] The recognition result data table (result_table) and image (result_img) are constructed to record the vectors determined initially. The table result_table contains data on possible abnormal holes and the corresponding initial calibration position P_obj. The data storage format in the table result_table is implemented using a vector container. The data type of the container is a structure, which contains the position information of point (i, j) and the angle information α with P_obj as the reference.
[0094] Based on the initial P_obj and direction vector And L updates the position of P_obj, and based on the aforementioned method of obtaining hole position deviation and correcting the spindle, a new image N_org is obtained.
[0095] The multi-step region correction strategy and its implementation mainly correct the updated P_obj position to obtain more accurate coordinate information. Specifically, it calculates the gradient of the eight neighboring pixels of the updated P_obj center point as the center point. The gradient is a first-order fused gradient contained in the X and Y directions, and the fusion method is the vector sum of the gradients. This is then extended outward until the fused gradient has been calculated for all points within the P_obj contour region. Based on the magnitude of the gradient, points with similar gradient values are considered to be of the same category. If an isolated point of one category is contained in points of other categories, it should belong to the other category. If a continuous point of one category is contained in points of other categories, its category attribute remains unchanged. The category attribute of the region where the updated P_obj center point falls is calculated, and the cluster center of the X and Y coordinates of all points in the corresponding region is calculated. The corresponding center value is the modified P_obj center point coordinate.
[0096] Based on the initial P_obj and direction vector And L updates the position of P_obj to At the end of the indicated direction, a group of holes is calculated by C(i,j) perpendicular to the vector. vector and its length H, and according to The initial position P_obj determines the new partition corresponding to the next row region, until the corresponding row is reached. Parallel and at a distance equal to the end of the direction pointed to by vector H.
[0097] All data points of C(i,j) are processed and corrected, and the corresponding data are recorded in the result data record `result_table` and the image `result_img`. This generates standard data for comparison with the projected image. Image analysis is significantly affected by noise; the designed method reduces the accumulation of positioning errors caused by noise through multiple corrections, ensuring the accuracy of the group hole analysis and evaluation. The final analysis results record the accurate location information of all abnormal holes (unprocessed holes, incompletely processed holes), which facilitates rapid and efficient manual re-inspection and post-processing. With a reasonable imaging device design, it is possible to achieve simultaneous processing and inspection analysis, meeting the needs of integrated manufacturing and inspection. The designed method significantly reduces the computational load during dynamic correction, lowering the computer hardware requirements for code implementation. For completed group holes, it can completely replace manual inspection, achieving automated inspection and realizing high-quality, high-efficiency, and low-cost results, providing technical support for aerospace manufacturing enterprises to achieve intelligent and rapid manufacturing.
[0098] See attached document Figure 8Based on the same inventive concept as in the foregoing embodiments, this application also provides a device for evaluating the quality of multi-hole machining, the device comprising:
[0099] The merging module is used to merge several digital model projection images of the target part in two dimensions to obtain a merged image; wherein, the digital model projection images are obtained based on the traversal positions on the traversal path;
[0100] The cropping module is used to crop the feature image and the merged image of the target part respectively to obtain the feature cropped image and the merged cropped image. The feature image has hole position features, which are the representation of the effective holes on the target part. The pixels of the hole position feature area on the feature image are the same as the pixels of the effective hole position area on the merged image.
[0101] The evaluation module is used to obtain hole processing quality information of the target part based on the area intersection ratio of the hole area on the merged cropped image and the feature cropped image.
[0102] Those skilled in the art should understand that the division of the various modules in the embodiments is merely a logical functional division. In actual applications, they can be fully or partially integrated into one or more actual carriers. These modules can be implemented entirely in software through processing unit calls, entirely in hardware, or a combination of software and hardware. It should be noted that each module in the hole processing quality evaluation device in this embodiment corresponds one-to-one with each step in the hole processing quality evaluation method in the aforementioned embodiments. Therefore, the specific implementation of this embodiment can refer to the implementation of the aforementioned hole processing quality evaluation method, which will not be repeated here.
[0103] Based on the same inventive concept as in the foregoing embodiments, embodiments of this application also provide a computer-readable storage medium storing a computer program, which, when loaded and executed by a processor, implements the method for evaluating the quality of multi-hole processing as provided in the embodiments of this application.
[0104] Based on the same inventive concept as in the foregoing embodiments, embodiments of this application also provide an electronic device, including a processor and a memory, wherein,
[0105] Memory is used to store computer programs;
[0106] The processor is used to load and execute computer programs to enable electronic devices to perform the hole machining quality evaluation method provided in the embodiments of this application.
[0107] In some embodiments, the computer-readable storage medium may be a memory such as FRAM, ROM, PROM, EPROM, EEPROM, flash memory, magnetic surface memory, optical disk, or CD-ROM; or it may be a device including one or any combination of the above-mentioned memories. The computer may be a variety of computing devices, including smart terminals and servers.
[0108] In some embodiments, executable instructions may take the form of a program, software, software module, script, or code, written in any form of programming language (including compiled or interpreted languages, or declarative or procedural languages), and may be deployed in any form, including as a standalone program or as a module, component, subroutine, or other unit suitable for use in a computing environment.
[0109] As an example, executable instructions may, but do not necessarily, correspond to files in a file system. They may be stored as part of a file that holds other programs or data, for example, in one or more scripts in a Hyper Text Markup Language (HTML) document, in a single file dedicated to the program in question, or in multiple collaborating files (e.g., a file that stores one or more modules, subroutines, or code sections).
[0110] As an example, executable instructions can be deployed to execute on a single computing device, or on multiple computing devices located in one location, or on multiple computing devices distributed across multiple locations and interconnected via a communication network.
[0111] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or system that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or system. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or system that includes that element.
[0112] The sequence numbers of the embodiments in this application are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments.
[0113] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as read-only memory / random access memory, magnetic disk, optical disk) and includes several instructions to cause a multimedia terminal device (which may be a mobile phone, computer, television receiver, or network device, etc.) to execute the methods described in the various embodiments of this application.
[0114] In summary, this application provides a method, apparatus, storage medium, and electronic device for evaluating the quality of hole machining. The method includes: merging several digital projection images of a target part in two dimensions to obtain a merged image; wherein the digital projection images are obtained based on traversal positions on a traversal path; cropping the feature image and the merged image of the target part respectively to obtain a feature-cropped image and a merged-cropped image; wherein the feature image has hole position features, which represent the effective holes on the target part, and the pixels of the area of the hole position features on the feature image are the same as the pixels of the effective hole position area on the merged image; and obtaining the hole machining quality information of the target part based on the area intersection-union ratio of the hole position area on the merged-cropped image and the feature-cropped image. This application merges the projected images obtained at all traversed positions in two dimensions, so that all hole positions can be presented in one image. In order to achieve the matching of the degree of overlap, the pixels of the effective hole position area on the merged image are set to be the same as the pixels of the hole position feature area on the feature image. Since the feature image and the merged image obtained based on the projected image have different scales, it is necessary to uniform the size and ensure the preservation of abnormal hole positions by cropping. Then, by the intersection and union ratio of the area of the hole position area on the merged cropped image and the feature cropped image, that is, by overlaying and comparing the feature map under the actual situation with the standard image represented by the projected image, the abnormal hole positions can be obtained quickly and accurately, thereby completing the evaluation of the processing quality of the group holes.
[0115] The above description is only a preferred embodiment of this application and is not intended to limit this application. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the protection scope of this application.
Claims
1. A group hole processing quality evaluation method characterized by, The method comprises the following steps: According to the two-dimensional merging of the several numerical model projection images of the target part, a merged image is obtained; wherein the numerical model projection image is obtained based on the traversal position on the traversal path; The feature image of the target part and the merged image are respectively cropped to obtain a feature cropped image and a merged cropped image; wherein the feature image has a hole site feature, the hole site feature is a representation of the effective hole on the target part, the pixels of the region of the hole site feature on the feature image are the same as the pixels of the effective hole site region on the merged image; before the feature image of the target part and the merged image are respectively cropped to obtain the feature cropped image and the merged cropped image, the group hole machining quality evaluation method further comprises: The feature image of the target part is obtained by performing effective hole feature extraction on the original image of the target part, specifically including: Get the hole center corresponding to all holes in the N_org coordinate data C(i, j), wherein N_org is the group hole image reacquired by the camera after correction; N_org in the effective hole feature position P_obj identification and determination: based on the calibration box l_r from the original image I_org extraction calibration hole characteristics, namely direct cutting way extraction Sobj, based on C(i, j) in the point data to Sobj cover in N_org in each corresponding region, let the corresponding number is a, by formula sim(i,j)= The feature comparison is carried out, wherein O(i+i',j+j') represents the corresponding region in N_org, The feature comparison is carried out, wherein O(i+i',j+j') represents the corresponding region in N_org, The corresponding region with the minimum corresponding value is the new effective hole feature P_obj position in N_org. Data C(i, j) and the corresponding P_obj position in N_org are calculated to the right of the corresponding direction vector of P_obj as the starting point The vector is the direction of the camera moving to the right during the correction and positioning process, and the end point of the vector satisfies the nearest characteristic within ±β angle to the right of P_obj as the starting point. Based on the module L of the vector , the horizontal distance between the group holes is obtained; The identification result data table result_table and the image result_img are constructed, and the first determined vector is recorded Abnormal hole data that can exist in the middle, and corresponding calibration initial position P_obj data based on the initial P_obj, a direction vector and L updates the position of P_obj, and based on the obtained hole position deviation amount and the correction of the spindle mode, a new image N_org is reacquired; Take the updated P_obj center point coordinate position as the center point to calculate the gradient of the pixel points in its eight adjacent regions, the gradient is a first-order fusion gradient containing X and Y directions, and the fusion mode is the vector sum of the gradient; and extend outward until all points in the P_obj contour region are calculated; based on the size relationship of the gradient, points with similar gradient values are considered as points of the same category, and if a category of isolated points is contained in other category points, it should belong to other category points, and if a category of continuous points is contained in other category points, the category attribute remains unchanged; calculate the category attribute of the region where the updated P_obj center point falls, and calculate the clustering center of the X and Y coordinates of all points in the corresponding region. The corresponding center value is the modified P_obj center point coordinate; Based on the initial P_obj and direction vector And L updates the position of P_obj to At the end of the indicated direction, a group of holes is calculated by C(i, j) perpendicular to the vector. vector and its length H, and according to The initial position P_obj determines the new partition corresponding to the next row region, until the corresponding row is reached. Parallel and at a distance equal to the end of the direction pointed to by vector H; Process all data points of C(i, j) and make corrections, and record the corresponding data in the result data record result_table and the image result_img; According to the area intersection ratio of the hole site region on the merged cropped image and the feature cropped image, the hole site machining quality information of the target part is obtained.
2. The group hole processing quality evaluation method according to claim 1, wherein Before the feature image of the target part and the merged image are respectively cropped to obtain the feature cropped image and the merged cropped image, the group hole machining quality evaluation method further comprises: According to the effective hole point data on the merged image, the effective hole site region is obtained; The effective hole site region is subjected to gray scale transformation so that the pixels of the effective hole site region are the same as the pixels of the region of the hole site feature on the feature image.
3. The group hole processing quality evaluation method according to claim 1, wherein The method comprises the following steps: Matching a plurality of numerical model projection images to obtain matching features; According to the matching features, the transformation structure between the numerical model projection images obtained at adjacent traversal positions is obtained; According to the transformation structure, the numerical model projection images are mapped and transformed to obtain transformed images; The transformed images are superimposed and registered, and two-dimensional merging is performed to obtain a merged image.
4. The group hole processing quality evaluation method according to claim 1, wherein Before the effective hole feature extraction on the original image of the target part to obtain the feature image of the target part, the group hole machining quality evaluation method further comprises: The camera is position-corrected so that the calibrated initial position on the original image obtained based on the camera shooting is close to the center of the original image.
5. The group hole processing quality evaluation method according to claim 4, wherein The position correction of the camera comprises: The distance deviation is obtained according to the hole center coordinates of the effective hole on the original image and the center of the original image; The distance deviation is obtained according to the hole center coordinates of the effective hole on the original image and the center of the original image.
6. The group hole processing quality evaluation method according to claim 4, wherein The distance deviation is obtained according to the hole center coordinates of the effective hole on the original image and the center of the original image. Before the position correction of the camera so that the calibrated initial position on the original image obtained based on the camera shooting is close to the center of the original image, the group hole machining quality evaluation method further comprises: An effective hole at the starting position of the traversal path is obtained.
7. A group hole processing quality evaluation device characterized by comprising: A marking strategy is used to cover the effective hole at the starting position of the traversal path to obtain the calibrated initial position. It comprises: A merging module is configured to perform two-dimensional merging on a plurality of numerical model projection images of a target part to obtain a merged image, wherein the numerical model projection images are obtained based on traversal positions on a traversal path; A cropping module is configured to crop a feature image of the target part and the merged image respectively to obtain a feature cropped image and a merged cropped image, wherein the feature image has a hole site feature, the hole site feature represents an effective hole on the target part, and the pixels in the region of the hole site feature on the feature image are the same as the pixels in the effective hole site region on the merged image; before the feature image of the target part and the merged image are cropped respectively to obtain the feature cropped image and the merged cropped image, the method further comprises: An effective hole feature extraction is performed on the original image of the target part to obtain the feature image of the target part, specifically comprising: N_org in the effective hole feature position P_obj identification and determination: based on the calibration box l_r from the original image I_org extraction calibration hole characteristics, namely direct cutting way extraction Sobj, based on C(i, j) in the point data to Sobj cover in N_org in each corresponding region, let the corresponding number is a, by formula sim(i,j)= The feature comparison is carried out, wherein O(i+i',j+j') represents the corresponding region in N_org, The feature comparison is carried out, wherein O(i+i',j+j') represents the corresponding region in N_org, The corresponding region with the minimum corresponding value is the new effective hole feature P_obj position in N_org. Data C(i, j) and the corresponding P_obj position in N_org are calculated to the right of the corresponding direction vector of P_obj as the starting point , the vector is the direction of the camera moving to the right in the correction and positioning process, and the end point of the vector satisfies the nearest feature within ±β angle to the right of P_obj as the starting point. Based on the module L of the vector , the horizontal distance between the group holes is obtained; The identification result data table result_table and the image result_img are constructed, and the first determined vector is recorded Abnormal hole data that can exist in the middle, and corresponding calibration initial position P_obj data based on the initial P_obj, a direction vector and L updates the position of P_obj, and based on the obtained hole position deviation amount and the correction of the spindle mode, a new image N_org is reacquired; Obtain the hole centers corresponding to all holes in N_org coordinate data C(i, j), wherein N_org is the group hole image obtained by the camera after position correction. Calculate the gradient of the pixel points in the eight adjacent regions of the updated P_obj center point coordinate position as the center point, and the gradient is the first-order fusion gradient containing X and Y directions, and the fusion mode is the vector sum of the gradient; and extend outward until all points in the P_obj contour region are calculated; based on the size relationship of the gradient, points with similar gradient values are regarded as points of the same category, and if a category of isolated points is contained in other category points, it should belong to other category points, and if a category of continuous points is contained in other category points, the category attribute is unchanged; calculate the category attribute of the region where the updated P_obj center point falls, and calculate the clustering center of the X and Y coordinates of all points in the corresponding region, and the corresponding center value is the modified P_obj center point coordinate. Based on the initial P_obj and direction vector And L updates the position of P_obj to At the end of the indicated direction, a group of holes is calculated by C(i, j) perpendicular to the vector. vector and its length H, and according to The initial position P_obj determines the new partition corresponding to the next row region, until the corresponding row is reached. Parallel and at a distance equal to the end of the direction pointed to by vector H; All data points of C(i, j) are processed and corrected, and corresponding data are recorded in result data record result_table and image result_img; An evaluation module is configured to obtain hole processing quality information of the target part according to an area intersection ratio of the hole region on the merged cropped image and the feature cropped image.
8. A computer readable storage medium storing a computer program, characterized in that, The computer program is loaded and executed by the processor to implement the group hole processing quality evaluation method according to any one of claims 1-6.
9. An electronic device, comprising: The electronic device comprises a processor and a memory, The memory is configured to store a computer program; The processor is configured to load and execute the computer program, so that the electronic device performs the group hole processing quality evaluation method according to any one of claims 1-6.
Citation Information
Patent Citations
Size detection system and method for a flat panel workpiece based on machine vision
CN109211110A
Auxiliary photographing equipment used for movement disorder symptom analysis, control method and device
CN110561399A
Assembly quality inspection method based on deep learning and object matching
CN115311618A