Workpiece measuring method and device, machine tool and storage medium

By using the camera to capture and analyze the workpiece images on the machine tool, the workpiece measurement is directly completed, and the problems of workpiece reset accuracy and probe measurement error in online cutting processing are solved, and the processing efficiency and measurement accuracy are improved.

CN119273738APending Publication Date: 2025-01-07MAKINO MACHINE TOOL CHINA CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411325327.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-23
Publication Date
2025-01-07

AI Technical Summary

Technical Problem

During the online cutting process, it is difficult to accurately reset the workpiece when reinstalled after inspection, which affects the processing efficiency. Especially when measuring special structures such as small inner diameter holes and right angle holes, there is an error in the measurement of probes.

Method used

The camera is used to take workpiece images on the machine tool, and the measurement data is obtained through image analysis, and the workpiece measurement is directly completed on the machine tool, which avoids the use of optical measurement instruments and coordinate system adjustments, and provides more accurate measurement results.

Benefits of technology

Improve processing efficiency, overcome probe measurement errors, and are suitable for complex structures and workpieces that are prone to deformation or damage, reduce errors in manual intervention and physical contact, and achieve higher measurement reliability and efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119273738A_ABST
    Figure CN119273738A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a workpiece measuring method and device, a machine tool and a storage medium, and the workpiece measuring method comprises the steps: shooting a target workpiece installed on the machine tool through a camera, and obtaining a workpiece image; analyzing the workpiece image to obtain measurement data of the target workpiece; and comparing the measurement data of the target workpiece with the design data of the target workpiece to obtain a machining result of the target workpiece. According to the embodiment of the invention, the camera is adopted to directly complete workpiece measurement on the machine tool, the problem that the machining efficiency is influenced by moving the workpiece is avoided, the workpiece can be measured only by analyzing the image shot by the camera during camera measurement, and the problem of measurement errors caused by the size of a probe is solved; particularly, when special structures such as small-inner-diameter holes and right-angle holes are measured, more accurate measurement results can be provided, camera measurement belongs to non-contact measurement, analysis of workpiece images and extraction of measurement data can be automatically carried out, and the reliability and efficiency of the measurement process are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present invention relate to the field of machine tool control technology, and in particular to a workpiece measurement method, device, machine tool and storage medium. Background Art

[0002] During the wire cutting process, in order to ensure that the workpiece meets the design requirements, it is usually necessary to move the processed workpiece to other optical measuring instruments for inspection. After the inspection, if the workpiece is found to not meet the requirements, the workpiece needs to be reinstalled on the wire cutting machine to continue processing. However, when reinstalling, it is difficult to accurately reset the workpiece to the previous processing position, and repeated adjustments are required, which affects the processing efficiency.

[0003] In order to improve processing efficiency, some wire cutting machines are equipped with a probe measurement system, which can measure the workpiece directly on the machine tool. The effect of the probe measuring the workpiece can be as follows: Figure 1 As shown. Using a probe to measure a workpiece on a machine tool eliminates the step of moving the workpiece and saves time. However, the probe head itself has a certain volume. When measuring the inner diameter of a hole, a certain error will occur due to its own volume, and the probe cannot accurately measure special structures such as right-angle holes and small inner diameter holes. Summary of the invention

[0004] The workpiece measurement method, device, machine tool and storage medium provided by the embodiments of the present invention can measure the special structure of the workpiece, provide more accurate measurement results and improve processing efficiency.

[0005] In a first aspect, a workpiece measurement method provided by an embodiment of the present invention is applied to a machine tool equipped with a camera, and the workpiece measurement method includes:

[0006] Using the camera to photograph a target workpiece mounted on the machine tool to obtain a workpiece image;

[0007] Analyzing the workpiece image to obtain measurement data of the target workpiece;

[0008] The measurement data of the target workpiece and the design data of the target workpiece are compared to obtain a processing result of the target workpiece.

[0009] Optionally, photographing a target workpiece mounted on the machine tool using the camera to obtain a workpiece image includes:

[0010] Determining each measurement area of ​​the target workpiece;

[0011] Moving the camera to photograph the respective measurement areas of the target workpiece to obtain area images corresponding to the respective measurement areas;

[0012] The region images are stitched together to obtain the workpiece image.

[0013] Optionally, the stitching of the regional images to obtain the workpiece image includes:

[0014] Determining an adjacent image of each of the regional images according to the measurement area corresponding to each of the regional images;

[0015] According to each of the region images and the adjacent images of each of the region images, the region images are deduplicated and merged to obtain the workpiece image.

