A high-precision Brinell hardness measurement method and system based on machine vision

Through high-precision measurement methods based on machine vision, using laser cameras to collect images and establish a Brinell hardness prediction model, the problem of low detection efficiency of existing Brinell hardness test methods is solved, and high-precision and real-time measurement effects are achieved.

CN119043885BActive Publication Date: 2025-03-11JINAN FENGZHI TEST INSTR CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411533603.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-10-31
Publication Date
2025-03-11
Estimated Expiration
2044-10-31

AI Technical Summary

Technical Problem

The existing Brinell hardness test methods are too specialized and the detection efficiency cannot meet the actual needs.

Method used

Using a high-precision measurement method based on machine vision, a laser camera is installed to collect the surface images of the measured sample under different pressures, a training set is established and data preprocessed, a Brinell hardness prediction model is established using a polynomial fitting method, and the model is optimized through the least squares method to achieve high-precision measurement.

Benefits of technology

It improves the accuracy and efficiency of Brinell hardness measurement, realizes real-time high-precision measurement, and meets actual detection needs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119043885B_ABST
    Figure CN119043885B_ABST
Patent Text Reader

Abstract

The present invention relates to the technical field of material hardness measurement, and discloses a high-precision Brinell hardness measurement method and system based on machine vision. The invention collects surface images of measurement samples under different pressures, and collects reference points in the photographed surface images of the measurement samples to establish a training set. At the same time, the surface images of the measurement samples in the training set are preprocessed by data processing, and based on the obtained preprocessed surface images of the measurement samples, the influence of pressure on the image parameters taken by the laser camera is calculated by a polynomial fitting method, and a Brinell hardness prediction model of the surface of the measurement sample is established. At the same time, the established Brinell hardness prediction model is optimized by the least squares method, and the optimal Brinell hardness prediction model is output. The Brinell hardness of different materials is predicted based on the optimal Brinell hardness prediction model, and the precise range of Brinell hardness data of different materials is calculated by a uniform distribution prediction method, thereby improving the accuracy of high-precision Brinell hardness measurement.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of material hardness measurement, and in particular to a high-precision Brinell hardness measurement method and system based on machine vision. Background Art

[0002] As the requirements for product quality become more and more stringent, the hardness of products has become an important way to test product quality. Among the standardized hardness test methods, the Brinell hardness test is a static test with high measurement accuracy, which can better reflect product quality. However, since the Brinell hardness test is too specialized, the detection efficiency cannot meet actual needs.

[0003] There is an existing Chinese patent application CN113702232A. This method uses a microscope to measure multiple self-contained indentations on a selected standard Brinell hardness block, obtains the corresponding hardness value of each indentation by looking up a table, and selects the indentation closest to the given hardness value of the selected standard Brinell hardness block as the standard indentation; at the same time, the standard indentation is measured multiple times by a fully automatic Brinell indentation measurement system to obtain a hardness measurement result; the indication repeatability and indication error of the fully automatic Brinell indentation measurement system are calculated; the calculated indication repeatability and indication error are compared with the technical indicators of the fully automatic Brinell indentation measurement system to obtain a hardness measurement result. However, since this method only verifies the measured hardness measurement result, it has certain limitations. Summary of the invention

[0004] 1. Technical issues to be resolved

[0005] In view of the shortcomings of the prior art, the present invention provides a high-precision Brinell hardness measurement method and system based on machine vision, which has the advantages of accuracy, efficiency, and real-time, and solves the problem that the Brinell hardness test is too specialized and the detection efficiency cannot meet actual needs.

[0006] (II) Technical solution

[0007] In order to solve the technical problem that the Brinell hardness test is too specialized and the detection efficiency cannot meet the actual needs, the present invention provides the following technical solutions:

[0008] This embodiment discloses a high-precision Brinell hardness measurement method based on machine vision, which specifically includes the following steps:

[0009] S1. Install a laser camera to collect surface images of the measurement sample under different pressures, and collect reference points in the captured surface images of the measurement sample to establish a training set;

[0010] S2. Preprocessing the surface images of the measured samples in the training set by means of data processing to obtain preprocessed surface images of the measured samples;

