Surface micro-morphology measurement method based on grayscale depth
By determining the shooting points and defect range based on reflectivity and grayscale gradient methods, the problem of large errors in the detection of highly reflective materials is solved, and efficient and accurate microscopic morphology detection is achieved.
Patent Information
- Application Number
- CN202510441830.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-09
- Publication Date
- 2025-10-14
- Estimated Expiration
- 2045-04-09
AI Technical Summary
Traditional grayscale depth-based calibration methods have large errors in highly reflective materials and complex curvature areas. Ambient light fluctuations and nonlinear interference of the imaging system lead to low detection accuracy and efficiency, requiring frequent recalibration.
The number of shooting points is determined by obtaining the reflectivity of the material surface, the defect range is determined based on the grayscale gradient and contrast, and the recognition accuracy is improved by fitting and adjusting the reflectivity and reliability to eliminate interference from the light source and imaging system.
提高了高反光材料的检测精度和效率,减少了频繁标定的需求,提升了工业检测的整体效率和精度。
Smart Images

Figure CN120374534B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of microscopic topography measurement, and in particular to a surface microscopic topography measurement method based on grayscale depth. Background Art
[0002] In the field of surface micromorphology measurement, traditional grayscale-depth-based calibration methods infer material surface topography by establishing a linear or nonlinear mapping relationship between grayscale values and actual physical depth (such as a grayscale-height calibration curve). However, their accuracy is limited by the material's reflective properties, lighting conditions, and nonlinear interference from the imaging system. For example, highly reflective materials such as metals and ceramics can cause the grayscale values and actual depth to deviate significantly from the calibration curve due to the specular reflection effect. Especially on inclined surfaces or areas with complex curvature, grayscale saturation or local shadows can further distort depth information, with errors reaching over 30% of the nominal value. In addition, factors such as ambient light fluctuations, camera dynamic range limitations, and lens distortion can introduce systematic deviations, making a single grayscale value incapable of reliably representing the actual micromorphology. Studies have shown that at the same depth, the grayscale difference between a polished steel surface and an aluminum oxide coating can reach 50-80 levels (8-bit grayscale), requiring frequent recalibration of traditional methods, significantly limiting industrial inspection efficiency.
[0003] Chinese Patent Publication No. CN110726380A discloses a multispectral microscopic three-dimensional topography detection device and method. The device comprises a polychromatic illumination module and a longitudinal dispersion-enhanced optical imaging module. The polychromatic illumination module is provided with, in order along the optical path, a polychromatic light source, a condenser, a uniform collimating lens assembly, a semi-reflective and semi-transparent beam splitter, and an objective lens with longitudinal dispersion. The longitudinal dispersion-enhanced optical imaging module is provided with, in order along the optical path, a longitudinally height-adjustable sample stage, an objective lens with longitudinal dispersion, a semi-reflective and semi-transparent beam splitter, a tube lens with longitudinal dispersion, a multispectral image sensor, and an image display and analysis module. This method enables microscopic three-dimensional topography detection with high lateral resolution, submicron-level high longitudinal measurement accuracy, and a large millimeter-level longitudinal measurement range in a single imaging operation without mechanical motion, achieving both high measurement efficiency and high measurement accuracy.
[0004] The following problems also exist in the existing technology: the use of grayscale depth to calibrate physical depth requires targeted calibration according to different materials, and different batches of products of the same material may still need to be recalibrated to improve the calibration accuracy, resulting in low industrial detection efficiency. Summary of the Invention
[0005] To this end, the present invention provides a surface micromorphology measurement method based on grayscale depth to overcome the problem in the prior art of low industrial detection efficiency caused by the need to recalibrate for different materials.
[0006] To achieve the above object, the present invention provides a surface micromorphology measurement method based on grayscale depth, comprising:
[0007] Obtaining the reflectivity of the material surface to determine the number of shooting points based on the reflectivity, and setting the shooting points symmetrically with a vertical line where the center point of the material surface is located as the central axis;
[0008] Acquiring image information of a single shooting point and preprocessing the image information to determine a grayscale gradient of a same pixel block at a symmetrical shooting point, and determining whether the pixel block has a defect based on the grayscale gradient;
[0009] Taking the defective pixel block as the center and the preset pixel distance as the spacing, the grayscale contrast is determined, and the defect range is determined according to the grayscale contrast;
[0010] Fitting the defect ranges determined by all the photographing points to determine reliability, determining whether the defect recognition accuracy is qualified based on a comparison result of the reliability and a preset reliability, and adjusting the preset reflectivity or the preset reliability based on unqualified recognition accuracy;
[0011] The topography of the material surface is determined according to the grayscale gradient based on defects with qualified recognition accuracy.
[0012] Furthermore, the process of determining the number of shooting points based on the reflectivity includes:
[0013] comparing the reflectivity with a preset reflectivity;
[0014] Determining the number of shooting points as a first number based on a comparison result that the reflectivity is greater than the preset reflectivity;
[0015] The number of shooting points is determined to be a second number based on a comparison result that the reflectivity is less than or equal to the preset reflectivity.
[0016] Furthermore, the process of determining whether the pixel block has a defect according to the grayscale gradient includes:
[0017] comparing the grayscale gradient with a preset grayscale gradient;
[0018] The pixel block is determined to be defective based on a comparison result that the grayscale gradient is greater than the preset grayscale gradient.
[0019] Furthermore, the process of determining the defect scope includes:
[0020] The grayscale contrast is determined with the pixel block with defects as the center and the preset pixel distance as the spacing;
[0021] comparing the grayscale contrast with a preset contrast;
[0022] Determining the preset pixel distance range as the defect range based on a comparison result that the grayscale contrast is greater than or equal to the preset contrast;
[0023] Determining, based on a comparison result that the grayscale contrast is less than the preset contrast, to increase the preset pixel distance by a preset amplitude to obtain a second pixel distance;
[0024] Taking the defective pixel block as the center and the second pixel distance as the basis, determining a second grayscale contrast ratio;
[0025] The second grayscale contrast is compared with a preset contrast until the second grayscale contrast is greater than the preset contrast, and the second pixel distance range is determined as a defect range.
[0026] Furthermore, the reliability determination process includes:
[0027] Taking any of the defect ranges as a reference, fitting the remaining defect ranges to determine the degree of fit;
[0028] comparing the fitness with a preset fitness;
[0029] Determining that the defect ranges overlap based on a comparison result that the degree of fit is greater than or equal to the preset degree of fit;
[0030] The comparison of the number of overlapping defect areas with the number of all defect areas is determined as the reliability.
[0031] Furthermore, the process of determining whether the defect recognition accuracy is qualified based on the reliability includes:
[0032] comparing the reliability with a preset reliability;
[0033] Determining that the defect recognition accuracy is qualified based on the comparison result that the reliability is greater than or equal to the preset reliability;
[0034] The defect recognition accuracy is determined to be unqualified based on the comparison result that the reliability is less than the preset reliability.
[0035] Furthermore, the process of determining the adjustment parameters according to the unqualified recognition accuracy includes:
[0036] Subtracting the preset reliability from the reliability to obtain a difference percentage;
[0037] Determining to increase the preset reflectivity based on a comparison result that the difference percentage is greater than a preset percentage;
[0038] The preset reliability is increased based on a comparison result that the difference percentage is less than or equal to the preset percentage.
[0039] Furthermore, the process of adjusting the preset reflectivity includes:
[0040] Determining the grayscale entropy of the defect range, and comparing the grayscale entropy with a preset entropy;
[0041] Based on the comparison result that the grayscale entropy is greater than the preset entropy, it is determined to increase the preset reflectivity by a first adjustment coefficient.
[0042] Furthermore, the process of adjusting the preset reliability includes:
[0043] Determining an inverse moment of the defect range, and comparing the inverse moment with a preset inverse moment;
[0044] Based on the comparison result that the inverse moment difference is less than the preset inverse moment difference, it is determined to increase the preset reliability by a second adjustment coefficient.
[0045] Furthermore, for defects with qualified recognition accuracy, the three-dimensional morphology of the defect is determined according to the grayscale gradient, and the three-dimensional morphology of the material surface is determined according to the grayscale gradient based on the defect.
[0046] Compared with the prior art, the beneficial effect of the present invention is that the present invention determines the number of shooting points according to the reflectivity. A high reflectivity means that under the same lighting conditions, the image obtained by the camera is clearer. A smaller number of shooting points are set for materials with high reflectivity, which can improve the detection efficiency while ensuring the detection accuracy. A larger number of shooting points are set for materials with low reflectivity to improve the detection accuracy. The shooting points are symmetrically distributed with the central axis of the material surface as the reference, and the grayscale gradient of the symmetrical shooting points for the same pixel block is determined. The grayscale gradient is the absolute difference in the grayscale depth of the image obtained by the symmetrical shooting points for the same pixel block. A large grayscale gradient indicates that the pixel block has defects, and a small grayscale gradient indicates that the pixel block does not have defects. Determining defects according to the grayscale gradient eliminates the errors caused by objective factors when calibration is performed based on the grayscale depth alone. Inaccuracy; under the condition of determining the pixel block with defects, the grayscale contrast of the local area is further determined based on the pixel block. The larger the grayscale contrast, the clearer the edge. The edge of the defect is determined according to the grayscale contrast to determine the defect range; on the basis of further determining the defect range, the defect ranges determined by each symmetrical shooting point are obtained, and a horizontal comparison is performed and the recognition accuracy of the defect is determined according to the comparison results, so as to further eliminate the problem of low detection accuracy caused by objective reasons; under the condition of determining that the recognition accuracy of the defect is qualified, that is, the correspondence between the grayscale gradient and the physical depth is qualified, the specific morphology of the defect is accurately determined according to the grayscale gradient, and the remaining part of the image is converted into three-dimensional morphology according to the grayscale gradient, thereby further improving the recognition accuracy of microscopic morphology detection and further improving industrial detection efficiency.
[0047] Furthermore, the present invention symmetrically sets a number of shooting points, and determines whether a pixel block has defects based on the grayscale gradient of the same pixel block at two symmetrical shooting points. The grayscale gradient of a pixel block without defects is a fixed value. When a defect exists, the grayscale depth will become smaller, causing the grayscale gradient to become larger. Confirming whether a defect exists based on the grayscale gradient can eliminate the error caused by the deviation between the grayscale depth and the actual depth, thereby further improving the recognition accuracy of microscopic morphology detection and further improving industrial detection efficiency.
[0048] Furthermore, under the condition that the recognition accuracy of defects is determined to be unqualified, the present invention determines to adjust the preset reflectivity or adjust the preset reliability according to the difference in the reliability of the defect range, thereby improving the accuracy of the defect detection benchmark, thereby further improving the recognition accuracy of micro-morphology detection, and further improving industrial detection efficiency.
[0049] Furthermore, the present invention determines the microscopic morphology of the remaining part of the image based on the grayscale gradient, on the premise that the defect recognition accuracy is qualified. The qualified defect recognition accuracy means that the physical height corresponding to the grayscale gradient is accurate, thereby further improving the recognition accuracy of microscopic morphology detection and further improving industrial detection efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0050] Figure 1 This is a flow chart of a surface micro-topography measurement method based on grayscale depth according to an embodiment of the present invention;
[0051] Figure 2 A flowchart for determining the number of shooting points according to an embodiment of the present invention;
[0052] Figure 3 A flowchart of determining whether a pixel block has a defect according to an embodiment of the present invention;
[0053] Figure 4 This is a flow chart for determining whether the defect recognition accuracy is qualified according to an embodiment of the present invention. DETAILED DESCRIPTION
[0054] In order to make the objects and advantages of the present invention more clearly understood, the present invention is further described below in conjunction with embodiments; it should be understood that the specific embodiments described herein are merely used to explain the present invention and are not intended to limit the present invention.
[0055] The preferred embodiments of the present invention are described below with reference to the accompanying drawings. It should be understood by those skilled in the art that these embodiments are only used to explain the technical principles of the present invention and are not intended to limit the scope of protection of the present invention.
[0056] It should be noted that, in the description of the present invention, terms such as "up", "down", "left", "right", "inside", and "outside" indicating directions or positional relationships are based on the directions or positional relationships shown in the accompanying drawings. This is only for the convenience of description and does not indicate or imply that the device or element must have a specific orientation, be constructed and operated in a specific orientation. Therefore, it cannot be understood as a limitation on the present invention.
[0057] Furthermore, it should be noted that, in the description of the present invention, unless otherwise expressly specified or limited, the terms "mounted," "connected," and "connected" should be understood in a broad sense. For example, they may refer to fixed connections, detachable connections, or integral connections; mechanical connections or electrical connections; direct connections or indirect connections through an intermediate medium; and internal communication between two components. Those skilled in the art will understand the specific meanings of the above terms in the present invention based on specific circumstances.
[0058] See also Figure 1-Figure 4 As shown, Figure 1A flowchart of a surface micro-topography measurement method based on gray depth according to an embodiment of the present application; Figure 2 A flowchart of determining the number of shooting point positions according to an embodiment of the present application; Figure 3 A flowchart of determining whether a pixel block has a defect according to an embodiment of the present application; Figure 4 A flowchart of determining whether the recognition accuracy of a defect is qualified according to an embodiment of the present application.
[0059] A surface micro-topography measurement method based on gray depth is provided according to an embodiment of the present application, comprising:
[0060] In step S1, the reflectivity of a material surface is obtained to determine the number of shooting point positions based on the reflectivity, and the shooting point positions are symmetrically arranged with a vertical line where a center point of the material surface is located as a center axis;
[0061] In step S2, image information of a single shooting point position is obtained and preprocessed to determine the gray gradient of a symmetric shooting point position for a same pixel block, and whether the pixel block has a defect is determined according to the gray gradient;
[0062] In step S3, a gray contrast is determined with a preset pixel distance as a pitch with the pixel block having a defect as a center, and a defect range is determined according to the gray contrast;
[0063] In step S4, the defect ranges determined by all shooting point positions are fitted to determine a reliability, whether the recognition accuracy of a defect is qualified is determined according to a comparison result of the reliability and a preset reliability, and the preset reflectivity or the preset reliability is adjusted according to unqualified recognition accuracy;
[0064] In step S5, the topography of the material surface is determined according to the gray gradient based on the defects with qualified recognition accuracy.
[0065] Specifically, the reflectivity refers to the ability of an object surface to reflect light, under the same light source, the higher the reflectivity of an object, the more light it reflects, making the object brighter and more visible under light conditions, which increases the recognition and clarity of the object, therefore, the number of shooting point positions is determined according to the reflectivity of the material surface, more shooting point positions are set for the object with low clarity under the same light source, and fewer shooting point positions are set for the object with high clarity under the same light source, which reduces the number of data processing as much as possible while ensuring detection accuracy, and improves detection efficiency.
[0066] Specifically, the light source can be set at any position, but the position that can make the clarity of the material reach the highest is the best, and the brightness and model of the light source are not limited, and the problem of insufficient recognition accuracy caused by the light source can be eliminated by using the gray gradient.
[0067] Specifically, the pre-processing procedure of the image information includes, but is not limited to, graying, denoising, filtering and contrast enhancement.
[0068] Specifically, the present application is to measure the overall micro-morphology based on the identification of defects on the surface of the material, and under the condition that the identification accuracy of the defects is qualified, the pixel coordinates are converted according to the gray gradient to convert the gray image into a three-dimensional image.
[0069] Specifically, the process of determining the number of shooting points based on the reflectivity includes:
[0070] Comparing the reflectivity with a preset reflectivity;
[0071] Based on the comparison result that the reflectivity is greater than the preset reflectivity, the number of shooting points is determined as a first number;
[0072] Based on the comparison result that the reflectivity is less than or equal to the preset reflectivity, the number of shooting points is determined as a second number.
[0073] Specifically, the value range of the preset reflectivity is set to [10%, 95%], and the embodiment of the present application is preferably 40%.
[0074] Specifically, the calculation formula of the first number is:
[0075]
[0076] Wherein, N1 represents the number of shooting points, L represents the length of the material surface that needs to be shot, W represents the width covered by a single shooting point, O represents the overlap percentage, which is set to 20%, and p represents the reflectivity.
[0077] The calculation formula of the second number is:
[0078]
[0079] Wherein, N2 represents the number of shooting points, L represents the length of the material surface that needs to be shot, W represents the width covered by a single shooting point, O represents the overlap percentage, which is set to 20%, and p represents the reflectivity.
[0080] Specifically, the process of determining whether the pixel block has defects based on the gray gradient includes:
[0081] Comparing the gray gradient with a preset gray gradient;
[0082] Based on the comparison result that the gray gradient is greater than the preset gray gradient, it is determined that the pixel block has defects.
[0083] Specifically, the preset gray scale gradient is determined according to the reflectivity of the material surface, and the gray scale gradient corresponding to the reflectivity is preset.
[0084] It can be understood that when the pixel block does not have defects, the shooting in different directions causes the gray scale values of the same pixel block to be different because the cameras are at different distances, so that the received light is different, resulting in different gray scale values, but the gray scale gradient is fixed, so when it is determined that the gray scale gradient is greater than the preset gray scale gradient, it can be determined that the pixel block has defects.
[0085] Specifically, the determination process of the defect range includes:
[0086] The gray scale contrast is determined with the pixel block having defects as the center and with the preset pixel distance as the interval;
[0087] The gray scale contrast is compared with the preset contrast;
[0088] The preset pixel distance range is determined as the defect range based on the comparison result that the gray scale contrast is greater than or equal to the preset contrast;
[0089] The preset pixel distance is increased by a preset amplitude to obtain a second pixel distance based on the comparison result that the gray scale contrast is less than the preset contrast;
[0090] A second gray scale contrast is determined with the pixel block having defects as the center and with the second pixel distance;
[0091] The second gray scale contrast is compared with the preset contrast until the second gray scale contrast is greater than the preset contrast, and the second pixel distance range is determined as the defect range.
[0092] Specifically, the preset pixel distance is 1 pixel, the gray scale contrast represents edge definition, and defects tend to have a large gray scale gradient with adjacent pixel blocks. A smaller gray scale contrast indicates that the range within the preset pixel distance is still a defect and it is impossible to determine whether the pixels connected to the preset pixel distance are defects. Therefore, the preset pixel distance is increased to determine again until the gray scale contrast is greater than or equal to the preset contrast, and the range within the second pixel distance is the defect range.
[0093] Specifically, the preset contrast is set to [5%, 15%], and the embodiment of the present application preferably is 18%; and the preset amplitude is 1 pixel.
[0094] Specifically, the determination process of the reliability includes:
[0095] The remaining defect ranges are fitted to determine the fitting degree with any defect range as the reference;
[0096] comparing the fitness with a preset fitness;
[0097] Determining that the defect ranges overlap based on a comparison result that the degree of fit is greater than or equal to the preset degree of fit;
[0098] Determining that the defect ranges do not overlap based on a comparison result that the degree of fit is less than the preset degree of fit;
[0099] The comparison of the number of overlapping defect areas with the number of all defect areas is determined as the reliability.
[0100] Specifically, each shooting point can obtain several defect ranges. A single defect range corresponds to several images based on all shooting points. The fitting process for a single defect range includes:
[0101] Taking any image as a reference image, comparing the remaining images with the reference image, determining a number of pixel blocks with consistent grayscale gradients, and determining a pixel block with the largest grayscale gradient based on the plurality of pixel blocks, and determining the pixel block with the largest grayscale gradient as the fitting center;
[0102] Establishing a rectangular coordinate system with the fitting center as the origin, establishing a first gradient curve with the grayscale gradient of a single pixel block in the direction of the horizontal axis, and sequentially establishing a plurality of second gradient curves in the direction of the horizontal axis for all pixel blocks within the defect range with the vertical axis as the base point;
[0103] The corresponding gradient curves in several images are overlapped, and the ratio of the distance of the overlapping part to the total distance of the curve is the overlap degree;
[0104] The number of images whose overlap degree is greater than a preset overlap degree is counted, and the ratio of the number of images to the total number of images is determined as the degree of fit.
[0105] Specifically, the preset overlap range is set to [95%, 98%], and 96% is preferred in the embodiment of the present invention.
[0106] Specifically, the preset degree of fit range is set to [90%, 99%], and 98% is preferred in the embodiment of the present invention.
[0107] Specifically, the process of determining whether the defect recognition accuracy is qualified based on the reliability includes:
[0108] comparing the reliability with a preset reliability;
[0109] Determining that the defect recognition accuracy is qualified based on the comparison result that the reliability is greater than or equal to the preset reliability;
[0110] The defect recognition accuracy is determined to be unqualified based on the comparison result that the reliability is less than the preset reliability.
[0111] Specifically, the preset reliability value range is set to [94%, 99%], and 96% is preferred in the embodiment of the present invention.
[0112] Specifically, the process of determining adjustment parameters based on unqualified recognition accuracy includes:
[0113] Subtracting the preset reliability from the reliability to obtain a difference percentage;
[0114] Subtracting the preset reliability from the reliability to obtain a difference percentage;
[0115] Determining to increase the preset reflectivity based on a comparison result that the difference percentage is greater than a preset percentage;
[0116] The preset reliability is increased based on a comparison result that the difference percentage is less than or equal to the preset percentage.
[0117] Specifically, the value range of the preset percentage is set to [1%, 3%], and 2% is preferred in the embodiment of the present invention.
[0118] Specifically, the process of adjusting the preset reflectivity includes:
[0119] Determining the grayscale entropy of the defect range, and comparing the grayscale entropy with a preset entropy;
[0120] Determining, based on a comparison result that the grayscale entropy is greater than the preset entropy, to increase the preset reflectivity by a first adjustment coefficient;
[0121] Based on the comparison result that the grayscale entropy is less than or equal to the preset entropy, it is determined not to increase the preset reflectivity.
[0122] Specifically, the grayscale entropy represents the texture complexity of the defect. A large entropy value indicates a large texture complexity, which means that the defect range is not accurately divided; a small entropy value indicates a small texture complexity, which means that the defect range is accurately divided.
[0123] Specifically, the value range of the preset entropy is set to [5 bits, 7 bits], and 6 bits is preferred in the embodiment of the present invention; the value range of the first adjustment coefficient is set to [1.2, 1.3], and 1.25 is preferred in the embodiment of the present invention;
[0124] Specifically, the process of adjusting the number of shooting points includes:
[0125] Determining an inverse moment of the defect range, and comparing the inverse moment with a preset inverse moment;
[0126] Determining an inverse moment of the defect range, and comparing the inverse moment with a preset inverse moment;
[0127] determining to increase the preset reliability with a second adjustment coefficient based on a comparison result that the inverse difference moment is less than the preset inverse difference moment;
[0128] determining not to adjust the preset reliability based on a comparison result that the inverse difference moment is greater than or equal to the preset inverse difference moment.
[0129] Specifically, the preset inverse difference moment is set to [0.1, 0.7], and the embodiment of the application is preferably 0.5; the inverse difference moment reflects the texture uniformity of the defect surface, and a small inverse difference moment indicates that the division of the defect range is not accurate.
[0130] Specifically, the second adjustment coefficient is set to [1.01, 1.04], and the embodiment of the application is preferably 1.03.
[0131] Specifically, for the defect with qualified recognition accuracy, the three-dimensional topography of the defect is determined according to the gray gradient, and the three-dimensional topography of the material surface is determined according to the gray gradient based on the defect.
[0132] Specifically, the gray gradient represents the physical depth of the defect, and the formula for determining the three-dimensional topography of the image using the gray gradient is as follows:
[0133]
[0134] wherein (u, v) represents the pixel coordinates, f x and f y represent the focal length, c x and c y represent the optical center coordinates, Z represents the gray gradient, (X c , Y c , Z c ) represents the camera three-dimensional coordinates corresponding to the pixel coordinates.
[0135] The camera three-dimensional coordinates are substituted into the following formula to obtain the world coordinates:
[0136]
[0137] wherein X w represents the X coordinate of the world coordinates corresponding to the pixel coordinates, Y w represents the Y coordinate of the world coordinates corresponding to the pixel coordinates, Z w represents the Z coordinate of the world coordinates corresponding to the pixel coordinates, and t represents the position of the camera in the world coordinate system.
[0138] Specifically, the pixel coordinates are determined with the upper left corner of the image information as the origin, and the optical center coordinates are parameters of the camera itself. It can be understood that the cameras used at all shooting points are cameras of the same specifications. There is no specific limitation on the model and parameters of any camera, as long as it can meet the shooting requirements.
[0139] Thus far, the technical solutions of the present invention have been described in conjunction with the preferred embodiments shown in the accompanying drawings. However, it will be readily understood by those skilled in the art that the scope of protection of the present invention is obviously not limited to these specific embodiments. Without departing from the principles of the present invention, those skilled in the art may make equivalent changes or substitutions to the relevant technical features, and the technical solutions after such changes or substitutions will fall within the scope of protection of the present invention.
Claims
1. A surface micromorphology measurement method based on grayscale depth, characterized in that: include: Obtaining the reflectivity of the material surface to determine the number of shooting points based on the reflectivity, and setting the shooting points symmetrically with a vertical line where the center point of the material surface is located as the central axis; Acquiring image information of a single shooting point and preprocessing the image information to determine a grayscale gradient of a same pixel block at a symmetrical shooting point, and determining whether the pixel block has a defect based on the grayscale gradient; Taking the defective pixel block as the center and the preset pixel distance as the spacing, the grayscale contrast is determined, and the defect range is determined according to the grayscale contrast; Fitting the defect ranges determined by all the photographing points to determine reliability, determining whether the defect recognition accuracy is qualified based on a comparison result of the reliability and a preset reliability, and adjusting the preset reflectivity or the preset reliability based on unqualified recognition accuracy; Determining the topography of the material surface according to the grayscale gradient based on the defects with qualified identification accuracy; The process of determining the scope of the defect includes: The grayscale contrast is determined with the pixel block with defects as the center and the preset pixel distance as the spacing; comparing the grayscale contrast with a preset contrast; Determining the preset pixel distance range as the defect range based on a comparison result that the grayscale contrast is greater than or equal to the preset contrast; Determining, based on a comparison result that the grayscale contrast is less than the preset contrast, to increase the preset pixel distance by a preset amplitude to obtain a second pixel distance; Taking the defective pixel block as the center and the second pixel distance as the basis, determining a second grayscale contrast ratio; comparing the second grayscale contrast with a preset contrast until the second grayscale contrast is greater than the preset contrast, and determining the second pixel distance range as a defect range; The reliability determination process includes: Taking any of the defect ranges as a reference, fitting the remaining defect ranges to determine the degree of fit; comparing the fitness with a preset fitness; Determining that the defect ranges overlap based on a comparison result that the degree of fit is greater than or equal to the preset degree of fit; The comparison between the number of overlapping defect ranges and the number of all defect ranges is determined as the reliability; The process of determining adjustment parameters based on unqualified recognition accuracy includes: Subtracting the preset reliability from the reliability to obtain a difference percentage; Determining to increase the preset reflectivity based on a comparison result that the difference percentage is greater than a preset percentage; Determining to increase the preset reliability based on a comparison result that the difference percentage is less than or equal to the preset percentage; The process of adjusting the preset reflectivity includes: Determining the grayscale entropy of the defect range, and comparing the grayscale entropy with a preset entropy; Determining, based on a comparison result that the grayscale entropy is greater than the preset entropy, to increase the preset reflectivity by a first adjustment coefficient; The process of adjusting the preset reliability includes: Determining an inverse moment of the defect range, and comparing the inverse moment with a preset inverse moment; Based on the comparison result that the inverse moment difference is less than the preset inverse moment difference, it is determined to increase the preset reliability by a second adjustment coefficient.
2. The surface micro-morphology measurement method based on grayscale depth according to claim 1, characterized in that: The process of determining the number of shooting points based on the reflectivity includes: comparing the reflectivity with a preset reflectivity; Determining the number of shooting points as a first number based on a comparison result that the reflectivity is greater than the preset reflectivity; The number of shooting points is determined to be a second number based on a comparison result that the reflectivity is less than or equal to the preset reflectivity.
3. The surface micro-morphology measurement method based on grayscale depth according to claim 2, characterized in that: The process of determining whether the pixel block has a defect according to the grayscale gradient includes: comparing the grayscale gradient with a preset grayscale gradient; The pixel block is determined to be defective based on a comparison result that the grayscale gradient is greater than the preset grayscale gradient.
4. The surface micro-topography measurement method based on grayscale depth according to claim 3, characterized in that: The process of determining whether the defect recognition accuracy is qualified based on the reliability includes: comparing the reliability with a preset reliability; Determining that the defect recognition accuracy is qualified based on the comparison result that the reliability is greater than or equal to the preset reliability; The defect recognition accuracy is determined to be unqualified based on the comparison result that the reliability is less than the preset reliability.
5. The surface micro-topography measurement method based on grayscale depth according to claim 4, characterized in that: For defects with qualified recognition accuracy, the three-dimensional morphology of the defect is determined according to the grayscale gradient, and the three-dimensional morphology of the material surface is determined according to the grayscale gradient based on the defect.
Citation Information
Patent Citations
Multi-spectrum microscopic three-dimensional morphology detection device and method
CN110726380A
Temperature measurement method and device and computer storage medium
CN111982305A
Rapid detection method and system for multiple defects on surface of aluminum valve plate, medium and terminal
CN113252567A