[0016] Optionally, analyzing the workpiece image to obtain measurement data of the target workpiece includes:

[0017] Obtaining the intrinsic and extrinsic parameters of the camera;

[0018] The workpiece image is analyzed in combination with the internal reference and the external reference to obtain measurement data of the target workpiece.

[0019] Optionally, comparing the measurement data of the target workpiece with the design data of the target workpiece to obtain the processing result of the target workpiece includes:

[0020] Drawing an actual effect diagram of the target workpiece according to the measurement data of the target workpiece;

[0021] Obtaining a design rendering corresponding to the design data of the target workpiece;

[0022] The actual effect diagram and the design effect diagram are compared to obtain the processing result of the target workpiece.

[0023] Optionally, comparing the measurement data of the target workpiece with the design data of the target workpiece to obtain the processing result of the target workpiece includes:

[0024] determining whether the measurement data of the target workpiece matches the design data of the target workpiece;

[0025] If they match, determining that the processing result of the target workpiece is qualified;

[0026] If there is no match, it is determined that the processing result of the target workpiece is unqualified.

[0027] Optionally, after determining that the processing result of the target workpiece is unqualified, the method further includes:

[0028] determining a difference between the measurement data and the design data;

[0029] The target workpiece is re-processed according to the difference.

[0030] The above workpiece measurement method uses a camera to complete the workpiece measurement directly on the machine tool, avoiding the step of moving the workpiece to the optical measuring instrument, thereby saving time; using camera measurement eliminates the process of reinstalling the workpiece after detection and repeatedly adjusting the coordinate system, thereby improving the overall processing efficiency; camera measurement has no contact with the workpiece, and only requires analysis of the image taken by the camera, overcoming the measurement error problem caused by the probe's own volume, especially when measuring special structures such as small inner diameter holes and right-angle holes, it can provide more accurate measurement results; the camera can obtain high-resolution images, and can accurately measure various complex structures through image analysis technology, and its scope of application is wider than that of the probe; camera measurement is a non-contact measurement method, suitable for workpieces that are easily deformed or damaged, reducing the adverse effects of physical contact; when measuring with a camera, the analysis of the workpiece image and the extraction of measurement data can be performed automatically, reducing errors caused by human intervention and improving the reliability and efficiency of the measurement process.

[0031] In a second aspect, a workpiece measuring device provided by an embodiment of the present invention is applied to a machine tool equipped with a camera, and the device includes:

[0032] A shooting control module, used for shooting a target workpiece mounted on the machine tool with the camera to obtain a workpiece image;

[0033] An analysis module, used for analyzing the workpiece image to obtain measurement data of the target workpiece;

[0034] The comparison module is used to compare the measurement data of the target workpiece with the design data of the target workpiece to obtain a processing result of the target workpiece.

[0035] In a third aspect, a machine tool provided by an embodiment of the present invention includes a memory, a processor, and a computer program stored in the memory and executable on the processor, and when the processor executes the program, a workpiece measurement method as in any embodiment of the present invention is implemented.

[0036] In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium, on which a computer program is stored, and when the program is executed by a processor, a workpiece measurement method as in any embodiment of the present invention is implemented.

[0037] The description of the second, third and fourth aspects of the embodiments of the present invention can refer to the detailed description of the first aspect; and the beneficial effects of the description of the second, third and fourth aspects can refer to the beneficial effects analysis of the first aspect, which will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS

[0038] In order to more clearly illustrate the technical solution of the present invention, the drawings required for use in the embodiments are briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present invention and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.

[0039] Figure 1 This is an example of the effect of using a probe to measure a workpiece.

[0040] Figure 2 is a schematic flow chart of a workpiece measurement method provided by an embodiment of the present invention;

[0041] Figure 3 is another schematic flow chart of a workpiece measuring method provided by an embodiment of the present invention;

[0042] Figure 4 is an example diagram of image stitching provided by an embodiment of the present invention;

[0043] Figure 5 is a structural schematic diagram of a workpiece measuring device provided by an embodiment of the present invention;

[0044] Figure 6 It is a structural schematic diagram of a machine tool provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0045] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.

