Texture direction detection method based on texture detection technology fusion

By integrating a variety of detection technologies for color images, including image conversion, grayscale distribution analysis, edge extraction, Hough transformation and spectral analysis, the shortcomings of existing texture direction detection technology in complex texture processing are solved, and the more High precision and robust texture orientation detection.

CN119444821AActive Publication Date: 2025-02-14UNIV OF ELECTRONICS SCI & TECH OF CHINA
View PDF 11 Cites 0 Cited by

Patent Information

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

AI Technical Summary

Technical Problem

When existing texture direction detection technology deals with complex, non-uniform or fine textures, its accuracy and robustness are insufficient, making it difficult to meet the refined inspection needs of modern industry and scientific research fields.

Method used

Using a fusion method based on texture detection technology, we use image conversion and denoising to color images, statistics grayscale distribution, extract edge information, perform Hough transformation and spectral analysis, and fuse a variety of detection technologies to obtain the final texture direction.

Benefits of technology

It significantly improves the accuracy and consistency of texture direction detection, and is suitable for texture surface detection of a variety of materials and complexities, meeting the high-precision needs of industrial production and scientific research fields.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure BDA0004941541970000031
    Figure BDA0004941541970000031
  • Figure BDA0004941541970000041
    Figure BDA0004941541970000041
  • Figure BDA0004941541970000051
    Figure BDA0004941541970000051
Patent Text Reader

Abstract

The invention discloses a texture direction detection method based on texture detection technology fusion, and the method comprises the steps: S1, carrying out the image conversion and denoising processing of a color image, and generating a gray image; s2, counting the number of pixels of different gray levels in the gray image to obtain a gray distribution diagram, and obtaining a first texture direction according to the gray distribution diagram; s3, extracting edge information in the image to obtain a gradient magnitude image, and generating a clear edge image according to the gradient magnitude image; s4, extracting a second texture direction of the edge image according to Hough transform; s5, performing spectral analysis on the image to obtain spectral representation of the image, and calculating an amplitude spectrum of a frequency spectrum to obtain a third texture direction; and S6, fusing the first texture direction, the second texture direction and the third texture direction to obtain a final texture direction. By fusing multiple detection technologies, the defects of a single method in processing different texture types, noise levels and complexity are overcome, 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 invention belongs to the field of image processing, and in particular relates to a texture direction detection method based on the fusion of texture detection technology. Background Art

[0002] With the rapid development of precision manufacturing and micro-nano technology, 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 by accuracy and robustness when dealing with complex, non-uniform or fine textures, which makes it difficult to meet the needs of modern industrial production and scientific research for refined detection. Therefore, there is an urgent need to develop an efficient, accurate and adaptable detection method for a wide range of surface texture types. In particular, there is a practical need for accurate measurement of surface texture directionality of precision components in the fields of aerospace, semiconductor manufacturing, biomedical engineering, etc. The surfaces of products in these fields often contain textures with specific directions, which affect the functionality, durability and overall performance of the components. For example, the direction of metal fatigue cracks, the orientation of the microstructure on the surface of optical components, the fiber arrangement of biological tissues, etc., all require high-precision texture direction detection technology to support.

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

[0004] Hough transform is a feature detection technology widely used in image processing and computer vision. It is particularly good at identifying geometric shapes in images, such as straight lines, circles, or other parameterized curves. Its basic idea is to transform points in image space into parameter space. For example, the Hough space of a straight line is a slope-intercept space. The shape in the image is detected by finding the peak in the parameter space through a cumulative voting mechanism. It is not affected by local minima and can tolerate noise and incomplete features in the image. It has a certain invariance to the rotation and translation of the shape, and can detect the shape features of the target object even at different viewing angles or postures. It can not only be used for straight line detection, but also can be extended to other parameterized curves or shapes, such as circles, ellipses, and even more complex shape detection.

[0005] In the field of image processing, spectral analysis usually refers to frequency domain analysis, which involves Fourier transform or other frequency domain transformation techniques. It converts the image from the spatial domain to the frequency domain in order to observe and analyze the frequency composition of the image. It can reveal the periodic structure and texture characteristics of the image, such as texture direction, periodic lines, etc. Low-pass, high-pass, and band-pass filtering operations in the frequency domain can effectively remove noise or retain specific frequency components. Using frequency domain characteristics for image compression can achieve a high compression ratio without distorting important details. Summary of the invention