[0011] S3. Based on the obtained preprocessed surface image of the measurement sample, the influence of pressure on the image parameters taken by the laser camera is calculated by a polynomial fitting method, and a Brinell hardness prediction model of the surface of the measurement sample is established;

[0012] S4. Optimizing the established Brinell hardness prediction model by the least square method, outputting the optimal Brinell hardness prediction model, and predicting the Brinell hardness of different materials based on the optimal Brinell hardness prediction model;

[0013] S5. Based on the predicted Brinell hardness data of different materials, the precise range of the Brinell hardness data of different materials is calculated by uniform distribution prediction.

[0014] The present invention establishes a training set by collecting surface images of measurement samples under different pressures and collecting reference points in the photographed surface images of the measurement samples. At the same time, the surface images of the measurement samples in the training set are preprocessed by a data processing method. Based on the obtained preprocessed surface images of the measurement samples, the influence of pressure on the image parameters taken by the laser camera is calculated by a polynomial fitting method, and a Brinell hardness prediction model of the surface of the measurement sample is established. At the same time, the established Brinell hardness prediction model is optimized by the least squares method, and the optimal Brinell hardness prediction model is output. The Brinell hardness of different materials is predicted based on the optimal Brinell hardness prediction model. At the same time, the precise range of the Brinell hardness data of different materials is calculated by a uniform distribution prediction method, thereby improving the accuracy of high-precision measurement of Brinell hardness.

[0015] Preferably, the laser camera is installed to collect the surface images of the measurement sample under different pressures, and the reference points in the captured surface images of the measurement sample are collected, and the establishment of the training set includes the following steps:

[0016] Set the positions of all reference points on the surface of the measuring sample, and fix the relative position of the camera and the surface of the measuring sample, so that the reference points on the surface of the measuring sample are evenly distributed in the entire camera field of view;

[0017] Set the pressure level and pressure holding time during the measurement process;

[0018] During the measurement process, the laser camera shooting interval is preset, and the surface image of the measurement sample shot by the laser camera at each set pressure is collected;

[0019] The image of the measurement sample surface taken by the laser camera when the pressure is set to 0 is the standard image;

[0020] The surface images of the measured specimens and the standard images taken by the laser camera at each set pressure are summarized and a training set is established.

[0021] The present invention installs a laser camera to collect surface images of the measurement sample under different pressures and sets a plurality of evenly distributed reference points in the surface images of the measurement sample. Meanwhile, during the measurement process, a shooting interval of the laser camera is preset to collect the surface images of the measurement sample taken by the laser camera under each set pressure, thereby ensuring the reliability of image acquisition.

[0022] Preferably, the preprocessing of the measured sample surface images in the training set by data processing to obtain the preprocessed measured sample surface images comprises the following steps:

[0023] S21, segmenting the surface image of the measurement sample in the training set by means of threshold segmentation to obtain a segmented surface image of the measurement sample;

[0024] S22, performing edge extraction on the segmented surface image of the measurement sample to obtain the surface image of the measurement sample after edge extraction;

[0025] S23, setting the measurement sample surface image after edge extraction as the measurement sample surface image after preprocessing.

[0026] Preferably, the segmentation process of the measured sample surface images in the training set by means of threshold segmentation to obtain the segmented measured sample surface images comprises the following steps:

[0027] S211, set the maximum grayscale value and the minimum grayscale value of the pixels on the surface of the sample to be measured, respectively. and , calculate the initial threshold value based on the maximum grayscale value and minimum grayscale value of the image pixels on the surface of the measured sample ;

[0028] S212, segmenting the surface image of the measurement sample based on the calculated initial threshold value, and segmenting the image into two parts according to the grayscale value of the pixels of the surface image of the measurement sample, setting the grayscale value greater than The image area is , gray value is less than or equal to The image area is ;

[0029] S213, calculate separately and Contains the mean grayscale value of the pixels and ;

[0030] S214. Calculate a new threshold ;

[0031] S215, repeat steps S212-214 until the calculated Convergence, and based on the converged The segmentation of the measurement sample surface image is completed to obtain the segmented measurement sample surface image.