[0046] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0047] Figure 2 It is a flow chart of the workpiece measurement method provided in an embodiment of the present invention. The workpiece measurement method provided in an embodiment of the present invention can be applied to the scenario where the workpiece installed on the machine tool needs to be measured. The workpiece measurement method can be executed by the workpiece measurement device provided in an embodiment of the present invention, and the device can be implemented in software and / or hardware. In a specific embodiment, the workpiece measurement device can be integrated in a machine tool, and the machine tool can be used to process various workpieces. The workpiece measurement device can be the control system of the machine tool. The following embodiment is explained by taking the integration of the workpiece measurement device in the machine tool as an example. A movable camera is installed on the machine tool, and the movement of a specified part of the machine tool can be controlled to move the camera, thereby completing the shooting of the workpiece installed on the machine tool. Refer to Figure 2 The workpiece measurement method of this embodiment may include the following steps:

[0048] Step 101: Use a camera to photograph a target workpiece mounted on a machine tool to obtain a workpiece image.

[0049] In this embodiment, the machine tool can be a wire cutting machine tool, which is an electrospark machining device used to process metals and other conductive materials with complex shapes and high precision requirements. Its basic principle is to use a thin metal wire (usually a molybdenum wire or a copper wire) as an electrode to generate a discharge between the electrode and the workpiece, and to remove the material by discharge so that the workpiece reaches a predetermined shape. The machine tool may include a main frame, a workbench, a guide rail, and a drive system. The workbench can be moved to fix and move the workpiece. The target workpiece is the workpiece to be measured, which can be a processed workpiece or a workpiece that has been suspended from processing. The target workpiece can be mounted on the workbench of the machine tool. By way of example, the target workpiece may include molds, turbine blades, precision medical equipment, etc. The processing materials of the target workpiece may include, but are not limited to, steel and its alloys, cemented carbide, aluminum alloy, and titanium alloy.

[0050] The camera can be installed on the machine tool through a fixed bracket or support structure. After installation, the optical axis alignment and focal length adjustment of the camera can be performed to ensure the accuracy of the image captured by the camera. Before shooting, uniform and shadow-free lighting conditions can be provided to improve the quality of image acquisition. For example, a ring light source, a light-emitting diode (LED) backlight panel, etc. can be used to provide lighting conditions. In addition, the lighting brightness can be adjusted according to the reflective characteristics of the workpiece surface to avoid overexposure or underexposure.

[0051] After the workpiece is processed, or during the real-time processing of the workpiece, the camera can be controlled by software or triggered by hardware to perform a shooting operation, capture one or more workpiece images, and transmit the image data to the computer or control system of the machine tool for processing. The machine tool obtains the workpiece image obtained by capturing the target workpiece installed on the machine tool with the camera.

[0052] Step 102: Analyze the workpiece image to obtain measurement data of the target workpiece.

[0053] Specifically, in order to facilitate measurement, the workpiece image can be preprocessed first, and then the preprocessed workpiece image can be analyzed. Preprocessing can include denoising, contrast enhancement, etc., and image processing algorithms such as Gaussian filtering and median filtering can be used to remove noise in the image, and the contrast and details of the image can be enhanced by methods such as histogram equalization and contrast stretching to obtain an image suitable for measuring data such as the contour and size of the workpiece.

[0054] Specifically, when analyzing workpiece images, edge detection algorithms such as Canny edge detection and Sobel operator edge detection can be used to detect the edges of the workpiece, extract the geometric contours of the workpiece, and calculate the key dimensions, form and position tolerances and other measurement data of the workpiece based on the extracted features. Key dimensions include diameter, length, width, aperture, etc., and form and position tolerances include roundness, flatness, verticality, etc.

[0055] Step 103 : comparing the measurement data of the target workpiece with the design data of the target workpiece to obtain a processing result of the target workpiece.

[0056] The design data of the target workpiece may be obtained from a design drawing or a drawing model of the workpiece, or may be read from a process database or a manufacturing system. The design data of the target workpiece may include key dimensions, tolerance requirements, geometric features, and the like.

[0057] The deviation between the measured data and the designed data can be calculated. For example, the difference between the actual aperture and the designed aperture can be calculated. The measured data can also be compared with the tolerance requirements to determine whether the workpiece size is within the tolerance range, and whether the workpiece is qualified based on the comparison results. If all measured data meet the design requirements, the workpiece can be considered qualified; if any measured data exceeds the tolerance range, the workpiece can be considered unqualified, and the reason for the failure and the amount of deviation can be recorded.

[0058] The measurement and judgment results can be recorded in the manufacturing execution system or quality management system for quality control and inspection. If the workpiece is unqualified, the judgment result can also be fed back to the processing control system to adjust and correct the target workpiece to ensure that the next step of processing meets the requirements.

