A texture direction detection method based on texture detection technology fusion

By integrating grayscale analysis, edge refinement, Hough transform, and spectral analysis, this texture detection method solves the problems of accuracy and robustness in complex texture detection, achieving high-precision texture direction detection, and is suitable for texture surface detection of various materials and complexities.

CN119444821BActive Publication Date: 2025-10-24UNIV OF ELECTRONICS SCI & TECH OF CHINA
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202410936705.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-07-12
Publication Date
2025-10-24
Estimated Expiration
2044-07-12

AI Technical Summary

Technical Problem

Existing texture orientation detection technologies lack accuracy and robustness when dealing with complex, non-uniform, or fine textures, making it difficult to meet the refined detection needs of modern industry and scientific research.

Method used

A method based on texture detection technology fusion is adopted, including grayscale analysis, edge thinning, Hough transform and spectral analysis. By combining multiple technologies, a grayscale image is generated, edge information is extracted, Hough transform and spectral analysis are performed, and finally the texture direction is obtained by fusion.

Benefits of technology

It significantly improves the accuracy and consistency of texture direction detection, is suitable for the detection of textured surfaces of various materials and complexities, meets the requirements of high-precision detection, and enhances product quality and scientific research level.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure QLYQS_2
    Figure QLYQS_2
  • Figure QLYQS_9
    Figure QLYQS_9
  • Figure QLYQS_11
    Figure QLYQS_11
Patent Text Reader

Abstract

The application discloses a texture direction detection method based on texture detection technology fusion, comprising the following steps: S1, performing image conversion and denoising processing on a color image to generate a gray image; S2, counting the pixel number of different gray levels in the gray image to obtain a gray distribution graph, and obtaining a first texture direction according to the gray distribution graph; S3, extracting edge information in the image to obtain a gradient amplitude graph, and generating a clear edge image according to the gradient amplitude graph; S4, extracting a second texture direction of the edge image according to Hough transformation; S5, performing spectral analysis on the image to obtain a spectral representation of the image, calculating the amplitude spectrum of the spectrum to obtain a third texture direction; and S6, fusing the first to third texture directions to obtain a final texture direction. Through the fusion of multiple detection technologies, the shortcomings of a single method in processing different texture types, noise levels and complexities are solved, and a more comprehensive and robust texture direction detection scheme is provided.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The application belongs to the field of image processing, and particularly relates to a texture direction detection method based on texture detection technology fusion. BACKGROUND

[0002] With the rapid development of precision manufacturing and micro-nano technology, the accurate detection of product surface micro-texture structure and its directionality has become one of the key quality control links. Traditional single detection methods are often limited in accuracy and robustness when dealing with complex, non-uniform or fine textures, leading to difficulty in meeting the needs of modern industrial production and scientific research for fine detection. Therefore, there is an urgent need to develop a detection method that is efficient, accurate and adaptable to a wide range of surface texture types. In particular, there is a practical need for accurate measurement of the directionality of the surface texture of precision parts in the fields of aerospace, semiconductor manufacturing, biomedical engineering, etc. The surfaces of products in these fields often contain textures with specific directionality, which affect the functionality, durability and overall performance of the parts. For example, the direction of metal fatigue cracks, the orientation of optical element surface microstructures, the fiber arrangement of biological tissues, etc., all require high-precision texture direction detection technology to support.

[0003] Gray scale analysis is one of the basic techniques in image processing, mainly used for processing black and white or grayscale images. It focuses on the gray value of each pixel in the image, rather than color information. The advantage of gray scale analysis is that it can simplify image data and highlight the brightness levels and contrast characteristics of the image. Converting a color image to a grayscale image reduces the dimensionality of data processing, making the algorithm more efficient. It is beneficial for extracting structural information and texture features of the image, and is particularly effective for scenes that are not sensitive to changes in lighting. It provides a basis for subsequent image processing operations such as threshold segmentation, edge detection, histogram analysis, etc.

[0004] Hough transform is a feature detection technique widely used in image processing and computer vision, especially good at identifying geometric shapes in images such as lines, circles or other parameterized curves. Its basic idea is to convert points in the image space to a parameter space, such as the slope-intercept space for lines, and find peaks in the parameter space by accumulating votes to detect shapes in the image. It is not affected by local minima and can tolerate noise and incomplete features in the image. It has certain invariance to the rotation and translation of shapes, and can detect shape features of target objects even at different angles or poses. It can not only be used for line detection, but also be extended to other parameterized curves or shapes, such as circle, ellipse and even more complex shape detection.