[0032] Preferably, the step of performing edge extraction on the segmented surface image of the measurement sample to obtain the surface image of the measurement sample after edge extraction comprises the following steps:

[0033] A one-dimensional array is established to record the grayscale values ​​of the eight neighborhoods around each pixel of the segmented sample surface image. When the grayscale values ​​of the eight neighborhoods around the pixel are the same as the grayscale value of the center point, the pixel is set to be inside the contour and deleted.

[0034] When the grayscale values ​​of the eight neighborhoods around a pixel are different from the grayscale value of the center point, the pixel is set at the edge of the contour and is retained;

[0035] Each pixel point in the segmented measurement sample surface image is traversed and summarized to obtain the measurement sample surface image after edge extraction.

[0036] The present invention performs segmentation processing on the surface images of the measured samples in the training set by means of threshold segmentation, and simultaneously completes the processing of the surface images of the measured samples in the training set by means of edge extraction on the segmented surface images of the measured samples, thereby improving the accuracy of the surface images of the measured samples in the training set.

[0037] Preferably, the method of calculating the influence of pressure on the image parameters taken by the laser camera by a polynomial fitting method based on the obtained preprocessed surface image of the measurement sample and establishing a Brinell hardness prediction model for the surface of the measurement sample comprises the following steps:

[0038] Extract the pixel-level coordinates of all reference points on each image, record the coordinates and corresponding pressure of each reference point, and use the coordinates of the reference points extracted on the standard image as the standard coordinates to obtain a set of data ,in, To set the coordinates of the reference point, is the standard coordinate corresponding to the reference point, The standard pressure data corresponding to the standard image, the standard pressure is 0, the data of all reference points are collected, and the data set of all reference points is established;

[0039] Based on the data sets of all the reference points, the pressure deformation of the measuring sample surface is established by polynomial fitting;

[0040] The formula for measuring the pressure deformation on the sample surface is as follows:

[0041] ;

[0042] ;

[0043] in, Indicates the horizontal component offset value from the standard coordinates to the reference point coordinates, represents the vertical component offset value from the standard coordinates to the reference point coordinates, represents the horizontal component of the reference point coordinates, represents the vertical component of the reference point coordinates, Indicates the difference between standard pressure and set pressure. , express Polynomial of degree;

[0044] The Brinell hardness prediction model of the measured sample surface is set as + .

[0045] The present invention extracts and records the pixel-level coordinates of all reference points on each image, compares the recorded data with the standard data, calculates the deformation generated, and establishes a Brinell hardness prediction model for the surface of the measured sample based on the calculated deformation generated, thereby improving the efficiency of high-precision measurement of Brinell hardness.

[0046] Preferably, the method of optimizing the established Brinell hardness prediction model by the least square method, outputting the optimal Brinell hardness prediction model, and predicting the Brinell hardness of different materials based on the optimal Brinell hardness prediction model comprises the following steps:

[0047] Setting the error threshold between the fitting coordinates and the standard coordinates predicted by the Brinell hardness prediction model;

[0048] Take separately is 1, 2, ..., and calculates the error between the fitted coordinates and the standard coordinates;

[0049] When the error between the fitting coordinates and the standard coordinates is less than the set error threshold, the polynomial and coefficients of the Brinell hardness prediction model at this time are output, and the polynomial and coefficients of the Brinell hardness prediction model at this time are used as the optimal Brinell hardness prediction model;

[0050] Call the optimal Brinell hardness prediction model to predict the Brinell hardness of different materials;

[0051] The formula for predicting the Brinell hardness of different materials is as follows:

[0052] ;

[0053] in, represents the Brinell hardness of the predicted material, Indicates the set pressure data.

[0054] The present invention sets an error threshold between the fitting coordinates and the standard coordinates predicted by the Brinell hardness prediction model, and completes the establishment of the optimal Brinell hardness prediction model by processing through the least squares method. The Brinell hardness of different materials is predicted by the established optimal Brinell hardness prediction model, thereby improving the real-time performance of high-precision Brinell hardness measurement.

[0055] Preferably, the method of calculating the precise range of the Brinell hardness data of different materials by uniform distribution prediction based on the predicted Brinell hardness data of different materials comprises the following steps:

