Visual inspection method of carbon dioxide five-axis cutting head based on image processing
Through image processing-based methods, the product image of the cutting stage of the carbon dioxide five-axis cutting machine is predicted and combined with the driving data and cutting head accuracy, the carbon dioxide five-axis cutting head detection problem in complex scenarios is solved, and efficient and accurate cutting evaluation is achieved. Suitable for complex application scenarios.
Patent Information
- Application Number
- CN202311308263.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-10-10
- Publication Date
- 2024-12-06
- Estimated Expiration
- 2043-10-10
AI Technical Summary
Existing visual detection technology cannot effectively detect cutting products of carbon dioxide five-axis cutting heads in complex scenarios, and cannot be suitable for complex application scenarios.
Using an image processing-based method, the cutting evaluation results are determined by acquiring the driving strategy of the carbon dioxide five-axis cutting machine and the image data of the image acquisition device, and the product images in the cutting stage are predicted, and the driving data and preset cutting head accuracy are combined to determine the cutting evaluation results to achieve Accurate inspection of target products.
It improves product cutting efficiency in multi-product cutting scenarios, achieves more accurate and efficient cutting evaluation results, is suitable for complex cutting situations, and avoids the impact on cutting of other products.
Smart Images

Figure CN117422672B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of visual inspection technology, and in particular to a visual inspection method for a carbon dioxide five-axis cutting head based on image processing. Background Art
[0002] With the development of computer technology and automation technology, visual inspection technology has been applied to the field of automation. For example, through visual inspection technology, products in the automation industry chain are inspected to determine whether the products are qualified.
[0003] At present, for visual inspection technology, image processing is generally achieved through models. For example, a preset model is used to determine whether a product image is consistent with a standard product image. If they are consistent, the product is qualified. Although this visual inspection method can achieve product inspection, it has limitations and cannot be applied to product inspection in complex scenarios. Summary of the invention
[0004] The purpose of this application is to provide a visual inspection method for a carbon dioxide five-axis cutting head based on image processing, which can realize accurate and efficient inspection of cut products based on a carbon dioxide five-axis cutting head.
[0005] To achieve the above-mentioned purpose, an embodiment of the present application provides a carbon dioxide five-axis cutting head visual inspection method based on image processing, which is applied to a carbon dioxide five-axis cutting machine, wherein the carbon dioxide five-axis cutting machine comprises: a five-axis cutting head, a driving device and an image acquisition device, and the visual inspection method comprises: after the cutting of the target product is completed, obtaining the driving strategy of the driving device, and obtaining the image data of the image acquisition device; the driving strategy comprises the driving data of each axis; the image data comprises: an initial image of the target product before being cut and the real product images of the target product at multiple cutting stages; according to the driving strategy and the initial image, determining the predicted product images of the target product at the multiple cutting stages; according to the real product image, the predicted product image, the cutting axis corresponding to the driving data and the preset cutting head accuracy, determining the cutting evaluation result of the target product.
[0006] In a possible implementation, the acquiring of image data of the image acquisition device includes: determining the start cutting time and the end cutting time corresponding to a plurality of cutting stages respectively according to the driving data of the respective axes; determining a plurality of image acquisition time points according to the start cutting time and the end cutting time corresponding to the plurality of cutting stages respectively; wherein any image acquisition time point is the start cutting time, the end cutting time, or is between the start cutting times of adjacent cutting stages; acquiring a plurality of real product images acquired by the image acquisition device at the plurality of image acquisition time points respectively, and determining the cutting stages corresponding to the plurality of real product images respectively, and acquiring an initial image acquired by the image acquisition device when the target product is not cut; and determining the image data according to the plurality of real product images and the initial image.
[0007] In a possible implementation, the driving strategy includes: first axis driving data, second axis driving data, third axis driving data, fourth axis driving data and fifth axis driving data; the determining of the start cutting time and the end cutting time corresponding to the plurality of cutting stages respectively according to the driving data of the respective axes includes: determining the start cutting time and the end cutting time corresponding to the first cutting stage according to the first axis driving data; determining the start cutting time and the end cutting time corresponding to the second cutting stage according to the second axis driving data, the end cutting time corresponding to the first cutting stage and a preset first switching time; the first switching time is used to characterize the time for switching from controlling the first axis to controlling the second axis; determining the start cutting time and the end cutting time corresponding to the second cutting stage according to the third axis driving data, the end cutting time corresponding to the second cutting stage and a preset first switching time The beam cutting time and the preset second switching time are used to determine the start cutting time and the end cutting time corresponding to the third cutting stage; the second switching time is used to characterize the time for switching from controlling the second axis to controlling the third axis; according to the fourth axis driving data, the end cutting time corresponding to the third cutting stage and the preset third switching time, the start cutting time and the end cutting time corresponding to the fourth cutting stage are determined; the third switching time is used to characterize the time for switching from controlling the third axis to controlling the fourth axis; according to the fifth axis driving data, the end cutting time corresponding to the fourth cutting stage and the preset third switching time, the start cutting time and the end cutting time corresponding to the fifth cutting stage are determined; the fourth switching time is used to characterize the time for switching from controlling the fourth axis to controlling the fifth axis.
[0008] In a possible implementation, the driving strategy includes: first-axis driving data, second-axis driving data, third-axis driving data, fourth-axis driving data and fifth-axis driving data, and determining the predicted product image of the target product in the multiple cutting stages according to the driving strategy and the initial image includes: determining the predicted product image of the target product in the first cutting stage according to the first-axis driving data and the initial image; determining the predicted product image of the target product in the second cutting stage according to the second-axis driving data, the initial image and the predicted product image of the target product in the first cutting stage; determining the predicted product image of the target product in the third cutting stage according to the third-axis driving data, the initial image and the predicted product image of the target product in the second cutting stage; determining the predicted product image of the target product in the fourth cutting stage according to the fourth-axis driving data, the initial image and the predicted product image of the target product in the third cutting stage; determining the predicted product image of the target product in the fifth cutting stage according to the fifth-axis driving data, the initial image and the predicted product image of the target product in the fourth cutting stage.
[0009] In a possible implementation, determining the predicted product image of the target product in the first cutting stage based on the first-axis drive data and the initial image includes: determining the first cutting point of the target product in the initial image based on the starting cutting position of the cutting head; determining the second cutting point of the target product in the initial image based on the first-axis drive data and the first cutting point; determining a cropping strategy for the target product in the initial image based on the first cutting point and the second cutting point; and cropping the initial image according to the cropping strategy to obtain the predicted product image of the target product in the first cutting stage.
[0010] In a possible implementation, determining the predicted product image of the target product at the second cutting stage based on the second-axis driving data, the initial image and the predicted product image of the target product at the first cutting stage includes: determining a third cutting point of the target product in the predicted product image at the first cutting stage based on the second-axis driving data, the initial image and the predicted product image of the target product at the first cutting stage; determining a fourth cutting point of the target product in the predicted product image at the first cutting stage based on the second-axis driving data and the third cutting point; determining a cropping strategy for the target product in the predicted product image at the first cutting stage in the initial image based on the third cutting point and the fourth cutting point; and cropping the predicted product image of the target product at the first cutting stage based on the cropping strategy to determine the predicted product image of the target product at the second cutting stage.
[0011] In a possible implementation, the cutting evaluation result of the target product is determined based on the real product image, the predicted product image, the cutting axis corresponding to the drive data, and the preset cutting head accuracy, including: determining a predicted similarity range based on the cutting axis corresponding to the drive data and the preset cutting head accuracy; the predicted similarity range is used to characterize the similarity range between the real product image and the predicted product image; determining the similarity between the real product image and the predicted product image corresponding to multiple cutting stages respectively; and determining the cutting evaluation result of the target product based on the similarity and the predicted similarity range.
[0012] In a possible implementation, the method of determining a predicted similarity range based on the cutting axis corresponding to the driving data and the preset cutting head accuracy includes: determining the cutting errors respectively corresponding to the multiple cutting axes of the cutting head according to the preset cutting head accuracy; determining the similarities respectively corresponding to the multiple cutting stages according to the cutting axis corresponding to the driving data, the cutting errors respectively corresponding to the multiple cutting axes, and the cutting stages corresponding to the cutting axis corresponding to the driving data; and determining the predicted similarity range according to the similarities respectively corresponding to the multiple cutting stages.
[0013] In one possible implementation, the cutting evaluation result is used to characterize whether the target product is a product that is qualified for cutting; the visual inspection method also includes: if the cutting evaluation result characterizes that the target product is a product that is qualified for cutting, determining an optimized cutting strategy corresponding to the target product based on the real product image, the predicted product image and the preset standard cutting product image; determining an optimized driving strategy based on the optimized cutting strategy and the driving strategy; if the cutting evaluation result characterizes that the target product is not a product that is qualified for cutting, determining a secondary cutting strategy corresponding to the target product based on the real product image and the predicted product image; determining a secondary driving strategy based on the secondary cutting strategy, and controlling the driving device to perform secondary cutting on the target product.
[0014] In a possible implementation, determining the secondary cutting strategy corresponding to the target product based on the real product image and the predicted product image includes: determining a first target product size and a first target product shape corresponding to the real product image of the last cutting stage, and determining a second target product size and a second target product shape corresponding to the predicted product image of the last cutting stage; if the first target product size is larger than the second target product size, and the first target product shape and the second target product shape are inconsistent, determining an associated product size based on the second target product size, and determining an associated product shape based on the second target product shape, and determining the secondary cutting strategy based on the second target product size, the second target product shape, the associated product size, and the associated product shape; if the first target product size is smaller than or equal to the second target product size, and the first target product shape and the second target product shape are consistent, determining the secondary cutting strategy based on the first target size, the second target size, the first target shape, and the second target shape.
[0015] Compared with the prior art, the image processing-based visual inspection method for a carbon dioxide five-axis cutting head provided by the present application takes into account the complex application scenarios of a carbon dioxide five-axis cutting machine. It does not adopt the method of presetting a standard product image, but instead predicts product images at different cutting stages based on the driving strategy of the carbon dioxide five-axis cutting machine after the cutting of the target product is completed. Then, based on the predicted product image and the real product image, as well as the cutting axis corresponding to the driving data and the preset cutting head accuracy, the cutting evaluation result of the target product is determined. In this way, not only the complex cutting situation of the carbon dioxide five-axis cutting machine is considered, but also the cutting axis corresponding to the driving data and the preset cutting head accuracy are combined. Moreover, after the cutting of the target product is completed, the cutting evaluation of the product is performed again, which does not affect the cutting of other products, and can improve the product cutting efficiency in multi-product cutting scenarios, thereby achieving more accurate and efficient determination of cutting evaluation results. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] Figure 1 is a structural schematic diagram of a carbon dioxide five-axis cutting machine according to an embodiment of the present application;
[0017] Figure 2 is a flow chart of a visual inspection method for a carbon dioxide five-axis cutting head based on image processing according to an embodiment of the present application;
[0018] Figure 3 It is a schematic diagram of the structure of a terminal device according to one embodiment of the present application. DETAILED DESCRIPTION
[0019] The specific implementation methods of the present application are described in detail below in conjunction with the accompanying drawings, but it should be understood that the protection scope of the present application is not limited by the specific implementation methods.
[0020] Unless explicitly stated otherwise, throughout the specification and claims, the term “comprise” or variations such as “include” or “comprising”, etc., will be understood to include the stated elements or components but not to exclude other elements or components.
[0021] The visual inspection solution provided by the embodiment of the present application can be applied to application scenarios where a carbon dioxide five-axis cutting machine is used to cut products. In these application scenarios, the carbon dioxide five-axis cutting machine can cut the products, and the cut products are inspected by visual inspection to ensure that the products meet the requirements.
[0022] The carbon dioxide five-axis cutting machine is a cutting device that uses carbon dioxide as the cutting medium, and its cutting head is configured with five axes, which can realize the movement of the cutting head in five axis directions to achieve more flexible cutting control. The five axes include: X-axis, Y-axis, Z-axis and two rotation axes; the specific implementation principle can refer to the mature technology in this field.
[0023] Please refer to the following Figure 1 , which is a functional structure block diagram of a carbon dioxide five-axis cutting machine provided in an embodiment of the present application, which includes: a five-axis cutting head, a driving device and an image acquisition device.
[0024] Among them, the five-axis cutting head is used to realize product cutting, and its five axes are connected to the driving device, which can control the movement of the five axes; the image acquisition device is used to capture product images, so as to realize visual inspection based on the product images.
[0025] In some embodiments, the image acquisition device is disposed at a position where images of products can be acquired.
[0026] In some embodiments, the cutting machine further includes: a controller, which is connected to the driving device and the image acquisition device respectively. The controller can be in the form of a chip, a control device, an image processor, etc., which is not limited here.
[0027] Furthermore, the technical solutions of the embodiments of the present application can be applied to a controller to achieve visual detection.
[0028] At present, for visual inspection technology, image processing is generally achieved through models. For example, a preset model is used to determine whether a product image is consistent with a standard product image. If they are consistent, the product is qualified. Although this visual inspection method can achieve product inspection, it has limitations and cannot be applied to product inspection in complex scenarios. In other words, it cannot be applied to scenes with more complex cutting methods such as five-axis cutting heads.
[0029] Based on this, the embodiment of the present application provides a visual inspection solution. Considering the complex application scenarios of the carbon dioxide five-axis cutting machine, it does not adopt the method of presetting standard product images. Instead, after the cutting of the target product is completed, based on the driving strategy of the carbon dioxide five-axis cutting machine, the product images at different cutting stages are predicted, and then based on the predicted product image and the real product image, as well as the cutting axis corresponding to the driving data and the preset cutting head accuracy, the cutting evaluation result of the target product is determined. In this way, not only the complex cutting situation of the carbon dioxide five-axis cutting machine is considered, but also the cutting axis corresponding to the driving data and the preset cutting head accuracy are combined. Moreover, after the cutting of the target product is completed, the cutting evaluation of the product is performed again, which does not affect the cutting of other products, and can improve the product cutting efficiency in multi-product cutting scenarios, thereby achieving more accurate and efficient determination of cutting evaluation results.
[0030] Please refer to the following Figure 2 , is a flow chart of a visual inspection method for a carbon dioxide five-axis cutting head based on image processing provided in an embodiment of the present application, the visual inspection method comprising:
[0031] Step 201, after the target product is cut, a driving strategy of a driving device is obtained, and image data of an image acquisition device is obtained.
[0032] The driving strategy includes driving data of each axis; the image data includes: an initial image of the target product before being cut and real product images of the target product at multiple cutting stages.
[0033] In some embodiments, the driving strategy of the driving device is used to achieve cutting of a target product, so it may include driving data of each axis.
[0034] For example, if the cutting of the target product only requires the cutting head to move on one axis, the drive strategy only needs to include the drive data of this axis; if the cutting of the target product requires the cutting head to move on multiple axes, the drive strategy needs to include the drive data of these multiple axes.
[0035] In the embodiments of the present application, the determination of the driving strategy may refer to the mature technology in the art and will not be described in detail here.
[0036] In some embodiments, the driving data of each axis may include: movement speed, movement direction, movement starting point, movement end point, etc.; through the driving data, the movement trajectory of the cutting head on the axis can be determined.
[0037] In some embodiments, the image acquisition device needs to capture a product image once before the target product starts to be cut, and the image at this time is the initial image; and when the target product is in different cutting stages, it is necessary to capture images separately to obtain real product images at multiple cutting stages.
[0038] In some embodiments, multiple cutting stages can be distinguished by multiple axes; for example, when the cutting head moves on the X-axis, it may be the first cutting stage; when the cutting head changes from the X-axis to the Y-axis, it may be the second cutting stage.
[0039] Furthermore, these cutting stages can be divided by combining the driving data of multiple axes.
[0040] Therefore, as an optional implementation, acquiring image data of an image acquisition device includes: determining the start cutting time and the end cutting time corresponding to a plurality of cutting stages respectively according to the driving data of each axis; determining a plurality of image acquisition time points according to the start cutting time and the end cutting time corresponding to the plurality of cutting stages respectively; wherein any image acquisition time point is the start cutting time, the end cutting time or is between the start cutting times of adjacent cutting stages; acquiring a plurality of real product images acquired by the image acquisition device at a plurality of image acquisition time points respectively, and determining the cutting stages corresponding to the plurality of real product images respectively, and acquiring an initial image acquired by the image acquisition device when the target product is not cut; and determining image data according to the plurality of real product images and the initial image.
[0041] In some embodiments, the driving data of each axis also includes: a start driving time and an end driving time. Then, assuming that the driving process of an axis corresponds to a cutting stage, the start driving time of the driving process is the start cutting time of the corresponding cutting stage, and the end driving time of the driving process is the end cutting time of the corresponding cutting stage.
[0042] Furthermore, based on the start cutting time and the end cutting time corresponding to the multiple cutting stages, multiple image acquisition time points are determined.
[0043] In some embodiments, both the cutting start time and the cutting end time can be regarded as image acquisition time points, and the images acquired at the image acquisition points are real product images at the corresponding cutting stages.
[0044] In other embodiments, a time point between the start cutting time of adjacent cutting stages and not belonging to the start cutting time and the end cutting time can also be regarded as an image acquisition time point. Moreover, for this image acquisition time point, if it is between the start cutting time and the end cutting time of a cutting stage, the acquired image is a real product image of the cutting stage; if it is between the end cutting time of a cutting stage and the start cutting time of the next cutting stage, it belongs to the real product image of the previous cutting stage.
[0045] In some embodiments, the image acquisition device acquires an initial image before cutting of the target product begins.
[0046] In some embodiments, if the driving strategy includes driving data of five axes, then the start driving time and the end driving time cannot be simply determined as the start cutting time and the end cutting time of the corresponding cutting stage.
[0047] Therefore, as another optional implementation, the driving strategy includes: first axis driving data, second axis driving data, third axis driving data, fourth axis driving data and fifth axis driving data; determining the start cutting time and end cutting time corresponding to multiple cutting stages respectively according to the driving data of each axis, including: determining the start cutting time and end cutting time corresponding to the first cutting stage according to the first axis driving data; determining the start cutting time and end cutting time corresponding to the second cutting stage according to the second axis driving data, the end cutting time corresponding to the first cutting stage and the preset first switching time; the first switching time is used to characterize the time for switching from controlling the first axis to controlling the second axis; determining the start cutting time and end cutting time corresponding to the second cutting stage according to the third axis driving data, the end cutting time corresponding to the second cutting stage and the preset first switching time The end cutting time and the preset second switching time determine the start cutting time and the end cutting time corresponding to the third cutting stage; the second switching time is used to characterize the time for switching from controlling the second axis to controlling the third axis; according to the fourth axis driving data, the end cutting time corresponding to the third cutting stage and the preset third switching time, the start cutting time and the end cutting time corresponding to the fourth cutting stage are determined; the third switching time is used to characterize the time for switching from controlling the third axis to controlling the fourth axis; according to the fifth axis driving data, the end cutting time corresponding to the fourth cutting stage and the preset third switching time, the start cutting time and the end cutting time corresponding to the fifth cutting stage are determined; the fourth switching time is used to characterize the time for switching from controlling the fourth axis to controlling the fifth axis.
[0048] In some embodiments, the start driving time in the first axis driving data is the start cutting time corresponding to the first cutting stage, and the end driving time in the first axis driving data is the end cutting time corresponding to the first cutting stage.
[0049] In some embodiments, a cutting time is determined based on the end cutting time corresponding to the first cutting stage and the preset first switching time, and then the cutting time is compared with the start driving time in the second axis driving data. If the two are equal, the start driving time in the second axis driving data is determined as the start cutting time corresponding to the second cutting stage; if the two are different, the later time is determined as the start cutting time of the second cutting stage. Further, a driving duration is determined based on the start driving time and the end driving time in the second axis driving data, and the end cutting time of the second cutting stage is determined based on the drive duration and the start cutting time of the second cutting stage.
[0050] In some embodiments, a cutting time is determined based on the end cutting time corresponding to the second cutting stage and the preset second switching time, and then the cutting time is compared with the start driving time in the third-axis driving data. If the two are equal, the start driving time in the third-axis driving data is determined as the start cutting time corresponding to the third cutting stage; if the two are different, the later time is determined as the start cutting time of the third cutting stage. Further, a driving duration is determined based on the start driving time and the end driving time in the third-axis driving data, and the end cutting time of the third cutting stage is determined based on the drive duration and the start cutting time of the third cutting stage.
[0051] In some embodiments, a cutting time is determined based on the end cutting time corresponding to the third cutting stage and the preset first switching time, and then the cutting time is compared with the start driving time in the fourth axis driving data. If the two are equal, the start driving time in the fourth axis driving data is determined as the start cutting time corresponding to the fourth cutting stage; if the two are different, the later time is determined as the start cutting time of the fourth cutting stage. Further, a driving duration is determined based on the start driving time and the end driving time in the fourth axis driving data, and the end cutting time of the fourth cutting stage is determined based on the drive duration and the start cutting time of the fourth cutting stage.
[0052] In some embodiments, a cutting time is determined based on the end cutting time corresponding to the fourth cutting stage and the preset first switching time, and then the cutting time is compared with the start driving time in the fifth-axis driving data. If the two are equal, the start driving time in the fifth-axis driving data is determined as the start cutting time corresponding to the fifth cutting stage; if the two are different, the later time is determined as the start cutting time of the fifth cutting stage. Further, a driving duration is determined based on the start driving time and the end driving time in the fifth-axis driving data, and the end cutting time of the fifth cutting stage is determined based on the drive duration and the start cutting time of the fifth cutting stage.
[0053] Step 202: Determine predicted product images of the target product at multiple cutting stages according to the driving strategy and the initial image.
[0054] As an optional implementation, step 202 includes: determining the predicted product image of the target product in the first cutting stage based on the first axis driving data and the initial image; determining the predicted product image of the target product in the second cutting stage based on the second axis driving data, the initial image and the predicted product image of the target product in the first cutting stage; determining the predicted product image of the target product in the third cutting stage based on the third axis driving data, the initial image and the predicted product image of the target product in the second cutting stage; determining the predicted product image of the target product in the fourth cutting stage based on the fourth axis driving data, the initial image and the predicted product image of the target product in the third cutting stage; determining the predicted product image of the target product in the fifth cutting stage based on the fifth axis driving data, the initial image and the predicted product image of the target product in the fourth cutting stage.
[0055] As an optional implementation, a predicted product image of the target product in the first cutting stage is determined based on the first-axis driving data and the initial image, including: determining the first cutting point of the target product in the initial image based on the starting cutting position of the cutting head; determining the second cutting point of the target product in the initial image based on the first-axis driving data and the first cutting point; determining a cropping strategy for the target product in the initial image based on the first cutting point and the second cutting point; and cropping the initial image according to the cropping strategy to obtain the predicted product image of the target product in the first cutting stage.
[0056] In some embodiments, the driving data also includes a starting position and an end position, and the starting position in the first axis driving data is the starting position of the cutting head. Based on the starting cutting position, the first cutting point in the target product is determined.
[0057] In some embodiments, a correspondence between the cutting position coordinate system and the image coordinate system can be established in advance. Based on the correspondence, when the cutting position is known, the corresponding pixel point in the image coordinate system can be accurately located. The establishment of the correspondence between the coordinate systems can refer to the mature technology in the field and will not be described in detail here.
[0058] In some embodiments, when the first cutting point is known, a corresponding cutting track can be simulated in the initial image according to the first axis driving data, the starting point of the cutting track is the first cutting point, and the end point of the cutting track is the second cutting point. Furthermore, the first cutting point and the second cutting point can determine the cutting strategy of the target product in the initial image.
[0059] It can be understood that the cutting strategy can be understood as a cutting trajectory generated according to the first cutting point, the second cutting point and the corresponding simulated cutting trajectory.
[0060] Furthermore, the predicted product image of the target product at the second cutting stage is determined based on the second-axis driving data, the initial image and the predicted product image of the target product at the first cutting stage, including: determining the third cutting point of the target product in the predicted product image at the first cutting stage based on the second-axis driving data, the initial image and the predicted product image of the target product at the first cutting stage; determining the fourth cutting point of the target product in the predicted product image at the first cutting stage based on the second-axis driving data and the third cutting point; determining a cropping strategy for the target product in the predicted product image at the first cutting stage in the initial image based on the third cutting point and the fourth cutting point; and cropping the predicted product image of the target product at the first cutting stage based on the cropping strategy to determine the predicted product image of the target product at the second cutting stage.
[0061] In some embodiments, the similarity between the initial image and the predicted product image of the target product in the first cutting stage is determined. If the similarity is within a preset similarity range, a third cutting point is determined based on the second-axis driving data; wherein the implementation method for determining the third cutting point based on the second-axis driving data is the same as the implementation method for determining the first cutting point.
[0062] In some embodiments, the preset similarity range is used to characterize the range in which the similarity between the product image and the initial image should be after each cutting. For example, after the first cutting, the image similarity should be between 80% and 90%; after the second cutting, the image similarity should be between 70% and 80%; after the third cutting, the image similarity should be between 60% and 70%; after the fourth cutting, the image similarity should be between 50% and 60%; after the fifth cutting, the image similarity should be less than 50%.
[0063] Furthermore, for the determination of the predicted products corresponding to the subsequent cutting stage, reference may be made to the method for determining the predicted products corresponding to the second cutting stage, which will not be described in detail here.
[0064] In other embodiments, in addition to determining the predicted product image in the above manner, a prediction model may be pre-built, and the prediction model is trained based on the driving data and the predicted product image. The trained model may simulate the predicted product image based on the driving data. Thus, the predicted product image may be directly determined using the prediction model.
[0065] Step 203, determining a cutting evaluation result of the target product according to the real product image, the predicted product image, the cutting axis corresponding to the drive data and the preset cutting head accuracy.
[0066] As an optional implementation, step 203 includes: determining a predicted similarity range based on the cutting axis corresponding to the driving data and the preset cutting head accuracy; the predicted similarity range is used to characterize the similarity range between the real product image and the predicted product image; determining the similarity between the real product image and the predicted product image corresponding to multiple cutting stages; and determining the cutting evaluation result of the target product based on the similarity and the predicted similarity range.
[0067] In some embodiments, a predicted similarity range is determined based on the cutting axis corresponding to the driving data and a preset cutting head accuracy, including: determining the cutting errors corresponding to multiple cutting axes of the cutting head according to the preset cutting head accuracy; determining the similarities corresponding to multiple cutting stages according to the cutting axis corresponding to the driving data, the cutting errors corresponding to the multiple cutting axes, and the cutting stages corresponding to the cutting axis corresponding to the driving data; determining a predicted similarity range according to the similarities corresponding to the multiple cutting stages.
[0068] In some embodiments, the basic error caused by different cutting head accuracies is preset, and then the cutting error of the cutting axis is determined based on the basic error. For example, the cutting errors of the X-axis, Y-axis and Z-axis are the same, which is the same as the basic error; the cutting errors of the rotating axis are the same, and based on the basic error, a preset value is added, which can be 10% of the basic error.
[0069] Furthermore, for any cutting stage, a similarity reference value is preset first, and then a floating value of the similarity is determined based on the cutting error corresponding to the cutting axis corresponding to the cutting stage, and based on the floating value, a predicted similarity range is generated on the basis of the reference value.
[0070] Further, based on the predicted similarity range, after determining the similarity between the real product images and the predicted product images corresponding to the multiple cutting stages, it is judged whether the similarity meets the predicted similarity range. If so, the cutting is qualified; otherwise, the cutting is unqualified.
[0071] In some embodiments, the cutting evaluation result is used to characterize whether the target product is a product qualified for cutting.
[0072] Then, the visual inspection method also includes: if the cutting evaluation result indicates that the target product is a product that is qualified for cutting, determining the optimized cutting strategy corresponding to the target product based on the real product image, the predicted product image and the preset standard cutting product image; determining the optimized driving strategy based on the optimized cutting strategy and the driving strategy; if the cutting evaluation result indicates that the target product is not a product that is qualified for cutting, determining the secondary cutting strategy corresponding to the target product based on the real product image and the predicted product image; determining the secondary driving strategy based on the secondary cutting strategy, and controlling the driving device to perform secondary cutting on the target product.
[0073] In some embodiments, if the similarity between the real product image and the preset standard cutting product image is greater than the similarity between the predicted product image and the preset standard cutting product image, the driving strategy needs to be optimized.
[0074] At this time, the image portion with the largest difference between the real product image and the preset image representing the cut product is compared, and the target axis driving data that needs to be optimized is determined based on the image portion. Then, the driving data of the target axis is re-determined to determine the optimized driving strategy.
[0075] In some embodiments, if the similarity between the real product image and the preset standard cutting product image is less than the similarity between the predicted product image and the preset standard cutting product image, there is no need to optimize the driving strategy.
[0076] At this time, the current situation can be fed back to the user, and the user can adjust other cutting strategies such as the emission intensity of carbon dioxide to determine the optimized cutting strategy.
[0077] In some embodiments, the gap between the real product and the predicted product image is compared, and a secondary cutting strategy is determined based on the gap.
[0078] In some embodiments, a secondary cutting strategy corresponding to the target product is determined based on the real product image and the predicted product image, including: determining the first target product size and the first target product shape corresponding to the real product image of the last cutting stage, and determining the second target product size and the second target product shape corresponding to the predicted product image of the last cutting stage; if the first target product size is larger than the second target product size, and the first target product shape and the second target product shape are inconsistent, determining the associated product size according to the second target product size, and determining the associated product shape according to the second target product shape, and determining the secondary cutting strategy according to the second target product size, the second target product shape, the associated product size and the associated product shape; if the first target product size is less than or equal to the second target product size, and the first target product shape and the second target product shape are consistent, determining the secondary cutting strategy according to the first target size, the second target size, the first target shape and the second target shape.
[0079] In some embodiments, the size and shape in the image coordinate system are first determined, and then the actual size and shape are determined according to the correspondence between the coordinate systems.
[0080] In some embodiments, the associated product size refers to the size of a product similar to the cut product corresponding to the target product; the associated product shape refers to the shape of a product similar to the cut product corresponding to the target product. Specifically, the association relationship between different products can be pre-configured, so that the associated product size and the associated product shape can be quickly determined based on the association relationship.
[0081] Thus, in this case, the cut products can be converted into other usable products, avoiding product waste and loss due to cutting failure.
[0082] In some embodiments, a secondary cutting strategy is determined based on the second target product size, the second target product shape, the associated product size and the associated product shape, which can be understood as a cutting strategy of cutting the second target product size to the associated product size and cutting the second target product shape to the associated product shape.
[0083] In some embodiments, a secondary cutting strategy is determined based on the first target size, the second target size, the first target shape and the second target shape, which can be understood as a cutting strategy of cutting the second target size to the first target product size and cutting the second target product shape to the first target product shape.
[0084] The implementation of the above-mentioned cutting strategy can refer to the mature technology in the field and will not be described in detail here.
[0085] It can be seen from the introduction of the above embodiments that the CO2 five-axis cutting head visual inspection method based on image processing, taking into account the complex application scenarios of the CO2 five-axis cutting machine, does not adopt the method of presetting standard product images, but after the cutting of the target product is completed, based on the driving strategy of the CO2 five-axis cutting machine, predicts the product images at different cutting stages, and then determines the cutting evaluation result of the target product based on the predicted product image and the real product image, as well as the cutting axis corresponding to the driving data and the preset cutting head accuracy. In this way, not only the complex cutting situation of the CO2 five-axis cutting machine is considered, but also the cutting axis corresponding to the driving data and the preset cutting head accuracy are combined. Moreover, after the cutting of the target product is completed, the cutting evaluation of the product is performed again, which does not affect the cutting of other products, and can improve the product cutting efficiency in multi-product cutting scenarios, thereby achieving more accurate and efficient determination of cutting evaluation results.
[0086] Please refer to Figure 3 , an embodiment of the present application also provides a terminal device, which can be used as the execution subject of the aforementioned visual detection method.
[0087] The terminal device includes a processor 301 and a memory 302, and the processor 301 and the memory 302 are communicatively connected.
[0088] The processor 301 and the memory 302 are electrically connected directly or indirectly to achieve data transmission or interaction. For example, these elements can be electrically connected through one or more communication buses or signal buses. The method steps executed by the aforementioned modules or interactive terminals respectively include at least one software function module that can be stored in the memory 302 in the form of software or firmware.
[0089] The processor 301 may be an integrated circuit chip with signal processing capability. The processor 301 may be a general-purpose processor, including a CPU (Central Processing Unit), a NP (Network Processor), etc.; it may also be a digital signal processor, a dedicated integrated circuit, a readily available programmable gate array or other programmable logic device, a discrete gate or transistor logic device, or a discrete hardware component. It may implement or execute the methods, steps, and logic block diagrams disclosed in the embodiments of the present invention. A general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc.
[0090] The memory 302 can store various software programs and modules. The processor 301 executes various functional applications and data processing by running the software programs and modules stored in the memory 302, that is, implements various steps in the embodiment of the present application.
[0091] The memory 302 may include, but is not limited to, RAM (Random Access Memory), ROM (Read Only Memory), PROM (Programmable Read-Only Memory), EPROM (Erasable Programmable Read-Only Memory), EEPROM (Electric Erasable Programmable Read-Only Memory), etc.
[0092] Understandably, Figure 3 The structure shown is for illustration only. The terminal device may also include Figure 3 More or fewer components as shown, or with Figure 3 Different configurations are shown.
[0093] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented in one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that include computer-usable program code.
[0094] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0095] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1A function specified in one or more boxes.
[0096] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0097] The foregoing description of the specific exemplary embodiments of the present application is for the purpose of illustration and illustration. These descriptions are not intended to limit the present application to the precise form disclosed, and it is clear that many changes and variations can be made based on the above teachings. The purpose of selecting and describing the exemplary embodiments is to explain the specific principles of the present application and its practical application, so that those skilled in the art can realize and utilize the various exemplary embodiments of the present application and various selections and changes. The scope of the present application is intended to be limited by the claims and their equivalents.
Claims
1. A visual inspection method for a carbon dioxide five-axis cutting head based on image processing, applied to a carbon dioxide five-axis cutting machine, the carbon dioxide five-axis cutting machine comprising: A five-axis cutting head, a driving device and an image acquisition device, characterized in that the visual inspection method comprises: After the target product is cut, the driving strategy of the driving device is obtained, and the image data of the image acquisition device is obtained; the driving strategy includes the driving data of each axis; the image data includes: the initial image of the target product before cutting and the real product images of the target product at multiple cutting stages; Determining predicted product images of the target product at the plurality of cutting stages according to the driving strategy and the initial image; Determine a cutting evaluation result of the target product according to the real product image, the predicted product image, the cutting axis corresponding to the drive data, and a preset cutting head accuracy; The driven strategy includes: first-axis driving data, second-axis driving data, third-axis driving data, fourth-axis driving data and fifth-axis driving data, and the predicted product image of the target product in the multiple cutting stages is determined according to the driving strategy and the initial image, including: determining the predicted product image of the target product in the first cutting stage according to the first-axis driving data and the initial image; determining the predicted product image of the target product in the second cutting stage according to the second-axis driving data, the initial image and the predicted product image of the target product in the first cutting stage; determining the predicted product image of the target product in the third cutting stage according to the third-axis driving data, the initial image and the predicted product image of the target product in the second cutting stage; determining the predicted product image of the target product in the fourth cutting stage according to the fourth-axis driving data, the initial image and the predicted product image of the target product in the third cutting stage; determining the predicted product image of the target product in the fifth cutting stage according to the fifth-axis driving data, the initial image and the predicted product image of the target product in the fourth cutting stage.
2. The visual inspection method according to claim 1, characterized in that: The step of acquiring the image data of the image acquisition device comprises: Determine the start cutting time and the end cutting time corresponding to the plurality of cutting stages respectively according to the driving data of each axis; Determine multiple image acquisition time points according to the start cutting time and the end cutting time corresponding to the multiple cutting stages respectively; wherein any image acquisition time point is the start cutting time, the end cutting time, or is between the start cutting times of adjacent cutting stages; Acquire a plurality of real product images respectively acquired by the image acquisition device at the plurality of image acquisition time points, determine the cutting stages respectively corresponding to the plurality of real product images, and acquire an initial image acquired by the image acquisition device when the target product is not cut; The image data is determined based on the plurality of real product images and the initial image.
3. The visual inspection method according to claim 2, characterized in that: The driving strategy includes: first axis driving data, second axis driving data, third axis driving data, fourth axis driving data and fifth axis driving data; the step of determining the start cutting time and the end cutting time corresponding to the plurality of cutting stages respectively according to the driving data of each axis includes: Determining the start cutting time and the end cutting time corresponding to the first cutting stage according to the first axis driving data; Determine the start cutting time and the end cutting time corresponding to the second cutting stage according to the second axis driving data, the end cutting time corresponding to the first cutting stage and the preset first switching time; the first switching time is used to represent the time for switching from controlling the first axis to controlling the second axis; Determine the start cutting time and the end cutting time corresponding to the third cutting stage according to the third axis driving data, the end cutting time corresponding to the second cutting stage and the preset second switching time; the second switching time is used to represent the time for switching from controlling the second axis to controlling the third axis; Determine the start cutting time and the end cutting time corresponding to the fourth cutting stage according to the fourth axis driving data, the end cutting time corresponding to the third cutting stage and the preset third switching time; the third switching time is used to represent the time for switching from controlling the third axis to controlling the fourth axis; The start cutting time and the end cutting time corresponding to the fifth cutting stage are determined according to the fifth-axis driving data, the end cutting time corresponding to the fourth cutting stage and the preset fourth switching time; the fourth switching time is used to characterize the time for switching from controlling the fourth axis to controlling the fifth axis.
4. The visual inspection method according to claim 1, characterized in that: The step of determining a predicted product image of the target product at the first cutting stage according to the first axis driving data and the initial image includes: Determining a first cutting point of the target product in the initial image according to a starting cutting position of the cutting head; determining a second cutting point of the target product in the initial image according to the first axis driving data and the first cutting point; Determining a cutting strategy for the target product in the initial image according to the first cutting point and the second cutting point; The initial image is cropped according to the cropping strategy to obtain a predicted product image of the target product in the first cutting stage.
5. The visual inspection method according to claim 1, characterized in that: The step of determining the predicted product image of the target product at the second cutting stage according to the second axis driving data, the initial image and the predicted product image of the target product at the first cutting stage comprises: determining a third cutting point of the target product in the predicted product image of the target product at the first cutting stage according to the second axis driving data, the initial image and the predicted product image of the target product at the first cutting stage; determining, according to the second axis driving data and the third cutting point, a fourth cutting point of the target product in the predicted product image of the target product at the first cutting stage; Determining, according to the third cutting point and the fourth cutting point, a cutting strategy for the target product in the initial image in the predicted product image at the first cutting stage; The predicted product image of the target product in the first cutting stage is cropped according to the cropping strategy to determine the predicted product image of the target product in the second cutting stage.
6. The visual inspection method according to claim 1, characterized in that: The step of determining the cutting evaluation result of the target product according to the real product image, the predicted product image, the cutting axis corresponding to the driving data, and the preset cutting head accuracy includes: Determining a predicted similarity range according to the cutting axis corresponding to the driving data and the preset cutting head precision; the predicted similarity range is used to characterize a similarity range between the real product image and the predicted product image; Determine the similarity between the real product images and the predicted product images corresponding to the multiple cutting stages; A cutting evaluation result of the target product is determined according to the similarity and the predicted similarity range.
7. The visual inspection method according to claim 6, characterized in that: The determining of the predicted similarity range according to the cutting axis corresponding to the driving data and the preset cutting head precision includes: According to the preset cutting head accuracy, determining the cutting errors corresponding to the multiple cutting axes of the cutting head respectively; Determining similarities corresponding to the multiple cutting stages respectively according to the cutting axis corresponding to the driving data, the cutting errors respectively corresponding to the multiple cutting axes, and the cutting stages corresponding to the cutting axis corresponding to the driving data; The predicted similarity range is determined according to the similarities respectively corresponding to the multiple cutting stages.
8. The visual inspection method according to claim 1, characterized in that: The cutting evaluation result is used to characterize whether the target product is a qualified cutting product; the visual inspection method further includes: If the cutting evaluation result indicates that the target product is a product that is qualified for cutting, an optimized cutting strategy corresponding to the target product is determined according to the real product image, the predicted product image and the preset standard cutting product image; an optimized driving strategy is determined according to the optimized cutting strategy and the driving strategy; If the cutting evaluation result indicates that the target product is not a product that is qualified for cutting, a secondary cutting strategy corresponding to the target product is determined based on the real product image and the predicted product image; a secondary driving strategy is determined based on the secondary cutting strategy, and the driving device is controlled to perform secondary cutting on the target product.
9. The visual inspection method according to claim 8, characterized in that: The determining, according to the real product image and the predicted product image, a secondary cutting strategy corresponding to the target product includes: Determine a first target product size and a first target product shape corresponding to the real product image of the last cutting stage, and determine a second target product size and a second target product shape corresponding to the predicted product image of the last cutting stage; If the size of the first target product is larger than the size of the second target product, and the shape of the first target product is inconsistent with the shape of the second target product, determining the size of the associated product according to the size of the second target product, and determining the shape of the associated product according to the shape of the second target product, and determining the secondary cutting strategy according to the size of the second target product, the shape of the second target product, the size of the associated product, and the shape of the associated product; If the first target product size is smaller than or equal to the second target product size, and the first target product shape is consistent with the second target product shape, a secondary cutting strategy is determined according to the first target size, the second target size, the first target shape and the second target shape.
Citation Information
Patent Citations
Method and system for identifying micro-defect of sterile package and storage medium
CN115170493A
PCB cutting monitoring system, method and device and storage medium
CN116533308A
Road surface detection method and device based on neural vision network
CN116664582A
Machine vision-based atmospheric natural environment test industrial product identification and segmentation method
CN116824135A
Image processing method and apparatus, device, and computer readable storage medium
WO2021098796A1
