CN117808811A - Numerical control machine tool tipping abnormity detection method - Google Patents

Numerical control machine tool tipping abnormity detection method Download PDF

Info

Publication number
CN117808811A
CN117808811A CN202410232077.5A CN202410232077A CN117808811A CN 117808811 A CN117808811 A CN 117808811A CN 202410232077 A CN202410232077 A CN 202410232077A CN 117808811 A CN117808811 A CN 117808811A
Authority
CN
China
Prior art keywords
connected domain
image
value
pixel point
edge
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202410232077.5A
Other languages
Chinese (zh)
Inventor
王志范
李卫
何磊磊
马红刚
李鹏辉
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shaanxi Zhongsheng Tianze Composite Material Technology Co ltd
Original Assignee
Shaanxi Zhongsheng Tianze Composite Material Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shaanxi Zhongsheng Tianze Composite Material Technology Co ltd filed Critical Shaanxi Zhongsheng Tianze Composite Material Technology Co ltd
Priority to CN202410232077.5A priority Critical patent/CN117808811A/en
Publication of CN117808811A publication Critical patent/CN117808811A/en
Pending legal-status Critical Current

Links

Landscapes

  • Image Analysis (AREA)

Abstract

The invention relates to the technical field of image data processing, in particular to a method for detecting the edge collapse abnormality of a cutter of a numerical control machine tool; acquiring a cutter gray level image; performing edge detection on the gray level image of the cutter at least twice to obtain at least two edge images; carrying out connected domain analysis on each edge image to obtain a connected domain of each edge image; obtaining the non-texture degree of all the connected domains based on each connected domain; counting the corresponding non-texture degree of each pixel point in the edge image, determining the optimal non-texture degree, and taking the optimal non-texture degree as the cracking degree; adjusting the gray value of the corresponding pixel point in the tool gray image based on the bursting degree to obtain a new gray value, and obtaining an adjusted tool gray image; and carrying out edge detection on the adjusted cutter gray level image to obtain a crack region. The method and the device can increase the contrast ratio of the fine cracks generated by the tipping and other coarse textures in the image, and accurately detect the tipping and the fine cracks generated by the tipping.

Description

