A visual recognition method for workpiece milling processing status
Through visual recognition method, the contour lines and grayscale symbiosis matrix entropy of the workpiece surface are extracted, which solves the problem of difficulty in identifying flutter during milling in the prior art, and realizes low-cost and accurate milling status recognition and flutter classification of workpieces, improving Processing efficiency and quality.
Patent Information
- Application Number
- CN202210297007.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-03-24
- Publication Date
- 2024-11-05
- Estimated Expiration
- 2042-03-24
AI Technical Summary
The prior art is difficult to effectively identify the flutter state of the workpiece during milling, and the sensor is costly and susceptible to noise, which limits the processing efficiency and quality.
By using visual recognition method, by obtaining the grayscale image of the workpiece surface, extracting the contour lines and calculating the index value, combining the grayscale symbiosis matrix entropy, the workpiece milling processing status is determined, and the sensor installation is avoided, and the flutter recognition and grading are achieved.
It realizes low-cost and accurate identification of the milling state of the workpiece, including stable, fluttering and forced vibration, avoids the impact of sensor costs and noise, and meets the needs of refined processing.
Smart Images

Figure CN114638966B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of image recognition and intelligent manufacturing, and in particular to a visual recognition method for the milling processing state of a workpiece. Background Art
[0002] With the development of aerospace, automobile and other fields, thin-walled parts with high strength and light weight are widely used in engineering. Due to the poor rigidity of such parts, they are prone to chatter during milling, resulting in deterioration of the surface quality. Therefore, effectively identifying chatter during milling is a key step to improve machining efficiency and quality.
[0003] At present, the common practice is to use the milling force signal, vibration acceleration signal, and acoustic field signal during the milling process to determine the milling processing status of thin-walled parts. Although the overall effect of vibration detection through sensors is good, force sensors and acceleration sensors have the disadvantages of high cost and large installation size. Acoustic sensors are easily affected by industrial environmental noise during signal collection, so their practicality is limited.
[0004] It should be noted that the information disclosed in the above background technology section is only used for understanding the background of the present application, and therefore may include information that does not constitute prior art known to ordinary technicians in the field. Summary of the invention
[0005] The main purpose of the present invention is to overcome the defects of the above-mentioned background technology and provide a visual recognition method for the milling processing state of a workpiece, so as to realize accurate recognition of the milling processing state of the workpiece without installing a sensor.
[0006] To achieve the above object, the present invention adopts the following technical solutions:
[0007] A method for visually identifying the milling state of a workpiece comprises the following steps:
[0008] A: Obtaining a grayscale image of the workpiece surface during the workpiece milling process;
[0009] B: extracting several contour lines of the workpiece surface based on the grayscale image;
[0010] C: Calculate the index value Index_D of each contour line;
[0011] D: Calculate the average value Index_Dmean of the index values of all contour lines;
[0012] If Index_Dmean is less than the predetermined threshold, the workpiece milling processing state is determined to be stable, otherwise the subsequent steps are executed;
[0013] E: Get the contour image of the grayscale image in step A;
[0014] F: evenly dividing the contour image into a plurality of sub-images;
[0015] G: Calculate the index value Index_E of each sub-image;
[0016] H: Calculate the average value Index_Emean of the index values of all sub-images;
[0017] If Index_Emean is greater than a predetermined threshold, the milling processing state of the workpiece is determined to be forced vibration; otherwise, it is determined to be chatter.
[0018] Further:
[0019] If it is determined in step H that the milling processing state of the workpiece is chatter, the method further includes: determining the level of chatter according to Index_Dmean calculated in step D.
[0020] In step A, preferably, a camera equipped with an annular light strip and a polarizer is used to acquire a grayscale image of the workpiece surface, and the camera equipped with an annular light strip and a polarizer forms a camera-annular light strip-polarizer sandwich structure; preferably, the distance between the workpiece and the camera is 5-20 cm.
[0021] In step A, the grayscale image is square and has a size of no less than 300×300 pixels.
[0022] In step B, preferably, all contour lines pass through the center point of the image; preferably, the angle between adjacent contour lines is a certain value.
[0023] In step B, the number of the contour lines is not less than 4.
[0024] In step C, the calculation process of the index value Index_D of each contour line is as shown in formulas (1)-(4):
[0025]
[0026]
[0027]
[0028]
[0029] in:
[0030] L is a one-dimensional array representing the contour line, and the value of an element at a certain position in the array represents the height value of the contour line at that position;
[0031] Li is the height value of the contour line at position i;
[0032] N is the length of the contour, or the number of elements in the one-dimensional array representing the contour;
[0033] n is the length of the contour minus 1;
[0034] d is the farthest straight-line distance from a point on the contour line to the first point;
[0035] i is the index of the point position on the contour line;
[0036] k is the logarithm of the difference between the position indexes of the two points with base 2, and the value is an integer;
[0037] m2 k The position index difference is 2 k The sum of the distances between two points;
[0038] m is m2 k The average value under all k values;
[0039] floor(log2(N)) is an integer not greater than log2(N).
[0040] In step F, preferably, all sub-images are square and have the same size; preferably, no two sub-images have overlapping parts; preferably, the number of sub-images is not less than 25.
[0041] Step G specifically includes the following steps:
[0042] G1: Obtain four gray level co-occurrence matrices of the sub-image in four directions;
[0043] G2: Calculate the entropy of the four gray-level co-occurrence matrices;
[0044] G3: Take the maximum and minimum of the four entropy values;
[0045] G4: Calculate the difference between the maximum value and the minimum value, and take the ratio of the difference to the minimum value as the index value Index_E.
[0046] A computer-readable storage medium implements the visual recognition method of the milling processing state of a workpiece when the computer program stored in the medium is executed by a processor.
[0047] The present invention has the following beneficial effects:
[0048] The present invention proposes a visual recognition method that can accurately identify the milling processing state of a workpiece, including stability, chatter and forced vibration; if the milling processing state of the workpiece is identified as chatter, the chatter degree can also be graded. Compared with the traditional method (identifying whether there is chatter by analyzing the sensor signal), the present method avoids the high cost of installing sensors and the limitation of the influence of the complex processing environment on the sensor signal; in the preferred scheme, the present invention also introduces a new function - grading the chatter degree, which meets the requirements of the refined processing era for the refinement of chatter recognition results. The present method has the advantages of low cost, simplicity and ease of use, high recognition accuracy and recognition efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0049] Figure 1 is a flow chart of a method for visually identifying a milling processing state of a workpiece according to an embodiment of the present invention;
[0050] Figure 2 2 is a schematic diagram of a sandwich structure of a camera, an annular light strip, and a polarizer according to an embodiment of the present invention;
[0051] Figure 3 is a schematic diagram of a surface contour line extraction method according to an embodiment of the present invention;
[0052] Figure 4 is a schematic diagram of an image segmentation method according to an embodiment of the present invention;
[0053] Figure 5 This is a diagram showing the identification result of the milling processing state of a workpiece according to an embodiment of the present invention. DETAILED DESCRIPTION
[0054] The following is a detailed description of the embodiments of the present invention. It should be emphasized that the following description is only exemplary and is not intended to limit the scope and application of the present invention.
[0055] It should be noted that when an element is referred to as being "fixed to" or "disposed on" another element, it can be directly on the other element or indirectly on the other element. When an element is referred to as being "connected to" another element, it can be directly connected to the other element or indirectly connected to the other element. In addition, connection can be used for fixing as well as for coupling or communication.
[0056] It should be understood that the terms "length", "width", "up", "down", "front", "back", "left", "right", "vertical", "horizontal", "top", "bottom", "inside", "outside", etc., indicating the orientation or position relationship, are based on the orientation or position relationship shown in the accompanying drawings, and are only for the convenience of describing the embodiments of the present invention and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as a limitation on the present invention.
[0057] In addition, the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of the features. In the description of the embodiments of the present invention, the meaning of "plurality" is two or more, unless otherwise clearly and specifically defined.
[0058] See also Figure 1 The embodiment of the present invention provides a method for visually recognizing the milling processing state of a workpiece, comprising the following steps:
[0059] Step A: obtaining a grayscale image of the workpiece surface during the workpiece milling process;
[0060] Step B: extracting several contour lines of the workpiece surface based on the grayscale image;
[0061] Step C: Calculate the index value of each contour line (Index_D);
[0062] Step D: Take the average value of the index value described in step C of all contour lines (Index_Dmean);
[0063] If Index_Dmean is less than the predetermined threshold, the workpiece milling processing state is determined to be stable, otherwise the subsequent steps are executed;
[0064] Step E: Obtain a contour image of the grayscale image in step A;
[0065] Step F: Evenly divide the contour image into several sub-images;
[0066] Step G: Calculate the index value (Index_E) of each sub-image;
[0067] Step H: taking the average value (Index_Emean) of the index values described in step G of all sub-images;
[0068] If Index_Emean is greater than a predetermined threshold, the milling processing state of the workpiece is determined to be forced vibration; otherwise, the milling processing state of the workpiece is determined to be chatter.
[0069] like Figure 1 As shown in , in some embodiments, if the milling processing state of the workpiece is determined to be chatter, the level of the chatter is further determined according to the Index_Dmean described in step D.
[0070] The visual recognition method of the milling state of a workpiece in the embodiment of the present invention processes and analyzes the grayscale image of the workpiece surface to identify whether the milling state of the workpiece is stable, vibrating, or forced vibration; if it is vibrating, the degree of vibrating can also be graded. The method has the characteristics of low implementation cost, simple operation, high recognition accuracy and efficiency, and full functions.
[0071] In some embodiments, step A includes: preferably, a camera-annular light strip-polarizer sandwich structure is used to take a grayscale image of the workpiece surface, such as Figure 2 As shown. The shooting process is carried out in a dark environment, and the ring light strip is the only light source. The main purpose of using a polarizer is to reduce the impact of reflections on the workpiece surface on the image quality. Preferably, when shooting, the workpiece is located directly below the camera, and the distance between the two is 5-20cm. If the distance between the two is too large, the detailed information on the workpiece surface is easily lost; conversely, the amount of captured information is insufficient. Preferably, the grayscale image is square and the size is not less than 300×300 pixels. The grayscale image is represented as a square matrix, and the grayscale value of a pixel in the matrix represents the height value of the workpiece surface at that position.
[0072] In some embodiments, step B comprises: Figure 3 As shown, a plurality of contour lines of the workpiece surface are extracted based on the grayscale image. Preferably, each contour line passes through the center point of the image; preferably, the angle between any two adjacent contour lines is a certain value; preferably, the number of contour lines is not less than 4. Each contour line is represented as a one-dimensional array, and the value of an element at a certain position of the array represents the height value of the contour line at that position.
[0073] In some embodiments, step C includes: preferably, calculating the index value (Index_D) of each extracted contour line according to the following formulas (1)-(2):
[0074]
[0075]
[0076]
[0077]
[0078] in:
[0079] L is a one-dimensional array representing the contour line, and the value of an element at a certain position in the array represents the height value of the contour line at that position;
[0080] L i is the height value of the contour line at position i;
[0081] N is the length of the contour, or the number of elements in the one-dimensional array representing the contour;
[0082] n is the length of the contour minus 1;
[0083] d is the farthest straight-line distance from a point on the contour line to the first point;
[0084] i is the index of the point position on the contour line;
[0085] k is the logarithm of the difference between the position indexes of the two points with base 2, and the value is an integer;
[0086] m2 k The position index difference is 2 k The sum of the distances between two points;
[0087] m is m2 k The average value under all k values;
[0088] floor(log2(N)) is an integer not greater than log2(N).
[0089] In some embodiments, step D includes: preferably, calculating the average value of Index_D of all extracted contour lines according to formula (5), recorded as Index_Dmean.
[0090]
[0091] in:
[0092] Index_D j is the index value (Index_D) described in step C of the j-th contour line;
[0093] N_p is the number of contour lines.
[0094] In some embodiments, preferably, the milling state of the workpiece is determined to be stable or other (chatter and forced vibration) states according to Index_Dmean. Preferably, if Index_Dmean is less than a predetermined threshold, the workpiece surface is stable; otherwise, it is chatter or forced vibration. The predetermined threshold is 2.0 in this embodiment.
[0095] In some embodiments, step E includes: extracting a contour image of the grayscale image in step A according to the Canny algorithm, wherein the contour image is a binary image. The Canny algorithm is a commonly used contour extraction algorithm, and the specific algorithm can be referred to in relevant materials.
[0096] In some embodiments, step F includes: each contour image is evenly divided into a number of sub-images, such as Figure 4 Preferably, all sub-images are square and have the same size; preferably, any two sub-images have no overlapping parts; preferably, the number of sub-images is not less than 25.
[0097] In some embodiments, step G includes: preferably, calculating the index value (Index_E) of the sub-image according to the following four steps:
[0098] Step G1: Obtain the gray level co-occurrence matrix of the sub-image in four directions;
[0099] Step G2: Calculate the entropy of the four gray-level co-occurrence matrices described in step G1;
[0100] Step G3: taking the maximum and minimum values of the four entropy values described in step G2;
[0101] Step G4: Take the difference between the maximum value and the minimum value described in step G3, and take the ratio of this difference to the minimum value described in step G3 as the index Index_E.
[0102] In some embodiments, step H includes: preferably, taking the average value of Index_E of all sub-images according to formula (3), denoted as Index_Emean.
[0103]
[0104] in:
[0105] Index_E j is the index value (Index_E) of step G for the j-th sub-image;
[0106] N_s is the number of sub-images.
[0107] In some embodiments, preferably, it is determined whether the milling state of the workpiece is chatter or forced vibration according to Index_Emean. Preferably, if Index_Emean is greater than a predetermined threshold, the milling state of the workpiece is forced vibration; otherwise, it is chatter, and the chatter level is determined according to Index_Dmean described in step D. The predetermined threshold is 0.28 in this embodiment, and the relationship between the chatter level and Index_Dmean is shown in Table 1.
[0108] Table 1: Relationship between chatter level and Index_Dmean
[0109] Flutter Level Index_Dmean 1 Index_Dmean∈[2.00,2.30) 2 Index_Dmean∈[2.30,2.60) 3 Index_Dmean∈[2.60,2.90) 4 Index_Dmean∈[2.90,+∞)
[0110] Figure 5The experimental results of some embodiments of the present invention are shown, and it is verified that the visual recognition method of the present invention has high recognition accuracy for the milling processing state of the workpiece.
[0111] The background section of the present invention may contain background information about the problem or environment of the present invention, but does not necessarily describe the prior art. Therefore, the content included in the background section is not an admission by the applicant that the prior art is available.
[0112] The above content is a further detailed description of the present invention in combination with specific / preferred embodiments, and it cannot be determined that the specific implementation of the present invention is limited to these descriptions. For ordinary technicians in the technical field to which the present invention belongs, without departing from the concept of the present invention, it can also make several substitutions or modifications to these described embodiments, and these substitutions or modifications should be regarded as belonging to the protection scope of the present invention. In the description of this specification, the description of the reference terms "an embodiment", "some embodiments", "preferred embodiments", "examples", "specific examples", or "some examples" means that the specific features, structures, materials or characteristics described in combination with the embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic representation of the above terms does not necessarily target the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described can be combined in any one or more embodiments or examples in a suitable manner. In the absence of mutual contradiction, those skilled in the art can combine and combine the different embodiments or examples described in this specification and the features of different embodiments or examples. Although the embodiments of the present invention and their advantages have been described in detail, it should be understood that various changes, substitutions and modifications can be made herein without departing from the scope of protection of the patent application.
Claims
1. A method for visually identifying the milling state of a workpiece, characterized in that: The following steps are involved: A: Obtaining a grayscale image of the workpiece surface during the workpiece milling process; B: extracting several contour lines of the workpiece surface based on the grayscale image; C: Calculate the index value of each contour line Index_D ; D: Calculate the average value of the index value of all contour lines Index_Dmean ; like Index_Dmean If the value is less than a predetermined threshold, the milling state of the workpiece is determined to be stable, otherwise the subsequent steps are executed; E: Get the contour image of the grayscale image in step A; F: Evenly divide the contour image into a plurality of sub-images; G: Calculate the index value of each sub-image Index_E ; H: Calculate the average value of the index value of all sub-images Index_Emean ; like Index_Emean If the value is greater than a predetermined threshold, the milling processing state of the workpiece is determined to be forced vibration; Otherwise it is judged as chatter; In step C, the index value of each contour line is calculated Index_D The calculation process is as follows: ; in: L is a one-dimensional array representing the contour line, and the value of an element at a certain position in the array represents the height value of the contour line at that position; L i For the contour line at position i The height value of N The length of the contour line, or the number of elements in the one-dimensional array representing the contour line; n The length of the contour line minus 1; d The farthest straight-line distance from a point on the contour line to the first point; i The index of the point position on the contour line; k It is the logarithm of the difference between the position indexes of two points with base 2, and the value is an integer; m 2 k The position index difference is 2 k The sum of the distances between two points; m for m 2 k In all k The average value under the value; floor (log2( N )) is no greater than log2( N ) is an integer.
2. The visual recognition method of the milling state of a workpiece according to claim 1, characterized in that: If the milling state of the workpiece is determined to be chatter in step H, the method further includes: according to the average value calculated in step D Index_Dmean Determines the level of dithering.
3. The visual recognition method for the milling state of a workpiece according to any one of claims 1 to 2, characterized in that: In step A, a grayscale image of the workpiece surface is acquired using a camera equipped with an annular light strip and a polarizer, wherein the camera equipped with an annular light strip and a polarizer forms a camera-annular light strip-polarizer sandwich structure; the distance between the workpiece and the camera is 5-20 cm.
4. The visual recognition method for the milling state of a workpiece according to any one of claims 1 to 2, characterized in that: In step A, the grayscale image is square and has a size of no less than 300×300 pixels.
5. The visual recognition method for the milling state of a workpiece according to any one of claims 1 to 2, characterized in that: In step B, all contour lines pass through the center point of the image; the angle between adjacent contour lines is a certain value.
6. The visual recognition method for the milling state of a workpiece according to any one of claims 1 to 2, characterized in that: In step B, the number of the contour lines is not less than 4.
7. The visual recognition method for the milling state of a workpiece according to any one of claims 1 to 2, characterized in that: In step F, all sub-images are square and have the same size.
8. The visual recognition method for the milling state of a workpiece according to any one of claims 1 to 2, characterized in that: In step F, there is no overlapping part between any two sub-images.
9. The visual recognition method for the milling state of a workpiece according to any one of claims 1 to 2, characterized in that: In step F, the number of sub-images is not less than 25.
10. The visual recognition method for the milling state of a workpiece according to any one of claims 1 to 2, characterized in that: Step G specifically includes the following steps: G1: Obtain four gray level co-occurrence matrices of the sub-image in four directions; G2: Calculate the entropy of the four gray-level co-occurrence matrices; G3: Take the maximum and minimum of the four entropy values; G4: Calculate the difference between the maximum value and the minimum value, and take the ratio of the difference to the minimum value as the index value Index_E .
11. A computer-readable storage medium, characterized in that: When the stored computer program is executed by a processor, the visual recognition method of the milling processing state of a workpiece as claimed in any one of claims 1 to 10 is implemented.