[0059] The workpiece measurement method of this embodiment uses a camera to complete the workpiece measurement directly on the machine tool, avoiding the step of moving the workpiece to the optical measuring instrument, thereby saving time; using the camera for measurement, the process of reinstalling the workpiece after detection and repeatedly adjusting the coordinate system is eliminated, thereby improving the overall processing efficiency; the camera measurement has no contact with the workpiece, and only needs to analyze the image taken by the camera, thus overcoming the measurement error problem caused by the probe's own volume, especially when measuring special structures such as small inner diameter holes and right-angle holes, it can provide more accurate measurement results; the camera can obtain high-resolution images, and various complex structures can be accurately measured through image analysis technology, and the scope of application is wider than that of the probe; camera measurement is a non-contact measurement method, which is suitable for workpieces that are easily deformed or damaged, reducing the adverse effects of physical contact; when measuring with the camera, the analysis of the workpiece image and the extraction of measurement data can be performed automatically, reducing errors caused by human intervention and improving the reliability and efficiency of the measurement process.

[0060] The workpiece measurement method provided by the embodiment of the present invention is further described below. Figure 3 As shown, the method of this embodiment includes:

[0061] Step 201, determining each measurement area of ​​the target workpiece.

[0062] According to the design drawings or drawing models, the key dimensions and features that need to be measured on the target workpiece can be determined. Key dimensions and features include: hole diameter, hole spacing, outer contour dimensions, slot width, etc. The specific location and range of these key dimensions and features on the target workpiece are identified, and the target workpiece is divided into multiple measurement areas according to the identification results. All measurement areas combined will cover the entire target workpiece.

[0063] Step 202 : Move the camera to photograph each measurement area of ​​the target workpiece to obtain a regional image corresponding to each measurement area.

[0064] The camera can be pre-installed on the machine tool through a fixed bracket or a supporting structure. The camera can be an industrial camera. Before shooting, the camera resolution and lens focal length can be set according to the measurement accuracy requirements. The movement of the camera can be controlled by a CNC workbench, an electric slide, a linear guide or a robotic arm. The camera is preferably able to move in three-dimensional space to cover all measurement areas. Motion control algorithms such as proportional-integral-derivative (PID) control and stepper control can be used to accurately control the movement path and position of the camera to accurately capture each measurement area of ​​the target workpiece. During the shooting process, the focal length and angle of the camera can be adjusted as needed to obtain a clear and high-resolution image. The position to which the camera should move can be calculated based on the center point position and size of each measurement area, so as to control the camera to move to each predetermined measurement area in turn. After each movement is completed, the camera is triggered to capture one or more images to ensure that all details of the measurement area are covered. The images captured by the camera can be stored, and an index can be established for each image to record its shooting position and measurement area.

[0065] Step 203: determining the adjacent image of each regional image according to the measurement area corresponding to each regional image.

[0066] Adjacent images refer to adjacent and overlapping images when shooting or cutting multiple images to cover a workpiece. When the workpiece is divided into multiple measurement areas and each measurement area is represented by a separate image, there will be an adjacent relationship between these images. These adjacent images are adjacent images. Figure 4 As shown, image A and image C can be considered as adjacent images of image B.

[0067] When taking each regional image, the corresponding camera shooting position and viewing angle information (such as the coordinates of the camera, shooting angle, etc.) can be recorded. The camera position and angle recorded during shooting can be used to calculate the position of each regional image on the workpiece, set an adjacency threshold, and determine whether the coverage areas of the two images overlap or are adjacent. For example, if the center point distances of the measurement areas corresponding to the two images are within a certain range, they are considered to be adjacent images. Alternatively, feature points can be extracted from each regional image, and feature points in different images can be compared to find similar or identical feature points. If there are a sufficient number of matching feature points between the two images, they are considered to be adjacent images. The adjacency relationship of the images can be recorded in a data structure, which can be an array, a list, or a dictionary, to facilitate subsequent image stitching operations.

[0068] Step 204 , according to each regional image and the adjacent images of each regional image, the regional images are deduplicated and merged to obtain a workpiece image.

[0069] For each regional image, feature extraction algorithms such as Scale-invariant feature transform (SIFT) and Speeded Up Robust Features (SURF) can be used to extract key feature points, and matching algorithms such as Fast Library for Approximate Nearest Neighbors (FLANN) and brute force matching can be used to match feature points between adjacent images to find overlapping areas. The homography matrix is ​​applied to transform an image to a position aligned with its adjacent images to achieve image registration, and the registered images are superimposed on the same coordinate system to create a preliminary stitched image. For overlapping areas, image fusion algorithms such as linear fusion and Laplace pyramid fusion can be used to eliminate boundary effects and make the image transition natural. Repeat the above steps for each set of adjacent images to achieve sequential stitching of multiple images. Finally, a complete workpiece image is formed. For example, the image stitching process can be as follows Figure 4 As shown, a complete image representing the entire measurement area of ​​the target workpiece will eventually be obtained.