Numerical control machine tool tipping abnormity detection method
Technical Field
The invention relates to the technical field of image data processing, in particular to a method for detecting the abnormal tipping of a cutter of a numerical control machine tool.
Background
The numerical control machine tool commonly used for machining the billiard cue mainly comprises a screw lathe, a numerical control lathe, a grinding machine and the like, and the machine tools can be selected and used according to different machining requirements so as to ensure the machining precision and efficiency. Meanwhile, in the machining process, proper cutters, machining parameters and perfect machining process control are required to be reasonably selected so as to ensure the machining quality and efficiency.
Therefore, a tool is one of the key components of a numerical control machine tool for machining a workpiece, and plays an important role in machining such as cutting, turning, drilling, and the like of the workpiece, adjusting the machining amount, and the like, and therefore, it is very important to reasonably select and use the tool, and to regularly maintain and replace the tool.
Among them, the tool tipping of the numerical control machine tool is a common fault phenomenon, especially when the tool is worn and stressed when a large number of workpieces are machined for a long time, the tipping and fracture of the edge of the tool are easily caused, the machining efficiency and quality of the numerical control machine tool are reduced, and even potential safety hazards can be generated for the machine tool and operators.
In the prior art, the edge breakage of a cutter is detected in time through a computer vision technology, for example, an authorized bulletin number is CN116823826B, and the invention discloses a numerical control machine tool cutter edge breakage abnormal detection method, which comprises the steps of dividing a gray level image of the cutter into grids, clustering, evaluating the clustering effect after clustering, and identifying an edge breakage area according to an accurate clustering result.
However, it should be noted that in the above method, since the classification of the clustering is set according to the experience value by the person, the result of the clustering may be error, and the influence of the environmental factor is not considered, so that the photographed image itself may have noise, and thus the problem of the complete tipping area cannot be accurately segmented is solved.
Disclosure of Invention
The invention aims to provide a method for detecting the abnormal tipping of a cutter of a numerical control machine tool, which is used for solving the problem that a complete tipping area cannot be accurately segmented due to noise in a shot image.
In order to solve the technical problems, the invention provides a method for detecting the abnormal tipping of a cutter of a numerical control machine tool, which comprises the following steps:
acquiring a cutter gray level image;
performing edge detection on the cutter gray level image at least twice to obtain at least two edge images; the edge detection adopts a canny algorithm, and when the edge detection is carried out on the cutter gray level image at least twice, the number of double thresholds is set to be at least two groups; sorting the double thresholds from small to large based on the sizes of the middle and high thresholds of the double thresholds, and traversing the double thresholds according to the sequencing of the double thresholds to obtain corresponding edge images;
carrying out connected domain analysis on each edge image to obtain a connected domain of each edge image;
randomly selecting a connected domain in one edge image, marking the connected domain as a current connected domain, and counting the gray average value of all pixels in the current connected domain, the total number of the pixels in the current connected domain, the occurrence times of the current connected domain in multiple edge detection and the change number of the pixels of the current connected domain disappearing along with the traversal of a double threshold value; calculating to obtain the non-texture degree of the current connected domain, and further obtaining the non-texture degree of all the connected domains; counting at least two non-texture degrees corresponding to each pixel point in the edge image, and determining the optimal non-texture degree of each pixel point, and taking the optimal non-texture degree as a collapse degree;
adjusting the gray value of the corresponding pixel point in the tool gray image based on the bursting degree to obtain a new gray value, and obtaining an adjusted tool gray image; and carrying out edge detection on the adjusted cutter gray level image to obtain a crack region.
Optionally, when obtaining the connected domain of each edge image, the method further includes a step of numbering all the connected domains, specifically:
according to the sequence of the double-threshold traversal, the connected domains corresponding to the edge images are sequenced in sequence;
numbering the sorted connected domains according to a numbering rule;
the numbering rule is that if the current edge image and the previous edge image have the same connected domain, the same connected domain in the current edge image is not numbered any more, the number of the same connected domain in the previous edge image is kept consistent with the number of the same connected domain in the previous edge image, and the remaining other connected domains in the current edge image are continuously and repeatedly numbered; wherein the remaining other connected domain is a new connected domain different from the connected domain of the previous edge image.
Optionally, the non-texture degree is:
wherein,represent the firstiNon-texture of individual connected domains, +.>Is the firstiGray mean value of individual connected domains +.>Is the firstiThe number of pixel point changes of each connected domain disappearing along with the traversal of the double threshold value, ++>Is the firstiThe total number of pixels of each connected domain, < >>Is the firstiThe number of times that the connected domain appears in the plurality of edge detections.
Optionally, the dual threshold acquisition process is:
acquiring a threshold range of a high threshold, wherein the upper limit value in the threshold range is the gradient maximum value of the pixel point in the tool gray image, and the lower limit value is the gradient minimum value of the pixel point in the tool gray image;
taking the product of a set proportion and a high threshold value as a low threshold value, wherein the set proportion is an empirical value;
and taking the lower limit value as an initial value, determining a plurality of high thresholds and corresponding low thresholds according to the set threshold interval, and further obtaining at least two groups of double thresholds.
Optionally, the acquiring process of the optimal non-texture degree is:
and calculating the importance degree of the non-texture degree corresponding to any pixel point, and taking the non-texture degree with the largest importance degree as the optimal non-texture degree of any pixel point.
Optionally, the importance degree is:
wherein,represent the firstjThe first pixel point corresponds tokDegree of importance of individual non-textures, +.>Represent the firstjThe first pixel point corresponds tokThe number of times that a connected domain of non-texture degree appears in multiple edge detection, +.>Represent the firstjThe corresponding +.>The number of times of occurrence of connected domains corresponding to the non-texture degree in multiple edge detection, +.>Represent the firstjThe first pixel point corresponds tokThe total number of new connected domains generated in the corresponding edge image by the connected domains of non-texture degree along with the traversal of the double threshold value,/for the connected domains>Represent the firstjThe first pixel point corresponds tokThe gradient direction of all pixel points in the connected domain of each non-texture degree is equal to the angle average value of the included angle between the gradient direction of all pixel points and the horizontal direction from left to right,/or->Represent the firstjThe first pixel point corresponds tokThe connected domain of each non-texture degree generates the first connected domain in the corresponding edge image along with the traversal of the double threshold valuezThe average value of the angles between the gradient directions of all the pixel points in the new connected domain and the horizontal direction from left to right,Kis the firstjThe total number of non-textures of the individual pixels,norm() The function is a function of the norm,exp() The function is an exponential function based on a natural constant e.
Optionally, the process of obtaining the new gray value is:
normalizing the collapse degree of each pixel point to obtain a normalized value;
taking the product of the normalized value and the gray value of the corresponding pixel point in the tool gray image as an adjustment value;
and calculating the difference value between the gray value of the pixel point and the adjustment value, and taking the difference value as a new gray value.
Optionally, the edge detection of the adjusted tool gray image is performed by adopting a canny algorithm, wherein a high threshold in the double thresholds is an oxford threshold, and a low threshold is a product of a set proportion and the high threshold.
The beneficial effects of the invention are as follows:
according to the scheme, the detail of the gray level image of the cutter is analyzed, the collapse degree of each pixel point is obtained according to the loss difference and the sequence relevance of the connected domain of the extracted edge image, and then the corresponding pixel point in the gray level image of the cutter is enhanced according to the collapse degree, so that the contrast ratio between fine cracks generated by the collapse blade and other coarse textures in the image can be accurately increased, the fine cracks generated by the collapse blade and the collapse blade can be accurately detected, the problem of the collapse blade of the cutter can be accurately judged, and corresponding countermeasures can be taken.
Drawings
In order to more clearly illustrate the embodiments of the invention or the technical solutions and advantages of the prior art, the following description will briefly explain the drawings used in the embodiments or the description of the prior art, and it is obvious that the drawings in the following description are only some embodiments of the invention, and other drawings can be obtained according to the drawings without inventive effort for a person skilled in the art.
Fig. 1 schematically shows a step flow chart of a method for detecting tool tipping abnormality of a numerical control machine tool according to the present invention.
Detailed Description
In order to further describe the technical means and effects adopted by the present invention to achieve the preset purpose, the following detailed description is given below of the specific implementation, structure, features and effects of the technical solution according to the present invention with reference to the accompanying drawings and preferred embodiments. In the following description, a different one or another embodiment is not necessarily the same embodiment. Furthermore, the particular features, structures, or characteristics of one or more embodiments may be combined in any suitable manner.
Aiming at the problem that the sanding tool for producing billiard sticks is easily affected by the roughness of the surface of the tool when detecting the micro cracks of the surface, namely, long-term use or production reasons, when the tool generates fine tipping and cracks, the existence of the tipping and the fine cracks of the tool body is extremely difficult to distinguish, so that a great deal of noise interference exists in the subsequent detection result, the tipping and the edges of the cracks cannot be judged, and potential safety hazards are caused, thereby providing the numerical control machine tool tipping abnormal detection method.
Fig. 1 schematically shows a step flow chart of a method for detecting tool tipping abnormality of a numerical control machine tool according to the present invention.
Taking a cutter used in a numerical control machine tool for machining billiard cues as an example, a method for detecting the edge chipping abnormality of the cutter of the numerical control machine tool in the embodiment is described, specifically as follows:
as shown in fig. 1, the method for detecting the tool tipping abnormality of the numerically-controlled machine tool in the embodiment comprises the following steps:
at step S1, a tool gray scale image is acquired.
In the embodiment, an industrial camera is adopted to collect images, semantic segmentation is adopted to the collected images, a background is separated from a cutter to obtain a cutter image, a grayscale algorithm is adopted to the cutter image, and a corresponding cutter grayscale image is obtained through the grayscale algorithm and is used for the subsequent steps.
At step S2, edge detection is performed on the tool gray scale image at least twice, resulting in at least two edge images. In this embodiment, a Sobel algorithm or a canny algorithm may be used for edge detection.
In one embodiment, when the Sobel algorithm is employed, it may adjust the set threshold up and down so as to obtain a plurality of edge images when edge detection is performed a plurality of times. The size of the set threshold value can be determined according to the gradient value of the pixel point in the gray level image of the cutter.
In another embodiment, edge detection is performed on the gray level image of the cutter by adopting a canny algorithm, wherein at least two groups of double thresholds are set, the double thresholds are ordered based on the size of a middle-high threshold of the double thresholds, and when edge detection is performed, traversing of the double thresholds is performed according to the sequence, so that a corresponding edge image is obtained.
It should be noted that, since the canny algorithm performs edge detection, it includes image smoothing, gradient calculation, non-maximum suppression, hysteresis thresholding, and final edge detection. The hysteresis threshold method comprises the following steps: setting different low threshold t min And a high threshold t max So that the gradient strength is greater than the high threshold t max Is considered to be a determined edge pixel and is preserved. At the same time, the gradient strength is smaller than the low threshold t min Is not considered an edge pixel, is ignored; whileFor pixels between two thresholds, if connected to a known edge pixel, it is also considered an edge pixel. Therefore, the edge detection result of the tool gray-scale image is different under different double threshold conditions.
In this embodiment, the tool gray level image is analyzed by setting at least two sets of dual thresholds. Specifically, the process of obtaining the double threshold is as follows:
firstly, acquiring a threshold range of a high threshold; the upper limit value in the threshold range is the maximum gradient value of the pixel point in the tool gray image, and the lower limit value is the minimum gradient value of the pixel point in the tool gray image. In this embodiment, the gradient range of the pixel point in the tool gray image, that is, the range from the minimum value to the maximum value in the tool gray image is obtained and used as the threshold range of the high threshold.
Next, the product of the set proportion and the high threshold is taken as the low threshold, wherein the set proportion is an empirical value. The setting ratio in this embodiment is 0.2, but the setting ratio may be 0.4, which may be customized according to the actual situation. Illustratively, when the high threshold is Y, then the low threshold is 0.2Y.
Then, the lower limit value is used as an initial value, a plurality of high thresholds and corresponding low thresholds are determined according to the set threshold interval, and then a plurality of groups of double thresholds are obtained. The set threshold interval is 0.02, and the set threshold interval can be obtained by self-defining according to actual conditions.
In this embodiment, the lower limit value in the high threshold range is used as an initial value, and the high threshold value when each edge detection is performed is obtained according to a set threshold interval, so as to obtain dual thresholds, that is, each high threshold value corresponds to one low threshold value, so as to obtain at least two groups of dual thresholds.
The reason why the plurality of groups of double threshold values are arranged is that the region gradient value of the crack is larger, so that the crossing threshold value interval is larger in the traversing process, and meanwhile, the gray gradient of the crack region is approximate, so that the pixel point change in the connected domain which is greatly influenced by the crack in the double threshold value traversing process has uniformity, and therefore, the rule of the edge pixel point in the cutter gray image can be deeply analyzed through multiple times of double threshold value traversing.
At step S3, connected domain analysis is performed on each edge image, and connected domain of each edge image is obtained.
The method for performing connected domain analysis on the image is the prior art, and is not described herein.
Further, when the connected domain of each edge image is obtained, the method further includes a step of numbering all the connected domains, specifically:
according to the sequence of the double-threshold traversal, the connected domains corresponding to the edge images are sequenced in sequence;
numbering the sorted connected domains according to a numbering rule;
the numbering rule is that if the current edge image and the previous edge image have the same connected domain, the same connected domain in the current edge image is not numbered any more, the number of the same connected domain in the previous edge image is kept consistent with the number of the same connected domain in the current edge image, and the remaining other connected domains in the current edge image are continuously and repeatedly numbered; wherein the remaining other connected domain is a new connected domain different from the connected domain of the previous edge image.
It should be noted that, as the dual threshold value is traversed, a new connected domain different from the connected domain in the previous edge image may appear in the subsequent edge image compared with the connected domain in the previous edge image, because the high threshold value in the dual threshold value is increasing, and correspondingly the low threshold value is increasing, then the edge pixel point screened based on the dual threshold value may gradually decrease, that is, based on the connected domain in the previous edge image, at this time, part of the pixel points in the connected domain disappear, and a new connected domain different from the connected domain in the previous edge image is generated in the subsequent edge image.
In this embodiment, the sequence of the edge images is obtained according to the size sequence of the middle and high thresholds of the double thresholds, then the connected domain analysis is performed on each connected domain, and the connected domains in each edge image are sequentially numbered according to the numbering rule.
The numbering rule is that when the same connected domain appears in the plurality of edge images, the number of the connected domain in the rear edge image is consistent with the number of the connected domain in the front edge image, and the remaining other connected domains in the rear edge image are continuously and repeatedly numbered, wherein the remaining other connected domains are new connected domains which are different from the connected domain in the front edge image.
For example, when there are 3 sets of dual thresholds, there are 3 corresponding edge images, 4 connected domains of the first edge image, namely a, b, c and d, which correspond to numbers 1, 2, 3 and 4, 4 connected domains of the second edge image, namely a, b, e and d, which correspond to numbers 1, 2, 5 and 4, and 5 connected domains of the third edge image, m, n, b, d and e, which correspond to numbers 6, 7, 2, 4 and 5. That is, in this embodiment, the numbers of the same connected domains in all the edge images are the same and remain unchanged, and the remaining other connected domains are sequentially numbered continuously and repeatedly according to the order of the numbers.
The number of the connected domains is favorable for analyzing the front-back relevance of each connected domain, such as how the relevance between the front connected domain and the back connected domain changes according to the traversing sequence of the double threshold values, and the like, and the number of repeated occurrence times of the same connected domain can be counted more conveniently, so that the subsequent analysis is convenient.
The number of times of occurrence of the same connected domain is counted while numbering the connected domain, so as to obtain the repeated occurrence times of different connected domains.
At step S4, randomly selecting a connected domain in one of the edge images, marking the connected domain as a current connected domain, and counting the gray average value of all pixels in the current connected domain, the total number of pixels in the current connected domain, the number of times of occurrence of the current connected domain in multiple edge detection and the number of pixel change of the current connected domain disappearing along with the traversal of the double threshold; and calculating to obtain the non-texture degree of the current connected domain, and further obtaining the non-texture degree of all the connected domains.
Wherein, the non-texture degree is:
wherein,represent the firstiNon-texture of individual connected domains, +.>Is the firstiGray mean value of individual connected domains +.>Is the firstiThe number of pixel point changes of each connected domain disappearing along with the traversal of the double threshold value, ++>Is the firstiThe total number of pixels of each connected domain, < >>Is the firstiThe number of times that the connected domain appears in the plurality of edge detections.
The above mentioned firstiThe number of pixel point changes of each connected domain disappearing along with the traversal of the double threshold value is thatiAnd comparing the connected domains with the new connected domains generated by the edge image corresponding to the double threshold value of the subsequent traversal to obtain the number of disappeared pixels.
Wherein, the non-texture is used to characterize the likelihood of a crack in the tool. The higher the non-texture, the greater the likelihood that the connected domain will have cracks. By way of example in the above embodimentsThe change condition of the connected domain is characterized in that the gray gradient of the crack region is similar, the pixel points in the connected domain are uniformly changed, and the larger the value is, the higher the gray gradient approximation degree in the connected domain is, and the higher the possibility that the crack influence exists in the connected domain is. And then pass->Characterization of the first embodimentiThe higher the stability of the connected domain, the higher the probability that the connected domain is affected by a crack.
It should be noted that, in the above embodiment, the non-texture degree obtained in the foregoing embodiment is that, firstly, the crack characteristic is considered, that is, because the gradient value of the area where the crack exists is larger, and in the edge detection, the probability that the pixel point with the larger gradient is screened out is smaller in the traversal process of multiple double thresholds, the pixel point corresponding to the subsequent crack can be detected by the connected domain serving as the edge, that is, the number of occurrence times of the connected domain to which the pixel point corresponding to the crack belongs is greater, and when a plurality of connected domains with unchanged numbers appear, it is proved that the stability of the connected domain is stronger, and the possibility that the connected domain of the edge image has abnormality is higher.
Secondly, due to the fact that the threshold value is continuously changed, in the process of traversing the threshold value by using a canny algorithm, as the high threshold value and the low threshold value become larger, part of pixel points are screened out, and especially when more pixel points with the same gradient value exist, when one pixel point is screened out, other pixel points inevitably disappear at the same time. Therefore, based on the characteristic of gray gradient approximation of the crack region, the more uniform the change of the pixel points in the connected domain which is greatly affected by the crack in the process of double-threshold traversal (the pixel points are reserved as edge pixel points or all the pixel points disappear in the edge image corresponding to the current double-threshold), namely the more the number of the disappeared pixel points is, the more likely the pixel points belong to the crack region, so that the non-texture degree of the current connected domain can be characterized by utilizing the change of the number of the pixel points in the process of double-threshold traversal.
However, since there is a rough region having a large gradation gradient value and a high approximation degree of the gradation gradient of the internal pixel point, that is, the rough region has a characteristic similar to that of the crack region, it is still possible to determine that the connected region is a crack only by the stability of the connected region.
Based on the above-mentioned problem of error, the factor of the gray value of the pixel point is also introduced in this embodiment, specifically, because the gray value of the pixel point in the crack region is lower, and the gray value of the pixel point corresponding to the rough region is larger than that of the crack region, so the lower the gray average value of the connected domain belonging to the crack region, the higher the possibility that the connected domain is affected by the crack.
Therefore, the non-texture degree can be obtained according to the change condition of the connected domain and the regional characteristics of the connected domain in the edge image after traversing of different double thresholds. Meanwhile, for a single pixel point, the more the number of occurrence times of the same-number connected domain, the stronger the relevance between the pixel point and other pixel points in the connected domain, and meanwhile, a higher approximate relation exists between new connected domains generated after the fracture connected domain is broken, namely the degree of collapse can be obtained according to the mutual relevance of non-texture degrees.
At step S5, at least two non-texture degrees corresponding to each pixel point in the edge image are counted, and the optimal non-texture degree of each pixel point is determined and used as the collapse degree.
In this embodiment, each connected domain corresponds to one non-texture degree, the non-texture degree of each connected domain corresponds to all the pixels in the connected domain, and the connected domain to which the pixel belongs may change during edge detection, so if the same pixel appears in the connected domains in a plurality of different edge images, the pixel corresponds to a plurality of non-texture degrees, that is, there is a case that a single pixel corresponds to a plurality of non-texture degrees.
It should be noted that, for any pixel point, the more the corresponding connected domain appears in the multiple double-threshold traversal process, the more the pixel point is similar to the affected condition of other pixel points in the connected domain, and the more the non-texture degree of the corresponding connected domain accords with the collapse degree of the corresponding pixel point. However, in the process of traversing the dual threshold value for multiple times, since the characteristics of the crack region and the rough region are similar, when the crack region and the rough region are affected by the rough region, there is a case that the gradient is large, and a plurality of connected domains may be generated, and at this time, the crack cannot be distinguished only by the calculated non-texture degree. Therefore, the non-texture degree corresponding to the pixel point is also required to be analyzed, the problem that a single pixel point corresponds to a plurality of non-texture degrees is solved, and the non-texture degree which is most suitable for the pixel point is selected.
Meanwhile, the gradient directions of the pixel points in the crack area are uniform, so that uniformity exists in the crack area, and the gradient direction disorder degree of the pixel points in the rough area is high. Therefore, for the crack region, the previous connected domain is changed due to the change of the double threshold value, so that the stronger the correlation between the generated new connected domain and the connected domain before the change is, the more the non-texture degree of the corresponding connected domain accords with the collapse degree of the corresponding pixel point. Therefore, in this embodiment, by introducing the unification degree of the gradient direction, the relevance between the new connected domain generated after the change of the connected domain and the connected domain before the change is determined, so as to evaluate the non-texture degree of the pixel point.
Specifically, by analyzing the importance degrees of the plurality of non-texture degrees corresponding to each pixel point, the non-texture degree with the largest importance degree is taken as the optimal non-texture degree, and the optimal non-texture degree of any pixel point is the cracking degree.
The importance degree is as follows:
wherein,represent the firstjThe first pixel point corresponds tokDegree of importance of individual non-textures, +.>Represent the firstjThe first pixel point corresponds tokThe number of times that a connected domain of non-texture degree appears in multiple edge detection, +.>Represent the firstjThe corresponding +.>The number of times of occurrence of connected domains corresponding to the non-texture degree in multiple edge detection, +.>Represent the firstjThe first pixel point corresponds tokConnected domains of non-texture degree with traversal of double thresholdThe total number of new connected regions produced in the corresponding edge image, +.>Represent the firstjThe first pixel point corresponds tokThe gradient direction of all pixel points in the connected domain of each non-texture degree is equal to the angle average value of the included angle between the gradient direction of all pixel points and the horizontal direction from left to right,/or->Represent the firstjThe first pixel point corresponds tokThe connected domain of each non-texture degree generates the first connected domain in the corresponding edge image along with the traversal of the double threshold valuezThe average value of the angles between the gradient directions of all the pixel points in the new connected domain and the horizontal direction from left to right,Kis the firstjThe total number of non-textures of the individual pixels,norm() The function is a function of the norm,exp() The function is an exponential function based on a natural constant e.
In the above-mentioned formula(s),and (3) representing the importance of the non-texture degree corresponding to the pixel point, wherein when the double threshold value is traversed, the more the pixel point exists, the more important the pixel point exists, the larger the difference between the pixel point and other traversing times is, namely, the higher the value is, the more the non-texture degree accords with the collapse degree of the corresponding pixel point. I.e. < ->After the characterization of the connected domain changes, the correlation with each new connected domain is carried out, so that the overall correlation of the connected domain is obtained; when the overall relevance of the connected domain is stronger, the corresponding non-texture degree is more consistent with the cracking degree of the corresponding pixel point;the integral association degree of the connected domain corresponding to the kth non-texture degree corresponding to the pixel point is represented, and the higher the integral association degree is, the more the non-texture degree accords with the cracking degree of the corresponding pixel point.
At step S6, adjusting the gray value of the corresponding pixel point in the tool gray image based on the collapse degree to obtain a new gray value, and obtaining an adjusted tool gray image; and performing edge detection on the adjusted cutter gray level image to obtain a crack region.
After the collapse degree of each pixel point of the edge image is obtained, the gray value of the pixel point is adjusted according to the collapse degree, specifically as follows:
and normalizing the collapse degree of each pixel point. Specifically, since the gray value of the crack region is lower than that of other regions, the contrast effect of the crack region and other regions is enhanced by a method of reducing the gray value of the crack connected region, and the adjustment formula is as follows: and (1-collapse degree) multiplied by the gray value of the original pixel point=the gray value of the new pixel point, so that the gray value of the pixel point is redistributed, and the gray values of all the pixel points in all the edge images are updated, so that the crack area of the tool gray image is enhanced.
In this embodiment, after the enhanced tool gray image is obtained, the high threshold of the double threshold in the canny algorithm is used as the high threshold of the oxford method threshold, the low threshold is defined as the product of the upper threshold and the set proportion, and the edge detection of the adjusted tool gray image is performed by the canny algorithm to obtain the detection result of the fine cracks generated by the tipping and the tipping, that is, the obtained edge image may be a crack area, so as to continuously determine whether the fine cracks generated by the tipping and the tipping exist, and make corresponding maintenance measures.
Of course, as other embodiments, the present invention may also employ other algorithms, such as the Sobel algorithm.
The set proportion is an empirical value, and the set proportion can be 0.2 or 0.4, and can be customized according to actual conditions.
According to the scheme, the edge detection is carried out on the cutter image for multiple times to obtain the corresponding edge image under different edge detection, the characteristics of each pixel point are further analyzed from the edge images, the obtained characteristics are utilized to determine the collapse degree of each pixel point, the gray value of the corresponding pixel point is used for adjusting, the contrast ratio of the fine cracks generated by the collapse blade and other rough textures in the cutter image is improved, the detection of the collapse blade and the fine cracks generated by the collapse blade is realized, and the detection accuracy is improved.
While various embodiments of the present invention have been shown and described herein, it will be obvious to those skilled in the art that such embodiments are provided by way of example only. Many modifications, changes, and substitutions will now occur to those skilled in the art without departing from the spirit and scope of the invention. It should be understood that various alternatives to the embodiments of the invention described herein may be employed in practicing the invention.