[0006] In view of the above-mentioned deficiencies in the prior art, the present invention provides a texture direction detection method based on texture detection technology fusion, which 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] In order to achieve the above-mentioned object of the invention, the technical solution adopted by the present invention is: a texture direction detection method based on texture detection technology fusion, comprising the following steps:

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

[0009] 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;

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

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

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

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

[0014] Further: S1 comprises the following sub-steps:

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

[0016] S12, denoising the converted image by Gaussian filtering to generate a grayscale image.

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

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

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

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

[0021]

[0022] Where x1 is the abscissa in the filter window, y1 is the ordinate in the filter window, and δ is the standard deviation of the Gaussian function.

[0023] Further: S2 comprises the following sub-steps:

[0024] S21, setting a number of grayscale distribution calculation search lines, counting the number of pixels of different grayscale levels in the grayscale image according to each grayscale distribution calculation search line, and obtaining a grayscale distribution map corresponding to each grayscale distribution calculation search line;

[0025] S22, performing smoothing processing on all grayscale distribution images, obtaining the first rising edge and the last falling edge of each grayscale distribution image, and using them as the two edges of the basic texture area boundary;

[0026] S23, treating each edge of the basic texture region boundary as a straightness, calculating the straightness direction to obtain the boundary direction of the basic texture region, and using it as the first texture direction.

[0027] Further: In said S21, the method of calculating the number of pixels of different gray levels in the gray image according to any gray distribution of the search line is:

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

[0029] Further: S3 includes the following sub-steps:

[0030] S31, calculating the gradient magnitude and gradient direction of the grayscale image by using the Sobel operator to generate a gradient magnitude map;

[0031] S32, searching for pixel points with local maximum values ​​along the gradient direction on the gradient magnitude map, and taking them as candidate edge points;

[0032] S33, setting a high threshold and a low threshold, taking edge candidate points whose gradient amplitude is greater than the high threshold as strong edge pixel points, and taking edge candidate points whose gradient amplitude is between the high threshold and the low threshold as weak edge pixel candidate points;

[0033] S34, taking the weak edge pixel candidate points connected to the pixel chain marked as the edge as weak edge pixel points, and generating an edge image according to the continuous strong edge pixel points and weak edge pixel points.

[0034] Further: In S31, the expressions for calculating the gradient magnitude GradientMagnitude(G) and the gradient direction GradientDirection(θ2) are specifically:

[0035]

[0036] In the formula, l x and l y is the gradient vector, and its specific expression is:

[0037] I x =G x *image

[0038] I y =G y *image

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

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

[0041] S41, perform Hough transform on each pixel in the edge image, and calculate the pixel coordinates (ρ, θ) represented in the Hough space, the specific expression of which is:

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

[0043] Where x2 is the horizontal coordinate of the pixel in the edge image, y2 is the vertical coordinate of the pixel in the edge image, ρ and θ are the polar coordinate parameters of the line parameters in the edge image;

[0044] S42, calculate the pixel coordinates (ρ i ,θ j ) The probability of a straight line segment occurring, with the pixel coordinates (ρ) represented by the highest probability mi ,θ mj ) straight line segment as the reference line for texture direction detection, and θ mj as the second texture direction.

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

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

[0047]

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

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

[0050] Among them, the expression for calculating the amplitude spectrum |f(u,v)| of the frequency 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 S6, the expression for obtaining the final texture direction is specifically:

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

[0055] Wherein, 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, satisfying w1+w2+w3=1.

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

[0057] (1) The present invention provides a texture direction detection method based on the fusion of texture detection technologies. By integrating multiple detection technologies, the present invention aims to address the shortcomings of a single method in dealing with different texture types, noise levels and complexities, and to provide a more comprehensive and robust texture direction detection solution.

[0058] (2) The present invention can more finely capture and analyze the directional characteristics of textures by comprehensively applying multiple techniques such as grayscale analysis, edge refinement, Hough transform and spectral analysis to images, thereby significantly improving the detection accuracy and consistency of texture direction estimation.

[0059] (3) The method of the present invention is applicable to the detection of texture surfaces of various materials and complexities. Whether it is the quality control of the surface of precision parts in industrial production or the analysis of microstructures in the field of scientific research, it can provide high-quality texture direction information to meet the diverse 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 the search line layout for grayscale distribution calculation.

[0063] Figure 3 It is a grayscale distribution diagram. DETAILED DESCRIPTION