[0070] Through the above steps, the images of each region can be deduplicated and seamlessly merged to obtain a complete workpiece image. This step ensures accurate registration and natural transition between all regional images, so that the final stitched image has high-quality visual effects and accurate position information.

[0071] Step 205, obtaining the intrinsic parameters and extrinsic parameters of the camera.

[0072] The intrinsic parameters are used to describe the properties of the camera itself, which may include the focal length, principal point coordinates, distortion coefficients, etc. The extrinsic parameters are used to describe the posture of the camera relative to the measurement environment (such as the workpiece or the world coordinate system), for example, they may include a rotation matrix and a translation vector. The rotation matrix describes the rotation state of the camera in space, and the translation vector describes the translation state of the camera relative to the world coordinate system.

[0073] Step 206 , analyzing the workpiece image in combination with the internal reference and the external reference to obtain measurement data of the target workpiece.

[0074] First, the workpiece image can be corrected. That is, the distortion coefficient in the camera intrinsic parameter can be used to correct the geometric distortion in the workpiece image, and the inverse distortion mapping can be applied to convert the distorted image into a corrected distortion-free image to ensure that the straight lines in the image remain straight lines.

[0075] Next, feature extraction can be performed on the workpiece image. For example, edge detection or morphological operations can be used to extract key features of the target workpiece, such as holes, edges, grooves, etc., or advanced feature extraction methods (such as SIFT, SURF, or ORB) can be used to obtain feature points in the workpiece image.

[0076] Thirdly, the coordinates of the feature points in the workpiece image can be transformed. External parameters (such as rotation matrix and translation vector) can be used to transform the feature points in the image coordinate system into the world coordinate system of the target workpiece. The projection transformation formula of the camera is applied to transform the two-dimensional coordinates of the image plane into physical coordinates in three-dimensional space.

[0077] Finally, the target workpiece can be geometrically measured to calculate the actual physical dimensions of the workpiece features (such as hole diameter, slot width, and margin). The geometric formulas and standard measurement methods are used to calculate the dimensions, angles, and relative positions of each feature, thereby obtaining the measurement data of the target workpiece.

[0078] Step 207 , determining whether the measurement data of the target workpiece matches the design data of the target workpiece, if so, executing step 208 , if not, executing step 209 .

[0079] The measurement data reflects the actual physical size and features of the target workpiece. Specifically, the design data of the target workpiece can be obtained from the drawing model or design drawing. The design data may include specific parameters such as the geometric size, aperture, groove depth, and position of the target workpiece. A tolerance range can be set to determine whether the difference between the measurement data of the target workpiece and the design data of the target workpiece is within the tolerance range. If the measured value of the feature is within the tolerance range of the design value, the feature is considered to match. The tolerance range defines the allowable error of each feature to determine whether it matches. For example, the position coordinate difference of the feature in the design data and the measurement data can be compared to obtain the position difference, and the size difference of the feature in the design data and the measurement data can be compared to obtain the size difference. The features can be compared item by item to determine whether the corresponding features are within the tolerance range, and finally the comparison results of all features are summarized to determine whether they match.

[0080] It is also possible to draw an actual rendering of the target workpiece based on the measurement data of the target workpiece, obtain a design rendering corresponding to the design data of the target workpiece, and compare the actual rendering with the design rendering to determine whether the measurement data of the target workpiece matches the design data of the target workpiece.

[0081] Step 208: Determine whether the processing result of the target workpiece is qualified.

[0082] When all features are within the tolerance range, the workpiece is determined to be qualified, and if any feature exceeds the tolerance range, the workpiece is determined to be unqualified. The qualified workpiece can be stopped for reprocessing, and the qualified workpiece can be removed from the machine tool.

[0083] Step 209: determine that the processing result of the target workpiece is unqualified.

[0084] If the processing result of the target workpiece is unqualified, the unqualified features or items can be marked to prompt or guide reprocessing.

[0085] Step 210, determining the difference between the measured data and the design data.

[0086] The differences between the measured data and the designed data for each feature can be calculated, and these differences can include position differences, size differences, etc.

[0087] Step 211 , reprocessing the target workpiece according to the difference.

[0088] The nature of the difference can be analyzed, that is, for each feature, the direction of the difference and the specific size can be determined. The source of the difference can be determined, that is, the cause of the error can be analyzed in combination with factors such as process flow and equipment accuracy. The reprocessing strategy can be set or adjusted based on the analysis results. For example, if the actual size is larger than the designed size, excess material can be removed; if the actual size of the workpiece is smaller than the designed size, material can be added; if the position deviation is large, the position of the workpiece can be adjusted or repositioned.

[0089] The reprocessing strategy can be converted into specific processing instructions and passed to CNC machine tools or other processing equipment, so that CNC machine tools or other processing equipment can adjust the process flow to meet the reprocessing needs. The reprocessed workpiece can be measured again to obtain new measurement data. Re-execute the previous steps, compare the new measurement data with the design data, and verify whether the reprocessing results are qualified.

[0090] Through the above steps, the workpiece can be finely processed to ensure that the target workpiece finally meets the design requirements.

[0091] The workpiece measurement method of this embodiment uses a camera to complete the workpiece measurement directly on the machine tool, avoiding the step of moving the workpiece to the optical measuring instrument, thereby saving time; using the camera for measurement, the process of reinstalling the workpiece after detection and repeatedly adjusting the coordinate system is eliminated, thereby improving the overall processing efficiency; the camera measurement has no contact with the workpiece, and only needs to analyze the image taken by the camera, thus overcoming the measurement error problem caused by the probe's own volume, especially when measuring special structures such as small inner diameter holes and right-angle holes, it can provide more accurate measurement results; the camera can obtain high-resolution images, and various complex structures can be accurately measured through image analysis technology, and the scope of application is wider than that of the probe; camera measurement is a non-contact measurement method, which is suitable for workpieces that are easily deformed or damaged, reducing the adverse effects of physical contact; when measuring with the camera, the analysis of the workpiece image and the extraction of measurement data can be performed automatically, reducing errors caused by human intervention and improving the reliability and efficiency of the measurement process.

[0092] Figure 5 is a schematic diagram of the structure of a workpiece measuring device provided in an embodiment of the present invention. The device is suitable for executing the workpiece measuring method provided in an embodiment of the present invention. Figure 5 As shown, the device may specifically include:

[0093] A shooting control module 401 is used to shoot a target workpiece installed on a machine tool using a camera to obtain a workpiece image;

[0094] An analysis module 402 is used to analyze the workpiece image to obtain measurement data of the target workpiece;

[0095] The comparison module 403 is used to compare the measurement data of the target workpiece with the design data of the target workpiece to obtain a processing result of the target workpiece.

[0096] In one embodiment, the shooting control module 401 uses the camera to shoot a target workpiece mounted on the machine tool to obtain a workpiece image, including:

[0097] Determining each measurement area of ​​the target workpiece;

[0098] Moving the camera to photograph the respective measurement areas of the target workpiece to obtain area images corresponding to the respective measurement areas;

[0099] The region images are stitched together to obtain the workpiece image.

[0100] In one embodiment, the shooting control module 401 stitches the regional images to obtain the workpiece image, including:

[0101] Determining an adjacent image of each of the regional images according to the measurement area corresponding to each of the regional images;

[0102] According to each of the region images and the adjacent images of each of the region images, the region images are deduplicated and merged to obtain the workpiece image.

[0103] In one embodiment, the analysis module 402 analyzes the workpiece image to obtain the measurement data of the target workpiece, including:

[0104] Obtaining the intrinsic and extrinsic parameters of the camera;

[0105] The workpiece image is analyzed in combination with the internal reference and the external reference to obtain measurement data of the target workpiece.

[0106] In one embodiment, the comparison module 403 compares the measurement data of the target workpiece with the design data of the target workpiece to obtain the processing result of the target workpiece, including:

[0107] Drawing an actual effect diagram of the target workpiece according to the measurement data of the target workpiece;

[0108] Obtaining a design rendering corresponding to the design data of the target workpiece;

[0109] The actual effect diagram and the design effect diagram are compared to obtain the processing result of the target workpiece.

[0110] In one embodiment, the comparison module 403 compares the measurement data of the target workpiece with the design data of the target workpiece to obtain the processing result of the target workpiece, including:

[0111] determining whether the measurement data of the target workpiece matches the design data of the target workpiece;

[0112] If they match, determining that the processing result of the target workpiece is qualified;

[0113] If there is no match, it is determined that the processing result of the target workpiece is unqualified.

[0114] In one embodiment, the device further comprises a processing control module, and the processing control module is used to:

[0115] determining a difference between the measurement data and the design data;