[0005] In the field of image processing, spectral analysis generally refers to frequency domain analysis, involving Fourier transform or other frequency domain transform techniques. It converts an image from the spatial domain to the frequency domain to observe and analyze the frequency composition of the image. It can reveal the periodic structure and texture features of the image, such as texture direction, periodic lines, etc. Low-pass, high-pass, band-pass filtering, etc. in the frequency domain can effectively remove noise or retain specific frequency components. Image compression using frequency domain characteristics can achieve a high compression ratio without losing important details. SUMMARY

[0006] In view of the above problems in the prior art, the texture direction detection method based on texture detection technology fusion provided by the present application solves the problem that the existing texture direction detection technology may be sensitive to complex textures, weak edges or noise, resulting in unstable or inaccurate detection results.

[0007] To achieve the above-mentioned purposes, the technical scheme adopted by the present application is as follows: a texture direction detection method based on texture detection technology fusion, comprising the following steps:

[0008] S1, image conversion and denoising processing are performed on the color image to generate a gray-scale image;

[0009] S2, the number of pixels of different gray levels in the gray-scale image is counted to obtain a gray-scale distribution map, and a first texture direction is obtained according to the gray-scale distribution map;

[0010] S3, edge information in the gray-scale image is extracted to obtain a gradient amplitude map, and a clear edge image is generated according to the gradient amplitude map;

[0011] S4, a second texture direction of the edge image is extracted according to the Hough transform;

[0012] S5, spectral analysis is performed on the color image to obtain a spectral representation of the image, and a third texture direction is calculated from the amplitude spectrum of the spectrum;

[0013] S6, the first texture direction, the second texture direction and the third texture direction are fused to obtain the final texture direction.

[0014] Further, the S1 comprises the following steps:

[0015] S11, image conversion is performed on the color image to generate a converted image;

[0016] S12, the converted image is denoised by Gaussian filtering to generate a gray-scale image.

[0017] Further, in the S11, the expression of the gray-scale value Gray of the converted image is specifically:

[0018] Gray = 0.299 * R + 0.587 * G + 0.114 * B

[0019] In the formula, R, G and B are respectively red, green and blue component values of the original color pixel;

[0020] In the S12, the expression of the Gaussian kernel function H of the Gaussian filter is specifically as follows:

[0021]

[0022] In the formula, x1 is the horizontal coordinate in the filter window, y1 is the vertical coordinate in the filter window, and δ is the standard deviation of the Gaussian function.

[0023] Further, the S2 comprises the following steps:

[0024] S21, a plurality of gray scale distribution calculation search lines are set, the number of pixels of different gray scales in the gray scale image is counted according to each gray scale distribution calculation search line, and a gray scale distribution graph corresponding to each gray scale distribution calculation search line is obtained;

[0025] S22, all the gray scale distribution graphs are smoothed to obtain the first rising edge and the last falling edge of each gray scale distribution graph, which are taken as two edges of the basic texture region boundary;

[0026] S23, each edge of the basic texture region boundary is regarded as a straightness, the straightness direction is calculated to obtain the boundary direction of the basic texture region, and the boundary direction is taken as the first texture direction.

[0027] Further, in the S21, the method for counting the number of pixels of different gray scales in the gray scale image according to any gray scale distribution calculation search line is as follows:

[0028] The gray scale distribution in the gray scale image is calculated along any gray scale distribution calculation search line, wherein the horizontal coordinate and the vertical coordinate of the gray scale distribution calculation search line are respectively the coordinate and the gray scale of the gray scale image corresponding to each pixel point on the gray scale distribution calculation search line.

[0029] Further, the S3 comprises the following steps:

[0030] S31, the gradient amplitude and the gradient direction of the gray scale image are calculated by using the Sobel operator to generate a gradient amplitude graph;

[0031] S32, the pixel point with the local maximum value along the gradient direction on the gradient amplitude graph is searched, and the pixel point is taken as an edge candidate point;

[0032] S33, a high threshold value and a low threshold value are set, the edge candidate point with the gradient amplitude greater than the high threshold value is taken as a strong edge pixel point, and the edge candidate point with the gradient amplitude between the high threshold value and the low threshold value is taken as a weak edge pixel candidate point.

[0033] S34, the weak edge pixel candidate points connected in the pixel chain which has been marked as edge are taken as weak edge pixel points, and the edge image is generated according to the continuous strong edge pixel points and the weak edge pixel points.

[0034] Further, in the S31, the expressions of the gradient magnitude GradientMagnitude (G) and the gradient direction GradientDirection (θ2) are specifically as follows:

[0035]

[0036] In the formula, l x and l y are gradient vectors, and the expressions thereof are specifically as follows:

[0037] I x =G x *image

[0038] I y =G y *image

[0039] In the formula, * is a convolution operation, G x is a Sobel operator template in the horizontal coordinate axis direction, and G x is a Sobel operator template in the vertical coordinate axis direction, and image is a gray-scale image.

[0040] Further, the S4 includes the following sub-steps:

[0041] S41, a Hough transform is performed on each pixel point in the edge image, and the pixel point coordinates (ρ, θ) represented in the Hough space are calculated, and the expression thereof is specifically as follows:

[0042] ρ=x2*sinθ+y2*cosθ

[0043] In the formula, x2 is the horizontal coordinate of the pixel point in the edge image, y2 is the vertical coordinate of the pixel point in the edge image, and ρ and θ are the polar coordinate parameters of the line parameters in the edge image.

[0044] S42, the probability of the line segment represented by the pixel point coordinates (ρ i , θ j ) in the Hough space is calculated, the line segment represented by the pixel point coordinates (ρ mi , θ mj ) with the highest probability is taken as the reference line of the texture direction detection, and θ mj is taken as the second texture direction.

[0045] Further, the S5 includes the following sub-steps:

[0046] S51, performing spectral analysis on the color image to obtain a spectral representation F(u,v) of the image;

[0047]

[0048] where f(x3,y3) is the gray value of the image at pixel point coordinate (x3,y3), (u,v) is the coordinate in the frequency domain corresponding to the pixel point coordinate (x3,y3), M is the width of the image, and N is the height of the image;

[0049] S52, calculating an amplitude spectrum of the spectrum according to the spectral representation of the image, analyzing the direction of the texture in the image according to the amplitude spectrum of the spectrum, and obtaining a third texture direction;

[0050] wherein the expression for calculating the amplitude spectrum |f(u,v)| of the spectrum is specifically:

[0051]

[0052] where Re(F(u,v)) is the real part of F(u,v), and Im(F(u,v)) is the imaginary part of F(u,v).

[0053] Further, in the S6, the expression for obtaining the final texture direction is specifically:

[0054] P = w1*P1 + w2*P2 + w3*P3

[0055] where P1 is the first texture direction, P2 is the second texture direction, P3 is the third texture direction, w1, w2 and w3 are corresponding weight factors, and w1+w2+w3=1.

[0056] The beneficial effects of the present application are:

[0057] (1) The present application provides a texture direction detection method based on texture detection technology fusion, which fuses multiple detection technologies to solve the shortcomings of single method in processing different texture types, noise levels and complexities, and provides a more comprehensive and robust texture direction detection scheme.

[0058] (2) The present application can more finely capture and analyze the directional features of the texture by comprehensively using multiple technologies such as gray scale analysis, edge thinning, Hough transform and spectral analysis, thereby significantly improving the detection accuracy and consistency of texture direction estimation.

[0059] (3) The method of the present application is suitable for texture surface detection of various materials and complexities, whether it is quality control of the surface of precision parts in industrial production or analysis of microstructure in the field of scientific research, it can provide high-quality texture direction information to meet the diversified and high-precision detection needs.

[0060] (4) The purpose of the present invention is to construct an integrated, automated, and adaptable texture direction detection system to solve the problem of accurately identifying and quantifying texture directions in complex environments, and to improve the product quality and scientific research level of related industries. BRIEF DESCRIPTION OF THE DRAWINGS

[0061] Figure 1 This is a flow chart of a texture direction detection method based on texture detection technology fusion of the present invention.

[0062] Figure 2 Schematic diagram of search line layout for grayscale distribution calculation.

[0063] Figure 3 Grayscale distribution diagram. DETAILED DESCRIPTION

[0064] The specific embodiments of the present invention are described below to facilitate understanding of the present invention by those skilled in the art. However, it should be clear that the present invention is not limited to the scope of the specific embodiments. For those skilled in the art, as long as various changes are within the spirit and scope of the present invention as defined and determined by the appended claims, these changes are obvious, and all inventions and creations utilizing the concepts of the present invention are protected.

[0065] like Figure 1 As shown, in one embodiment of the present invention, a texture direction detection method based on texture detection technology fusion includes the following steps:

[0066] S1, performing image conversion and denoising on the color image to generate a grayscale image;

[0067] S2. Counting the number of pixels of different gray levels in the gray image to obtain a gray distribution map, and obtaining a first texture direction according to the gray distribution map;

[0068] S3, extracting edge information from the grayscale image to obtain a gradient amplitude map, and generating a clear edge image based on the gradient amplitude map;

[0069] S4, extracting a second texture direction of the edge image according to Hough transform;

[0070] S5. performing spectral analysis on the color image to obtain a spectrum representation of the image, and calculating an amplitude spectrum of the spectrum to obtain a third texture direction;

[0071] S6. Fusing the first texture direction, the second texture direction, and the third texture direction to obtain a final texture direction.

[0072] The S1 comprises the following sub-steps:

[0073] S11, image conversion is performed on the color image to generate a converted image;

[0074] S12, the converted image is denoised by Gaussian filtering to generate a grayscale image.

[0075] In this embodiment, the color image is converted into a grayscale image to simplify the subsequent processing steps and reduce the amount of calculation, and the noise in the image is removed by filtering and slicing technology to improve the image quality. Since the process of converting the color image into a grayscale image and denoising is not directly dependent on mathematical formula, but is based on the basic principle of image processing, S1 is divided into two steps for operation.

[0076] In S11, the expression of the grayscale value Gray of the converted image is specifically:

[0077] Gray=0.299*R+0.587*G+0.114*B

[0078] In the formula, R, G and B are respectively the red, green and blue component values of the original color pixel, and the weight coefficients of the formula are set according to the sensitivity of the human eye to different color lights.

[0079] In S12, the expression of the Gaussian kernel function H of the Gaussian filtering is specifically:

[0080]

[0081] In the formula, x1 is the horizontal coordinate in the filter window, y1 is the vertical coordinate in the filter window, and δ is the standard deviation of the Gaussian function, which determines the width and shape of the filter.

[0082] In this embodiment, the filtering process can be expressed by matrix operation, that is, for each pixel point in the image, the pixels in its neighborhood are weighted and summed according to the weight of the Gaussian kernel function to generate a grayscale value and obtain a grayscale image.

[0083] S2 includes the following steps:

[0084] S21, a plurality of gray scale distribution calculation search lines are set, the number of pixels of different gray scale levels in the grayscale image is counted according to each gray scale distribution calculation search line, and the gray scale distribution diagram corresponding to each gray scale distribution calculation search line is obtained;

[0085] S22, all the gray scale distribution diagrams are smoothed to obtain the first rising edge and the last falling edge of each gray scale distribution diagram, which are taken as two edges of the basic texture region boundary;

[0086] S23, each edge of the basic texture region boundary is regarded as a straightness, the straightness direction is calculated to obtain the boundary direction of the basic texture region, and the boundary direction is taken as the first texture direction.

[0087] In the S21, the method for calculating the number of pixels of different gray levels in the statistical gray image along any gray distribution calculation search line is as follows:

[0088] The gray distribution in the gray image is calculated along the gray distribution calculation search line, wherein the abscissa and ordinate of the gray distribution calculation search line are the coordinates and gray of the gray image corresponding to each pixel point on the gray distribution calculation search line.

[0089] In the embodiment, the gray distribution calculation search line is as shown in FIG. 2, and each gray distribution calculation search line corresponds to a gray distribution graph. Figure 2 The abscissa and ordinate of the gray distribution graph represent the coordinates and gray of the gray image corresponding to each pixel point on the gray distribution calculation search line.

[0090] In the S22, after the obtained gray distribution graph is smoothed, the first rising edge and the last falling edge of each gray distribution graph are searched, as shown in FIG. 3. Figure 3 The 1 represents the first rising edge, and the 2 represents the last falling edge. The first rising edge and the last falling edge correspond to two edges of the basic texture region boundary respectively.

[0091] In the S23, the expression of the coordinates (x4, y4) of the straightness is as follows:

[0092] y4=a+bx4

[0093] In the formula, a and b are parameters of the straightness.

[0094] In the embodiment, the direction of the basic texture region boundary in the image is consistent with the direction of the stripe line, so the texture direction of the superimposed solar cell can be obtained from the direction of the basic texture region boundary, and the texture direction is taken as the first texture direction. According to the calculation of the straightness direction formula, the expression of the straightness direction θ1 is as follows:

[0095] θ1=arctan(b)

[0096] When the straight line is perpendicular to the abscissa axis, the slope of the straight line does not exist, and the straightness direction θ1 is 90°.

[0097] The S3 includes the following steps:

[0098] S31, the gradient amplitude and gradient direction of the gray image are calculated by the Sobel operator, and a gradient amplitude graph is generated;

[0099] S32, the pixel point with the local maximum value along the gradient direction in the gradient amplitude graph is searched, and the pixel point is taken as an edge candidate point;

[0100] S33, set a high threshold value and a low threshold value, edge candidate points with gradient amplitudes greater than the high threshold value are regarded as strong edge pixel points, and edge candidate points with gradient amplitudes between the high threshold value and the low threshold value are regarded as weak edge pixel candidate points;

[0101] In this embodiment, the high threshold value is greater than the low threshold value, and edge candidate points with gradient amplitudes lower than the low threshold value are regarded as non-edge pixels and are not used to generate an edge image.

[0102] S34, weak edge pixel candidate points connected to the pixel chain that has been marked as an edge are regarded as weak edge pixel points, and an edge image is generated according to the continuous strong edge pixel points and weak edge pixel points.

[0103] In this embodiment, the high threshold value is greater than the low threshold value, and edge candidate points with gradient amplitudes lower than the low threshold value are regarded as non-edge pixels and are not used to generate an edge image. By connecting the continuous strong edge pixel points and weak edge pixels together to form a final edge image, the edges can be connected and isolated noise points can be removed.

[0104] In the S31, the expressions of the gradient amplitude GradientMagnitude (G) and the gradient direction GradientDirection (θ2) are specifically as follows:

[0105]

[0106] In the formula, l x and l y are gradient vectors, and the expressions thereof are specifically as follows:

[0107] I x =G x * image

[0108] I y =G y * image

[0109] In the formula, * is a convolution operation, G x is a Sobel operator template in the horizontal coordinate axis direction, and G x is a Sobel operator template in the vertical coordinate axis direction, and image is a gray-scale image, which is converted into a numerical matrix suitable for processing.

[0110] In this embodiment, the Sobel operator is used to extract edge information in the image, the detected edges are subjected to thinning processing, redundant and noise edges are removed, and a clearer edge image is obtained.

[0111] The S4 includes the following sub-steps:

[0112] S41, performing Hough transform on each pixel point in the edge image, and calculating pixel point coordinates (p, q) represented in a Hough space, and the expression is specifically as follows:

[0113] p=x2*sin q+y2*cos q

[0114] In the formula, x2 is the horizontal coordinate of the pixel point in the edge image, y2 is the vertical coordinate of the pixel point in the edge image, p and q are polar coordinate parameters of the line parameters in the edge image.

[0115] S42, calculating the probability of the line segment represented by the pixel point coordinates (p, q) in the Hough space, taking the line segment represented by the pixel point coordinates (p, q) with the highest probability as the reference line of the texture direction detection, and taking q as the second texture direction. i j mi mj mj

[0116] The S5 includes the following sub-steps:

[0117] S51, performing spectral analysis on the color image to obtain a spectral representation F(u, v) of the image;

[0118]

[0119] In the formula, f(x3, y3) is the gray value of the image at the pixel point coordinates (x3, y3), (u, v) is the coordinates in the frequency domain corresponding to the pixel point coordinates (x3, y3), M is the width of the image, and N is the height of the image.

[0120] In the embodiment, the spectral analysis is a method of converting the image from the spatial domain to the frequency domain, and the image is represented as a superposition of a series of sine and cosine functions.

[0121] S52, calculating an amplitude spectrum of the spectrum according to the spectral representation of the image, analyzing the direction of the texture in the image according to the amplitude spectrum of the spectrum, and obtaining a third texture direction;

[0122] In the formula, Re(F(u, v)) is the real part of F(u, v), and Im(F(u, v)) is the imaginary part of F(u, v).

[0123]

[0124] In the formula, Re(F(u, v)) is the real part of F(u, v), and Im(F(u, v)) is the imaginary part of F(u, v).

[0125] ​​​​​In the embodiment, the amplitude spectrum of the spectrum shows the amplitude information of different frequency components in the image, and the low frequency components are usually located in the central region, and the high frequency components are distributed in the edge, so that the directionality feature of the texture in the image can be obtained by analyzing the amplitude spectrum of the spectrum, and the third texture direction is obtained.

[0126] In the S6, the expression of the final texture direction is specifically:

[0127] P = w1 * P1 + w2 * P2 + w3 * P3

[0128] In the formula, P1 is the first texture direction, P2 is the second texture direction, P3 is the third texture direction, w1, w2 and w3 are corresponding weight factors, and w1 + w2 + w3 = 1.

[0129] In the embodiment, the results obtained by the gray distribution analysis, the Hough transform and the spectrum analysis are fused, and various factors are comprehensively considered to determine the final texture direction. The first to third texture directions detected are output in the form of an image, a numerical value or other forms for subsequent application or analysis. The fusion strategy adopts weighted average, and each method is given a corresponding weight according to the advantages and disadvantages of each method in the extraction of specific texture features.

[0130] The present application has the advantages that the present application provides a texture direction detection method based on texture detection technology fusion, which fuses multiple detection technologies to solve the shortcomings of a single method in processing different texture types, noise levels and complexities, and provides a more comprehensive and robust texture direction detection scheme.

[0131] The present application can more finely capture and analyze the directionality feature of the texture by comprehensively using multiple technologies such as gray scale analysis, edge thinning, Hough transform and spectrum analysis, thereby significantly improving the detection accuracy and consistency of texture direction estimation.

[0132] The method of the present application is suitable for texture surface detection of various materials and complexities, and can provide high-quality texture direction information to meet the diversified and high-precision detection requirements, whether it is quality control of the surface of precision parts in industrial production or analysis of microstructures in the scientific research field.

[0133] The purpose of the present application is to construct an integrated, automated and adaptable texture direction detection system to solve the problem of accurately identifying and quantifying the texture direction in a complex environment, and to improve the product quality and scientific research level of related industries.

[0134] In the description of the application, it needs to be understood that the terms "center", "thickness", "upper", "lower", "horizontal", "top", "bottom", "inner", "outer", "radial" and the like indicate the orientation or positional relationship based on the orientation or positional relationship shown in the drawings, and are only for the convenience of describing the application and simplifying the description, and do not indicate or imply that the device or element referred to must have a particular orientation, be constructed and operated in a particular orientation, and therefore cannot be understood as a limitation on the application. In addition, the terms "first", "second", "third" are only for the purpose of description, and cannot be understood as indicating or implying relative importance or implying the number of technical features indicated. Therefore, the features defined by "first", "second", "third" can explicitly or implicitly include one or more of the features.

Claims