Claims (8)

1. The method for detecting the abnormal tipping of the cutter of the numerical control machine tool is characterized by comprising the following steps of:
acquiring a cutter gray level image;
performing edge detection on the cutter gray level image at least twice to obtain at least two edge images; the edge detection adopts a canny algorithm, and when the edge detection is carried out on the cutter gray level image at least twice, the number of double thresholds is set to be at least two groups; sorting the double thresholds from small to large based on the sizes of the middle and high thresholds of the double thresholds, and traversing the double thresholds according to the sequencing of the double thresholds to obtain corresponding edge images;
carrying out connected domain analysis on each edge image to obtain a connected domain of each edge image;
randomly selecting a connected domain in one edge image, marking the connected domain as a current connected domain, and counting the gray average value of all pixels in the current connected domain, the total number of the pixels in the current connected domain, the occurrence times of the current connected domain in multiple edge detection and the change number of the pixels of the current connected domain disappearing along with the traversal of a double threshold value; calculating to obtain the non-texture degree of the current connected domain, and further obtaining the non-texture degree of all the connected domains;
counting at least two non-texture degrees corresponding to each pixel point in the edge image, and determining the optimal non-texture degree of each pixel point, and taking the optimal non-texture degree as a collapse degree;
adjusting the gray value of the corresponding pixel point in the tool gray image based on the bursting degree to obtain a new gray value, and obtaining an adjusted tool gray image; and carrying out edge detection on the adjusted cutter gray level image to obtain a crack region.
2. The method for detecting the edge chipping abnormality of the tool of the numerical control machine tool according to claim 1, characterized by further comprising the step of numbering all the connected domains when the connected domain of each edge image is obtained, specifically:
according to the sequence of the double-threshold traversal, the connected domains corresponding to the edge images are sequenced in sequence;
numbering the sorted connected domains according to a numbering rule;
the numbering rule is that if the current edge image and the previous edge image have the same connected domain, the same connected domain in the current edge image is not numbered any more, the number of the same connected domain in the previous edge image is kept consistent with the number of the same connected domain in the previous edge image, and the remaining other connected domains in the current edge image are continuously and repeatedly numbered; wherein the remaining other connected domain is a new connected domain different from the connected domain of the previous edge image.
3. The method for detecting the tool tipping abnormality of the numerically-controlled machine tool according to claim 1, wherein the non-texture degree is:
wherein,represent the firstiNon-texture of individual connected domains, +.>Is the firstiGray mean value of individual connected domains +.>Is the firstiThe number of pixel point changes of each connected domain disappearing along with the traversal of the double threshold value, ++>Is the firstiThe total number of pixels of each connected domain, < >>Is the firstiThe number of times that the connected domain appears in the plurality of edge detections.
4. The method for detecting the tool tipping abnormality of the numerical control machine tool according to claim 1, wherein the obtaining process of the double threshold is as follows:
acquiring a threshold range of a high threshold, wherein the upper limit value in the threshold range is the gradient maximum value of the pixel point in the tool gray image, and the lower limit value is the gradient minimum value of the pixel point in the tool gray image;
taking the product of a set proportion and a high threshold value as a low threshold value, wherein the set proportion is an empirical value;
and taking the lower limit value as an initial value, determining a plurality of high thresholds and corresponding low thresholds according to the set threshold interval, and further obtaining at least two groups of double thresholds.
5. The method for detecting the tool tipping abnormality of the numerically-controlled machine tool according to claim 1, wherein the obtaining process of the optimal non-texture degree is as follows:
and calculating the importance degree of the non-texture degree corresponding to any pixel point, and taking the non-texture degree with the largest importance degree as the optimal non-texture degree of any pixel point.
6. The method for detecting the abnormal tipping of the cutter of the numerical control machine tool according to claim 5, wherein the importance degree is as follows:
wherein,represent the firstjThe first pixel point corresponds tokDegree of importance of individual non-textures, +.>Represent the firstjThe number of times the kth non-texture connected domain corresponding to each pixel appears in multiple edge detection,/->Represents the (th) of the j-th pixel point>The number of times of occurrence of connected domains corresponding to the non-texture degree in multiple edge detection, +.>Represent the firstjThe first pixel point corresponds tokThe total number of new connected domains generated in the corresponding edge image by the connected domains of the non-texture degree along with the traversal of the double threshold value,represent the firstjThe first pixel point corresponds tokThe gradient direction of all pixel points in the connected domain of each non-texture degree is equal to the angle average value of the included angle between the gradient direction of all pixel points and the horizontal direction from left to right,/or->Represent the firstjThe first pixel point corresponds tokThe connected domain of each non-texture degree generates the first connected domain in the corresponding edge image along with the traversal of the double threshold valuezThe average value of the angles between the gradient directions of all the pixel points in the new connected domain and the horizontal direction from left to right, K is the total number of non-texture degrees of the j-th pixel point,norm() The function is a function of the norm,exp() The function is an exponential function based on a natural constant e.
7. The method for detecting the tool tipping abnormality of the numerically-controlled machine tool according to claim 1, wherein the new gray value obtaining process is as follows:
normalizing the collapse degree of each pixel point to obtain a normalized value;
taking the product of the normalized value and the gray value of the corresponding pixel point in the tool gray image as an adjustment value;
and calculating the difference value between the gray value of the pixel point and the adjustment value, and taking the difference value as a new gray value.
8. The method for detecting the tool tipping abnormality of the numerical control machine tool according to claim 1, wherein the edge detection of the adjusted tool gray image is performed by a canny algorithm, wherein the high threshold value in the double threshold values is an oxford threshold value, and the low threshold value is the product of a set proportion and the high threshold value.
CN202410232077.5A 2024-03-01 2024-03-01 Numerical control machine tool tipping abnormity detection method Pending CN117808811A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202410232077.5A CN117808811A (en) 2024-03-01 2024-03-01 Numerical control machine tool tipping abnormity detection method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202410232077.5A CN117808811A (en) 2024-03-01 2024-03-01 Numerical control machine tool tipping abnormity detection method

