A quality inspection method and system for titanium alloy sheet forming
Through superpixel segmentation and adaptive local window technology, combined with the Niblack algorithm, the problem of misjudgment caused by complex texture distribution in titanium alloy thin plate inspection was solved, and high-accuracy and high-efficiency quality inspection was achieved.
Patent Information
- Application Number
- CN202511013113.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-23
- Publication Date
- 2025-09-23
- Estimated Expiration
- 2045-07-23
Smart Images

Figure CN120525871B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of image data processing, and in particular to a quality detection method and system for titanium alloy thin plate forming. Background Art
[0002] Titanium alloy sheets are commonly used in the aerospace industry to manufacture critical structural components such as aircraft fuselages and wings due to their high strength, excellent corrosion resistance, and good specific strength. These components must withstand complex aerodynamic loads, gravity, and various dynamic stresses during flight. Thickness deviations in the sheets can lead to uneven stress distribution and localized stress concentration, which accelerates the initiation and propagation of fatigue cracks, seriously threatening flight safety and structural lifespan.
[0003] Rolling is a core process in the production of titanium alloy sheets. Stable rolling force and speed ensure uniform deformation of the material between the rollers, resulting in a uniform rolling pattern on the sheet surface. However, the complexity of the actual production environment makes it easy for uneven thickness to occur during the rolling process. For example, factors such as roller wear and fluctuations in rolling force can lead to uneven sheet texture, or thickness deviations during sheet rolling. Therefore, quality inspection of formed titanium alloy sheets is necessary to promptly remove defective products to ensure the safety and reliability of aviation components.
[0004] Given the significant light and dark variations in the textured areas of formed titanium alloy sheets, the Niblack algorithm (Niblack's Algorithm) can be used for texture segmentation. The Niblack algorithm presets a fixed local window size and uses the standard deviation of the grayscale values of the pixels within each pixel window to adjust the grayscale mean, obtain the segmentation threshold for each pixel, and achieve texture pixel segmentation. However, since the surface textures of titanium alloy sheets are closely distributed and numerous during the actual rolling process, if the fixed window is too large, the transition area may be misclassified as non-texture pixels. If the window is too small, pixels in the non-texture area may be mistakenly classified as texture pixels, thereby affecting the accuracy of quality inspection of titanium alloy sheets. Summary of the Invention
[0005] In order to solve the problem that the traditional Niblack algorithm obtains the segmentation threshold of each pixel point by presetting the fixed local window size to achieve the segmentation of texture pixel points, and since the surface texture distribution of titanium alloy thin plates in the actual rolling process is relatively close and the number is large, if the fixed window is too large, it is easy to cause the transition area to be misjudged as non-texture. If the window is too small, the pixels in the non-texture area may be mistakenly classified as texture pixels, thereby affecting the accuracy of quality inspection of titanium alloy thin plates, the present invention provides a quality inspection method and system for titanium alloy thin plate forming.
[0006] In a first aspect, the present invention provides a quality inspection method for titanium alloy sheet forming, which adopts the following technical solution:
[0007] A quality inspection method for titanium alloy sheet forming, comprising: segmenting a surface image of a titanium alloy sheet using superpixel segmentation to obtain a plurality of superpixel blocks; determining the possibility that each superpixel block belongs to a reflective area according to the grayscale mean of all pixel points in each superpixel block and the maximum value of the grayscale mean, and the distance between each superpixel block and the center position of the superpixel block corresponding to the maximum value of the grayscale mean; obtaining a reflective area superpixel block and a non-reflective area superpixel block based on the size of the possibility, and determining the possibility that each superpixel block belongs to a reflective area according to the grayscale value of each pixel point in each reflective area superpixel block, the grayscale mean of all pixel points in all non-reflective area superpixel blocks, and the distance between each superpixel block and the center position of the superpixel block corresponding to the maximum value of the grayscale mean. The algorithm can determine the corrected grayscale value of each pixel point in the super-pixel block of each reflective area, and record the corrected grayscale value and the grayscale value of the pixel point in the super-pixel block of the non-reflective area as the grayscale value for eliminating the influence of reflection; for any pixel point in the surface image, the side length of the adaptive local window of the pixel point is determined according to the size of the normalized result of the standard deviation of the grayscale value for eliminating the influence of reflection of all pixels points in the local fixed window preset by the Niblack algorithm; based on the grayscale value for eliminating the influence of reflection of the pixel point in the adaptive local window of each pixel point, the Niblack algorithm is used to obtain the texture pixel point to realize the quality inspection for titanium alloy sheet forming.
[0008] The present invention judges the possibility of reflective areas based on the grayscale mean of superpixel blocks and the distance from the center position of the superpixel block with the maximum grayscale mean, and performs grayscale correction on the pixels in the reflective areas, effectively eliminating the interference caused by surface reflection and making the grayscale value more realistic and stable. The invention introduces the setting of adaptive local window size for each pixel point, and automatically adjusts the window side length according to the standard deviation normalization result of eliminating the influence of reflection on the grayscale value in the preset window. When the textures are dense and closely distributed, the misjudgment of transition areas caused by too large windows and misjudgment of non-textures caused by too small windows are avoided, thereby improving the accuracy of segmentation. The corrected grayscale value is combined with the adaptive window, and local threshold segmentation is performed based on the Niblack algorithm to more accurately distinguish between texture pixels and non-texture pixels, thereby ensuring that the detection results reflect the true surface state of the titanium alloy thin plate. The method of superpixel segmentation and dynamic parameter adjustment based on image features is adopted to reduce the dependence on manual experience and fixed parameters, thereby improving the versatility and adaptability of the detection system to titanium alloy thin plates of different batches and different texture distributions.
[0009] Furthermore, the superpixel segmentation adopts SLIC algorithm.
[0010] Furthermore, the surface image is a surface image of a titanium alloy sheet that has been subjected to grayscale processing.
[0011] Furthermore, the possibility satisfies:
[0012] Where, For the The probability that a superpixel block belongs to the reflective area, is the maximum value of the grayscale mean of all pixels in each superpixel block, For the The grayscale mean of all pixels in a superpixel block, For the The distance between the super pixel block and the center position of the super pixel corresponding to the maximum value of the grayscale mean, is the maximum value of the distance between each superpixel block and the center position of the superpixel corresponding to the maximum value of the grayscale mean, is the natural exponential function.
[0013] The present invention combines the grayscale difference of superpixel blocks with spatial distance to quantify the possibility of reflective areas. It takes into account the brightness levels in the image and integrates the spatial distribution characteristics, thereby improving the accuracy of reflective area determination. By utilizing the continuous and monotonically decreasing characteristics of the exponential function, the reflective possibility of superpixel blocks whose grayscale and spatial distance are far away from the maximum grayscale point decreases naturally, reflecting the principle of spatial proximity, effectively avoiding the sudden change of artificial threshold segmentation, and ensuring a smooth transition of determination.
[0014] Furthermore, the distance is Euclidean distance.
[0015] Furthermore, the obtaining of super-pixel blocks in the reflective area and super-pixel blocks in the non-reflective area includes: sorting the possibilities from large to small to obtain a sorted possibility sequence, obtaining the differences between all two adjacent possibilities in the sequence, and taking the average of the possibilities of the reflective areas to which the two super-pixel blocks corresponding to the maximum value of the differences belong as the reflective segmentation threshold; in response to the possibility that the reflective area to which any super-pixel block belongs is greater than the reflective segmentation threshold, the super-pixel block is determined to be a super-pixel block in the reflective area, otherwise, the pixel block is determined to be a super-pixel block in the non-reflective area, thereby obtaining super-pixel blocks in the reflective area and super-pixel blocks in the non-reflective area.
[0016] Furthermore, the corrected grayscale value satisfies:
[0017] Where, For the The first superpixel block in the reflective area The corrected gray value of each pixel, For the The first superpixel block in the reflective area The gray value of a pixel, is the grayscale mean of all pixels in all superpixel blocks in the non-reflective area, For the The possibility that a superpixel block in a reflective area belongs to a reflective area, The symbol for rounding up.
[0018] The present invention makes a correction by subtracting the original grayscale of the pixels in the reflective area from the mean value of the non-reflective area, and multiplies it by the reflection possibility, automatically reducing the excessive brightness caused by the light spot reflection and reasonably restoring the true grayscale of the pixels; taking the overall grayscale mean value of the non-reflective area as a reference benchmark, the corrected grayscale is made close to the true surface brightness, and combined with the reflection possibility weight, fine adjustment of the local area is achieved; by rounding up, the numerical integrity and controllability of the correction amplitude are guaranteed, and excessive correction to generate negative values or non-physical values is avoided, thereby maintaining the rationality of the grayscale distribution of the image and improving the restoration of texture details.
[0019] Furthermore, the side length satisfies:
[0020] Where, The surface image The side length of the adaptive local window of pixels, The surface image The normalized result of the standard deviation of the grayscale values of all pixels in the adaptive local window of pixels is eliminated by removing the reflection effect. is the preset grayscale standard deviation threshold, The side length of the local fixed window preset by the Niblack algorithm, The surface image Eliminating the reflection of each pixel affects the gray value. The maximum value of the grayscale value of the reflection-removed effect of all pixels in the surface image, Rounds to odd numbers.
[0021] The present invention dynamically adjusts the local window size of each pixel according to the standard deviation normalization result of local grayscale changes and the proportion of pixel grayscale values, realizes adaptive response to texture complexity and grayscale distribution, and improves detection sensitivity and accuracy; uses pixel to eliminate the influence of reflection on the ratio of grayscale value to maximum value, effectively reflects local brightness changes, prevents the adaptive window from being too large or too small, and thus avoids blurred texture edges or false segmentation caused by inappropriate window size; ensures that the window side length is an odd value by rounding to odd numbers, meets the symmetry requirement of the sliding window for the center pixel, and is conducive to the stable operation of the algorithm and the consistency of results; when the grayscale standard deviation is small, the window side length is appropriately enlarged to enhance the noise smoothing ability; when the grayscale standard deviation is large, the window size is quickly adjusted through a simple proportional relationship to ensure that complex texture details are retained.
[0022] Furthermore, the grayscale value of the pixel points in the adaptive local window based on the elimination of the influence of reflection is used to obtain the texture pixel points using the Niblack algorithm to realize the quality inspection for titanium alloy thin plate forming, including: according to the grayscale value of the pixel points in the adaptive local window based on the elimination of the influence of reflection, the segmentation threshold of each pixel point is obtained using the Niblack algorithm, and in response to the grayscale value of any pixel point that eliminates the influence of reflection is greater than the segmentation threshold of the pixel point, the pixel point is determined to be a texture pixel point; all texture pixel points are sorted according to position to obtain the texture area sequence of the surface image, and the DTW distance between the texture area sequence of the surface image and the texture area sequence of the surface image of the standard titanium alloy thin plate obtained in advance is obtained; in response to the negative correlation mapping of the DTW distance being greater than the preset qualified threshold, the quality of the currently inspected titanium alloy thin plate is determined to be qualified, and the quality inspection for titanium alloy thin plate forming is completed.
[0023] The present invention combines the grayscale value after eliminating reflection and the Niblack local segmentation threshold dynamically calculated based on the pixel adaptive window to achieve accurate extraction of complex texture details and significantly improve the recognition accuracy of texture areas; through the front-end reflection correction and adaptive window mechanism, it ensures that the Niblack algorithm still maintains stable performance in non-uniform lighting and reflective environments, reducing misjudgments and missed judgments; serializing the texture pixel points is conducive to capturing the spatial continuity and overall morphological characteristics of the texture, not only focusing on the local but also taking into account the global morphological differences of the texture; the adaptive local window and the DTW-based similarity measurement work together to improve the robustness of the detection algorithm to diverse textures and batch fluctuations, thereby improving the quality control of titanium alloy thin plates.
[0024] In a second aspect, the present invention provides a quality inspection system for titanium alloy sheet forming, which adopts the following technical solution:
[0025] A quality inspection system for titanium alloy sheet forming includes: a processor and a memory, wherein the memory stores computer program instructions, and when the computer program instructions are executed by the processor, the above-mentioned quality inspection method for titanium alloy sheet forming is implemented.
[0026] By adopting the above technical solution, the above-mentioned quality inspection method for titanium alloy sheet forming is generated into a computer program and stored in a memory so as to be loaded and executed by a processor, thereby making a terminal device based on the memory and the processor for easy use.
[0027] The present invention has the following technical effects:
[0028] (1) Abandoning the limitations of the fixed window of the traditional Niblack algorithm, by analyzing the normalized results of the local standard deviation of the pixel points, the local window side length is dynamically adjusted. In view of the dense and complex distribution of the texture on the surface of the titanium alloy thin plate, the adaptive window can accurately fit the texture morphology, avoiding the misjudgment of the transition area due to a large window, or the misclassification of the non-texture area due to a small window, and significantly improving the accuracy of texture pixel segmentation.
[0029] (2) A superpixel segmentation and reflective area identification mechanism is introduced. The possibility of reflection in each area is quantified through multi-dimensional information such as the grayscale mean and spatial position of the superpixel block, and the pixel grayscale value is corrected accordingly, which effectively weakens the interference of the titanium alloy surface reflection on the detection results. The subsequent Niblack algorithm is calculated based on more realistic grayscale data, further enhancing the reliability of quality detection of titanium alloy thin plates.
[0030] (3) Superpixel segmentation technology divides the image into semantic pixel blocks to reduce computational redundancy; the adaptive window is dynamically adjusted only in the local area to avoid the high complexity brought by global calculation, which not only ensures the detection accuracy but also effectively reduces the algorithm running time, achieving a dual improvement in quality detection efficiency and accuracy, and meeting the real-time requirements of industrial production. BRIEF DESCRIPTION OF THE DRAWINGS
[0031] Figure 1 This is a flow chart of a quality inspection method for titanium alloy sheet forming according to an embodiment of the present invention. DETAILED DESCRIPTION
[0032] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of them. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative work shall fall within the scope of protection of the present invention.
[0033] The embodiment of the present invention discloses a quality inspection method for titanium alloy sheet forming, referring to Figure 1 , including steps S01 to S05:
[0034] S01: Segment the surface image of the titanium alloy sheet using superpixel segmentation to obtain multiple superpixel blocks.
[0035] It should be noted that the industrial camera is fixed in a suitable position and the shooting angle distance is adjusted according to the size and shape of the current type of titanium alloy sheet to ensure that the surface details are fully captured.
[0036] Specifically, the superpixel segmentation adopts the SLIC algorithm.
[0037] Specifically, the surface image is a surface image of a titanium alloy thin plate that has been subjected to grayscale processing.
[0038] S02: Determine the possibility that each superpixel block belongs to a reflective area.
[0039] It should be noted that due to the high reflectivity of actual titanium alloys, the high reflectivity of localized areas on the titanium alloy surface can cause reflective areas in the captured image. These overly bright grayscales can severely obscure some of the existing grain details on the titanium alloy surface, blurring the boundaries between grains and significantly affecting the accuracy of subsequent grain segmentation. Considering the silver-gray color of actual titanium metal, due to its inherent color characteristics and surface microstructure, the overall grayscale of the thin plate made from it is relatively low. This means that there is a significant grayscale contrast between reflective areas (highlights) and non-reflective areas, and reflective areas often exhibit a continuous light spot morphology due to the strong reflection during camera imaging. Therefore, after using superpixel segmentation to cluster pixels with similar characteristics in the image into different superpixel blocks, the superpixel block with the highest grayscale is most likely located at the center of the reflective area or in the most reflective part. For each superpixel block, the spatial distance and grayscale feature differences between it and the pixel block with the highest grayscale are analyzed to quantify the likelihood that each superpixel block belongs to a reflective area.
[0040] The possibility of each superpixel block belonging to a reflective area is determined based on the grayscale mean of all pixels in each superpixel block and the maximum value of the grayscale mean, as well as the distance between each superpixel block and the center position of the superpixel block corresponding to the maximum value of the grayscale mean.
[0041] Specifically, the possibility satisfies:
[0042] ;
[0043] Where, For the The probability that a superpixel block belongs to the reflective area, is the maximum value of the grayscale mean of all pixels in each superpixel block, For the The grayscale mean of all pixels in a superpixel block, For the The distance between the super pixel block and the center position of the super pixel corresponding to the maximum value of the grayscale mean, is the maximum value of the distance between each superpixel block and the center position of the superpixel corresponding to the maximum value of the grayscale mean, is the natural exponential function.
[0044] Specifically, the distance is the Euclidean distance.
[0045] in, The difference between the grayscale mean of the superpixel with the maximum grayscale mean and the grayscale mean of the current superpixel. The smaller this value, the closer the grayscale characteristics of the current superpixel are to the core of the reflective area, indicating that the current superpixel is more likely to belong to the reflective area. Considering that the light reflection intensity of the reflective area decreases from the center to the periphery, the closer the area is to the core, the stronger the reflection, and the more likely it is to be near the center of the reflective area. By introducing the Euclidean distance metric between the center of the current superpixel and the center of the superpixel with the maximum grayscale mean, this distance value reflects the relative position of the two pixels in image space. The smaller this distance value, the more likely the current superpixel is to be near the center of the reflective area. Therefore, by combining these two metrics and performing an average weighted average, the more likely the current superpixel is to belong to the reflective area and the more likely it is to be near the center of the reflective area, the more likely the current superpixel is to belong to the reflective area. Conversely, if at least one metric indicates that the superpixel is unlikely to belong to the reflective area, the less likely the current superpixel is to belong to the reflective area.
[0046] S03: Determine the corrected grayscale value of each pixel in the superpixel block of each reflective area, and obtain the grayscale value of the pixel in the surface image after eliminating the reflection effect.
[0047] It should be noted that, considering the significant brightness of the actual reflective area itself, and the likelihood obtained through the above processing can significantly distinguish superpixel blocks in the reflective and non-reflective areas, that is, the likelihood obtained in the reflective area is significantly larger, while the likelihood obtained in the non-reflective area is significantly smaller. Therefore, when selecting the reflection segmentation threshold for segmenting the reflective area, the average of the likelihoods of the two areas with a more obvious transition interval can be quantified as a segmentation indicator, thereby accurately segmenting the superpixel blocks that distinguish between the reflective and non-reflective areas. Furthermore, since the corresponding brightness values of actual textures and non-textures under light reflection also deviate, the reflection segmentation threshold in the reflective area can be directly used to correct the pixel grayscale in the area, ensuring that the current pixel point approaches its original grayscale when it is not affected by reflection.
[0048] Based on the size of the possibility, super-pixel blocks in the reflective area and super-pixel blocks in the non-reflective area are obtained, and according to the grayscale value of each pixel in each super-pixel block in the reflective area, the grayscale mean of all pixels in all super-pixel blocks in the non-reflective area, and the possibility, the corrected grayscale value of each pixel in each super-pixel block in the reflective area is determined, and the corrected grayscale value and the grayscale value of the pixel in the super-pixel block in the non-reflective area are recorded as the grayscale value to eliminate the influence of reflection.
[0049] Specifically, obtaining the super pixel block in the reflective area and the super pixel block in the non-reflective area includes:
[0050] Sort the possibilities from largest to smallest to obtain a sorted possibility sequence, obtain the difference between all two adjacent possibilities in the sequence, and use the average of the possibilities of the reflective areas of the two superpixel blocks corresponding to the maximum value of the difference as the reflective segmentation threshold;
[0051] In response to the possibility that the possibility of any super-pixel block belonging to the reflective area is greater than the reflective segmentation threshold, the super-pixel block is identified as a reflective area super-pixel block; otherwise, the pixel block is identified as a non-reflective area super-pixel block, and a reflective area super-pixel block and a non-reflective area super-pixel block are obtained.
[0052] Specifically, the corrected grayscale value satisfies:
[0053] ;
[0054] Where, For the The first superpixel block in the reflective area The corrected gray value of each pixel, For the The first superpixel block in the reflective area The gray value of a pixel, is the grayscale mean of all pixels in all superpixel blocks in the non-reflective area, For the The possibility that a superpixel block in a reflective area belongs to a reflective area, The symbol for rounding up.
[0055] in, Indicates the The first superpixel block in the reflective area The correction factor of the grayscale value of each pixel reflects the possibility of using the superpixel block in the current reflective area to correct the deviation of the grayscale of the current pixel relative to the grayscale mean of the non-reflective area, ensuring that the current pixel is closer to its own grayscale when it is not affected by reflection; if the possibility that the superpixel block belongs to the reflective area is greater, the intensity of correcting the deviation will be greater, and the corrected grayscale value of the current pixel is obtained by subtracting the correction factor from the original grayscale value.
[0056] S04: Determine the side length of the adaptive local window of pixels in the surface image.
[0057] It should be noted that after eliminating the influence of the reflective area, the image texture details are relatively clear. However, the uniformity of the thickness of the actual thin plate after forming is reflected in the uniformity of the texture, so the image texture needs to be segmented. Considering that there are also light and dark variations between the actual stripe area and the non-stripe area, the adaptive threshold segmentation Niblack algorithm can be used to segment the stripe area. However, the algorithm adjusts the grayscale mean to obtain the segmentation threshold of each pixel by the grayscale standard deviation within a fixed local window size for each pixel, thereby distinguishing whether it is a texture. In the actual thin plate rolling process, the surface texture distribution is relatively close. If the fixed window is too large and inappropriate, mis-segmentation may occur. For example, if the window is too large, it may include pixels in both the stripe area and the non-stripe area. The grayscale level in the window is lowered, resulting in the possibility of mis-segmentation of some pixels in the texture boundary area. If the window is too small, it is easy to lower the threshold of the pixels in the non-stripe area, resulting in the mis-segmentation of some pixels in the non-stripe area.
[0058] For any pixel in the surface image, the side length of the adaptive local window of the pixel is determined according to the size of the normalized result of the standard deviation of the grayscale value of all pixels in the local fixed window preset by the Niblack algorithm after eliminating the reflection effect.
[0059] Implementers can set the size of the preset local window according to the specific implementation situation. For example, a 7×7 window centered on the current pixel point. If the current pixel point is close to the image boundary and is not large enough to form a 7×7 window, the missing pixel point is obtained by mirror filling.
[0060] Specifically, the side length satisfies:
[0061] ;
[0062] Where, The surface image The side length of the adaptive local window of pixels, The surface image The normalized result of the standard deviation of the grayscale values of all pixels in the adaptive local window of pixels is eliminated by removing the reflection effect. is the preset grayscale standard deviation threshold, The side length of the local fixed window preset by the Niblack algorithm, The surface image Eliminating the reflection of each pixel affects the gray value. The maximum value of the grayscale value of the reflection-removed effect of all pixels in the surface image, Rounds to odd numbers.
[0063] Implementers can set the normalization method and grayscale standard deviation threshold according to specific implementation conditions. For example, normalization is maximum and minimum normalization; the grayscale standard deviation threshold is 0.5.
[0064] Among them, for , indicating that the lower the grayscale contrast of the current pixel after eliminating the influence of the reflective area in the adaptive local window (eliminating the grayscale value of the reflective effect), that is, the area where the current pixel is located may be in the stripe area or the non-stripe area; when the algorithm processes this case, the threshold will be lower than the mean of the area, resulting in the pixel points in the non-stripe area being mis-segmented. Therefore, the introduction of the current pixel point to eliminate the influence of the grayscale value of the reflective area belongs to the non-stripe area. If The smaller the value, the more likely the current pixel is to be in the non-stripe area. In this case, the window size needs to be increased to include pixels in the transition area or stripe area, thereby increasing the threshold effect and reducing the number of pixels in the non-stripe area that are mis-segmented. The closer the value is to 0, Approaching 1, Significantly greater than );if The larger the value, the more likely the current pixel is to be within the stripe area. In this case, the original window size can be maintained ( The closer the value is to 1, Approaching 0, Approaching itself). , indicating that the higher the grayscale contrast of the current pixel after eliminating the influence of the reflective area within the adaptive local window, the higher the grayscale contrast. This means that the current pixel may be located at the junction of a striped and non-striped area. By reducing the window size to focus on the local area near the current pixel, the interference of the grayscale of pixels in other areas on the grayscale feature judgment of the current pixel is reduced, making the obtained segmentation threshold more accurate during segmentation. Finally, since the actual required window side length must be an odd number to ensure that the analyzed pixel is used as the midpoint, the rounding-to-odd function is used to adjust the side length of the adaptive local window for each pixel.
[0065] S05: Based on the grayscale value of each pixel point in the adaptive local window, the reflection-affected pixel points are eliminated and the texture pixel points are obtained using the Niblack algorithm to realize the quality inspection for titanium alloy sheet forming.
[0066] Specifically, the method of eliminating the reflection-affected grayscale value of the pixel points in the adaptive local window based on each pixel point and obtaining the texture pixel points by using the Niblack algorithm to realize the quality inspection for titanium alloy sheet forming includes:
[0067] Based on the grayscale value of each pixel within the adaptive local window without the influence of reflection, a segmentation threshold of each pixel is obtained using the Niblack algorithm (this is a well-known technique of the Niblack algorithm and will not be described in detail here). In response to the grayscale value of any pixel without the influence of reflection being greater than the segmentation threshold of the pixel, the pixel is determined to be a texture pixel.
[0068] Sort all texture pixels by position (for example, there are 6 texture pixels, and the position information of each texture pixel in the surface image is , according to the X-axis from small to large, under the same X-axis value, the Y-axis is sorted from small to large, then the texture area sequence of the surface image is ), obtain the texture area sequence of the surface image and perform binarization processing, obtain the DTW distance between the texture area sequence of the surface image and the texture area sequence of the surface image of the standard titanium alloy thin plate obtained in advance (if the DTW distance of the two sequences is smaller, it means that the texture pixel distribution characteristics of the currently detected titanium alloy thin plate and the same standard titanium alloy thin plate are more consistent, that is, the thickness of the currently detected titanium alloy thin plate has no deviation or is very small, and it is considered that the quality of the currently detected titanium alloy thin plate is better), in response to the negative correlation mapping of the DTW distance (that is, the qualified rate of the titanium alloy thin plate, the specific negative correlation mapping adopts ,in, is the distance) is greater than a preset qualified threshold, the quality of the titanium alloy sheet currently being tested is determined to be qualified, and the quality inspection for titanium alloy sheet forming is completed.
[0069] Implementers can set the qualification threshold according to specific implementation circumstances, for example, 0.7.
[0070] An embodiment of the present invention also discloses a quality inspection system for titanium alloy thin plate forming, including a processor and a memory, wherein the memory stores computer program instructions. When the computer program instructions are executed by the processor, a quality inspection method for titanium alloy thin plate forming according to the present invention is implemented.
[0071] The above system also includes other components well known to those skilled in the art, such as a communication bus and a communication interface. The configuration and functions of these components are known in the art and will not be described in detail here.
[0072] The above are all preferred embodiments of the present invention, and are not intended to limit the scope of protection of the present invention. Therefore, any equivalent changes made based on the structure, shape, and principle of the present invention should be included in the scope of protection of the present invention.
Claims
1. A quality inspection method for titanium alloy sheet forming, characterized in that: include: The surface image of the titanium alloy sheet is segmented using superpixel segmentation to obtain multiple superpixel blocks; Determine the likelihood that each superpixel block belongs to a reflective area based on the grayscale mean value of all pixels in each superpixel block and the maximum value of the grayscale mean values, and the distance between each superpixel block and the center position of the superpixel block corresponding to the maximum value of the grayscale mean values; Based on the size of the possibility, a super-pixel block in the reflective area and a super-pixel block in the non-reflective area are obtained, and according to the grayscale value of each pixel in each super-pixel block in the reflective area, the grayscale mean of all pixels in all super-pixel blocks in the non-reflective area, and the possibility, a corrected grayscale value of each pixel in each super-pixel block in the reflective area is determined, and the corrected grayscale value and the grayscale value of the pixel in the super-pixel block in the non-reflective area are recorded as the grayscale value to eliminate the influence of reflection; For any pixel in the surface image, the side length of the adaptive local window of the pixel is determined according to the normalized standard deviation of the grayscale value of all pixels in the local fixed window preset by the Niblack algorithm after eliminating the reflection effect. Based on the grayscale value of each pixel point in the adaptive local window, the reflection effect of the pixel point is eliminated and the Niblack algorithm is used to obtain the texture pixel point to realize the quality inspection of titanium alloy sheet forming.
2. The quality inspection method for titanium alloy sheet forming according to claim 1, characterized in that: The superpixel segmentation adopts the SLIC algorithm.
3. The quality inspection method for titanium alloy sheet forming according to claim 1, characterized in that: The surface image is a surface image of a titanium alloy thin plate that has been subjected to grayscale processing.
4. The quality inspection method for titanium alloy sheet forming according to claim 1, characterized in that: The possibility satisfies: ; Where, For the The probability that a superpixel block belongs to the reflective area, is the maximum value of the grayscale mean of all pixels in each superpixel block, For the The grayscale mean of all pixels in a superpixel block, For the The distance between the super pixel block and the center position of the super pixel corresponding to the maximum value of the grayscale mean, is the maximum value of the distance between each superpixel block and the center position of the superpixel corresponding to the maximum value of the grayscale mean, is the natural exponential function.
5. A titanium alloy sheet forming quality inspection method according to claim 1 or 4, characterized in that: The distance is the Euclidean distance.
6. The quality inspection method for titanium alloy sheet forming according to claim 1, characterized in that: The obtaining of the super pixel block in the reflective area and the super pixel block in the non-reflective area includes: Sort the possibilities from largest to smallest to obtain a sorted possibility sequence, obtain the difference between all two adjacent possibilities in the sequence, and use the average of the possibilities of the reflective areas of the two superpixel blocks corresponding to the maximum value of the difference as the reflective segmentation threshold; In response to the possibility that the possibility of any super-pixel block belonging to the reflective area is greater than the reflective segmentation threshold, the super-pixel block is identified as a reflective area super-pixel block; otherwise, the pixel block is identified as a non-reflective area super-pixel block, and a reflective area super-pixel block and a non-reflective area super-pixel block are obtained.
7. The quality inspection method for titanium alloy sheet forming according to claim 1, characterized in that: The corrected grayscale value satisfies: ; Where, For the The first superpixel block in the reflective area The corrected gray value of each pixel, For the The first superpixel block in the reflective area The gray value of a pixel, is the grayscale mean of all pixels in all superpixel blocks in the non-reflective area, For the The possibility that a superpixel block in a reflective area belongs to a reflective area, The symbol for rounding up.
8. The quality inspection method for titanium alloy sheet forming according to claim 1, characterized in that: The side length satisfies: ; Where, The surface image The side length of the adaptive local window of pixels, The surface image The normalized result of the standard deviation of the grayscale values of all pixels in the adaptive local window of pixels is eliminated by removing the reflection effect. is the preset grayscale standard deviation threshold, The side length of the local fixed window preset by the Niblack algorithm, The surface image Eliminating the reflection of each pixel affects the gray value. The maximum value of the grayscale value of the reflection-removed effect of all pixels in the surface image, Rounds to odd numbers.
9. The quality inspection method for titanium alloy sheet forming according to claim 1, characterized in that: The method of eliminating the reflection-affected grayscale value of the pixel points in the adaptive local window based on each pixel point and obtaining the texture pixel points by using the Niblack algorithm to realize the quality inspection for titanium alloy sheet forming includes: According to the grayscale value of the pixel points in the adaptive local window of each pixel point, the segmentation threshold of each pixel point is obtained by using the Niblack algorithm. If the grayscale value of any pixel point is greater than the segmentation threshold of the pixel point, the pixel point is identified as a texture pixel point. All texture pixel points are sorted according to their positions to obtain a texture area sequence of the surface image, and the DTW distance between the texture area sequence of the surface image and the texture area sequence of the surface image of a pre-acquired standard titanium alloy sheet is obtained. In response to the negative correlation mapping of the DTW distance being greater than a preset qualified threshold, the quality of the currently inspected titanium alloy sheet is determined to be qualified, and the quality inspection for titanium alloy sheet forming is completed.
10. A quality inspection system for titanium alloy sheet forming, characterized in that: include: A processor and a memory, wherein the memory stores computer program instructions, and when the computer program instructions are executed by the processor, a quality inspection method for titanium alloy sheet forming according to any one of claims 1 to 9 is implemented.
Citation Information
Patent Citations
Sleeper rail production quality detection method based on machine vision
CN116071387A
Black smoke vehicle automatic detection method based on superpixel segmentation
CN116740658A