[0056] For the predicted Brinell hardness data of different materials, five reference points are evenly selected on the surface of each material, and the same pressure is set to test the selected five reference points;

[0057] After the test is completed, the deformation degree of the five reference points is collected by a laser camera, and the repeatability of the Brinell hardness data of the five reference points is calculated based on the collected deformation degree of the five reference points;

[0058] ;

[0059] in, Indicates the repeatability of Brinell hardness data, Indicates the maximum value of five Brinell hardness data. Indicates the minimum value of the five Brinell hardness data. It represents the arithmetic mean of five Brinell hardness data;

[0060] Calculate the Brinell hardness accuracy range for different materials based on the repeatability of the calculated Brinell hardness data;

[0061] The error range of Brinell hardness data is as follows:

[0062] ;

[0063] in, represents the predicted Brinell hardness data, Indicates the error range of Brinell hardness data;

[0064] The Brinell hardness data accuracy range is set to the predicted Brinell hardness data plus or minus the calculated Brinell hardness data error range.

[0065] The present invention selects reference points uniformly on the surface of each material, performs Brinell hardness measurement on each reference point, and determines the precise range of Brinell hardness data by calculating the repeatability and error of the Brinell hardness data of the reference point, thereby improving the accuracy of high-precision measurement of Brinell hardness.

[0066] This embodiment also discloses a Brinell hardness high-precision measurement system based on machine vision, comprising: a data acquisition module, a data processing module, a Brinell hardness prediction module, and a Brinell hardness determination module;

[0067] The data acquisition module is used to collect image data of different materials affected by pressure through a laser camera;

[0068] The data processing module is used to process the image data of different materials affected by pressure collected by the laser camera to obtain processed image data;

[0069] The Bournard hardness prediction module is used to establish a Bournard hardness prediction model according to the processed image data;

[0070] The Brinell hardness determination module is used to accurately optimize the established Brinell hardness prediction model.

[0071] (III) Beneficial effects

[0072] Compared with the prior art, the present invention provides a high-precision Brinell hardness measurement method and system based on machine vision, which has the following beneficial effects:

[0073] 1. The invention establishes a training set by collecting surface images of measurement samples under different pressures and collecting reference points in the photographed surface images of measurement samples. At the same time, the surface images of measurement samples in the training set are preprocessed by data processing. Based on the obtained preprocessed surface images of measurement samples, the influence of pressure on the image parameters taken by laser camera is calculated by polynomial fitting method, and a Brinell hardness prediction model of the surface of measurement samples is established. At the same time, the established Brinell hardness prediction model is optimized by least squares method, and the optimal Brinell hardness prediction model is output. The Brinell hardness of different materials is predicted based on the optimal Brinell hardness prediction model. At the same time, the precise range of Brinell hardness data of different materials is calculated by uniform distribution prediction, thereby improving the accuracy of high-precision measurement of Brinell hardness.

[0074] 2. The invention installs a laser camera to collect surface images of the measurement sample under different pressures and sets multiple evenly distributed reference points in the surface images of the measurement sample. At the same time, during the measurement process, the laser camera shooting interval is preset to collect the surface images of the measurement sample taken by the laser camera at each set pressure, thereby ensuring the reliability of image acquisition.

[0075] 3. The present invention segments the surface images of the measured samples in the training set by means of threshold segmentation, and at the same time completes the processing of the surface images of the measured samples in the training set by means of edge extraction on the segmented surface images of the measured samples, thereby improving the accuracy of the surface images of the measured samples in the training set.

[0076] 4. The invention extracts and records the pixel-level coordinates of all reference points on each image, compares the recorded data with the standard data, calculates the amount of deformation, and establishes a Brinell hardness prediction model for the surface of the measured sample based on the calculated deformation, thereby improving the efficiency of high-precision measurement of Brinell hardness.

[0077] 5. The present invention sets an error threshold between the fitting coordinates and the standard coordinates predicted by the Brinell hardness prediction model, and completes the establishment of the optimal Brinell hardness prediction model through least squares processing. The Brinell hardness of different materials is predicted through the established optimal Brinell hardness prediction model, thereby improving the real-time performance of high-precision Brinell hardness measurement.