Publications (1)

Publication Number Publication Date
CN117808811A true CN117808811A (en) 2024-04-02

Family

ID=90430554

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202410232077.5A Pending CN117808811A (en) 2024-03-01 2024-03-01 Numerical control machine tool tipping abnormity detection method

Country Status (1)

Country Link
CN (1) CN117808811A (en)

Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2004005895A1 (en) * 2002-07-09 2004-01-15 Medispectra, Inc. Methods and apparatus for characterization of tissue samples
CN104637067A (en) * 2015-03-18 2015-05-20 厦门麦克玛视电子信息技术有限公司 Method for detecting defect of textured surface
CN110774055A (en) * 2019-10-10 2020-02-11 华中科技大学 Cutter breakage monitoring method and system based on image edge detection
CN110930405A (en) * 2020-01-19 2020-03-27 南京理工大学 Cutter damage detection method based on image area division
CN114782432A (en) * 2022-06-20 2022-07-22 南通电博士自动化设备有限公司 Edge detection method of improved canny operator based on textural features
CN115358983A (en) * 2022-08-16 2022-11-18 佛山市南海区广工大数控装备协同创新研究院 Tool defect detection method, tool defect detection apparatus, and computer-readable storage medium
CN116563282A (en) * 2023-07-10 2023-08-08 东莞市博思特数控机械有限公司 Drilling tool detection method and system based on machine vision
CN116758099A (en) * 2023-08-17 2023-09-15 无锡康贝电子设备有限公司 Abnormal monitoring and scram system of numerical control machine tool
CN116823826A (en) * 2023-08-29 2023-09-29 无锡康贝电子设备有限公司 Numerical control machine tool tipping abnormity detection method
CN117237368A (en) * 2023-11-16 2023-12-15 临沂市公路事业发展中心兰陵县中心 Bridge crack detection method and system
CN117400066A (en) * 2023-12-15 2024-01-16 西安航飞精密工具有限公司 Numerical control machine tool wear identification method and system