[0064] The specific implementation modes of the present invention are described below so that those skilled in the art can understand the present invention. However, it should be clear that the present invention is not limited to the scope of the specific implementation modes. For those of ordinary skill in the art, as long as various changes are within the spirit and scope of the present invention as defined and determined by the attached claims, these changes are obvious, and all inventions and creations utilizing the concept 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 according to 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 frequency spectrum representation of the image, and calculating an amplitude spectrum of the frequency spectrum to obtain a third texture direction;

[0071] S6. Merge 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, performing image conversion on the color image to generate a converted image;

[0074] S12, denoising the converted image 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 performing denoising does not directly rely on mathematical formulas, but is based on the basic principles of image processing, S1 is divided into two steps for operation.

[0076] In S11, the gray value Gray of the converted image is specifically expressed as:

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

[0078] Where R, G and B are the red, green and blue component values ​​of the original color pixel respectively, and the weight coefficient of the formula is set according to the sensitivity of the human eye to different colors of light.

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

[0080]

[0081] Where x1 is the horizontal coordinate within the filter window, y1 is the vertical coordinate within 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 operations, that is, for each pixel in the image, a weighted sum is performed with the pixels in its neighborhood according to the weight of the Gaussian kernel function to generate a grayscale value and obtain a grayscale image.

[0083] The S2 comprises the following sub-steps:

[0084] S21, setting a number of grayscale distribution calculation search lines, counting the number of pixels of different grayscale levels in the grayscale image according to each grayscale distribution calculation search line, and obtaining a grayscale distribution map corresponding to each grayscale distribution calculation search line;

[0085] S22, performing smoothing processing on all grayscale distribution images, obtaining the first rising edge and the last falling edge of each grayscale distribution image, and using them as the two edges of the basic texture area boundary;

[0086] S23, treating each edge of the basic texture region boundary as a straightness, calculating the straightness direction to obtain the boundary direction of the basic texture region, and using it as the first texture direction.

[0087] In S21, the method for calculating the number of pixels of different gray levels in the gray image according to any gray distribution is:

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

[0089] In this embodiment, the grayscale distribution calculation search line is set as follows Figure 2 As shown, each grayscale distribution calculation search line generates a grayscale distribution graph, and the horizontal axis and the vertical axis in the grayscale distribution graph represent the coordinates and grayscale of the grayscale image corresponding to each pixel point on the grayscale distribution calculation search line, respectively.

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

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

[0092] y4=a+bx4

[0093] Where a and b are the parameters of straightness.

[0094] In this 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 used as the first texture direction. According to the straightness direction formula, the expression for calculating the straightness direction θ1 is specifically:

[0095] θ1=arctan(b)

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

[0097] The S3 comprises the following sub-steps:

[0098] S31, calculating the gradient magnitude and gradient direction of the grayscale image by using the Sobel operator to generate a gradient magnitude map;

[0099] S32, searching for pixel points with local maximum values ​​along the gradient direction on the gradient magnitude map, and taking them as candidate edge points;

[0100] S33, setting a high threshold and a low threshold, taking edge candidate points whose gradient amplitude is greater than the high threshold as strong edge pixel points, and taking edge candidate points whose gradient amplitude is between the high threshold and the low threshold as weak edge pixel candidate points;

[0101] In this embodiment, the high threshold is greater than the low threshold, and edge candidate points with gradient magnitudes lower than the low threshold are considered as non-edge pixels and are not used to generate edge images.

[0102] S34, taking the weak edge pixel candidate points connected to the pixel chain marked as the edge as weak edge pixel points, and generating an edge image according to the continuous strong edge pixel points and weak edge pixel points.

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

[0104] In S31, the expressions for calculating the gradient magnitude GradientMagnitude(G) and the gradient direction GradientDirection(θ2) are specifically:

[0105]

[0106] In the formula, l x and l y is the gradient vector, and its specific expression is:

[0107] I x =G x *image

[0108] I y =G y *image

[0109] In the formula, * is the convolution operation, G x is the template of the Sobel operator in the horizontal axis direction, G x is the template of the Sobel operator in the vertical axis direction, image is a grayscale image, and this image 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, and the detected edges are refined to remove redundant and noisy edges, thereby obtaining a clearer edge image.

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

[0112] S41, perform Hough transform on each pixel in the edge image, and calculate the pixel coordinates (ρ, θ) represented in the Hough space, the specific expression of which is:

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

[0114] Where x2 is the horizontal coordinate of the pixel in the edge image, y2 is the vertical coordinate of the pixel in the edge image, ρ and θ are the polar coordinate parameters of the line parameters in the edge image;

[0115] S42, calculate the pixel coordinates (ρ i ,θ j ) The probability of a straight line segment occurring, with the pixel coordinates (ρ) represented by the highest probability mi ,θ mj ) straight line segment as the reference line for texture direction detection, and θ mj as the second texture direction.

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

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

[0118]

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

[0120] In this embodiment, spectral analysis is a method of converting an 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 frequency spectrum according to the frequency spectrum representation of the image, and analyzing a direction of a texture in the image according to the amplitude spectrum of the frequency spectrum to obtain a third texture direction;

[0122] Among them, the expression for calculating the amplitude spectrum |f(u,v)| of the frequency spectrum is specifically:

[0123]

[0124] 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).

[0125] In this embodiment, the amplitude spectrum of the frequency spectrum displays the amplitude information of different frequency components in the image. The low-frequency components are usually located in the central area, while the high-frequency components are distributed at the edges. Therefore, by analyzing the amplitude spectrum of the frequency spectrum, the directional characteristics of the texture in the image can be obtained to obtain the third texture direction.

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

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

[0128] Wherein, 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, satisfying w1+w2+w3=1.

[0129] In this embodiment, the present invention fuses the results obtained by grayscale distribution analysis, Hough transform and spectral analysis, and comprehensively considers various factors to determine the final texture direction. The first to third texture directions detected are output in the form of images, numerical values ​​or other forms for subsequent application or analysis. The fusion strategy adopts weighted averaging, and each method is assigned a corresponding weight according to its advantages and disadvantages in extracting specific texture features.

[0130] The beneficial effects of the present invention are as follows: the present invention provides a texture direction detection method based on the fusion of texture detection technologies. By integrating multiple detection technologies, the present invention aims to solve the shortcomings of a single method in dealing with different texture types, noise levels and complexities, and to provide a more comprehensive and robust texture direction detection solution.

[0131] The present invention can more finely capture and analyze the directional characteristics of textures by comprehensively applying multiple techniques such as grayscale analysis, edge refinement, Hough transform and spectral analysis to images, thereby significantly improving the detection accuracy and consistency of texture direction estimation.

[0132] The method of the present invention is applicable to the detection of texture surfaces of various materials and complexities. Whether it is the quality control of the surface of precision parts in industrial production or the analysis of microstructure in the field of scientific research, it can provide high-quality texture direction information to meet diverse and high-precision detection needs.

[0133] 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 direction in complex environments and to improve the product quality and scientific research level of related industries.

[0134] In the description of the present invention, it is necessary to understand that the orientation or positional relationship indicated by the terms "center", "thickness", "upper", "lower", "horizontal", "top", "bottom", "inner", "outer", "radial", etc. is based on the orientation or positional relationship shown in the drawings, and is only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as a limitation on the present invention. In addition, the terms "first", "second", and "third" are used only for descriptive purposes, and cannot be understood as indicating or implying the relative importance or the number of implicitly specified technical features. Therefore, the features defined by "first", "second", and "third" may 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 following steps are involved: S1, performing image conversion and denoising on the color image to generate a grayscale image; S2. Count the number of pixels of different gray levels in the gray image to obtain a gray distribution map, and obtain the first texture direction according to the gray distribution map. S3, extracting edge information from the grayscale image to obtain a gradient amplitude map, and generating a clear edge image according to the gradient amplitude map; S4, extracting a second texture direction of the edge image according to Hough transform; S5, performing spectral analysis on the color image to obtain a frequency spectrum representation of the image, and calculating an amplitude spectrum of the frequency spectrum to obtain a third texture direction; S6. Merge the first texture direction, the second texture direction, and the third texture direction to obtain a final texture direction.

2. The texture direction detection method based on texture detection technology fusion according to claim 1 is characterized in that: The S1 comprises the following sub-steps: S11, performing image conversion on the color image to generate a converted image; S12, denoising the converted image by Gaussian filtering to generate a grayscale image.

3. The texture direction detection method based on texture detection technology fusion according to claim 2 is characterized in that: In S11, the gray value Gray of the converted image is specifically expressed as: Gray=0.299*R+0.587*G+0.114*B Where R, G and B are the red, green and blue component values ​​of the original color pixel respectively; In S12, the expression of the Gaussian kernel function H of the Gaussian filter is specifically: Where 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.

4. The texture direction detection method based on texture detection technology fusion according to claim 1 is characterized in that: The S2 comprises the following sub-steps: S21, setting a number of grayscale distribution calculation search lines, counting the number of pixels of different grayscale levels in the grayscale image according to each grayscale distribution calculation search line, and obtaining a grayscale distribution map corresponding to each grayscale distribution calculation search line; S22, performing smoothing processing on all grayscale distribution images, obtaining the first rising edge and the last falling edge of each grayscale distribution image, and using them as the two edges of the basic texture area boundary; S23, treating each edge of the basic texture region boundary as a straightness, calculating the straightness direction to obtain the boundary direction of the basic texture region, and using it as the first texture direction.

5. The texture direction detection method based on texture detection technology fusion according to claim 4 is characterized in that: In S21, the method for calculating the number of pixels of different gray levels in the gray image according to any gray distribution is: The grayscale distribution in the grayscale image is calculated along any grayscale distribution calculation search line, wherein the horizontal coordinate and the vertical coordinate of the grayscale distribution calculation search line are the coordinate and the grayscale of the grayscale image corresponding to each pixel point on the grayscale distribution calculation search line, respectively.

6. The texture direction detection method based on texture detection technology fusion according to claim 1 is characterized in that: The S3 comprises the following sub-steps: S31, calculating the gradient magnitude and gradient direction of the grayscale image by using the Sobel operator to generate a gradient magnitude map; S32, searching for pixel points with local maximum values ​​along the gradient direction on the gradient amplitude map, and taking them as candidate edge points; S33, setting a high threshold and a low threshold, taking edge candidate points whose gradient amplitude is greater than the high threshold as strong edge pixel points, and taking edge candidate points whose gradient amplitude is between the high threshold and the low threshold as weak edge pixel candidate points; S34, taking the weak edge pixel candidate points connected to the pixel chain marked as the edge as weak edge pixel points, and generating an edge image according to the continuous strong edge pixel points and weak edge pixel points.

7. The texture direction detection method based on texture detection technology fusion according to claim 6 is characterized in that: In S31, the expressions for calculating the gradient magnitude GradientMagnitude(G) and the gradient direction GradientDirection(θ2) are specifically: In the formula, l x and l y is the gradient vector, and its specific expression is: I x =G x *image I y =G y *image In the formula, * is the convolution operation, G x is the template of the Sobel operator in the horizontal axis direction, G x is the template of the Sobel operator in the vertical axis direction, and image is a grayscale image.

8. The texture direction detection method based on texture detection technology fusion according to claim 1 is characterized in that: The S4 comprises the following sub-steps: S41, perform Hough transform on each pixel in the edge image, and calculate the pixel coordinates (ρ, θ) represented in the Hough space, the specific expression of which is: ρ=x2*sinθ+y2*cosθ Where x2 is the horizontal coordinate of the pixel in the edge image, y2 is the vertical coordinate of the pixel in the edge image, ρ and θ are the polar coordinate parameters of the line parameters in the edge image; S42, calculate the pixel coordinates (ρ i ,θ j ) The probability of a straight line segment occurring, with the pixel coordinates (ρ) represented by the highest probability mi ,θ mj ) straight line segment as the reference line for texture direction detection, and θ mj as the second texture direction.

9. The texture direction detection method based on texture detection technology fusion according to claim 1, characterized in that: The S5 comprises the following sub-steps: S51, performing spectral analysis on the color image to obtain a spectrum representation F(u,v) of the image; Where f(x3,y3) is the gray value of the image at the pixel coordinate (x3,y3), (u,v) is the coordinate of the pixel coordinate (x3,y3) in the frequency domain, M is the width of the image, and N is the height of the image; S52, calculating an amplitude spectrum of the frequency spectrum according to the frequency spectrum representation of the image, and analyzing a direction of a texture in the image according to the amplitude spectrum of the frequency spectrum to obtain a third texture direction; Among them, the expression for calculating the amplitude spectrum |f(u,v)| of the frequency spectrum is specifically: 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).

10. The texture direction detection method based on texture detection technology fusion according to claim 1, characterized in that: In S6, the expression for obtaining the final texture direction is specifically: P=w1*P1+w2*P2+w3*P3 Wherein, 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, satisfying w1+w2+w3=1.

Citation Information

Patent Citations

  • Endoscopic imaging algorithm and control system

    CN106709967A

  • Tongue crack feature extraction method based on wavelet transformation

    CN109919929A

  • Meat quality quantitative analysis and evaluation method based on three-dimensional texture characteristics

    CN110097537A

  • Weldment contour detection method

    CN113034452A

  • Visible light ship wake image enhancement and detection method

    CN116630208A