[0078] 6. The invention improves the accuracy of high-precision measurement of Brinell hardness by evenly selecting reference points on the surface of each material and measuring the Brinell hardness of each reference point. The invention determines the precise range of the Brinell hardness data by calculating the repeatability and error of the Brinell hardness data of the reference point. BRIEF DESCRIPTION OF THE DRAWINGS

[0079] Figure 1 It is a schematic diagram of the structure of the Brinell hardness high-precision measurement process of the present invention. DETAILED DESCRIPTION

[0080] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0081] Example 1

[0082] See also Figure 1 This embodiment discloses a high-precision Brinell hardness measurement method based on machine vision, which specifically includes the following steps:

[0083] S1. Install a laser camera to collect surface images of the measurement sample under different pressures, and collect reference points in the captured surface images of the measurement sample to establish a training set;

[0084] Install a laser camera, collect surface images of the measurement sample under different pressures, and collect reference points in the captured surface images of the measurement sample. Establishing a training set includes the following steps:

[0085] Set the positions of all reference points on the surface of the measuring sample, and fix the relative position of the camera and the surface of the measuring sample, so that the reference points on the surface of the measuring sample are evenly distributed in the entire camera field of view;

[0086] Set the pressure level and pressure holding time during the measurement process;

[0087] During the measurement process, the laser camera shooting interval is preset, and the surface image of the measurement sample shot by the laser camera at each set pressure is collected;

[0088] Furthermore, the surface image of the measurement sample taken by the laser camera when the pressure is set to 0 is a standard image;

[0089] The surface images of the measured specimens and the standard images taken by the laser camera at each set pressure are summarized and a training set is established.

[0090] S2. Preprocessing the surface images of the measured samples in the training set by means of data processing to obtain preprocessed surface images of the measured samples;

[0091] Preprocessing the measured sample surface images in the training set by data processing to obtain the preprocessed measured sample surface images includes the following steps:

[0092] S21, segmenting the surface image of the measurement sample in the training set by means of threshold segmentation to obtain a segmented surface image of the measurement sample;

[0093] S211, set the maximum grayscale value and the minimum grayscale value of the pixels on the surface of the sample to be measured, respectively. and , calculate the initial threshold value based on the maximum grayscale value and minimum grayscale value of the image pixels on the surface of the measured sample ;

[0094] S212, segmenting the surface image of the measurement sample based on the calculated initial threshold value, and segmenting the image into two parts according to the grayscale value of the pixels of the surface image of the measurement sample, setting the grayscale value greater than The image area is , gray value is less than or equal to The image area is ;

[0095] S213, calculate separately and Contains the mean grayscale value of the pixels and ;

[0096] S214. Calculate a new threshold ;

[0097] S215, repeat steps S212-214 until the calculated Convergence, and based on the converged The segmentation of the surface image of the measurement sample is completed to obtain the segmented surface image of the measurement sample;

[0098] S22, performing edge extraction on the segmented surface image of the measurement sample to obtain the surface image of the measurement sample after edge extraction;

[0099] A one-dimensional array is established to record the grayscale values ​​of the eight neighborhoods around each pixel of the segmented sample surface image. When the grayscale values ​​of the eight neighborhoods around the pixel are the same as the grayscale value of the center point, the pixel is set to be inside the contour and deleted.

[0100] When the grayscale values ​​of the eight neighborhoods around a pixel are different from the grayscale value of the center point, the pixel is set at the edge of the contour and is retained;

[0101] Traversing and summarizing each pixel point in the segmented measurement sample surface image to obtain the measurement sample surface image after edge extraction;

[0102] S23, setting the measured sample surface image after edge extraction as the measured sample surface image after preprocessing;

[0103] S3. Based on the obtained preprocessed surface image of the measurement sample, the influence of pressure on the image parameters taken by the laser camera is calculated by a polynomial fitting method, and a Brinell hardness prediction model of the surface of the measurement sample is established;

[0104] Based on the obtained preprocessed surface image of the measurement sample, the influence of pressure on the image parameters taken by the laser camera is calculated by a polynomial fitting method, and a Brinell hardness prediction model of the surface of the measurement sample is established, including the following steps:

[0105] Extract the pixel-level coordinates of all reference points on each image, record the coordinates and corresponding pressure of each reference point, and use the coordinates of the reference points extracted on the standard image as the standard coordinates to obtain a set of data ,in, To set the coordinates of the reference point, is the standard coordinate corresponding to the reference point, The standard pressure data corresponding to the standard image, the standard pressure is 0, the data of all reference points are collected, and the data set of all reference points is established;

[0106] Based on the data sets of all the reference points, the pressure deformation of the measuring sample surface is established by polynomial fitting;

[0107] The formula for measuring the pressure deformation on the sample surface is as follows:

[0108] ;

[0109] ;

[0110] in, Indicates the horizontal component offset value from the standard coordinates to the reference point coordinates, represents the vertical component offset value from the standard coordinates to the reference point coordinates, represents the horizontal component of the reference point coordinates, represents the vertical component of the reference point coordinates, Indicates the difference between standard pressure and set pressure. , express Polynomial of degree;

[0111] Furthermore, the Brinell hardness prediction model of the measured sample surface is set as + ;

[0112] S4. Optimizing the established Brinell hardness prediction model by the least square method, outputting the optimal Brinell hardness prediction model, and predicting the Brinell hardness of different materials based on the optimal Brinell hardness prediction model;

[0113] Setting the error threshold between the fitting coordinates and the standard coordinates predicted by the Brinell hardness prediction model;

[0114] Take separately is 1, 2, ..., and calculates the error between the fitted coordinates and the standard coordinates;

[0115] When the error between the fitting coordinates and the standard coordinates is less than the set error threshold, the polynomial and coefficients of the Brinell hardness prediction model at this time are output, and the polynomial and coefficients of the Brinell hardness prediction model at this time are used as the optimal Brinell hardness prediction model;

[0116] Call the optimal Brinell hardness prediction model to predict the Brinell hardness of different materials;

[0117] The formula for predicting the Brinell hardness of different materials is as follows:

[0118] ;

[0119] in, represents the Brinell hardness of the predicted material, Indicates the set pressure data;

[0120] S5. Based on the predicted Brinell hardness data of different materials, the precise range of Brinell hardness data of different materials is calculated by uniform distribution prediction;

[0121] Based on the predicted Brinell hardness data of different materials, the precise range of Brinell hardness data of different materials is calculated by uniform distribution prediction, including the following steps:

[0122] For the predicted Brinell hardness data of different materials, five reference points are evenly selected on the surface of each material, and the same pressure is set to test the selected five reference points;

[0123] After the test is completed, the deformation degree of the five reference points is collected by a laser camera, and the repeatability of the Brinell hardness data of the five reference points is calculated based on the collected deformation degree of the five reference points;

[0124] ;

[0125] in, Indicates the repeatability of Brinell hardness data, Indicates the maximum value of five Brinell hardness data. Indicates the minimum value of the five Brinell hardness data. It represents the arithmetic mean of five Brinell hardness data;

[0126] Calculate the Brinell hardness accuracy range for different materials based on the repeatability of the calculated Brinell hardness data;

[0127] The error range of Brinell hardness data is as follows:

[0128] ;

[0129] in, represents the predicted Brinell hardness data, Indicates the error range of Brinell hardness data;

[0130] Furthermore, the Brinell hardness data accuracy range is the predicted Brinell hardness data plus or minus the calculated Brinell hardness data error range;

[0131] Example 2

[0132] This embodiment also discloses a Brinell hardness high-precision measurement system based on machine vision, comprising: a data acquisition module, a data processing module, a Brinell hardness prediction module, and a Brinell hardness determination module;

[0133] The data acquisition module is used to collect image data of different materials affected by pressure through a laser camera;

[0134] The data processing module is used to process the image data of different materials affected by pressure collected by the laser camera to obtain processed image data;

[0135] The Bournard hardness prediction module is used to establish a Bournard hardness prediction model according to the processed image data;

[0136] The Brinell hardness determination module is used to accurately optimize the established Brinell hardness prediction model.

[0137] Although embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that various changes, modifications, substitutions and variations may be made to the embodiments without departing from the principles and spirit of the present invention, and that the scope of the present invention is defined by the appended claims and their equivalents.

Claims

1. A high-precision Brinell hardness measurement method based on machine vision, characterized in that: The following steps are involved: S1. Install a laser camera to collect surface images of the measurement sample under different pressures, and collect reference points in the captured surface images of the measurement sample to establish a training set; S2. Preprocessing the surface images of the measured samples in the training set by means of data processing to obtain preprocessed surface images of the measured samples; S3. Based on the obtained preprocessed surface image of the measurement sample, the influence of pressure on the image parameters taken by the laser camera is calculated by a polynomial fitting method, and a Brinell hardness prediction model of the surface of the measurement sample is established; S4. Optimizing the established Brinell hardness prediction model by the least square method, outputting the optimal Brinell hardness prediction model, and predicting the Brinell hardness of different materials based on the optimal Brinell hardness prediction model; S5. Based on the predicted Brinell hardness data of different materials, the precise range of Brinell hardness data of different materials is calculated by uniform distribution prediction; The method of calculating the influence of pressure on the image parameters taken by the laser camera by a polynomial fitting method based on the obtained preprocessed surface image of the measurement sample and establishing a Brinell hardness prediction model for the surface of the measurement sample includes the following steps: Extract the pixel-level coordinates of all reference points on each image, record the coordinates and corresponding pressure of each reference point, and use the coordinates of the reference points extracted on the standard image as the standard coordinates to obtain a set of data ,in, To set the coordinates of the reference point, is the standard coordinate corresponding to the reference point, The standard pressure data corresponding to the standard image, the standard pressure is 0, the data of all reference points are collected, and the data set of all reference points is established; Based on the data sets of all the reference points, the pressure deformation of the measuring sample surface is established by polynomial fitting; The formula for measuring the pressure deformation on the sample surface is as follows: ; ; in, Indicates the horizontal component offset value from the standard coordinates to the reference point coordinates, represents the vertical component offset value from the standard coordinates to the reference point coordinates, represents the horizontal component of the reference point coordinates, represents the vertical component of the reference point coordinates, Indicates the difference between standard pressure and set pressure. , express Polynomial of degree; The Brinell hardness prediction model of the measured sample surface is set as + ; The method of calculating the precise range of the Brinell hardness data of different materials by uniform distribution prediction based on the predicted Brinell hardness data of different materials comprises the following steps: For the predicted Brinell hardness data of different materials, five reference points are evenly selected on the surface of each material, and the same pressure is set to test the selected five reference points; After the test is completed, the deformation degree of the five reference points is collected by a laser camera, and the repeatability of the Brinell hardness data of the five reference points is calculated based on the collected deformation degree of the five reference points; ; in, Indicates the repeatability of Brinell hardness data, Indicates the maximum value of five Brinell hardness data. Indicates the minimum value of the five Brinell hardness data. It represents the arithmetic mean of five Brinell hardness data; Calculate the Brinell hardness accuracy range for different materials based on the repeatability of the calculated Brinell hardness data; The error range of Brinell hardness data is as follows: ; in, represents the predicted Brinell hardness data, Indicates the error range of Brinell hardness data; The Brinell hardness data accuracy range is set to the predicted Brinell hardness data plus or minus the calculated Brinell hardness data error range.

2. The high-precision Brinell hardness measurement method based on machine vision according to claim 1 is characterized in that: The laser camera is installed to collect the surface images of the measurement sample under different pressures, and the reference points in the captured surface images of the measurement sample are collected. Establishing the training set includes the following steps: Set the positions of all reference points on the surface of the measuring sample, and fix the relative position of the camera and the surface of the measuring sample, so that the reference points on the surface of the measuring sample are evenly distributed in the entire camera field of view; Set the pressure level and pressure holding time during the measurement process; During the measurement process, the laser camera shooting interval is preset, and the surface image of the measurement sample shot by the laser camera at each set pressure is collected; The image of the measurement sample surface taken by the laser camera when the pressure is set to 0 is the standard image; The surface images of the measured specimens and the standard images taken by the laser camera at each set pressure are summarized and a training set is established.

3. The high-precision Brinell hardness measurement method based on machine vision according to claim 2 is characterized in that: The method of preprocessing the measured sample surface images in the training set by data processing to obtain the preprocessed measured sample surface images comprises the following steps: S21, segmenting the surface image of the measurement sample in the training set by means of threshold segmentation to obtain a segmented surface image of the measurement sample; S22, performing edge extraction on the segmented surface image of the measurement sample to obtain the surface image of the measurement sample after edge extraction; S23, setting the measurement sample surface image after edge extraction as the measurement sample surface image after preprocessing.

4. The high-precision Brinell hardness measurement method based on machine vision according to claim 3 is characterized in that: The segmentation process of the measured sample surface image in the training set by threshold segmentation to obtain the segmented measured sample surface image comprises the following steps: S211, set the maximum grayscale value and the minimum grayscale value of the pixels on the surface of the sample to be measured, respectively. and , calculate the initial threshold based on the maximum grayscale value and minimum grayscale value of the image pixels on the surface of the measured sample ; S212, segmenting the surface image of the measurement sample based on the calculated initial threshold value, and segmenting the image into two parts according to the grayscale value of the pixels of the surface image of the measurement sample, setting the grayscale value greater than The image area is , gray value is less than or equal to The image area is ; S213, calculate separately and Contains the mean grayscale value of the pixels and ; S214. Calculate a new threshold ; S215, repeat steps S212-214 until the calculated Convergence, and based on the converged The segmentation of the measurement sample surface image is completed to obtain the segmented measurement sample surface image.

5. The high-precision Brinell hardness measurement method based on machine vision according to claim 4 is characterized in that: The step of extracting edges from the segmented surface image of the measurement sample to obtain the surface image of the measurement sample after edge extraction comprises the following steps: A one-dimensional array is established to record the grayscale values ​​of the eight neighborhoods around each pixel of the segmented sample surface image. When the grayscale values ​​of the eight neighborhoods around the pixel are the same as the grayscale value of the center point, the pixel is set to be inside the contour and deleted. When the grayscale values ​​of the eight neighborhoods around a pixel are different from the grayscale value of the center point, the pixel is set at the edge of the contour and is retained; Each pixel point in the segmented measurement sample surface image is traversed and summarized to obtain the measurement sample surface image after edge extraction.

6. The high-precision Brinell hardness measurement method based on machine vision according to claim 5 is characterized in that: The method of optimizing the established Brinell hardness prediction model by the least square method, outputting the optimal Brinell hardness prediction model, and predicting the Brinell hardness of different materials based on the optimal Brinell hardness prediction model includes the following steps: Setting the error threshold between the fitting coordinates and the standard coordinates predicted by the Brinell hardness prediction model; Take separately is 1, 2, ..., and calculates the error between the fitted coordinates and the standard coordinates; When the error between the fitting coordinates and the standard coordinates is less than the set error threshold, the polynomial and coefficients of the Brinell hardness prediction model at this time are output, and the polynomial and coefficients of the Brinell hardness prediction model at this time are used as the optimal Brinell hardness prediction model; Call the optimal Brinell hardness prediction model to predict the Brinell hardness of different materials; The formula for predicting the Brinell hardness of different materials is as follows: ; in, represents the Brinell hardness of the predicted material, Indicates the set pressure data.

7. A system for implementing the Brinell hardness high-precision measurement method based on machine vision according to any one of claims 1 to 6, characterized in that: include: A data acquisition module, a data processing module, a Brinell hardness prediction module, and a Brinell hardness determination module; The data acquisition module is used to collect image data of different materials affected by pressure through a laser camera; The data processing module is used to process the image data of different materials affected by pressure collected by the laser camera to obtain processed image data; The Bournard hardness prediction module is used to establish a Bournard hardness prediction model according to the processed image data; The Brinell hardness determination module is used to accurately optimize the established Brinell hardness prediction model.

Citation Information

Patent Citations

  • Red globe grape hardness nondestructive detection method based on machine vision

    CN105606473A

  • Full-automatic Brinell indentation measurement system calibration method based on hardness method

    CN113702232A