1. A texture direction detection method based on texture detection technology fusion, characterized in that, The method comprises the following steps: S1, image conversion and denoising processing are performed on the color image to generate a gray image; S2, the number of pixels of different gray levels in the gray image is counted to obtain a gray distribution graph, and a first texture direction is obtained according to the gray distribution graph; S3, edge information in the gray image is extracted to obtain a gradient amplitude graph, and a clear edge image is generated according to the gradient amplitude graph; S4, a second texture direction of the edge image is extracted according to a Hough transform; S5, spectral analysis is performed on the color image to obtain a spectral representation of the image, the amplitude spectrum of the spectrum is calculated to obtain a third texture direction; S6, the first texture direction, the second texture direction and the third texture direction are fused to obtain a final texture direction; The S2 comprises the following steps: S21, a plurality of gray distribution calculation search lines are set, the number of pixels of different gray levels in the gray image is counted according to each gray distribution calculation search line to obtain a gray distribution graph corresponding to each gray distribution calculation search line; S22, all the gray distribution graphs are smoothed to obtain a first rising edge and a last falling edge of each gray distribution graph, which are taken as two edges of a basic texture region boundary; S23, each edge of the basic texture region boundary is regarded as a straightness, the straightness direction is calculated to obtain a boundary direction of the basic texture region, and the boundary direction is taken as the first texture direction; The S4 comprises the following steps: S41, performing Hough transform on each pixel point in the edge image, and calculating pixel point coordinates represented in a Hough space The expression is specifically: In the formula, x2 is the horizontal coordinate of a pixel point in the edge image, y2 is the vertical coordinate of the pixel point in the edge image, and are polar coordinate parameters of the straight line parameters in the edge image. S42, calculate the pixel point coordinate represented in the Hough space the pixel point coordinate represented by the highest probability the straight line segment as a reference line for texture direction detection, and as the second texture direction The S5 comprises the following steps: S51, performing spectral analysis on the color image to obtain a spectral representation of the image ; In the formula, f(x3, y3) is a gray value of the image at a pixel point coordinate (x3, y3), (u, v) is a coordinate in a frequency domain corresponding to the pixel point coordinate (x3, y3), M is a width of the image, and N is a height of the image; S52, the amplitude spectrum of the spectrum is calculated according to the spectral representation of the image, the direction of the texture in the image is analyzed according to the amplitude spectrum of the spectrum, and a third texture direction is obtained; wherein the expression of the amplitude spectrum of the frequency spectrum is specifically: In the formula, Re(F(u, v)) is a real part of F(u, v), and Im(F(u, v)) is an imaginary part of F(u, v). 2.The texture direction detection method based on texture detection technology fusion according to claim 1, characterized in that, The S1 comprises the following steps: S11, image conversion is performed on the color image to generate a converted image; S12, denoising is performed on the converted image through a Gaussian filter to generate a gray image. 3.The texture direction detection method based on texture detection technology fusion according to claim 2, characterized in that, In the S11, an expression of a gray value Gray of the converted image is specifically as follows: Gray = 0.299 * R + 0.587 * G + 0.114 * B In the formula, R, G and B are respectively red, green and blue component values of an original color pixel; In the S12, an expression of a Gaussian kernel function H of the Gaussian filter is specifically as follows: where x1 is the horizontal coordinate within the filter window, y1 is the vertical coordinate within the filter window, is the standard deviation of the Gaussian function. 4.The texture direction detection method based on texture detection technology fusion according to claim 1, characterized in that, In the S21, a method for counting the number of pixels of different gray levels in the gray image according to any gray distribution calculation search line is as follows: The gray distribution in the gray image is calculated along any gray distribution calculation search line, wherein the horizontal coordinate and the vertical coordinate of the gray distribution calculation search line are respectively a coordinate of the gray image corresponding to each pixel point on the gray distribution calculation search line and a gray value.

5. The texture direction detection method based on fusion of texture detection techniques according to claim 1, characterized in that, The S3 comprises the following steps: S31, the gradient amplitude and the gradient direction of the gray image are calculated through a Sobel operator to generate a gradient amplitude graph; S32, search the pixel points which are local maximum along the gradient direction on the gradient amplitude diagram, and take the pixel points as edge candidate points; S33, set a high threshold and a low threshold, take the edge candidate points with gradient amplitude greater than the high threshold as strong edge pixel points, and take the edge candidate points with gradient amplitude between the high threshold and the low threshold as weak edge pixel candidate points; S34, take the weak edge pixel candidate points connected to the pixel chain which has been marked as edge as weak edge pixel points, and generate an edge image according to the continuous strong edge pixel points and the weak edge pixel points. 6.The texture direction detection method based on texture detection technology fusion according to claim 5, characterized in that, In the S31, the gradient amplitude and the gradient direction are calculated by the following expressions. where l x and l y is the gradient vector, which is expressed as: wherein * is a convolution operation, G x is a template of Sobel operator in the horizontal coordinate axis direction, G y is a template of Sobel operator in the vertical coordinate axis direction, and image is a grayscale image. 7.The texture direction detection method based on texture detection technology fusion according to claim 1, characterized in that, In the S6, the expression of the final texture direction is specifically: In the formula, P1 is the first texture direction, P2 is the second texture direction, P3 is the third texture direction, w1, w2 and w3 are corresponding weight factors, and w1+w2+w3=1 is satisfied.

Citation Information

Patent Citations

  • Tongue crack feature extraction method based on wavelet transformation

    CN109919929A

  • Weldment contour detection method

    CN113034452A