[0116] The target workpiece is re-processed according to the difference.

[0117] Those skilled in the art can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional modules is used as an example for illustration. In actual applications, the above-mentioned functions can be assigned to different functional modules as needed, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above. The specific working process of the functional modules described above can refer to the corresponding process in the aforementioned method embodiment, and will not be repeated here.

[0118] The device of the embodiment of the present invention uses a camera to directly complete the workpiece measurement on the machine tool, avoiding the step of moving the workpiece to the optical measuring instrument, thereby saving time; using the camera for measurement, the process of reinstalling the workpiece after detection and repeatedly adjusting the coordinate system is omitted, thereby improving the overall processing efficiency; the camera measurement has no contact with the workpiece, and only needs to analyze the image taken by the camera, thereby overcoming the measurement error problem caused by the probe's own volume, especially when measuring special structures such as small inner diameter holes and right-angle holes, it can provide more accurate measurement results; the camera can obtain high-resolution images, and various complex structures can be accurately measured through image analysis technology, and the scope of application is wider than that of the probe; camera measurement is a non-contact measurement method, which is suitable for workpieces that are easily deformed or damaged, and reduces the adverse effects of physical contact; when the camera is measuring, the analysis of the workpiece image and the extraction of measurement data can be performed automatically, reducing errors caused by human intervention and improving the reliability and efficiency of the measurement process.

[0119] An embodiment of the present invention further provides a machine tool, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the workpiece measurement method provided in any of the above embodiments is implemented.

[0120] An embodiment of the present invention further provides a computer-readable medium on which a computer program is stored. When the program is executed by a processor, the workpiece measurement method provided by any of the above embodiments is implemented.

[0121] Reference below Figure 6 , which shows a schematic structural diagram of a computer system 500 suitable for implementing a machine tool according to an embodiment of the present invention. Figure 6 The electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present invention.

[0122] like Figure 6As shown, the computer system 500 includes a central processing unit (CPU) 501, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 502 or a program loaded from a storage part 508 into a random access memory (RAM) 503. In the RAM 503, various programs and data required for the operation of the computer system 500 are also stored. The CPU 501, the ROM 502, and the RAM 503 are connected to each other via a bus 504. An input / output (I / O) interface 505 is also connected to the bus 504.

[0123] The following components are connected to the I / O interface 505: an input section 506 including a keyboard, a mouse, etc.; an output section 507 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage section 508 including a hard disk, etc.; and a communication section 509 including a network interface card such as a LAN card, a modem, etc. The communication section 509 performs communication processing via a network such as the Internet. A drive 510 is also connected to the I / O interface 505 as needed. A removable medium 511, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 510 as needed, so that a computer program read therefrom is installed into the storage section 508 as needed.

[0124] In particular, according to the embodiments disclosed in the present invention, the process described above with reference to the flowchart can be implemented as a computer software program. For example, the embodiments disclosed in the present invention include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from the network through the communication part 509, and / or installed from the removable medium 511. When the computer program is executed by the central processing unit (CPU) 501, the above-mentioned functions defined in the system of the present invention are executed.

[0125] It should be noted that the computer-readable medium shown in the present invention may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present invention, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, device or device. In the present invention, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, which carries a computer-readable program code. This propagated data signal may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Computer-readable signal media may also be any computer-readable medium other than computer-readable storage media, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer-readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, optical cable, RF, etc., or any suitable combination of the above.

[0126] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present invention. In this regard, each box in the flow chart or block diagram can represent a module, a program segment, or a part of a code, and the above-mentioned module, program segment, or a part of a code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram or flow chart, and the combination of the boxes in the block diagram or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0127] The modules and / or units involved in the embodiments of the present invention may be implemented in software or hardware. The modules and / or units described may also be set in a processor. For example, it may be described as follows: a processor includes a shooting control module, an analysis module, and a comparison module. The names of these modules do not, in some cases, limit the modules themselves.

[0128] As another aspect, the present invention further provides a computer-readable medium, which may be included in the device described in the above embodiment; or may exist independently without being assembled into the device. The above computer-readable medium carries one or more programs, and when the above one or more programs are executed by a device, the device includes:

[0129] Using the camera to photograph a target workpiece mounted on the machine tool to obtain a workpiece image;

[0130] Analyzing the workpiece image to obtain measurement data of the target workpiece;

[0131] The measurement data of the target workpiece and the design data of the target workpiece are compared to obtain a processing result of the target workpiece.

[0132] The solution of the embodiment of the present invention uses a camera to directly complete the workpiece measurement on the machine tool, avoiding the step of moving the workpiece to the optical measuring instrument, thereby saving time; using camera measurement, the process of reinstalling the workpiece after detection and repeatedly adjusting the coordinate system is omitted, thereby improving the overall processing efficiency; the camera measurement has no contact with the workpiece, and only needs to analyze the image taken by the camera, thereby overcoming the measurement error problem caused by the probe's own volume, especially when measuring special structures such as small inner diameter holes and right-angle holes, it can provide more accurate measurement results; the camera can obtain high-resolution images, and various complex structures can be accurately measured through image analysis technology, and the scope of application is wider than that of the probe; camera measurement is a non-contact measurement method, which is suitable for workpieces that are easily deformed or damaged, reducing the adverse effects caused by physical contact; when measuring with a camera, the analysis of the workpiece image and the extraction of measurement data can be performed automatically, reducing errors caused by human intervention and improving the reliability and efficiency of the measurement process.

[0133] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps described in the present invention can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solution of the present invention can be achieved, and this document does not limit this.

[0134] It should be noted that the collection, collection, updating, analysis, processing, use, transmission, storage and other aspects of user personal information involved in the technical solution of this disclosure are in compliance with the provisions of relevant laws and regulations, are used for legitimate purposes, and do not violate public order and good morals. Necessary measures are taken for user personal information to prevent illegal access to user personal information data and maintain the security of user personal information, network security and national security.

[0135] The above specific implementations do not constitute a limitation on the protection scope of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions may occur depending on design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.

Claims

1. A workpiece measuring method, characterized in that: Applied to a machine tool equipped with a camera, the workpiece measurement method includes: Using the camera to photograph a target workpiece mounted on the machine tool to obtain a workpiece image; Analyzing the workpiece image to obtain measurement data of the target workpiece; The measurement data of the target workpiece and the design data of the target workpiece are compared to obtain a processing result of the target workpiece.

2. The workpiece measuring method according to claim 1, characterized in that: The step of photographing a target workpiece mounted on the machine tool using the camera to obtain a workpiece image includes: Determining each measurement area of ​​the target workpiece; Moving the camera to photograph the respective measurement areas of the target workpiece to obtain area images corresponding to the respective measurement areas; The region images are stitched together to obtain the workpiece image.

3. The workpiece measuring method according to claim 2, characterized in that: The step of stitching the regional images to obtain the workpiece image includes: Determining an adjacent image of each of the regional images according to the measurement area corresponding to each of the regional images; According to each of the region images and the adjacent images of each of the region images, the region images are deduplicated and merged to obtain the workpiece image.

4. The workpiece measuring method according to claim 1, characterized in that: The step of analyzing the workpiece image to obtain measurement data of the target workpiece includes: Obtaining the intrinsic and extrinsic parameters of the camera; The workpiece image is analyzed in combination with the internal reference and the external reference to obtain measurement data of the target workpiece.

5. The workpiece measuring method according to claim 1, characterized in that: The comparing the measurement data of the target workpiece with the design data of the target workpiece to obtain the processing result of the target workpiece includes: Drawing an actual effect diagram of the target workpiece according to the measurement data of the target workpiece; Obtaining a design rendering corresponding to the design data of the target workpiece; The actual effect diagram and the design effect diagram are compared to obtain the processing result of the target workpiece.

6. The workpiece measuring method according to claim 1, characterized in that: The comparing the measurement data of the target workpiece with the design data of the target workpiece to obtain the processing result of the target workpiece includes: determining whether the measurement data of the target workpiece matches the design data of the target workpiece; If they match, determining that the processing result of the target workpiece is qualified; If there is no match, it is determined that the processing result of the target workpiece is unqualified.

7. The workpiece measuring method according to claim 6, characterized in that: After determining that the processing result of the target workpiece is unqualified, the method further includes: determining a difference between the measurement data and the design data; The target workpiece is re-processed according to the difference.

8. A workpiece measuring device, characterized in that: Applied to a machine tool equipped with a camera, the workpiece measuring device comprises: A shooting control module, used for shooting a target workpiece mounted on the machine tool with the camera to obtain a workpiece image; An analysis module, used for analyzing the workpiece image to obtain measurement data of the target workpiece; The comparison module is used to compare the measurement data of the target workpiece with the design data of the target workpiece to obtain a processing result of the target workpiece.

9. A machine tool comprising a memory, a processor and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the program, the workpiece measuring method according to any one of claims 1 to 7 is implemented.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the workpiece measuring method according to any one of claims 1 to 7 is implemented.