Patent Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2004005895A1 (en) * 2002-07-09 2004-01-15 Medispectra, Inc. Methods and apparatus for characterization of tissue samples
CN104637067A (en) * 2015-03-18 2015-05-20 厦门麦克玛视电子信息技术有限公司 Method for detecting defect of textured surface
CN110774055A (en) * 2019-10-10 2020-02-11 华中科技大学 Cutter breakage monitoring method and system based on image edge detection
CN110930405A (en) * 2020-01-19 2020-03-27 南京理工大学 Cutter damage detection method based on image area division
CN114782432A (en) * 2022-06-20 2022-07-22 南通电博士自动化设备有限公司 Edge detection method of improved canny operator based on textural features
CN115358983A (en) * 2022-08-16 2022-11-18 佛山市南海区广工大数控装备协同创新研究院 Tool defect detection method, tool defect detection apparatus, and computer-readable storage medium
CN116563282A (en) * 2023-07-10 2023-08-08 东莞市博思特数控机械有限公司 Drilling tool detection method and system based on machine vision
CN116758099A (en) * 2023-08-17 2023-09-15 无锡康贝电子设备有限公司 Abnormal monitoring and scram system of numerical control machine tool
CN116823826A (en) * 2023-08-29 2023-09-29 无锡康贝电子设备有限公司 Numerical control machine tool tipping abnormity detection method
CN117237368A (en) * 2023-11-16 2023-12-15 临沂市公路事业发展中心兰陵县中心 Bridge crack detection method and system
CN117400066A (en) * 2023-12-15 2024-01-16 西安航飞精密工具有限公司 Numerical control machine tool wear identification method and system

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
王伟;何卫平;雷蕾;林清松;: "复杂金属背景下二维条码区域的快速定位", 天津大学学报(自然科学与工程技术版), no. 06, 15 June 2013 (2013-06-15) *
罗晓华, 朱策, 于新斌, 何中市: "分形维的自适应阈值选取与图像增强", 东莞理工学院学报, no. 05, 30 March 2006 (2006-03-30) *
贺延涛;徐琪;唐亮;游晓明;: "基于纹理特征的磁片表面刀纹缺陷检测", 计算机工程与科学, no. 06, 15 June 2012 (2012-06-15) *

