A method for measuring the direction of a microscopic trace on the surface of an object based on polarization imaging
By using a polarization imaging-based method and Stokes vector and spatial filtering techniques, the orientation of fine traces on the surface of an object can be automatically detected. This solves the problems of low efficiency and high cost of manual inspection in microscopic imaging, and realizes low-cost and high-efficiency trace orientation measurement.
Patent Information
- Application Number
- CN202310058039.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-01-19
- Publication Date
- 2026-02-13
- Estimated Expiration
- 2043-01-19
AI Technical Summary
In existing technologies, the detection of the direction of fine traces on the surface of an object mainly relies on microscopes and manual observation. This has the problems of long inspection time, low efficiency, accuracy that depends on experience, and expensive microscope systems, making it difficult to apply to actual working conditions.
A polarization-based imaging method is used to acquire grayscale images of the surface of the object under test at four polarization angles. The polarization phase angle image is calculated using Stokes vectors, and test line modules at different angles are established for spatial filtering. The trace direction is determined by calculating the standard deviation.
It greatly reduces the subjective error of trace evidence inspectors, has low equipment cost, simple measurement system layout, and is suitable for actual working conditions.
Smart Images

Figure CN116124790B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of computer vision technology, specifically relating to a method for measuring the direction of fine traces on the surface of an object. Background Technology
[0002] A trace is a three-dimensional shape formed on the contact area between a trace-producing object and a receiving object due to the influence of external factors (external force, pressure, temperature, etc.). Because of different causes of formation and different external factors, traces have different orientations. Trace orientation measurement has a wide range of applications, such as in industrial inspection to detect axial reciprocating motion traces inside hydraulic supports and radial reciprocating motion traces inside motors to determine whether they meet acceptable standards; and in criminal investigation to detect and analyze traces and their orientations made by firearms and other tools used in crimes to find clues for solving cases.
[0003] Currently, the main method for detecting trace orientation at the micron level is to place the object under a microscope and then observe and compare it manually. This method of detection by microscope and human eye has many drawbacks, such as long inspection time, low efficiency, and the inspection accuracy largely depends on the experience of the inspector. At the same time, microscope systems are expensive and difficult to apply to actual working conditions.
[0004] Polarization-based imaging measurement methods can automate inspection, significantly reducing subjective errors by trace inspection personnel. Furthermore, polarization detection equipment is low-cost, and the measurement system is simple to set up, making it more suitable for practical working environments. This method is based on the following experimental findings: when the angle of the test line module aligns with the direction of the actual trace on the object being tested, the standard deviation of the spatial filtering result between the test line module and the polarization phase angle grayscale image is minimized. Conversely, when the angle of the test line module deviates from the direction of the actual trace on the object, the standard deviation of the spatial filtering result increases with the degree of deviation. Therefore, by using test line modules with different angles and spatial filtering of the polarization phase angle grayscale image, and calculating the standard deviation of the different spatial filtering results, the direction of the trace on the object's surface can be obtained. This method can replace inspection systems that rely on microscopic imaging combined with manual judgment. Summary of the Invention
[0005] In order to overcome the prior art, the present application provides a kind of object surface microscopic trace direction measurement method based on polarization imaging, first, the gray scale image of four polarization angles of the measured object surface is obtained, the polarization phase angle image of the object surface is calculated according to Stokes vector, and the polarization phase angle sub-image is extracted as the region to be measured from it, different angle test line module is established, spatial filtering module is respectively operated with polarization phase angle sub-image, and the standard deviation of different angle test line spatial filtering result is extracted, finally, the trace direction is obtained according to the minimum value of the standard deviation of spatial filtering result.The present application greatly reduces the subjective error of trace inspection staff compared with the traditional measurement method, and the polarization detection equipment cost is low, and the measurement system is simple, more suitable for actual working condition environment.
[0006] The technical solution adopted by the present application to solve its technical problems comprises the following steps:
[0007] Step 1: obtaining the gray scale image of four polarization angles of the measured object surface, and calculating the polarization phase angle image of the measured object surface, and extracting the polarization phase angle sub-image A of a×a pixel scale from the polarization phase angle image as the region to be measured;
[0008] Step 2: establishing 180 spatial filter modules respectively containing different angle test lines, and the pixel scale of each spatial filter module is a′×a′, and a′<a;
[0009] Step 3: respectively operating 180 spatial filter modules with polarization phase angle sub-image A to obtain 180 groups of polarization phase angle image standard deviation values, and calculating the average value of each group of polarization phase angle image standard deviation value as the standard deviation value corresponding to 180 different angle test lines;
[0010] Step 4: using the 180 standard deviations obtained in step 3 to draw an angle-standard deviation two-dimensional curve graph, and reading out the lowest point of the curve graph as the trace direction.
[0011] Further, the specific method of step 1 is:
[0012] The gray scale images of four polarization angles of 0°, 45°, 90° and 135° of the measured part are obtained by using a focal plane polarization camera or by installing and rotating a linear polarizer in front of a CCD camera, and the polarization phase angle image of the part is calculated according to the Stokes vector method, and the polarization phase angle sub-image A of a×a pixel scale is extracted from the polarization phase angle image as the region to be measured.
[0013] Further, the Stokes vector method is as follows:
[0014] A vector composed of four parameters is used to describe the polarization state of light, i.e. Stokes vector:
[0015]
[0016] where I represents the total light intensity, Q represents the light intensity of linearly polarized light in the 0° direction, U represents the light intensity of linearly polarized light in the 45° direction, and V represents the light intensity of circularly polarized light; I 0o , I 45o , I 90o , I 135o represent the light intensities in the 0°, 45°, 90°, and 135° polarization directions, respectively, I lh , I rh represent the light intensities corresponding to left-handed circularly polarized light and right-handed circularly polarized light, respectively;
[0017] The polarization phase angle of light is calculated according to the Stokes vector, i.e.:
[0018]
[0019] Further, the different angles in step 2 are 0°, 1°,..., 179°.
[0020] Further, step 3 is specifically:
[0021] The spatial filter is composed of a pixel neighborhood and a predefined operation performed on the pixels of the neighborhood wrapped by the filter; the filtering produces a new pixel whose value is the result of the filtering operation; the spatial filter is a black-and-white image with only 0 or 1 values, and the number of pixels counted by it is first calculated as N:
[0022]
[0023] where w(i,j) represents the coefficient of the filter at the corresponding position, and the pixel size of each spatial filter module is
[0024] ″′
[0025] a×a, a
[0026] Then, a nonlinear spatial filtering operation is performed; for a selected test line angle θ, the response g θ of the filter at any point (x,y) in the image is the standard deviation of the product of the filter coefficients and the image pixels wrapped by the filter:
[0027] where f(x+i-1,y+j-1) represents the pixel value at the point (x+i-1,y+j-1) in the image;
[0028] After the responses of all the pixel points in the image under test are calculated, the average of the responses is taken to obtain the standard deviation value corresponding to the test line angle θ wherein N' represents the filter response value g θ (x,y) of the number of;
[0029]
[0030] The beneficial effects of the present application are as follows:
[0031] The traditional microscopic trace direction measurement of object surface is mainly based on microscope and artificial discrimination method, and the measurement method has long inspection time, low efficiency, and the inspection accuracy is largely dependent on the experience of the inspector, and the microscope system is expensive and difficult to apply to the actual working condition site. The method uses the polarization phase angle gray image and the spatial filtering operation of the test line in different directions to obtain the microscopic trace direction of the object surface, which greatly reduces the subjective error of the trace inspection personnel compared with the traditional measurement method, and the polarization detection equipment has low cost and simple measurement system arrangement, which is more suitable for the actual working environment. BRIEF DESCRIPTION OF DRAWINGS
[0032] Figure 1 The measured object (planer sample) used in the embodiment of the present application.
[0033] Figure 2 The gray scale images of four polarization angles of the surface of the measured object in the embodiment of the present application.
[0034] Figure 3 The polarization phase angle gray scale image of the surface of the measured object in the embodiment of the present application.
[0035] Figure 4 The polarization phase angle sub-image of the surface of the measured object in the embodiment of the present application.
[0036] Figure 5 The test line module in different angles in the embodiment of the present application.
[0037] Figure 6 The angle-standard deviation quadratic curve (the trace direction true value is 90°) calculated in the embodiment of the present application. DETAILED DESCRIPTION
[0038] The present application is further illustrated below in combination with the drawings and embodiments.
[0039] The object of the present application is to provide a microscopic trace direction measurement method of object surface based on polarization imaging, to solve the problems of long inspection time, low efficiency, and the inspection accuracy largely dependent on the experience of the inspector of the current microscopic imaging and artificial discrimination detection system, and the expensive microscope system is difficult to apply to the actual working condition site.
[0040] The present application provides a microscopic trace direction measurement method of object surface based on polarization imaging, as shown in Figure 1The planer sample is taken as the test object; as shown in Figure 2 The gray scale images of the measured object surface at 0°, 45°, 90° and 135° polarization angles are acquired; as shown in Figure 3 The polarization phase angle image of the measured object surface is calculated according to the Stokes vector; as shown in Figure 4 The polarization phase angle sub-image Al of a x a pixel scale is extracted from the polarization phase angle image as the to-be-tested region; as shown in Figure 5 The spatial filtering modules containing 0°, 1°,..., 179° test lines are established respectively, and the pixel scale of the modules is a' x a' (a' < a); as shown in Figure 6 The standard deviations obtained by the 0°, 1°,..., 179° angle test line modules and the polarization phase angle sub-image are used to draw an angle-standard deviation two-dimensional curve graph, and the lowest point of the curve graph is read out as the trace direction.
[0041] The method is implemented according to the following steps:
[0042] Step 1, as shown in Figure 2 The gray scale images of the measured object surface at 0°, 45°, 90° and 135° polarization angles are acquired; as shown in Figure 3 The polarization phase angle image of the measured object surface is calculated according to the Stokes vector; as shown in Figure 4 The polarization phase angle sub-image Al of a x a pixel scale is extracted from the polarization phase angle image as the to-be-tested region; as shown in
[0043] Step 2, as shown in Figure 5 The spatial filtering modules containing 0°, 1°,..., 179° test lines are established respectively, and the pixel scale of the modules is a' x a' (a' < a);
[0044] Step 3, the 0°, 1°,..., 179° test line modules and the polarization phase angle sub-image are respectively subjected to spatial filtering operation, 180 groups of polarization phase angle image standard deviation values are extracted, and the average value of each group of polarization phase angle image standard deviation value is calculated to obtain 180 standard deviation values corresponding to different angle test lines;
[0045] Step 4, as shown in Figure 6 The standard deviations obtained by the 0°, 1°,..., 179° angle test line modules and the polarization phase angle sub-image are used to draw an angle-standard deviation two-dimensional curve graph, and the lowest point of the curve graph is read out as the trace direction.
[0046] In the technical scheme of the present application, the polarization phase angle image is obtained by the Stokes vector method. In order to simply and effectively describe the polarization state of light, G. G. Stokes proposed a vector composed of four parameters to describe the polarization state of light when studying polarized light, that is, the Stokes vector:
[0047]
[0048] In the formula, I represents the total light intensity, Q represents the light intensity of linearly polarized light in the 0° direction, U represents the light intensity of linearly polarized light in the 45° direction, and V represents the light intensity of circularly polarized light. The circularly polarized component can be generally ignored.
[0049] According to the Stokes vector, the polarization phase angle of light can be calculated, that is:
[0050]
[0051] In the present application, based on the experimental finding that when the angle of the test line module is consistent with the real trace direction of the measured object, the standard deviation of the test line module and the spatial filtering result of the polarization phase angle gray image is minimum, and when the angle of the test line module deviates from the real trace direction of the measured object, the standard deviation of the test line module and the spatial filtering result of the polarization phase angle gray image increases with the degree of deviation, a test line module based on the spatial filtering form is designed to detect the trace direction of the measured object. The spatial filter is composed of a pixel neighborhood (usually a rectangle) and a predefined operation performed on the pixels of the neighborhood. The filtering produces a new pixel, and the value of the pixel is the result of the filtering operation. Given the size a' of the test line module, the filter designed in the present application is a black and white image with only 0 or 1 values. First, the number N of pixel points counted is calculated:
[0052]
[0053] Then, a nonlinear spatial filtering operation is performed. For the selected test line angle θ, the response g of the filter at any point (x, y) in the image defined in the present application is: θ (x, y) is the standard deviation of the product of the filter coefficient and the image pixel covered by the filter:
[0054]
[0055] After the corresponding of all pixel points in the measured image is calculated, the average of the corresponding is obtained, that is, the standard deviation value corresponding to the test line angle θ is obtained, wherein N' represents the number of filter corresponding values g θ (x, y).
[0056]
[0057] In the specific operation process of the present application, firstly, the gray scale images of four polarization angles of the surface of the object to be measured are acquired, and a polarization phase angle sub-image A1 of a×a pixel scale is extracted from the image as a measured region; secondly, 180 spatial filter modules respectively containing different angle test lines are established, and the pixel scale of the module is a'×a'(a'<a); then, the spatial filtering operation is performed on the polarization phase angle sub-image by the different test line modules respectively, N polarization phase angle image gray scale values are extracted respectively, and the standard deviations of the N gray scale values are calculated; finally, the standard deviations obtained by the spatial filtering of the polarization phase angle sub-image by the test line modules of different angles are used to draw an angle-standard deviation two-dimensional curve graph, and the lowest point of the curve graph is read as the trace direction. Specific embodiments
[0059] The camera used in the present embodiment is a LUCID focal plane polarization camera, and the measurement target is a planer sample as shown in Figure 1 The gray scale images of four polarization angles of 0°, 45°, 90° and 135° of the surface of the planer sample are acquired as shown in Figure 2 The polarization phase angle image of the object surface is calculated according to the Stokes vector as shown in Figure 3 The polarization phase angle sub-image A1 of a×a pixel scale is extracted from the polarization phase angle image as a measured region as shown in Figure 4 180 spatial filtering modules respectively containing 0°, 1°,..., 179° test lines are established as shown in Figure 5 The standard deviations obtained by the spatial filtering of the polarization phase angle sub-image by the test line modules of different angles are used to draw an angle-standard deviation two-dimensional curve graph, and the lowest point of the curve graph is read as the trace direction as shown in Figure 6
[0060] Firstly, test line masks of different angles with a size of 100×100 are constructed as shown in Figure 5 The spatial filtering operation is performed on each angle θ, the corresponding pixel points on the polarization phase angle sub-image A1 test line are extracted, and the average standard deviation is calculated The standard deviation matrix (taking 10° as an example) is obtained as follows:
[0061]
[0062] According to the difference of the size of the selected measured region, the size of the generated standard deviation matrix will also be different. In order to enhance the reliability of the results and reduce the influence of errors, the average of the standard deviation matrix is calculated to obtain the standard deviation of the corresponding angle:
[0063] δ θ = 30.44960362703492
[0064] The standard deviation of all angles is calculated and the function relationship graph is obtained with the angle as the horizontal coordinate as follows: taking the horizontal coordinate corresponding to the minimum value point, the roughness quadrant of the measured area is 90°.
Claims
1. A method for measuring the orientation of fine traces on an object surface based on polarization imaging, characterized in that, Includes the following steps: Step 1: Obtain grayscale images of the four polarization angles of the surface of the object to be tested, and calculate the polarization phase angle image of the surface of the object to be tested. Extract the polarization phase angle sub-image A of size a×a pixels from the polarization phase angle image as the area to be tested. Step 2: Construct 180 spatial filter modules, each containing test lines at different angles. Each spatial filter module has a pixel size of a′×a′, where a′... <a; Step 3: Perform spatial filtering operations on the 180 spatial filter modules with the polarization phase angle sub-image A to obtain 180 sets of standard deviation values for polarization phase angle images. Calculate the average value of the standard deviation values for each set of polarization phase angle images as the standard deviation values corresponding to the 180 test lines at different angles. Step 4: Using the 180 standard deviations obtained in Step 3, plot a two-dimensional curve of angle versus standard deviation. The lowest point of the curve is the direction of the trace.
2. The method for measuring the direction of fine traces on an object surface based on polarization imaging according to claim 1, characterized in that, The specific method for step 1 is as follows: By using a split-focus plane polarization camera or by mounting and rotating a linear polarizer in front of a CCD camera, grayscale images of the tested component at four polarization angles of 0°, 45°, 90°, and 135° are acquired. The polarization phase angle image of the component is calculated according to the Stokes vector method, and a polarization phase angle sub-image A of size a×a pixels is extracted from the polarization phase angle image as the area to be measured.
3. The method for measuring the direction of fine traces on an object surface based on polarization imaging according to claim 1, characterized in that, The Stokes vector method is described in detail below: The polarization state of light is described by a vector consisting of four parameters, known as the Stokes vector: Where I represents the total illumination intensity, Q represents the illumination intensity of linearly polarized light at 0°, U represents the illumination intensity of linearly polarized light at 45°, and V represents the illumination intensity of circularly polarized light; I 0o I 45o I 90o I 135o I represents the light intensity at polarization directions of 0°, 45°, 90°, and 135°, respectively. lh I rh These represent the light intensities corresponding to left-handed and right-handed circularly polarized light, respectively. The polarization phase angle of light is calculated using the Stokes vector, i.e.:
4. The method for measuring the direction of fine traces on an object surface based on polarization imaging according to claim 1, characterized in that, The different angles in step 2 are 0°, 1°, ..., 179°.
5. The method for measuring the direction of fine traces on an object surface based on polarization imaging according to claim 1, characterized in that, Step 3 specifically involves: The spatial filter consists of a pixel neighborhood and a predefined operation performed on the image pixels enclosed by that neighborhood; the filter produces a new pixel, and the pixel's value is the result of the filtering operation; the spatial filter is a black and white image with only 0 or 1 values, and the number of pixels N included in the filter is first calculated: In the formula, w(i,j) represents the coefficients of the filter at the corresponding position, and the pixel size of each spatial filter module is a′×a′, where a′ <a; Then, a nonlinear spatial filtering operation is performed; for a selected test line angle θ, the filter response g at any point (x,y) in the image is... θ (x,y) is the standard deviation of the product of the filter coefficients and the number of image pixels covered by the filter: In the formula, f(x+i-1,y+j-1) represents the pixel value at point (x+i-1,y+j-1) in the image; After calculating the response of all pixels in the image to be tested, the average of these responses yields the standard deviation of the test line angle θ. Where N′ represents the filter response value g θ The number of (x,y) pairs;
Citation Information
Patent Citations
Multiband polarization imaging anti-counterfeiting element identification system
CN102759441A
Three-dimensional roughness detection device and method based on polarization imaging
CN114076579A