A method for identifying titanium metal special-shaped parts
By calculating the scratch coefficient and significance value of pixels in the image of titanium special-shaped parts, combined with the difference in positional relationship, the problem of misdetection of scratch areas caused by the surface reflectivity of titanium special-shaped parts is solved, and the surface of titanium special-shaped parts is realized. Accurate identification and detection of scratched areas.
Patent Information
- Application Number
- CN202410840391.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-27
- Publication Date
- 2024-10-25
- Estimated Expiration
- 2044-06-27
AI Technical Summary
The strong reflectivity of the surface of titanium special-shaped parts causes the pixel significance values of potential scratch areas to be close to those of normal areas, making it difficult for traditional detection methods to accurately identify scratch areas.
By calculating the scratch coefficient and final significance value of each pixel, combined with the difference in positional relationship between the pixel and other pixels, the scratch area is obtained, avoiding false detection due to reflectivity.
It achieves accurate identification of scratch areas on the surface of titanium metal special-shaped parts, improves detection accuracy, avoids misjudgment, and enhances identification efficiency.
Smart Images

Figure CN118429624B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of image processing, and more specifically, to a method for identifying titanium metal special-shaped parts. Background Art
[0002] Titanium special-shaped parts are widely used in aerospace, medical equipment, chemical industry and other fields, and they have excellent mechanical properties and corrosion resistance. At the same time, since titanium special-shaped parts usually have complex shapes and structures, traditional recognition methods may have errors and inefficiencies. Then, with the improvement of industrial automation level, more intelligent and efficient recognition methods are needed to meet production needs. By accurately identifying titanium special-shaped parts, production quality problems caused by recognition errors can be avoided to ensure that products meet standards. When quality inspection of titanium special-shaped parts is carried out, there may be a scratch defect on its surface, which will have an adverse effect on the mechanical properties, corrosion resistance, fatigue life, appearance quality and subsequent processing of the product. The existing method for quality inspection of titanium special-shaped parts is the significance detection CA algorithm, which can provide many advantages in technical quality inspection, such as high precision, high efficiency, automation, strong adaptability and visualization, which helps to improve product quality and production efficiency.
[0003] The patent application document currently published with the publication number CN115272335A discloses a metallurgical metal surface defect detection method based on saliency detection, which obtains multiple candidate categories and corresponding saliencies by performing data processing on the metal surface image; further, data processing is performed on the multiple candidate categories to obtain candidate scratch defect areas and corresponding final saliencies; a saliency map is constructed from the final saliency, and defect detection is performed on the saliency map to obtain the final scratch area.
[0004] When collecting images of titanium special-shaped parts, the titanium surface has strong reflectivity. If the light source or camera angle is not selected properly, it may cause reflection on the surface of the titanium special-shaped parts, which will make the potential scratch area on the surface of the titanium special-shaped parts have a closer significance value to the pixel points in the normal area. This will make it impossible to detect the accurate scratch area when the scratch area in the image of the titanium special-shaped parts is detected by the above method when there is reflection on the surface of the titanium special-shaped parts. Summary of the invention
[0005] In order to solve the problem that due to the strong reflectivity of the titanium metal surface, the potential scratch area on the surface of the titanium metal special-shaped part has a relatively close significance value to the pixel points in the normal area, and the accurate scratch area cannot be detected, the present invention proposes a method for identifying titanium metal special-shaped parts, which includes the following steps:
[0006] Collecting an image of a titanium metal special-shaped part; obtaining a scratch coefficient of each pixel point in the image of the titanium metal special-shaped part, wherein the scratch coefficient represents a degree of gray value transformation of the pixel point;
[0007] The formula for calculating the scratch degree of each pixel in the titanium metal special-shaped part image is:
[0008] ,in, Represents the scratch coefficient of the nth pixel; The information entropy of all pixels in the reference area representing the nth pixel; The number of representative pixels representing the nth pixel; The i-th representative pixel representing the n-th pixel and the i-th representative pixel except the i-th representative pixel The arc sine value of the angle between the line connecting the pixels and the horizontal direction; The i-th representative pixel representing the n-th pixel and the n-th representative pixel except the i-th representative pixel represents the arc sine of the angle between the line connecting the pixels and the horizontal direction; norm() represents the normalization function; exp() represents the exponential function with a natural constant as the base;
[0009] The final significance value of each pixel in the titanium metal special-shaped part image is obtained, and the final significance value reflects the weighted sum of the scratch degree of each pixel in the titanium metal special-shaped part image and the Euclidean distance between the pixel points; based on the final significance value of each pixel in the titanium metal special-shaped part image, the scratch area is obtained.
[0010] The innovation of the present invention lies in obtaining the degree of scratches of each pixel in the image of titanium metal special-shaped parts, obtaining the significance value of each pixel based on the degree of scratches of each pixel and the difference in the positional relationship between each pixel and other pixel points, and then obtaining the scratch area based on the significance value, thereby avoiding the situation that the potential scratch area on the surface of titanium metal special-shaped parts has a significance value close to that of the pixels in the normal area due to the strong reflectivity of the titanium metal surface, and the accurate scratch area can be obtained. Furthermore, the degree of scratches of each pixel in the image of titanium metal special-shaped parts is obtained based on the scratch coefficient of each pixel, combined with the inconsistency of the grayscale value of the pixel and the surrounding pixels and the feature that the scratch is a straight line, so that the obtained degree of scratches of each pixel is more accurate. Furthermore, the scratch coefficient of each pixel is obtained based on the grayscale value of each pixel and the difference in grayscale value between the grayscale value of each pixel and the comparison pixel. The scratch coefficient represents the possibility that the pixel is a scratch area. The larger the value, the more likely the pixel is to be a scratch area.
[0011] Preferably, the step of obtaining the scratch coefficient of each pixel point in the titanium metal special-shaped part image includes:
[0012] Get the comparison pixel points;
[0013] ;
[0014] In the formula, Represents the scratch coefficient of the nth pixel in the titanium metal special-shaped part image; Represents the gray value of the nth pixel in the titanium metal special-shaped part image; Represents the grayscale mean of all pixels in the titanium metal special-shaped parts image; Represents the grayscale mean of the nth pixel in the titanium metal special-shaped part image and all the pixels in its eight neighborhoods; Represents the grayscale mean of the g-th contrast pixel and all pixels in its eight neighborhoods; exp() represents an exponential function with a natural constant as the base; norm() represents a normalization function; G represents the number of contrast pixels.
[0015] The scratch coefficient of each pixel is obtained based on the grayscale value of each pixel and the difference in grayscale value between each pixel and the comparison pixel. The scratch coefficient represents the possibility that the pixel is a scratch area. The larger the value, the more likely the pixel is to be a scratch area, which facilitates the subsequent acquisition of the scratch degree of each pixel based on the scratch coefficient of each pixel.
[0016] Preferably, obtaining the reference area of the pixel point includes:
[0017] The default reference area size is , taking each pixel in the titanium metal special-shaped part image as the center pixel to construct a area as the reference area for each pixel.
[0018] Preferably, obtaining the representative pixel of the pixel includes:
[0019] The number of representative pixels C is preset, and the pixels in the reference area of each pixel in the titanium metal special-shaped part image are sorted in order from small to large according to the grayscale value to obtain the grayscale sequence of each pixel, and the first C pixels in the grayscale sequence of each pixel are obtained and recorded as the representative pixels of each pixel.
[0020] It is known that when the pixels with lower grayscale values in the local range of pixels form a straight line, it means that the pixels are more likely to be scratch pixels. Therefore, it is necessary to obtain the pixels with lower grayscale values in the local range of pixels for subsequent analysis, that is, the representative pixels of the pixels.
[0021] Preferably, the step of obtaining the final significance value of each pixel in the titanium metal special-shaped part image includes:
[0022] ;
[0023] In the formula, Represents the final saliency value of the nth pixel in the titanium metal special-shaped part image; Represents the scratch degree of the nth pixel in the titanium metal special-shaped part image; Represents the scratch degree of the u-th pixel except the n-th pixel in the titanium metal special-shaped part image; Represents the number of pixels in the titanium metal special-shaped parts image; represents the Euclidean distance between the nth pixel point and the uth pixel point excluding the nth pixel point in the titanium metal special-shaped part image; norm() represents the normalization function.
[0024] The larger the final significance value of a pixel point is, the more likely the pixel point is a scratch area pixel point. Therefore, it is convenient to obtain the scratch area according to the significance value of each pixel point.
[0025] Preferably, the step of obtaining the scratch area based on the final significance value of each pixel in the titanium metal special-shaped part image includes:
[0026] Preset final significance threshold , when the final significance of any pixel in the titanium metal special-shaped part image is greater than or equal to the final significance threshold When , the pixel is a scratch pixel, and all scratch pixels are analyzed for connected regions to obtain the scratch region.
[0027] The preset final significance threshold can distinguish the pixels in the normal area from the pixels in the scratch area, and thus obtain the accurate scratch area.
[0028] Preferably, obtaining the comparison pixel points includes:
[0029] The number of comparison pixel points G is preset, and G pixel points are randomly selected from the titanium metal special-shaped part image and recorded as comparison pixel points.
[0030] Preferably, the collecting of images of titanium metal special-shaped parts includes:
[0031] A high-definition camera is used to shoot titanium special-shaped parts to obtain an RGB image of the titanium special-shaped parts. The RGB image of the titanium special-shaped parts is gray-scaled to obtain an image of the titanium special-shaped parts. The mean filtering algorithm is used to filter the image of the titanium special-shaped parts.
[0032] The present invention has the following beneficial effects: the purpose of the present invention is to obtain the degree of scratches of each pixel point in the image of titanium metal special-shaped parts, obtain the significance value of each pixel point according to the degree of scratches of each pixel point and the difference in the positional relationship between each pixel point and other pixel points, and then obtain the scratch area according to the significance value, thereby avoiding the situation that the potential scratch area on the surface of titanium metal special-shaped parts has a relatively close significance value to the pixel points in the normal area due to the strong reflectivity of the titanium metal surface, and the normal area is detected as a scratch area. BRIEF DESCRIPTION OF THE DRAWINGS
[0033] By reading the following detailed description with reference to the accompanying drawings, the above and other objects, features and advantages of the exemplary embodiments of the present invention will become readily understood. In the accompanying drawings, several embodiments of the present invention are shown in an exemplary and non-limiting manner, and the same or corresponding reference numerals represent the same or corresponding parts, wherein:
[0034] Figure 1 The present invention is a flowchart of a method for identifying titanium metal special-shaped parts according to an embodiment of the present invention. DETAILED DESCRIPTION
[0035] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present invention.
[0036] The specific embodiments of the present invention are described in detail below with reference to the accompanying drawings.
[0037] See also Figure 1 , which shows a step flow chart of a method for identifying titanium metal special-shaped parts provided by an embodiment of the present invention, the method includes the following steps.
[0038] S001, collecting images of titanium metal special-shaped parts.
[0039] In the embodiment of the present invention, a high-definition camera is used to photograph titanium metal special-shaped parts to obtain an RGB image of the titanium metal special-shaped parts. In order to facilitate subsequent analysis and to reduce noise in the image, the RGB image of the titanium metal special-shaped parts is grayed to obtain an image of the titanium metal special-shaped parts. The titanium metal special-shaped parts image is filtered using a mean filtering algorithm. It should be noted that the mean filtering algorithm is a well-known technology and will not be described in detail in the embodiment of the present invention.
[0040] S002, obtaining the scratch coefficient of each pixel in the titanium metal special-shaped part image according to the grayscale value of each pixel and the grayscale difference between each pixel and other pixels, and obtaining the scratch degree of each pixel in the titanium metal special-shaped part image according to the scratch coefficient of each pixel in the titanium metal special-shaped part image.
[0041] It should be noted that, since the titanium metal surface has strong reflectivity, if the light source or the angle of the high-definition camera is not properly selected, it may cause reflection on the surface of the titanium metal special-shaped part, so that the scratch area in the titanium metal special-shaped part image and the pixel points in the normal area have relatively close L, a, and b values. When using the saliency detection CA algorithm to detect the scratch area in the titanium metal special-shaped part image, the image is converted from RGB space to Lab space to obtain the color distance and spatial distance of the local area, and then the eigenvalue of the local area is obtained, and then the saliency value is obtained by the difference of the eigenvalue at different scales. This calculation method cannot detect the complete scratch area when there is reflection on the surface of the titanium metal special-shaped part. Therefore, in response to this problem, the present invention proposes a method for identifying titanium metal special-shaped parts, by analyzing the grayscale value and grayscale change characteristics of the pixel points in the titanium metal special-shaped part surface image, the scratch degree of each pixel point is obtained; finally, the scratch degree of each pixel point is used in combination with the distance difference between the pixel points to obtain the saliency value of each pixel point, so as to realize accurate identification of scratch defects on the surface of the titanium metal special-shaped part.
[0042] It should be further explained that the surface of the scratch area is known to be rough, and the surface roughness of the scratch area will increase the scattering of light, so that the pixels in the scratch area receive less light than other areas. Therefore, the grayscale value of the pixels belonging to the scratch area is smaller. Therefore, the grayscale value of each pixel and the difference between each pixel and other pixels are analyzed to obtain the scratch coefficient of each pixel. The larger the scratch coefficient, the greater the possibility that the pixel belongs to the scratch area, and the scratch coefficient will be used to calculate the degree of scratch of each pixel in subsequent steps.
[0043] In the embodiment of the present invention, G pixels are randomly selected from the titanium metal special-shaped part image and recorded as comparison pixels. In the embodiment of the present invention, the preset number of comparison pixels G=5. In other embodiments, implementers can preset the value of the number of comparison pixels G according to the specific implementation method.
[0044] Get the scratch coefficient of each pixel in the titanium metal special-shaped part image:
[0045] ;
[0046] In the formula, Represents the scratch coefficient of the nth pixel in the titanium metal special-shaped part image; represents the gray value of the nth pixel in the titanium metal special-shaped part image; G represents the number of contrasting pixels; Represents the grayscale mean of all pixels in the titanium metal special-shaped parts image; Represents the grayscale mean of the nth pixel in the titanium metal special-shaped part image and all the pixels in its eight neighborhoods; Represents the grayscale mean of the g-th comparison pixel and all pixels in its eight neighborhoods; Represents the ratio between the gray value of the nth pixel and the gray mean of all pixels in the titanium metal special-shaped parts image. The smaller the value, the smaller the gray value of the nth pixel in the titanium metal special-shaped parts image is. Then the possibility that the nth pixel belongs to the scratch area is greater, that is, the scratch coefficient of the nth pixel is greater. It represents the difference between the grayscale mean of the nth pixel and the pixels in its eight neighborhoods, and the grayscale mean of the comparison pixel and the pixels in its eight neighborhoods. The smaller the value is, the greater the credibility of the relatively smaller grayscale value of the nth pixel in the titanium metal special-shaped part image, and the greater the possibility that the pixel belongs to the scratch area, and the greater the scratch coefficient.
[0047] It should be noted that the scratch coefficient of each pixel has been obtained through the analysis of the above steps, but the analysis of this indicator is only based on the grayscale value of each pixel, without taking into account the grayscale values of the surrounding pixels. It is still impossible to divide the pixels in the scratch area that are potentially affected by light reflection in the titanium metal special-shaped parts image into the scratch area. Therefore, it is also necessary to analyze the grayscale change characteristics of the pixels in the surrounding area of each pixel. It is known that the surface of the scratch area is rough, so the grayscale values of the pixels in the scratch area are more inconsistent, that is, when the grayscale values of the pixel are more inconsistent with those of the surrounding pixels, it means that the pixel is more likely to be a pixel in the scratch area, and the scratch is a straight line. Therefore, when the pixels with lower grayscale values among the surrounding pixels of the pixel are close to a straight line, it means that the pixel is more likely to be a pixel in the scratch area.
[0048] In the embodiment of the present invention, a reference area of each pixel is obtained: a pixel with a size of As the reference area of each pixel, in the embodiment of the present invention, the preset reference area size is In other embodiments, the implementer may preset the reference area size according to the specific implementation situation. The value of .
[0049] According to the order of grayscale value from small to large, the pixels in the reference area of the nth pixel in the titanium metal special-shaped part image are sorted to obtain the grayscale sequence of the nth pixel, and the first C pixels in the grayscale sequence of the nth pixel are obtained and recorded as the representative pixels of the nth pixel. In the embodiment of the present invention, the preset number of representative pixels is C=9. In other embodiments, the implementer can preset the value of the number of representative pixels according to the specific implementation situation.
[0050] According to the grayscale values of all pixels in the reference area of the nth pixel in the titanium metal special-shaped part image, the information entropy of all pixels in the reference area of the nth pixel in the titanium metal special-shaped part image is obtained. It should be noted that the acquisition of information entropy is a prior art and will not be elaborated in the present invention.
[0051] Get the scratch degree of each pixel in the titanium metal special-shaped part image:
[0052] ;
[0053] In the formula, Represents the scratch degree of the nth pixel in the titanium metal special-shaped part image; Represents the scratch coefficient of the nth pixel in the titanium metal special-shaped part image; The information entropy of all pixels in the reference area representing the nth pixel in the titanium metal special-shaped part image; The number of representative pixels representing the nth pixel in the titanium metal special-shaped part image; The i-th representative pixel representing the n-th pixel in the titanium metal special-shaped part image and the n-th representative pixel except the i-th representative pixel The arc sine value of the angle between the line connecting the pixels and the horizontal direction; The i-th representative pixel representing the n-th pixel in the titanium metal special-shaped part image and the n-th representative pixel except the i-th representative pixel represents the arc sine of the angle between the line connecting the pixels and the horizontal direction; exp() represents the exponential function with a natural constant as the base; norm() represents the normalization function; The larger the value is, the more inconsistent the grayscale values of the pixels in the reference area of the nth pixel are, and the greater the possibility of scratch defects in this reference area is, that is, the greater the degree of scratches on the nth pixel is. The smaller the value is, the closer the connection line between the pixels with low grayscale values in the reference area of the nth pixel is to a straight line. At the same time, since the scratch defects on the surface of titanium metal special-shaped parts are often in the shape of straight lines, the possibility of scratch defects in the reference area of the nth pixel will be greater, that is, the degree of scratches on the nth pixel will be greater.
[0054] S003, obtaining a final saliency value of each pixel in the titanium metal special-shaped part image according to the scratch degree of each pixel in the titanium metal special-shaped part image and the difference in positional relationship between each pixel and other pixels.
[0055] It should be noted that the degree of scratches obtained for each pixel in this scheme will be used as an important component for calculating the final significance value of each pixel. The existence of this indicator replaces the L, a, and b values of each pixel in the original algorithm, which will make the scratch area that cannot be detected normally due to the influence of light reflection detectable. At the same time, in this scheme, in order to reduce redundancy, reduce time complexity, and simplify calculation steps, when calculating the final significance value of each pixel, only one pixel size is used as one scale, and only the significance value corresponding to each pixel at one scale is calculated, and it is used as the final significance value of each pixel. Therefore, it is necessary to obtain the final significance value of each pixel based on the degree of scratches of each pixel and the difference in the positional relationship between each pixel and other pixels.
[0056] In the embodiment of the present invention, the final saliency value of each pixel in the titanium metal special-shaped part image is obtained:
[0057] ;
[0058] In the formula, Represents the final saliency value of the nth pixel in the titanium metal special-shaped part image; Represents the scratch degree of the nth pixel in the titanium metal special-shaped part image; Represents the scratch degree of the u-th pixel except the n-th pixel in the titanium metal special-shaped part image; Represents the number of pixels in the titanium metal special-shaped parts image; Represents the Euclidean distance between the nth pixel point and the uth pixel point other than the nth pixel point in the titanium metal special-shaped part image; Represents the difference between the scratch degree of the n-th pixel and the u-th pixel except the n-th pixel. The larger the value, the greater the final significance value of the n-th pixel, and the greater the possibility that it belongs to the scratch area; The smaller the value is, the smaller the distance between the n-th pixel and the u-th pixel except the n-th pixel is. Then the difference between the scratch degrees of these two pixels has a greater reference value for calculating the final significance value of the n-th pixel, that is, the final significance value of the n-th pixel is greater; norm() represents the normalization function.
[0059] S004, obtaining a scratch area according to the final significance value of each pixel point in the titanium metal special-shaped part image.
[0060] It should be noted that, when the final significance value of any pixel point is larger, it means that the pixel point is more likely to be a pixel point of the scratch area, so the final significance threshold is preset, and the scratch area is identified according to the final significance threshold.
[0061] In the embodiment of the present invention, the final significance threshold is preset , when the final significance of any pixel in the titanium metal special-shaped part image is greater than or equal to the final significance threshold When , the pixel point is the pixel point of the scratch area, the scratch area is obtained, and the final significance threshold is preset In other embodiments, implementers may preset the final significance threshold according to specific implementation conditions.
[0062] The present invention has the following beneficial effects: The present invention aims to obtain the degree of scratches of each pixel point in the image of titanium metal special-shaped parts, obtain the significance value of each pixel point based on the degree of scratches of each pixel point and the difference in the positional relationship between each pixel point and other pixel points, and obtain the scratch area based on the significance value, thereby avoiding the situation that the potential scratch area on the surface of titanium metal special-shaped parts has a significance value close to that of the pixels in the normal area due to the strong reflectivity of the titanium metal surface, and the accurate scratch area can be obtained. Furthermore, the degree of scratches of each pixel point in the image of titanium metal special-shaped parts is obtained based on the scratch coefficient of each pixel point, combined with the inconsistency of the grayscale value of the pixel point and the surrounding pixels and the feature that the scratch is a straight line, so that the obtained degree of scratches of each pixel point is more accurate. Furthermore, the scratch coefficient of each pixel point is obtained based on the grayscale value of each pixel point and the difference in the grayscale value between the grayscale value of each pixel point and the comparison pixel point. The scratch coefficient represents the possibility that the pixel point is a scratch area. The larger the value, the more likely the pixel point is to be a scratch area.
[0063] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the principles of the present invention should be included in the protection scope of the present invention.
Claims
1. A method for identifying titanium metal special-shaped parts, characterized in that: include: Collect images of titanium special-shaped parts; The number of representative pixels C is preset, and the pixels in the reference area of each pixel in the titanium metal special-shaped part image are sorted in the order of grayscale value from small to large to obtain the grayscale sequence of each pixel, and the first C pixels in the grayscale sequence of each pixel are obtained and recorded as the representative pixels of each pixel; the scratch coefficient of each pixel in the titanium metal special-shaped part image is obtained: Where Y n Represents the scratch coefficient of the nth pixel in the titanium metal special-shaped part image; H n Represents the gray value of the nth pixel in the titanium metal special-shaped part image; Represents the grayscale mean of all pixels in the titanium metal special-shaped parts image; K n Represents the grayscale mean of the nth pixel in the titanium metal special-shaped part image and all the pixels in its eight neighborhoods; A g represents the grayscale mean of the g-th contrast pixel and all pixels in its eight neighborhoods; exp() represents an exponential function with a natural constant as the base; norm() represents a normalization function; G represents the number of contrast pixels; The formula for calculating the scratch degree of each pixel in the titanium metal special-shaped part image is: Among them, Y n Represents the scratch coefficient of the nth pixel; S n represents the information entropy of all pixels in the reference area of the nth pixel; C represents the number of representative pixels of the nth pixel; μ n,i,r The arc sine value of the angle between the line connecting the ith representative pixel of the nth pixel and the rth representative pixel other than the ith representative pixel and the horizontal direction; π n,i,r+1 The arc sine value of the angle between the line connecting the ith representative pixel of the nth pixel and the r+1th representative pixel other than the ith representative pixel and the horizontal direction; norm() represents the normalization function; exp() represents the exponential function with a natural constant as the base; Get the final saliency value of each pixel in the titanium metal special-shaped part image: Where D n represents the final saliency value of the nth pixel in the titanium metal special-shaped part image; T n Represents the scratch degree of the nth pixel in the titanium metal special-shaped part image; T n,u represents the scratch degree of the u-th pixel in the titanium metal special-shaped part image except the n-th pixel; U represents the number of pixels in the titanium metal special-shaped part image; J n,u represents the Euclidean distance between the nth pixel point in the titanium metal special-shaped part image and the uth pixel point excluding the nth pixel point; norm() represents the normalization function; based on the final significance value of each pixel point in the titanium metal special-shaped part image, the scratch area is obtained.
2. A method for identifying titanium metal special-shaped parts according to claim 1, characterized in that: The acquisition of the reference area of the pixel point includes: The preset reference area size is N×N, and an area of size N×N is constructed with each pixel point in the titanium metal special-shaped part image as the central pixel point, which serves as the reference area of each pixel point.
3. The method for identifying titanium metal special-shaped parts according to claim 1, characterized in that: The method of obtaining the scratch area based on the final significance value of each pixel in the titanium metal special-shaped part image includes: A final significance threshold θ is preset. When the final significance of a pixel in the titanium metal special-shaped part image is greater than or equal to the final significance threshold θ, the pixel is a scratch pixel. Connected region analysis is performed on all scratch pixels to obtain the scratch region.
4. The method for identifying titanium metal special-shaped parts according to claim 2, characterized in that: The acquisition of the comparison pixel points includes: The number of comparison pixel points G is preset, and G pixel points are randomly selected from the titanium metal special-shaped part image and recorded as comparison pixel points.
5. The method for identifying titanium metal special-shaped parts according to claim 1, characterized in that: The collecting of titanium metal special-shaped parts images comprises: A high-definition camera is used to shoot titanium special-shaped parts to obtain an RGB image of the titanium special-shaped parts. The RGB image of the titanium special-shaped parts is gray-scaled to obtain an image of the titanium special-shaped parts. The mean filtering algorithm is used to filter the image of the titanium special-shaped parts.
