Workpiece parameter detection method, device and equipment and storage medium
By combining laser scanning, ultrasonic waves, and camera devices, the simultaneous detection of workpiece dimensions, internal flaws, and surface roughness is achieved, solving the problems of low inspection efficiency and quality impact of CNC machine tools, and realizing real-time quality control.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-13
- Publication Date
- 2026-03-13
AI Technical Summary
Existing CNC machine tools suffer from low efficiency and inconsistent accuracy in workpiece quality inspection, making real-time monitoring impossible. Furthermore, disassembly inspection leads to secondary processing deviations, affecting workpiece quality.
By combining laser scanning, ultrasonic waves, and camera devices, the method can simultaneously detect the workpiece's external dimensions, internal flaws, and surface roughness using point cloud data, reflected ultrasonic signals, and speckle image data.
It improves workpiece inspection efficiency, avoids quality reduction caused by disassembly inspection, and realizes real-time quality control during the processing.
Smart Images

Figure CN121649831A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of artificial intelligence technology, and more specifically, to a method, apparatus, equipment, and storage medium for detecting workpiece parameters to detect the quality of processed workpieces. Background Technology
[0002] In the existing CNC machine tool processing, in order to detect the quality of the workpiece after processing, it is necessary to detect parameters such as the dimensional accuracy, surface roughness, clamping parallelism and internal quality of the workpiece.
[0003] Traditional methods involve manually inspecting various parameters using separate tools. This approach is inefficient, inconsistent in accuracy, and cannot achieve real-time monitoring during processing. For complex workpieces, disassembly is required for inspection. When the workpiece is returned for secondary processing, the position deviates from its initial placement, altering the machining center point between the software and the actual workpiece. This causes deviations in all subsequent operations, necessitating a second center point re-establishment. This step is overly cumbersome, especially when processing large batches, resulting in extremely low inspection efficiency and negatively impacting workpiece quality, potentially leading to scrap. Summary of the Invention
[0004] In view of the problem of low efficiency in workpiece quality inspection in the prior art, this application aims to provide a workpiece parameter detection method, device, equipment and storage medium, thereby improving the efficiency of workpiece quality inspection and ensuring that the quality of the workpiece is not affected during the inspection process.
[0005] In a first aspect, embodiments of this application provide a workpiece parameter detection method, the method comprising:
[0006] The external dimensions of the workpiece are determined based on the point cloud data obtained from scanning the workpiece surface and the first image data obtained from photographing the workpiece.
[0007] Based on the reflected ultrasonic signal obtained from the ultrasonic wave acting on the workpiece and the first image data, the internal flaw detection of the workpiece is determined;
[0008] The surface roughness of the workpiece is determined based on the speckle image obtained by laser irradiation of the workpiece surface;
[0009] Output the workpiece parameter detection results, which include at least one of the following: workpiece external dimensions, workpiece internal flaw detection, and workpiece surface roughness.
[0010] The workpiece parameter detection method using the above technical solution can simultaneously detect the workpiece's external dimensions, internal flaws, and surface roughness. This not only avoids the problem of low detection efficiency caused by using separate tools for detection, but also avoids the problem of reduced workpiece quality caused by secondary processing due to disassembly and detection.
[0011] In one possible implementation, determining the workpiece's external dimensions based on point cloud data obtained from scanning the workpiece surface and first image data obtained from photographing the workpiece includes:
[0012] Control the laser scanner to scan the surface of the workpiece to obtain point cloud data, and control the camera device to capture the workpiece to obtain the first image data;
[0013] In response to the point cloud data obtained by the laser scanner, the point cloud data undergoes a first preprocessing step;
[0014] The surface data is obtained by fitting the first preprocessed point cloud data and the first image data using the moving least squares method.
[0015] The workpiece's three-dimensional model is obtained by reconstructing the surface data, thereby determining the workpiece's external dimensions.
[0016] In one possible implementation, determining the internal flaw detection of the workpiece based on the reflected ultrasonic signal obtained from the ultrasonic wave acting on the workpiece and the first image data includes:
[0017] Control the ultrasonic sensor to emit sound waves toward the workpiece and acquire the reflected ultrasonic signal;
[0018] The reflected ultrasonic signal is converted into a first digital signal and then subjected to a second preprocessing.
[0019] The first digital signal, after the second preprocessing, is converted into second image data using a full-focus imaging algorithm.
[0020] Internal flaw detection of the workpiece is achieved by combining the first image data, the second image data, and the three-dimensional model of the workpiece.
[0021] In one possible implementation, the second preprocessing includes: a first denoising process and a second denoising process;
[0022] The first denoising process includes amplifying, filtering, and FFT denoising the first digital signal;
[0023] The second denoising process includes removing non-defect noise from the first digital signal using a defect identification algorithm.
[0024] In one possible implementation, determining the surface roughness of the workpiece based on the speckle image obtained by laser irradiation of the workpiece surface specifically includes:
[0025] Control the laser source to emit laser light onto the workpiece surface, causing laser scattering;
[0026] The speckle image generated by laser scattering on the workpiece surface is acquired using a camera device;
[0027] The speckle image is converted into a second digital signal and then subjected to a third preprocessing step.
[0028] The texture features of a workpiece are calculated using Tamura texture feature theory. These texture features include roughness, contrast, and orientation.
[0029] By fitting the data using the moving least squares method, a mapping relationship between texture features and workpiece surface roughness is established, thereby obtaining the workpiece surface roughness.
[0030] Secondly, embodiments of this application also provide a workpiece parameter detection device, comprising:
[0031] The workpiece shape and size detection module is configured to determine the workpiece shape and size based on the point cloud data obtained by scanning the workpiece surface and the first image data obtained by capturing the workpiece.
[0032] The workpiece internal flaw detection module is configured to determine internal flaws in the workpiece based on the reflected ultrasonic signal obtained by ultrasonic waves acting on the workpiece and the first image data.
[0033] The workpiece surface roughness detection module is configured to determine the workpiece surface roughness based on the speckle image obtained by laser irradiation of the workpiece surface.
[0034] The output module is configured to output the workpiece parameter detection results, which include at least one of the following: workpiece external dimensions, workpiece internal flaw detection, and workpiece surface roughness.
[0035] Thirdly, embodiments of this application also provide a workpiece parameter detection device, comprising:
[0036] The tool holder body has a first mounting base on one side along the first direction. The first mounting base is equipped with a laser source, a laser scanner, a camera device and an ultrasonic sensor that can act on the workpiece to be tested in the first direction.
[0037] A groove is formed inside the tool holder body to embed a power module and an MCU. The MCU is electrically connected to the power module, laser source, laser scanner, camera device and ultrasonic sensor respectively.
[0038] The tool holder head is mounted on a second mounting base located on one side of the tool holder body along a second direction, which is opposite to the first direction;
[0039] The MCU is configured as follows:
[0040] The external dimensions of the workpiece are determined based on the point cloud data obtained from scanning the workpiece surface and the first image data obtained from photographing the workpiece.
[0041] Based on the reflected ultrasonic signal obtained from the ultrasonic wave acting on the workpiece and the first image data, the internal flaw detection of the workpiece is determined;
[0042] The surface roughness of the workpiece is determined based on the speckle image obtained by laser irradiation of the workpiece surface;
[0043] Output the workpiece parameter detection results, which include at least one of the following: workpiece external dimensions, workpiece internal flaw detection, and workpiece surface roughness.
[0044] Thirdly, embodiments of this application also provide a workpiece parameter detection system, including a CNC machine tool, a server, and the workpiece parameter detection device described in the third aspect;
[0045] The CNC machine tool fixes the workpiece parameter detection device through the tool holder head, so that it can detect the processed workpiece and obtain the workpiece parameter detection results;
[0046] The server receives the workpiece parameter detection results sent by the workpiece parameter detection device and analyzes them.
[0047] Fourthly, embodiments of this application also provide a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, are used to implement the method in any possible implementation of the first aspect described above.
[0048] Fifthly, embodiments of this application also provide a computer program product, the computer program product including a computer program, which, when executed by a processor, implements the method in any possible implementation of the first aspect described above.
[0049] This application provides a workpiece parameter detection method, apparatus, device, and storage medium. The workpiece parameter detection method includes simultaneously detecting the workpiece's external dimensions, surface roughness, and internal flaw detection parameters. The workpiece's external dimensions are determined based on point cloud data obtained from scanning the workpiece surface and first image data obtained from photographing the workpiece. The workpiece's surface roughness is determined based on a speckle image obtained from laser irradiation of the workpiece surface. Internal flaw detection parameters are determined based on reflected ultrasonic signals obtained from ultrasonic waves acting on the workpiece and the first image data. Finally, the workpiece parameter detection results are output. This application enables simultaneous multi-parameter detection of the workpiece during processing, achieving quality control in workpiece production, thereby improving processing efficiency and product quality. Attached Figure Description
[0050] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.
[0051] Figure 1 This is a schematic diagram of the overall structure of a workpiece parameter detection device provided in an embodiment of this application;
[0052] Figure 2 for Figure 1 An exploded structural diagram of the workpiece parameter detection device shown.
[0053] Figure 3 for Figure 1 A schematic diagram showing the connections of each module in the workpiece parameter detection device.
[0054] Figure 4 This is a flowchart of a workpiece parameter detection method provided in an embodiment of this application;
[0055] Figure 5 This is a flowchart of a workpiece external dimension detection method provided in an embodiment of this application;
[0056] Figure 6 This is a flowchart of a workpiece surface roughness detection method provided in an embodiment of this application;
[0057] Figure 7 This is a flowchart of a workpiece internal flaw detection method provided in an embodiment of this application;
[0058] Figure 8 This is a schematic diagram of the module structure of a workpiece parameter detection device provided in an embodiment of this application;
[0059] Figure 9 This is a hardware structure diagram of an electronic device provided in an embodiment of this application.
[0060] The accompanying drawings illustrate specific embodiments of this application, which will be described in more detail below. These drawings and descriptions are not intended to limit the scope of the concept in any way, but rather to illustrate the concept of this application to those skilled in the art through reference to particular embodiments.
[0061] Explanation of reference numerals in the attached figures:
[0062] 101-Tool holder body; 102-First mounting base; 103-Laser source; 104-Laser scanner; 105-Camera device; 106-Ultrasonic sensor; 107-MCU; 108-Power module; 109-Tool holder head; 110-Second mounting base; 111-Protective cover;
[0063] 801 - Workpiece external dimension detection module; 802 - Workpiece internal flaw detection module; 803 - Workpiece surface roughness detection module; 804 - Output module. Detailed Implementation
[0064] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numbers in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this application. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this application as detailed in the appended claims.
[0065] In the embodiments of this application, the terms "first" and "second" are used to distinguish identical or similar items with substantially the same function and effect. Those skilled in the art will understand that the terms "first" and "second" do not limit the quantity or execution order, nor do they necessarily imply difference. It should be noted that words such as "exemplary" or "for example" are used to indicate that something is being used as an example, illustration, or explanation. Any embodiment or design scheme described as "exemplary" or "for example" in this application should not be construed as being more preferred or advantageous than other embodiments or design schemes. Specifically, the use of words such as "exemplary" or "for example" is intended to present the relevant concepts in a concrete manner.
[0066] In the embodiments of this application, "at least one" means one or more, and "more than one" means two or more.
[0067] It should be noted that "at the time of..." in the embodiments of this application can be either at the instant when a certain situation occurs, or for a period of time after the occurrence of a certain situation. The embodiments of this application do not make specific limitations on this.
[0068] To facilitate a clear description of the technical solutions in the embodiments of this application, some terms and technologies involved in the embodiments of this application will be briefly introduced below:
[0069] Point cloud data refers to a collection of vectors in a three-dimensional coordinate system. Besides geometric location, point cloud data sometimes also contains color information. Color information is typically obtained by acquiring color images from a camera and then assigning the color information (RGB) of the corresponding pixels to the corresponding points in the point cloud. Intensity information is obtained from the echo intensity collected by a laser scanner receiver. This intensity information is related to the target's surface material, roughness, incident angle, and the instrument's emission energy and laser wavelength.
[0070] Tamura texture features: Tamura texture features are a method for describing the texture features of an image. Compared with traditional image processing techniques, Tamura texture features have the advantages of being more accurate, comprehensive, and unaffected by factors such as lighting and noise.
[0071] Moving Least Squares (MLS) is mainly used for curve and surface fitting. This method is based on a compactly supported weighted function (i.e., the function value is defined as greater than zero only in a closed domain of finite size, and is defined as zero outside the domain) and a polynomial basis function. It establishes a fitting function suitable for the scattered points model through weighted least squares.
[0072] Speckle: When a laser beam illuminates an optically rough surface (or a transmissive plate that transmits light through an optically rough surface) such as a wall, paper, or frosted glass, where the average undulations are orders of magnitude greater than the wavelength, the randomly distributed surface elements on these surfaces scatter wavelets that superimpose to create a random spatial intensity distribution in the reflected (or transmitted) light field, resulting in a granular structure. This is laser speckle. Since laser speckle is formed by laser light illuminating a rough surface, the distribution of the speckle pattern must depend on the fine structure of the illuminated surface, thus allowing it to be used to measure surface roughness.
[0073] In existing CNC machine tool processing, the detection of parameters such as workpiece dimensional accuracy, surface roughness, clamping parallelism and internal quality usually relies on separate measuring tools and manual inspection. This method has low detection efficiency, inconsistent accuracy and cannot achieve real-time monitoring during the processing.
[0074] For some complex workpieces, it is necessary to disassemble the workpiece for manual inspection. When the workpiece is put back for secondary processing after inspection, the machining center point of the machining software and the actual workpiece will change due to the deviation from the first placement. This will cause deviations in all subsequent operations, so it is necessary to find the center point again. This step is too cumbersome, especially when processing a large number of parts. The inspection efficiency is extremely low, and it will also affect the quality of the workpiece, easily resulting in scrapped parts.
[0075] To address the aforementioned issues, embodiments of this application provide a workpiece parameter detection method, apparatus, device, and storage medium, enabling simultaneous multi-parameter detection of workpieces during processing, thereby achieving quality control of workpiece production and improving processing efficiency and product quality.
[0076] Figure 1 This is a schematic diagram of the overall structure of a workpiece parameter detection device provided in an embodiment of this application. Figure 2 for Figure 1 The exploded structural diagram of the workpiece parameter detection device shown is as follows. Figure 3for Figure 1 The diagram shows the connection of each module in the workpiece parameter detection device. The device includes a tool holder body 101, with a first mounting base 102 on one side along a first direction. The first mounting base 102 houses a laser source 103, a laser scanner 104, a camera device 105, and an ultrasonic sensor 106, all oriented in the first direction and capable of acting on the workpiece to be measured. The mounting methods can include bolt fixing, snap-fitting, etc. The camera device 105 has a protective cover 111 at its front end, which can be installed using threaded fixing, snap-fitting, etc.
[0077] The tool holder body 101 has a recess for embedding the power module 108 and MCU 107, such as... Figure 3 As shown, the MCU107 is electrically connected to the power module 108, the laser source 103, the laser scanner 104, the camera device 105, and the ultrasonic sensor 106, respectively; wherein, the power module 108 provides power to each module.
[0078] The tool holder body 101 is provided with a second mounting seat 110 on one side along the second direction, which is opposite to the first direction. The tool holder head 109 is mounted on the second mounting seat 110. The above mounting method can be bolt fixing, thread fixing, etc.
[0079] Figure 4 This is a flowchart illustrating a workpiece parameter detection method provided in an embodiment of this application. (In order to adopt...) Figure 1 The workpiece parameter detection device shown detects the workpiece parameters. The MCU needs to follow the instructions. Figure 4 Configure the flowchart shown below, specifically as follows:
[0080] S401: Determine the external dimensions of the workpiece based on the point cloud data obtained by the laser scanner scanning the workpiece surface and the first image data obtained by the imaging device capturing the workpiece.
[0081] S402: Determine the internal flaw detection of the workpiece based on the reflected ultrasonic signal obtained by the ultrasonic sensor acting on the workpiece and the first image data;
[0082] S403: Determine the surface roughness of the workpiece based on the speckle image obtained by irradiating the workpiece surface with a laser source;
[0083] The order of steps S401 to S403 can be varied, and this embodiment does not impose a specific limitation.
[0084] S404: Outputs the detection results of workpiece parameters.
[0085] After obtaining the workpiece's external dimensions, internal flaw detection results, and surface roughness through steps S401 to S403, at least one of these workpiece parameter detection results is sent to a display device for display or to a server for analysis.
[0086] The workpiece parameter detection method provided in this embodiment can simultaneously detect the workpiece's external dimensions, internal flaws, and surface roughness. This not only avoids the problem of low detection efficiency caused by using separate tools for detection, but also avoids the problem of reduced workpiece quality caused by secondary processing due to disassembly and detection.
[0087] Figure 5 This is a flowchart illustrating a workpiece external dimension detection method provided in an embodiment of this application. This embodiment is... Figure 4 Based on the illustrated embodiment, the workpiece parameter detection method will be described in detail. For example... Figure 5 As shown, the above-mentioned method for detecting the external dimensions of a workpiece includes:
[0088] S501: Control the laser scanner to scan the workpiece surface to obtain point cloud data, and control the camera device to capture the workpiece to obtain the first image data;
[0089] Upon receiving a workpiece parameter detection request, the MCU sends a control signal to the laser scanner to scan the workpiece surface and acquire point cloud data; simultaneously, the MCU sends a control signal to the imaging device to capture the workpiece and acquire the first image data.
[0090] S502: In response to the point cloud data obtained by the laser scanner, perform the first preprocessing on the point cloud data;
[0091] After acquiring the point cloud data of the workpiece, the MCU performs the first preprocessing on the point cloud data through a point cloud preprocessing algorithm. For example, the point cloud preprocessing algorithm includes removing outliers, smoothing, and filtering the point cloud data.
[0092] S503: The surface data is obtained by fitting the first preprocessed point cloud data and the first image data using the moving least squares method;
[0093] For the point cloud data that has undergone the first preprocessing, the moving least squares method is used to perform surface fitting on the point cloud data and the acquired first image data to obtain surface data with smooth characteristics, while maintaining the local adaptability to the original data points.
[0094] S504: Perform three-dimensional reconstruction on the surface data to obtain a three-dimensional model of the workpiece, thereby determining the workpiece's external dimensions.
[0095] Using surface data, a 3D reconstruction algorithm is used to reconstruct the geometry of the workpiece, and finally a 3D model of the workpiece is generated, which can determine the external dimensions of the workpiece.
[0096] For example, by comparing the workpiece's external dimensions obtained from modeling with the actual dimensions of the workpiece, processing deviations can be obtained. These can be output as workpiece parameter detection results, which helps the operator adjust the processing steps.
[0097] Figure 6 This is a flowchart illustrating the internal flaw detection method for a workpiece provided in an embodiment of this application. Figure 4 Based on the illustrated embodiment, the workpiece parameter detection method will be described in detail. For example... Figure 6 As shown, the above-mentioned internal flaw detection method for workpieces includes:
[0098] S601: Controls the ultrasonic sensor to emit sound waves towards the workpiece and acquires the reflected ultrasonic signal;
[0099] Upon receiving a request for internal flaw detection of a workpiece, the MCU sends a control signal to the ultrasonic sensor, causing it to emit sound waves toward the surface of the workpiece. The ultrasonic sensor then collects the reflected ultrasonic signals and sends them to the signal processing unit.
[0100] S602: Convert the reflected ultrasonic signal into a first digital signal and perform a second preprocessing on it;
[0101] After receiving the reflected ultrasonic signal, the signal processing unit converts it from analog to digital into a first digital signal, and then performs a second preprocessing on the first digital signal.
[0102] The aforementioned second preprocessing includes two steps: a first denoising process and a second denoising process. The first denoising process includes amplifying and filtering the first digital signal, then analyzing the first digital signal using a Fast Fourier Transform (FFT) to refine the waveform and remove noise.
[0103] The second denoising process includes removing non-defect noise from the first digital signal using a defect identification algorithm. For example, before processing, a recognition model needs to be trained by collecting sufficient internal defect data of the workpiece as training samples. Then, the first digital signal, after the first denoising process, is fed into the recognition model to identify defects and noise, and remove the noise.
[0104] S603: Convert the first digital signal, which has undergone the second preprocessing, into second image data using a full-focus imaging algorithm;
[0105] Total Focusing Imaging (TFM) is an advanced technique in the field of ultrasonic imaging. By calculating the echo signals from all angles for each pixel, it enables omnidirectional detection of the internal structure of the workpiece under test. This method overcomes the limitations of traditional linear focusing and provides more comprehensive image information.
[0106] The first digital signal (denoised first digital signal) after first and second denoising processes is converted into second image data using a full-focusing imaging algorithm. The specific process is as follows: First, phased array technology is used to receive signals transmitted back from all probes, and multi-beam imaging technology is used to reconstruct a complete two-dimensional or three-dimensional image. Then, by linking the pixels of all two-dimensional or three-dimensional images, a three-dimensional dataset containing complete structural information is constructed.
[0107] S604: The first image data, the second image data, and the three-dimensional model of the workpiece are used to jointly image the internal flaws of the workpiece.
[0108] By combining the first image data captured by the imaging device, the second image data obtained by the all-focus imaging algorithm, and the three-dimensional model of the workpiece, the internal flaw detection of the workpiece can be obtained.
[0109] It should be noted that this step can directly reuse the first image data obtained during the workpiece shape dimension detection process. If the workpiece shape dimension was not detected during the workpiece parameter detection process, the imaging device can be directly controlled to capture the workpiece and obtain the first image data. Similarly, this step can also directly call the workpiece 3D model obtained during the workpiece shape dimension detection process.
[0110] Figure 7 This is a flowchart illustrating a workpiece surface roughness detection method provided in an embodiment of this application. This embodiment is... Figure 4 Based on the illustrated embodiment, the workpiece parameter detection method will be described in detail. For example... Figure 7 As shown, the above-mentioned workpiece surface roughness detection method includes:
[0111] S701: Controls the laser source to emit laser light onto the workpiece surface, causing laser scattering;
[0112] After receiving a workpiece surface roughness detection request, the MCU sends a control signal to the laser source, causing it to emit a laser beam onto the surface of the workpiece. Since there are randomly distributed micro-planes on the surface of the workpiece, it will generate heat dissipation light after receiving the laser beam.
[0113] S702: Acquire speckle images generated by laser scattering on the workpiece surface using a camera device;
[0114] After the laser source is activated, the imaging device is controlled to capture images of the speckle pattern generated by the scattering. The speckle pattern is caused by the fine structure of the workpiece surface, and therefore can be used to measure its surface roughness.
[0115] S703: Convert the speckle image into a second digital signal and perform a third preprocessing on it;
[0116] The speckle image can be converted into a second digital model using an image acquisition card, and then subjected to a third preprocessing step. This third preprocessing includes noise reduction, such as using Gaussian filtering to preserve edge information, thereby improving image quality.
[0117] S704: Calculates the texture features of the workpiece using Tamura texture feature theory. Texture features include: roughness, contrast, and orientation.
[0118] The Tamura texture feature theory extracts texture features as follows:
[0119] (1) Extract Tamura features from the image;
[0120] (2) Normalize the extracted features;
[0121] (3) Use the normalized features as input data and classify them into different categories;
[0122] (4) Use different classification algorithms for classification, such as support vector machines, neural networks, etc.
[0123] S705: By fitting using the moving least squares method, a mapping relationship between texture features and workpiece surface roughness is established, thereby obtaining the workpiece surface roughness.
[0124] The calculation formula is as follows:
[0125]
[0126] In the above formula, σ represents the surface roughness of the workpiece, N represents the number of groups in the speckle image divided according to the normal angle feature, and n i Let θ be the number of microplanes in the i-th group. i Let be the normal angle of the microplane in the i-th group, where i = 1, 2, ..., N. It should be noted that microplanes in speckle images can also be grouped according to other features, such as the spatial distribution, size, and shape of the microplanes in the speckle image.
[0127] In addition to using the methods described above to evaluate roughness, in other embodiments, surface feature analysis algorithms (such as gray-level co-occurrence matrix, Fourier transform, etc.) can also be used to evaluate roughness.
[0128] Figure 8 This is a schematic diagram of the module structure of a workpiece parameter detection device provided in an embodiment of this application. The device can be in the form of software and / or hardware, such as… Figure 8 As shown, a workpiece parameter detection device includes: a workpiece external dimension detection module 801, a workpiece internal flaw detection module 802, a workpiece surface roughness detection module 803, and an output module 804.
[0129] The workpiece shape dimension detection module 801 is used to determine the workpiece shape dimension based on the point cloud data obtained by scanning the workpiece surface and the first image data obtained by capturing the workpiece.
[0130] The internal flaw detection module 802 is used to determine the internal flaws of the workpiece based on the reflected ultrasonic signal obtained by the ultrasonic wave acting on the workpiece and the first image data.
[0131] The workpiece surface roughness detection module 803 is used to determine the surface roughness of the workpiece based on the speckle image obtained by laser irradiation of the workpiece surface.
[0132] The output module 804 is used to output the workpiece parameter detection results, which include at least one of the following: workpiece external dimensions, workpiece internal flaw detection, and workpiece surface roughness.
[0133] It should be noted that the above-mentioned workpiece external dimension detection module 801, workpiece internal flaw detection module 802, and workpiece surface roughness detection module 803 can execute their respective steps independently or in a random sequence.
[0134] For example, the workpiece shape dimension detection module 801 is specifically configured as follows:
[0135] Control the laser scanner to scan the surface of the workpiece to obtain point cloud data, and control the camera device to capture the workpiece to obtain the first image data;
[0136] In response to the point cloud data obtained by the laser scanner, the point cloud data undergoes a first preprocessing step;
[0137] The surface data is obtained by fitting the first preprocessed point cloud data and the first image data using the moving least squares method.
[0138] The workpiece's three-dimensional model is obtained by reconstructing the surface data, thereby determining the workpiece's external dimensions.
[0139] For example, the internal flaw detection module 802 of the workpiece is configured as follows:
[0140] Control the ultrasonic sensor to emit sound waves toward the workpiece and acquire the reflected ultrasonic signal;
[0141] The reflected ultrasonic signal is converted into a first digital signal and then subjected to a second preprocessing.
[0142] The first digital signal, after the second preprocessing, is converted into second image data using a full-focus imaging algorithm.
[0143] Internal flaw detection of the workpiece is achieved by combining the first image data, the second image data, and the three-dimensional model of the workpiece.
[0144] The second preprocessing includes: a first denoising process and a second denoising process;
[0145] The first denoising process includes amplifying, filtering, and FFT denoising the first digital signal;
[0146] The second denoising process includes removing non-defect noise from the first digital signal using a defect identification algorithm.
[0147] In this embodiment, the first image data and the three-dimensional model of the workpiece in the internal flaw detection module 802 can be obtained directly from the workpiece external dimension detection module 801. If there is no workpiece external dimension detection module 801, they can be obtained separately.
[0148] For example, the workpiece surface roughness detection module 803 is configured as follows:
[0149] Control the laser source to emit laser light onto the workpiece surface, causing laser scattering;
[0150] The speckle image generated by laser scattering on the workpiece surface is acquired using a camera device;
[0151] The speckle image is converted into a second digital signal and then subjected to a third preprocessing step.
[0152] The texture features of the workpiece are calculated using Tamura texture feature theory. The texture features include roughness, contrast and orientation.
[0153] By fitting the data using the moving least squares method, a mapping relationship between texture features and workpiece surface roughness is established, thereby obtaining the workpiece surface roughness.
[0154] This application provides a schematic diagram of the module structure of a workpiece parameter detection system. The system includes a CNC machine tool, a server, and... Figure 1 The workpiece parameter detection device shown.
[0155] The CNC machine tool uses the tool holder head 109 to fix the workpiece parameter detection device, so that it can detect the processed workpiece and obtain the workpiece parameter detection results.
[0156] The server receives and analyzes the workpiece parameter detection results sent by the workpiece parameter detection device. On one end of the server, parameters such as workpiece dimensions, internal flaw detection, and surface roughness can be displayed and analyzed, allowing back-end personnel to see the workpiece's shape more intuitively. By analyzing the parameters of all workpieces, the production quality of the workpieces can be understood.
[0157] Furthermore, the method of collecting important parameters of workpiece processing without disassembling the workpiece can greatly help operators control the processing efficiency and quality of the workpiece, allowing operators to set the processing parameters for the next toolpath programming to be closer to the ideal dimensions of the design drawing.
[0158] The workpiece parameter detection device provided in this application embodiment has the same implementation principle and technical effect as the aforementioned workpiece parameter detection method embodiment. For the sake of brevity, any parts not mentioned in the device embodiment can be referred to the corresponding content in the aforementioned workpiece parameter detection method embodiment.
[0159] Figure 9 This is a hardware structure diagram of an electronic device provided in an embodiment of this application. The embodiment provides an electronic device including: a processor 901, and a memory 902 communicatively connected to the processor 901; the memory 902 stores computer-executable instructions; the processor 901 executes the computer-executable instructions stored in the memory 902 to implement the workpiece parameter detection method described in the corresponding embodiments above.
[0160] Figure 9 The electronic device shown also includes a communication interface 903 and a communication bus 904, wherein the processor 901, the memory 902 and the communication interface 903 communicate with each other through the communication bus 904.
[0161] The memory 902 may include high-speed random access memory (RAM) or non-volatile memory, such as at least one disk storage device. The communication bus 904 can be an ISA bus, PCI bus, or EISA bus, etc. Buses can be categorized as address buses, data buses, control buses, etc. For ease of illustration, only a single bidirectional arrow is used in the diagram, but this does not imply that there is only one bus or one type of communication bus.
[0162] The communication interface 903 is used to connect to at least one user terminal and other network units through a network interface, and to send encapsulated IPv4 packets or IPv4 packets to the user terminal through the network interface.
[0163] The processor 901 may be an integrated circuit chip with signal processing capabilities. In implementation, each step of the above method can be completed by the integrated logic circuitry in the hardware of the processor 901 or by instructions in software form. The processor 901 can be a general-purpose processor, including a Central Processing Unit (CPU), a Network Processor (NP), etc.; it can also be a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field-Programmable Gate Array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. It can implement or execute the methods, steps, and logic block diagrams disclosed in the embodiments of this application. The general-purpose processor can be a microprocessor or any conventional processor. The steps of the methods disclosed in the embodiments of this application can be directly manifested as execution by a hardware decoding processor, or execution by a combination of hardware and software modules in the decoding processor. The software module can reside in a mature storage medium in the art, such as random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, or registers. This storage medium is located in memory 902. Processor 901 reads information from memory 902 and, in conjunction with its hardware, completes the steps of the method described in the foregoing embodiments.
[0164] This application also provides a computer storage medium storing computer-executable instructions. When executed by a processor, these instructions are used to implement the workpiece parameter detection method described in the preceding embodiments; therefore, they will not be repeated here. Furthermore, the beneficial effects of using the same method will also not be repeated. For technical details not disclosed in the computer storage medium embodiments of this invention, please refer to the description of the method embodiments of this invention.
[0165] This application also provides a computer program product, which includes a computer program. When the computer program is executed by a processor, it implements the workpiece parameter detection method described in the corresponding embodiments above. Therefore, it will not be described again here.
[0166] Those skilled in the art will understand that all or part of the processes in the above embodiments can be implemented by a computer program instructing related hardware. The program can be stored in a computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. The storage medium can be a magnetic disk, optical disk, read-only memory (ROM), or random access memory (RAM), etc.
[0167] It should be understood that this application is not limited to the precise structure described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope. The scope of this application is limited only by the appended claims.
Claims
1. A method for detecting workpiece parameters, characterized in that, The method includes: The external dimensions of the workpiece are determined based on the point cloud data obtained from scanning the workpiece surface and the first image data obtained from photographing the workpiece. Based on the reflected ultrasonic signal obtained from the ultrasonic wave acting on the workpiece and the first image data, the internal flaw detection of the workpiece is determined; The surface roughness of the workpiece is determined based on the speckle image obtained by laser irradiation of the workpiece surface; Output the workpiece parameter detection results, which include at least one of the following: workpiece external dimensions, workpiece internal flaw detection, and workpiece surface roughness.
2. The method according to claim 1, characterized in that, The step of determining the workpiece's external dimensions based on the point cloud data obtained from scanning the workpiece surface and the first image data obtained from photographing the workpiece includes: Control the laser scanner to scan the surface of the workpiece to obtain point cloud data, and control the camera device to capture the workpiece to obtain the first image data; In response to the point cloud data obtained by the laser scanner, the point cloud data undergoes a first preprocessing step; The surface data is obtained by fitting the first preprocessed point cloud data and the first image data using the moving least squares method. The workpiece's three-dimensional model is obtained by reconstructing the surface data, thereby determining the workpiece's external dimensions.
3. The method according to claim 2, characterized in that, The step of determining internal flaw detection of the workpiece based on the reflected ultrasonic signal obtained by the ultrasonic wave acting on the workpiece and the first image data includes: Control the ultrasonic sensor to emit sound waves toward the workpiece and acquire the reflected ultrasonic signal; The reflected ultrasonic signal is converted into a first digital signal and then subjected to a second preprocessing. The first digital signal, after the second preprocessing, is converted into second image data using a full-focus imaging algorithm. Internal flaw detection of the workpiece is achieved by combining the first image data, the second image data, and the three-dimensional model of the workpiece.
4. The method according to claim 3, characterized in that, The second preprocessing includes: a first denoising process and a second denoising process; The first denoising process includes amplifying, filtering, and FFT denoising the first digital signal; The second denoising process includes removing non-defect noise from the first digital signal using a defect identification algorithm.
5. The method according to claim 1, characterized in that, The determination of workpiece surface roughness based on the speckle image obtained by laser irradiation of the workpiece surface specifically includes: Control the laser source to emit laser light onto the workpiece surface, causing laser scattering; The speckle image generated by laser scattering on the workpiece surface is acquired using a camera device; The speckle image is converted into a second digital signal and then subjected to a third preprocessing step. The texture features of a workpiece are calculated using Tamura texture feature theory. These texture features include roughness, contrast, and orientation. By fitting the data using the moving least squares method, a mapping relationship between texture features and workpiece surface roughness is established, thereby obtaining the workpiece surface roughness.
6. A workpiece parameter detection device, characterized in that, include: The workpiece shape and size detection module is configured to determine the workpiece shape and size based on the point cloud data obtained by scanning the workpiece surface and the first image data obtained by capturing the workpiece. The workpiece internal flaw detection module is configured to determine internal flaws in the workpiece based on the reflected ultrasonic signal obtained by ultrasonic waves acting on the workpiece and the first image data. The workpiece surface roughness detection module is configured to determine the workpiece surface roughness based on the speckle image obtained by laser irradiation of the workpiece surface. The output module is configured to output the workpiece parameter detection results, which include at least one of the following: workpiece external dimensions, workpiece internal flaw detection, and workpiece surface roughness.
7. A workpiece parameter detection device, characterized in that, include: The tool holder body has a first mounting base on one side along the first direction. The first mounting base is equipped with a laser source, a laser scanner, a camera device and an ultrasonic sensor that can act on the workpiece to be tested in the first direction. A groove is formed inside the tool holder body to embed a power module and an MCU. The MCU is electrically connected to the power module, laser source, laser scanner, camera device and ultrasonic sensor respectively. The tool holder head is mounted on a second mounting base located on one side of the tool holder body along a second direction, which is opposite to the first direction; The MCU is configured as follows: The external dimensions of the workpiece are determined based on the point cloud data obtained from scanning the workpiece surface and the first image data obtained from photographing the workpiece. Based on the reflected ultrasonic signal obtained from the ultrasonic wave acting on the workpiece and the first image data, the internal flaw detection of the workpiece is determined; The surface roughness of the workpiece is determined based on the speckle image obtained by laser irradiation of the workpiece surface; Output the workpiece parameter detection results, which include at least one of the following: workpiece external dimensions, workpiece internal flaw detection, and workpiece surface roughness.
8. A workpiece parameter detection system, characterized in that, Includes CNC machine tools, servers, and the workpiece parameter detection device as described in claim 7; The CNC machine tool fixes the workpiece parameter detection device through the tool holder head, so that it can detect the processed workpiece and obtain the workpiece parameter detection results; The server receives the workpiece parameter detection results sent by the workpiece parameter detection device and analyzes them.
9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer-executable instructions, which, when executed by a processor, are used to implement the method as described in any one of claims 1 to 5.
10. A computer program product, characterized in that, The computer program product includes a computer program that, when executed by a processor, implements the method of any one of claims 1 to 5.