A roughness measurement method based on benchmark image quality algorithm
Through the roughness measurement method based on the benchmark image quality algorithm, combined with visual saliency and structural information, the limitations of roughness measurement accuracy and automated application in the existing technology are solved, and efficient and accurate roughness detection of grinding specimens is achieved. Suitable for high-standard automated online measurements.
Patent Information
- Application Number
- CN202210871414.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-07-22
- Publication Date
- 2024-10-18
- Estimated Expiration
- 2042-07-22
AI Technical Summary
Among existing roughness measurement methods, contact measurement has systematic errors and scratch risks, and non-contact optical measurement equipment is expensive and highly affected by the environment, making it difficult to achieve high-precision and efficient automated online measurement.
A roughness measurement method based on a benchmark image quality algorithm is adopted. By setting up a grinding sample block and an image collector, a roughness prediction model is constructed using image feature values under different light source levels. This method combines visual saliency and structural information to improve measurement accuracy and Reduce the impact of changes in light source brightness.
It achieves high-precision non-contact measurement of grinding sample roughness, is simple and efficient, can maintain measurement accuracy under different light source conditions, and is suitable for high-standard automated online inspection.
Smart Images

Figure CN115265422B_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the technical field of roughness measurement, in particular to a roughness measurement method based on a reference image quality algorithm. Background Art
[0002] Roughness measurement methods can be divided into contact measurement and non-contact measurement. Contact measurement is mainly based on stylus profilometers, while non-contact measurement is mainly based on optical measurement. Stylus measurement is line sampling, which cannot accurately characterize the surface roughness of an area. In addition, the accuracy of stylus measurement is limited by the radius of the stylus. When the surface roughness is less than 2.5μm, there is a certain systematic error in stylus measurement, and contact measurement cannot completely avoid scratches on the workpiece surface. Furthermore, stylus measurement has high environmental requirements and is inconvenient to operate, so it cannot be used for high-standard automated online measurement. Non-contact optical measurement methods are limited in their application in the engineering field due to their expensive equipment, great influence from the production site environment, inconvenient operation, and low efficiency.
[0003] Since the measurement technology based on machine vision has the advantages of large amount of information acquisition, high precision, non-contact, high efficiency, good flexibility, and high cost performance, it has been applied to roughness measurement by many scholars and has achieved a series of good results. Roughness measurement based on machine vision is essentially a measurement method based on optical principles. The main process is to use an industrial camera to collect the surface image of the workpiece, and then extract the characteristic indicators related to the surface roughness parameters in the image, and build a relationship model between the characteristic indicators and the roughness, and then predict the surface roughness of the sample to be tested by image sampling. However, the indicators in the prior art do not have benchmark indicators. After changing the brightness of the light source, the numerical value of the indicator changes greatly, and it is difficult to achieve robustness to the light source. Summary of the invention
[0004] The purpose of this section is to summarize some aspects of embodiments of the present invention and briefly introduce some preferred embodiments. Some simplifications or omissions may be made in this section and the specification abstract and the invention title of this application to avoid blurring the purpose of this section, the specification abstract and the invention title, and such simplifications or omissions cannot be used to limit the scope of the present invention.
[0005] In view of the above and / or existing problems in the existing roughness measurement, the present invention is proposed.
[0006] Therefore, an object of the present invention is to provide a roughness measurement method based on a reference image quality algorithm, which can detect the roughness of a grinding sample block with high accuracy.
[0007] In order to solve the above technical problems, the present invention provides the following technical solutions: a roughness measurement method based on a benchmark image quality algorithm, the measuring device used includes a workbench, a color block and an image collector, a grinding sample block is arranged on the upper side of the workbench, the detection surface of the grinding sample block is placed horizontally with the grinding sample block facing upward, the angle between the light emitted by the light source through the color block and the upper surface of the grinding sample block is 45°, the angle between the optical axis of the image collector and the upper surface of the grinding sample block is 45°, and the angle between the optical axis of the image collector and the light irradiated on the upper surface of the grinding sample block is 90°, comprising the following steps:
[0008] Set N calibrated samples and set the initial value of the number of shots i to 1;
[0009] Use the camera to shoot the i-th sample block;
[0010] Assign the value after i+1 to the new i;
[0011] Determine whether the new i exceeds N. If i is not greater than N, return to the shooting step, otherwise the shooting ends;
[0012] The feature value of each image is calculated and a roughness prediction model is constructed.
[0013] As a preferred solution of the roughness measurement method based on the benchmark image quality algorithm described in the present invention, the light source has m different levels.
[0014] In order to further realize the calculation of image eigenvalues, the eigenvalue VSISSIM of the i-th image is calculated as follows:
[0015]
[0016]
[0017]
[0018]
[0019]
[0020]
[0021]
[0022]
[0023] VS m (x) = max(VS1(x),VS2(x));
[0024]
[0025] The range of Ω is the spatial domain of the entire image, VS1(x) is the local visual saliency value of the first image, VS2(x) is the local visual saliency value of the second image, G1(x) is the local gradient value of the first image, G2(x) is the local gradient value of the second image, G(x) is the local gradient of the image, G x (x) is the local lateral gradient of the image, G y (x) is the local longitudinal gradient of the image, S C (x) is the chromaticity similarity of the two images, M1(x) is the M channel of the first image, M2(x) is the M channel of the second image, N1(x) is the N channel of the first image, N2(x) is the N channel of the second image, C1 is a constant set to avoid the denominator being 0, C2 is a constant set to avoid the denominator being 0, C3 is a constant set to avoid the denominator being 0, R, G, B are the red, green, and blue channels of the image, respectively, VS m (x) is the maximum local visual saliency of the two images, that is, the local weight, σ1(x) is the standard deviation of the first image, σ2(x) is the standard deviation of the second image, and σ 12 is the covariance of the two images, and C4 is a constant set to avoid 0 in the denominator.
[0026] In order to further realize the detection of roughness, the roughness value of each sample under different light source levels is:
[0027]
[0028]
[0029] It is the curve with the highest fitting coefficient among m light source brightness levels, n=1, 2, 3, 4...N, N is the total number of samples, n is the index value of N samples, m is the number of light source brightness levels, and f(x) is the correlation curve between roughness and VSISSIM eigenvalue under the corresponding light source level.
[0030] The beneficial effects of the present invention are as follows: the present invention provides a simple, efficient and scientific detection method for non-contact measurement of grinding surface roughness, combines visual saliency with structural information to further highlight image features, and uses local structural information as regional weights to weight the entire image, which can better reflect the differences in roughness of different areas on the grinding sample surface and improve the measurement accuracy of roughness. BRIEF DESCRIPTION OF THE DRAWINGS
[0031] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the following briefly introduces the drawings required for describing the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative labor. Among them:
[0032] Figure 1 It is a schematic diagram of the structure of the measuring device in the present invention.
[0033] Figure 2 This is a relationship diagram between roughness and characteristic value VSISSIM when the light source level is 55 in the present invention.
[0034] Figure 3 This is a relationship diagram between roughness and characteristic value VSISSIM when the light source level is 65 in the present invention.
[0035] Figure 4 This is a relationship diagram between roughness and characteristic value VSISSIM when the light source level is 75 in the present invention.
[0036] Figure 5 This is a relationship diagram between roughness and characteristic value VSISSIM when the light source level is 85 in the present invention.
[0037] Figure 6 This is a relationship diagram between roughness and characteristic value VSISSIM when the light source level is 95 in the present invention.
[0038] Among them, 1 virtual image, 2 color block, 3 light source, 4 image collector, 5 computer, 6 grinding sample block. DETAILED DESCRIPTION
[0039] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, the specific implementation methods of the present invention are described in detail below in conjunction with the accompanying drawings.
[0040] In the following description, many specific details are set forth to facilitate a full understanding of the present invention, but the present invention may also be implemented in other ways different from those described herein, and those skilled in the art may make similar generalizations without violating the connotation of the present invention. Therefore, the present invention is not limited to the specific embodiments disclosed below.
[0041] Secondly, the term "one embodiment" or "embodiment" as used herein refers to a specific feature, structure, or characteristic that may be included in at least one implementation of the present invention. The term "in one embodiment" that appears in different places in this specification does not necessarily refer to the same embodiment, nor does it refer to a separate or selective embodiment that is mutually exclusive with other embodiments.
[0042] Example 1
[0043] Reference Figure 1 , which is the first embodiment of the present invention, provides a roughness measurement method based on a benchmark image quality algorithm. The measuring device is used to measure the roughness of all tooth surfaces of the grinding gear, which is convenient for detection and highly efficient.
[0044] A roughness measurement method based on a benchmark image quality algorithm, wherein a measuring device used in the measurement comprises a workbench, a color block and an image collector, a grinding sample block is arranged on the upper side of the workbench, a detection surface of the grinding sample block is placed horizontally with the grinding sample block facing upward, an angle of 45° between the light emitted by the light source through the color block and the upper surface of the grinding sample block, an angle of 45° between the optical axis of the image collector and the upper surface of the grinding sample block, and an angle of 90° between the optical axis of the image collector and the light irradiated on the upper surface of the grinding sample block, comprising the following steps:
[0045] Set N calibrated samples and set the initial value of the number of shots i to 1;
[0046] Use the camera to shoot the i-th sample block;
[0047] Assign the value after i+1 to the new i;
[0048] Determine whether the new i exceeds N. If i is not greater than N, return to the shooting step, otherwise the shooting ends;
[0049] Calculate the feature value of each image and build a roughness prediction model;
[0050] Among them, the light source has m different levels.
[0051] In order to further realize the calculation of image eigenvalues, the eigenvalue VSISSIM of the i-th image is calculated as follows:
[0052]
[0053]
[0054]
[0055]
[0056]
[0057]
[0058]
[0059]
[0060] VS m(x) = max(VS1(x),VS2(x));
[0061]
[0062] The range of Ω is the spatial domain of the entire image, VS1(x) is the local visual saliency value of the first image, VS2(x) is the local visual saliency value of the second image, G1(x) is the local gradient value of the first image, G2(x) is the local gradient value of the second image, G(x) is the local gradient of the image, G x (x) is the local lateral gradient of the image, G y (x) is the local longitudinal gradient of the image, S C (x) is the chromaticity similarity of the two images, M1(x) is the M channel of the first image, M2(x) is the M channel of the second image, N1(x) is the N channel of the first image, N2(x) is the N channel of the second image, C1 is a constant set to avoid the denominator being 0, C1 is taken as 1.27, C2 is a constant set to avoid the denominator being 0, C2 is taken as 386, C3 is a constant set to avoid the denominator being 0, C3 is taken as 130, R, G, B are the red, green, and blue channels of the image respectively, VS m (x) is the maximum local visual saliency of the two images, that is, the local weight, σ1(x) is the standard deviation of the first image, σ2(x) is the standard deviation of the second image, and σ 12 is the covariance of the two pictures, C4 is a constant set to avoid 0 in the denominator, usually C4 = (K1×L)^2, generally K1 = 0.01, L = 255 (L is the dynamic range of pixel values, usually 255).
[0063] Assume that there are m different levels of light sources and n calibrated samples. First, use a CCD camera to shoot n samples at each light source level to obtain n pictures (the picture with the smallest roughness is set as the reference picture). Then, each picture will get a characteristic value from the VSISSIM indicator. Finally, the n characteristic values and the corresponding roughness of the n samples are fitted using the least squares method to obtain the corresponding curve of the sample roughness and the VSISSIM characteristic value at the light source level. The corresponding relationship is as follows:
[0064]
[0065] The one with the highest correlation coefficient (R 2 max ) as the reference curve, then the difference coefficients of the remaining light source level fitting curves relative to the reference curve can be expressed as:
[0066]
[0067] The fitting curves under different light source levels can be transformed into the reference curve:
[0068] The roughness value of each sample under different light source levels is:
[0069]
[0070] is the characteristic value corresponding to the curve with the highest fitting coefficient among m light source brightness levels, n = 1, 2, 3, 4...N, N is the total number of samples, n is the index value of N samples, m is the number of light source brightness levels, is the eigenvalue of n samples under m light source brightness levels, n=1, 2, 3, 4…N, n is the index value of N samples, m is the number of light source brightness levels, and f(x) is the correlation curve between roughness and VSISSIM eigenvalue under corresponding light source levels.
[0071] Example 2
[0072] Reference Figure 2 , which is the second embodiment of the present invention. This embodiment uses scientific experiments to verify the technical effect of the measurement method. Specifically, the color block consists of two small blocks, one half is red and the other half is green. The size of the color block is 150mm×150mm, the angle between the color block and the surface of the specimen is 45°, and the LED white light source is placed vertically. At the same time, the angle between the LED white light source and the color block is 45°. The optical axis of the camera is parallel to the color block and perpendicular to the virtual image of the color block. The light emitted from the LED white light source is converted into a red and green structure light source through the color block. The red and green structure light sources are reflected by the surface of the grinding sample block, forming a virtual image on its surface and captured by the CCD camera. The CCD camera is connected to a computer and can observe and collect images online. The relative positions of the color block, sample and CCD camera are controlled by parameters D1, D2, D3, H1 and H2. In this article, the values of parameters D1, D2, D3, H1 and H2 are 100mm, 220mm, 245mm, 60mm and 100mm, respectively. Considering the stroboscopic phenomenon of fluorescent lamps, this experiment uses LED white light sources, and the light source controller quantitatively controls the light source brightness levels to 55, 65, 75, 85, and 95, corresponding to 603lux, 733lux, 863lux, 991lux, and 1119lux, respectively. To avoid the influence of ambient light, the experiment was conducted in a dark box.
[0073] The image acquisition device is a 5-megapixel Basler color CCD camera, the light source is an OPT-CO100 LED white light source, and is connected to a computer using a light source controller. The computer runs on a 64-bit Windows 10 system, and OPTControllerDemo software and Plyon View software (which are prior arts) are installed on the computer. The OPT ControllerDemo software combines with the light source controller to quantitatively control the light source level (the light source has 256 brightness levels), and the Plyon View software is used to control the CCD camera to capture and save sample pictures.
[0074] During measurement, image sampling is first performed, and during sampling, the red and green areas are kept equal as much as possible, and the sampling areas of each original image are kept consistent; the surface roughness of the sample block is numerically calibrated, and the process is to use a stylus-type roughness measuring device to measure the texture parameters of each sample block six times (the movement direction of the stylus is perpendicular to the texture direction of the sample block), and in order to objectively characterize the true roughness of the sample block surface, the sampling area is evenly distributed, and the average value is taken as the roughness of the sample block; the proposed characteristic index value is calculated based on the collected image; a prediction model is constructed according to the content in Example 1, firstly, a prediction function is selected, and a function R=f(x) is constructed (R represents the roughness parameter, and x represents the image characteristic index value); secondly, the function parameters are solved in a way that minimizes the error, that is, min[f(x i )-y i ] 2 This determines the equation, where (x i ,y i ) is the given data point to be fitted; finally, by comparing different prediction functions, the one with the smallest error among all models and a monotonic relationship between roughness and characteristic indicators is selected as the prediction model.
[0075] Taking the light source level 55 as an example, the least squares method is used to build a prediction model, such as Figure 2 As shown in Figure 2, there is a strong correlation between the improved VSISSIM index and Ra. 2 The value of reached 0.98;
[0076] Taking the light source level 65 as an example, the least squares method is used to build a prediction model, such as Figure 3 As shown in Figure 2, there is a strong correlation between the improved VSISSIM index and Ra. 2 The value reached 0.94.
[0077] Taking the light source level 75 as an example, the least squares method is used to build a prediction model, such as Figure 4 As shown in Figure 2, there is a strong correlation between the improved VSISSIM index and Ra. 2 The value reached 0.96.
[0078] Taking the light source level 85 as an example, the least squares method is used to build a prediction model, such as Figure 4 As shown in Figure 2, there is a strong correlation between the improved VSISSIM index and Ra. 2 The value reached 0.95.
[0079] Taking the light source level 95 as an example, the least squares method is used to build a prediction model, such as Figure 4 As shown in Figure 2, there is a strong correlation between the improved VSISSIM index and Ra. 2 The value reached 0.96.
[0080] From the above, it can be seen that there is a strong correlation between the indicators designed by the present invention under different light sources and the Ra roughness, and as the brightness level of the light source changes, the curve trend between different light sources remains almost unchanged. It can be seen that the influence of the light source on the indicator can be ignored, thereby achieving robustness to the light source.
[0081] It should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that the technical solutions of the present invention may be modified or replaced by equivalents without departing from the spirit and scope of the technical solutions of the present invention, which should all be included in the scope of the claims of the present invention.
Claims
1. A roughness measurement method based on a benchmark image quality algorithm, characterized in that: The measuring device used includes a workbench, a color block and an image collector. A grinding sample block is arranged on the upper side of the workbench. The detection surface of the grinding sample block is placed horizontally with the detection surface facing upward. The angle between the light emitted by the light source through the color block and the upper surface of the grinding sample block is 45°. The angle between the optical axis of the image collector and the upper surface of the grinding sample block is 45°. The angle between the optical axis of the image collector and the light irradiated on the upper surface of the grinding sample block is 90°. The following steps are included: Set N calibrated samples and set the initial value of the number of shots i to 1; Use the camera to shoot the i-th sample block; Assign the value after i+1 to the new i; Determine whether the new i exceeds N. If i is not greater than N, return to the shooting step, otherwise the shooting ends; Calculate the feature value of each image and build a roughness prediction model; The light source has m different levels; The characteristic value VSISSIM of the i-th image is calculated as follows: VS m (x)=max(VS1(x),VS2(x)); The range of Ω is the spatial domain of the entire image, VS1(x) is the local visual saliency value of the first image, VS2(x) is the local visual saliency value of the second image, G1(x) is the local gradient value of the first image, G2(x) is the local gradient value of the second image, G(x) is the local gradient of the image, G x (x) is the local lateral gradient of the image, G y (x) is the local longitudinal gradient of the image, S C (x) is the chromaticity similarity of the two images, M1(x) is the M channel of the first image, M2(x) is the M channel of the second image, N1(x) is the N channel of the first image, N2(x) is the N channel of the second image, C1 is a constant set to avoid the denominator being 0, C2 is a constant set to avoid the denominator being 0, C3 is a constant set to avoid the denominator being 0, R, G, B are the red, green, and blue channels of the image respectively, VS m (x) is the maximum local visual saliency of the two images, that is, the local weight, σ1(x) is the standard deviation of the first image, σ2(x) is the standard deviation of the second image, and σ 12 is the covariance of the two images, and C4 is a constant set to avoid 0 in the denominator; The roughness value of each sample under different light source levels is, It is the curve with the highest fitting coefficient among m light source brightness levels, n=1, 2, 3, 4...N, N is the total number of samples, n is the index value of N samples, m is the number of light source brightness levels, and f(x) is the correlation curve between roughness and VSISSIM eigenvalue under the corresponding light source level.