Similar Documents

Publication Publication Date Title
Kerr et al. Assessment and visualisation of machine tool wear using computer vision
CN106251361B (en) A kind of rail surface defects image self-adapting division method
CN104794491B (en) Based on the fuzzy clustering Surface Defects in Steel Plate detection method presorted
CN108108890B (en) Process defect risk analysis method based on process incidence relation
CN109993459B (en) Method for identifying water bursting source of complex multi-aquifer mine
Chen et al. Automated inspection of engineering ceramic grinding surface damage based on image recognition
CN115187548A (en) Mechanical part defect detection method based on artificial intelligence
Sharifzadeh et al. Detection of steel defect using the image processing algorithms
Klancnik et al. Computer vision-based approach to end mill tool monitoring
Bommi Surface Roughness Prediction in Turning of Monel K 500 using DWT Technique
CN115311629B (en) Abnormal bending precision monitoring system of bending machine
CN110852989B (en) Quality flaw detection of tile photographed picture
CN115861290B (en) Skin-feel wood door surface defect detection method
CN110928237A (en) Vibration signal-based numerical control machining center flutter online identification method
CN105631481B (en) Iron based on genetic programming composes abrasive grain compound characteristics building method
CN116703911A (en) LED lamp production quality detecting system
CN114187286A (en) Wood plate surface machining quality control method based on machine vision
Atli et al. A computer vision-based fast approach to drilling tool condition monitoring
CN117036358B (en) Method and system for detecting tool wear of numerical control machine tool
CN114049340A (en) Diamond saw wire abrasion on-line detection method and device based on machine vision
CN117808811A (en) Numerical control machine tool tipping abnormity detection method
CN114139618A (en) Signal dependent noise parameter estimation method based on improved density peak clustering
CN110196797B (en) Automatic optimization method and system suitable for credit scoring card system
CN114850967B (en) Method and system for detecting cutter abrasion state based on man-in-loop
CN110465833A (en) A kind of cracking of cutter detection method

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination