CN114526694A - Method for measuring metal surface roughness - Google Patents
Method for measuring metal surface roughness Download PDFInfo
- Publication number
- CN114526694A CN114526694A CN202210015553.9A CN202210015553A CN114526694A CN 114526694 A CN114526694 A CN 114526694A CN 202210015553 A CN202210015553 A CN 202210015553A CN 114526694 A CN114526694 A CN 114526694A
- Authority
- CN
- China
- Prior art keywords
- image
- metal
- roughness
- algorithm
- metal surface
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
- 239000002184 metal Substances 0.000 title claims abstract description 88
- 238000000034 method Methods 0.000 title claims abstract description 48
- 230000003746 surface roughness Effects 0.000 title claims abstract description 20
- 238000004422 calculation algorithm Methods 0.000 claims abstract description 77
- 238000004439 roughness measurement Methods 0.000 claims abstract description 33
- 238000012545 processing Methods 0.000 claims abstract description 17
- 238000005259 measurement Methods 0.000 claims abstract description 16
- 230000000295 complement effect Effects 0.000 claims description 19
- 230000011218 segmentation Effects 0.000 claims description 18
- 238000005422 blasting Methods 0.000 claims description 13
- 239000004576 sand Substances 0.000 claims description 10
- 238000009499 grossing Methods 0.000 claims description 9
- 238000012896 Statistical algorithm Methods 0.000 claims description 7
- 238000001914 filtration Methods 0.000 claims description 7
- 238000012935 Averaging Methods 0.000 claims description 3
- 230000000877 morphologic effect Effects 0.000 claims description 3
- 238000001514 detection method Methods 0.000 abstract description 4
- 238000010276 construction Methods 0.000 abstract 1
- 238000005488 sandblasting Methods 0.000 description 8
- 230000000694 effects Effects 0.000 description 4
- 238000005516 engineering process Methods 0.000 description 4
- 238000011156 evaluation Methods 0.000 description 4
- 238000004458 analytical method Methods 0.000 description 3
- 238000009826 distribution Methods 0.000 description 3
- 238000005507 spraying Methods 0.000 description 3
- CWYNVVGOOAEACU-UHFFFAOYSA-N Fe2+ Chemical compound [Fe+2] CWYNVVGOOAEACU-UHFFFAOYSA-N 0.000 description 2
- 230000007797 corrosion Effects 0.000 description 2
- 238000005260 corrosion Methods 0.000 description 2
- 239000000463 material Substances 0.000 description 2
- 238000000691 measurement method Methods 0.000 description 2
- 238000007619 statistical method Methods 0.000 description 2
- 229910000831 Steel Inorganic materials 0.000 description 1
- 230000000052 comparative effect Effects 0.000 description 1
- 238000010219 correlation analysis Methods 0.000 description 1
- 230000007547 defect Effects 0.000 description 1
- 238000000605 extraction Methods 0.000 description 1
- 239000012535 impurity Substances 0.000 description 1
- 238000004519 manufacturing process Methods 0.000 description 1
- 238000011089 mechanical engineering Methods 0.000 description 1
- 239000007769 metal material Substances 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 238000013441 quality evaluation Methods 0.000 description 1
- 230000010076 replication Effects 0.000 description 1
- 238000011160 research Methods 0.000 description 1
- 239000010959 steel Substances 0.000 description 1
- 238000003860 storage Methods 0.000 description 1
- 238000004381 surface treatment Methods 0.000 description 1
- 230000000007 visual effect Effects 0.000 description 1
- 238000011179 visual inspection Methods 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G01—MEASURING; TESTING
- G01B—MEASURING LENGTH, THICKNESS OR SIMILAR LINEAR DIMENSIONS; MEASURING ANGLES; MEASURING AREAS; MEASURING IRREGULARITIES OF SURFACES OR CONTOURS
- G01B11/00—Measuring arrangements characterised by the use of optical techniques
- G01B11/30—Measuring arrangements characterised by the use of optical techniques for measuring roughness or irregularity of surfaces
- G01B11/306—Measuring arrangements characterised by the use of optical techniques for measuring roughness or irregularity of surfaces for measuring evenness
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T5/00—Image enhancement or restoration
- G06T5/70—Denoising; Smoothing
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/0002—Inspection of images, e.g. flaw detection
- G06T7/0004—Industrial image inspection
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/10—Segmentation; Edge detection
- G06T7/136—Segmentation; Edge detection involving thresholding
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2207/00—Indexing scheme for image analysis or image enhancement
- G06T2207/20—Special algorithmic details
- G06T2207/20024—Filtering details
- G06T2207/20032—Median filtering
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2207/00—Indexing scheme for image analysis or image enhancement
- G06T2207/30—Subject of image; Context of image processing
- G06T2207/30108—Industrial image inspection
- G06T2207/30136—Metal
Landscapes
- Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Quality & Reliability (AREA)
- Length Measuring Devices By Optical Means (AREA)
Abstract
A method of metal surface roughness measurement comprising the steps of: scanning the surface of the metal to be detected by adopting a laser structured light 3D vision system; when the scanning plane of the 3D vision system is not parallel to the surface of the measured metal, the 3D vision system levels the surface of the measured metal and obtains a leveling image; the 3D vision system scans and images the surface of the metal to be detected to obtain the 3D appearance of the surface of the metal to be detected; and measuring the surface roughness of the metal to be measured by utilizing a plurality of image processing algorithms. The method adopts the laser structured light 3D vision system to scan and image the metal surface to obtain the 3D morphology of the metal surface, and then utilizes an image processing algorithm to automatically measure the roughness of the metal surface, so that the method has higher real-time performance, increases the measurement reliability, and can realize the full automation of large-scale construction surface roughness detection.
Description
Technical Field
The invention relates to a technology for intersecting mechanical engineering and machine vision, in particular to a method for measuring the roughness of a metal surface by adopting laser structured light vision.
Background
In the production process of large-scale equipment such as ships, nuclear industry, heavy machinery, vehicles and the like, a metal material is a common structural material, wherein the consumption of ferrous metal, especially steel is huge, and the problems of corrosion and the like are inevitably generated in the service process of the components, so that the service life of the components is reduced, the use reliability is reduced, and the external aesthetic degree is reduced. The surface is usually sprayed to solve the corrosion problem of ferrous metal surface, and in order to improve the bonding property between the spraying material and the metal surface, the metal surface is often subjected to shot blasting and sand blasting to improve the roughness of the metal surface and remove impurities such as surface oxides.
After the metal surface is subjected to shot blasting and sand blasting, the measurement of the surface roughness is an important factor for determining the spraying quality, so that the measurement of the surface roughness is an important measurement link for the quality of shot blasting and sand blasting. At present, the main methods for measuring the surface roughness include a comparative sample block visual inspection method, a microscope focusing method, a contact pin method and a replication belt method, the main operations of the measurement methods all depend on manual work, the main evaluation also depends on the experience of workers, and the problems of low measurement efficiency, poor measurement objectivity, low measurement accuracy and the like exist.
In addition, shot blasting and sand blasting environments are harsh environments, and operators also have various unhealthy and dangerous factors in the detection process. Therefore, it is an urgent problem to realize automation of roughness measurement. In recent years, machine vision technology has been greatly advanced, and application of machine vision technology to roughness automation measurement will contribute to an increase in the degree of automation and an increase in accuracy of the work.
Disclosure of Invention
The technical problem to be solved by the present invention is to provide a method for measuring metal surface roughness by using laser structured light vision, aiming at the above defects in the prior art.
In order to achieve the above object, the present invention provides a method for measuring roughness of a metal surface, comprising the steps of:
s100, scanning the surface of the metal to be detected by adopting a laser structured light 3D vision system;
s200, when the scanning plane of the 3D vision system is not parallel to the surface of the metal to be detected, the 3D vision system levels the surface of the metal to be detected and obtains a leveling image;
s300, the 3D vision system scans and images the surface of the metal to be detected to obtain the 3D appearance of the surface of the metal to be detected; and
s400, measuring the surface roughness of the metal to be measured by utilizing a plurality of image processing algorithms.
In the method for measuring the roughness of the metal surface, in step S200, the leveling image is obtained by using a leveling algorithm, and the leveling algorithm includes the following steps:
s201, scanning the 3D vision system to obtain an original image I of the metal surface to be detectedsrSmoothing to obtain a smooth image Ism;
S202, using the original image IsrAnd the smoothed image IsmSubtracting to obtain a subtracted image Isu(ii) a And
s203, subtracting the image IsuAnd the original image IsrAre added to obtain the leveling image Isl。
In the method for measuring metal surface roughness, the image processing algorithms in step S400 include:
s410, a depth image missing information complementation algorithm;
s420, a depth image noise removal algorithm;
s430, specifying a line segment and a region roughness measurement algorithm;
s440, improving an anti-interference watershed segmentation algorithm; and
s450, a sand throwing and shot blasting sand pit parameter statistical algorithm.
The method for measuring the roughness of the metal surface comprises the following steps of:
s411, leveling the image I by using a morphological operatorslPerforming a close operation to obtain a close operation image Isc;
S412, searching the original image I of the detected metalsrThe value of the missing point is zero, and a missing region binary image I is obtainedzb;
S413, using the binary image I of the missing regionzbAnd the closed operation image IscPerforming dot multiplication to obtain a missing region complement image Izr(ii) a And
s414, filling the missing region back to the image IzrWith the original image IsrAdding them to obtain a complementary image Ire。
The method for measuring the roughness of the metal surface comprises the following steps of:
s421, for the complementary image IrePerforming Laplace filtering to obtain a high-frequency image Ilp;
S422, for the high-frequency image IlpCalculating an absolute value to obtain an absolute high-frequency image Ial;
S423, comparing the absolute high-frequency image IalCarrying out threshold segmentation to obtain a high-frequency binary image IhbAnd the high-frequency binary image IhbComplementary set low frequency binary image Ilb;
S424, the complementing image IreCarrying out median filtering to obtain a median image Ime;
S425, using the high-frequency binary image IhbAnd the median image ImePerforming dot multiplication to obtain a high-frequency smooth image Ihs;
S426, using the low-frequency binary image IlbAnd the complementary image IreDot multiplication to obtain low-frequency complementary image Ils(ii) a And
s427, smoothing the high frequency image IhsAnd low frequency complement image IlsAdding to obtain a denoised image Idn。
The method for measuring the roughness of the metal surface, wherein the algorithm for measuring the roughness of the specified line segment and the area comprises the following steps:
s431, measuring algorithm of area roughness; and
and S432, measuring the line roughness.
The method for measuring the roughness of the metal surface comprises the following steps:
s4311, setting a roughness measurement area to measure the area roughness; and
s4312, finding the highest point and the lowest point in the area of the measuring area, and calculating the binary difference value between the highest point and the lowest point.
The method for measuring the roughness of the metal surface comprises the following steps:
s4321, setting a measurement line for roughness measurement to measure line roughness;
s4322, obtaining a height value on each pixel point of the measuring line;
s4323, dividing the line segment into n segments according to the roughness measurement requirement;
s4324, calculating the highest value and the lowest value in each section of the n sections, and calculating the difference value between the highest value and the lowest value; and
s4325, averaging the difference values of the n sections to obtain the line roughness.
The method for measuring the roughness of the metal surface, wherein the improved anti-interference watershed segmentation algorithm is used for realizing the segmentation of the surface pit of the measured metal, and comprises the following steps:
s441, denoising the denoised image IdnSmoothing to obtain a smooth image Ism;
S442, using the denoised image IdnAnd the smoothed image IsmSubtracting to obtain boundary image Ied;
S443, using the denoised image IdnAnd the boundary image IedAdding to obtain an enhanced image Ieh;
S444, for the enhanced image IehPerforming a close operation to obtain a close image Icl(ii) a And
s445, for the closed image IclAnd (4) carrying out watershed algorithm to obtain a pit segmentation image.
The method for measuring the roughness of the metal surface comprises the following steps of:
s451, obtaining a pixel mark map of each pit, counting the number of pixel points of the pits on the pixel mark map, and obtaining the area of the pits according to a proportional relation; and
s452, determining a boundary of a pit on the pixel mark map, and determining an average value of the boundary heights of the pits, a deepest value of the pit, and a difference value between the deepest value of the pit and the average value of the boundary heights.
The invention has the technical effects that:
the method adopts the laser structured light 3D vision system to scan and image the metal surface to obtain the 3D appearance of the metal surface, and then utilizes an image processing algorithm to automatically measure the roughness of the metal surface, and has at least the following advantages:
1) the roughness information of the metal surface is obtained by adopting laser mechanism light 3D vision, reliable information can be provided for subsequent roughness evaluation and analysis, and possibility is provided for long-time storage of the information;
2) the leveling algorithm based on digital images is adopted, so that the problems that in the process of laser structured light 3D vision, the parallel relation between the scanning motion track of a scanning mechanism and a scanned plane is difficult to ensure in the prior art, and the subsequent roughness evaluation is seriously influenced are solved;
3) the missing signal complementation algorithm has wider scale and shape adaptability, solves the problems that in the laser structure light vision in the prior art, due to the reflection of the metal surface, the shielding of a convex part and the like, the local signal of the laser structure light depth image is missing, the size and the shape of a signal missing area are uncertain, and the missing signal brings serious interference to subsequent processing, and simultaneously solves the problem of the reliability of signal complementation;
4) the noise removal algorithm based on the combination of the Laplace operator and median filtering is insensitive to the noise scale and shape, and can reasonably estimate the original information of the noise part; meanwhile, the algorithm adopts convolution parallel operation, has good operability, and has higher real-time performance by matching with parallel operation hardware;
5) roughness measurement is carried out on the basis of the depth image, so that accidental factor interference of manual operation in methods such as a comparison sample block visual measurement method, a microscope focusing method, a contact pin method and a copy band method can be avoided, and target areas of a roughness measurement algorithm and a statistical algorithm can be conveniently determined; meanwhile, the statistical points can be effectively increased, so that the statistical reliability is increased;
6) by adopting the improved watershed algorithm, the problem of excessive segmentation caused by tiny concave pits in the prior art is effectively solved, and each sand pit can be accurately segmented;
7) the statistical analysis of the sand pits is carried out on the digital image technology, the information of shot blasting, the area and the area distribution of the sand blasting pits, the depth and the depth distribution of the pits, the shape of the pits and the like can be obtained, evaluation basis is provided for the manufacturability of the shot blasting and the sand blasting, and richer information is provided for the correlation research of the surface treatment quality and the spraying quality.
The invention is described in detail below with reference to the drawings and specific examples, but the invention is not limited thereto.
Drawings
FIG. 1 is a flow chart of a method according to an embodiment of the present invention;
FIGS. 2A-2D are graphs illustrating the effect of roughness image processing on a metal mark according to an embodiment of the present invention;
FIGS. 3A-3B are graphs illustrating the effect of an improved watershed algorithm over-segmentation of an image according to an embodiment of the present invention;
FIG. 4 is a histogram of pit area for sand blasting and shot blasting pit parameter statistics according to an embodiment of the present invention;
FIG. 5 is a graph of the results of the roughness measurement algorithm according to one embodiment of the present invention.
Detailed Description
The invention will be described in detail with reference to the following drawings, which are provided for illustration purposes and the like:
based on the background, the invention adopts the laser structured light vision to scan the metal surface and realizes the measurement of the roughness of the metal surface by an algorithm of a plurality of key links from a depth signal to the roughness measurement.
The method for measuring the roughness of the metal surface adopts a laser structured light 3D vision system, firstly, the vision system levels a measured plane according to a leveling algorithm, then, the metal surface is scanned and imaged to obtain the 3D appearance of the metal surface, and then, the roughness of the metal surface is automatically measured by utilizing various image processing algorithms.
Referring to fig. 1, fig. 1 is a flow chart of a method according to an embodiment of the invention. The method for measuring the roughness of the metal surface comprises the following steps:
s100, scanning the surface of the metal to be detected by adopting a laser structured light 3D vision system;
s200, when a scanning plane of the 3D vision system is not parallel to the surface of the metal to be detected, leveling the surface of the metal to be detected by the 3D vision system to obtain a leveling image;
s300, the 3D vision system scans and images the surface of the metal to be detected to obtain the 3D appearance of the surface of the metal to be detected; and
and S400, measuring the surface roughness of the metal to be measured by utilizing a plurality of image processing algorithms.
In step S200, the leveling image is obtained by adopting a leveling algorithm, the method has a leveling function under the condition that the scanning plane is not parallel to the measured plane, and the leveling algorithm comprises the following steps:
step S201, scanning the 3D vision system to obtain an original image I of the metal surface to be detectedsrSmoothing to obtain a smooth image Ism;
Step S202, using the original image IsrAnd the smoothed image IsmSubtracting to obtain a subtracted image Isu(ii) a And
step S203, subtracting the image IsuAnd the original image IsrAre added to obtain the leveling image Isl。
The multiple image processing algorithms in step S400 of this embodiment include five image processing algorithms, which specifically include:
s410, a depth image missing information complementation algorithm;
step S420, a depth image noise removal algorithm;
step S430, specifying a line segment and a region roughness measurement algorithm;
step S440, improving an anti-interference watershed segmentation algorithm; and
and S450, a sand throwing and shot blasting sand pit parameter statistical algorithm.
In step S410, the depth image missing information complementing algorithm is a missing information complementing algorithm for laser structured light vision, and includes the following steps:
step S411, leveling image I by using morphological operatorslPerforming a close operation to obtain a close operation image Isc;
Step S412, searching the original image I of the metal to be detectedsrThe value of the missing point is zero, and a missing region binary image I is obtainedzb;
Step S413, using the binary image I of the missing regionzbAnd the closed operation image IscPerforming dot multiplication to obtain a missing region complement image Izr(ii) a And
step S414, the missing region is filled back to the image IzrWith the original image IsrAdding them to obtain a complementary image Ire。
In step S420, the depth image noise removal algorithm includes the following steps:
step S421, the complementary image IrePerforming Laplace filtering to obtain a high-frequency image Ilp;
Step S422, for the high-frequency image IlpCalculating an absolute value to obtain an absolute high-frequency image Ial;
Step S423, the absolute high-frequency image IalCarrying out threshold segmentation to obtain a high-frequency binary image IhbAnd the high-frequency binary image IhbComplementary set low frequency binary image Ilb;
Step S424, the complementing image IreCarrying out median filtering to obtain a median image Ime;
Step S425, using the high-frequency binary image IhbAnd the median image ImePerforming dot multiplication to obtain a high-frequency smooth image Ihs;
Step S426, using the low-frequency binary image IlbAnd the complementary image IreDot multiplication to obtain low-frequency complementary image Ils(ii) a And
step S427, smoothing the high frequency mapLike IhsAnd low frequency complement image IlsAdding to obtain a denoised image Idn。
In step S430, the specified line segment and area roughness measurement algorithms include two rough measurement algorithms, which are an area rough measurement algorithm and a line rough measurement algorithm, respectively, that is:
step S431, measuring algorithm of area roughness; and
and step S432, measuring the line roughness.
The region roughness measurement algorithm of step S431 includes:
step S4311, a measurement area for roughness measurement can be set by self to measure the area roughness; and
step S4312, finding the highest point and the lowest point in the area of the measuring area, and calculating the binary difference value between the highest point and the lowest point.
The line roughness measurement algorithm of step S432 includes:
step S4321, a measurement line for roughness measurement can be set by self to measure the line roughness;
step S4322, obtaining a height value of each pixel point on the measuring line;
step S4323, dividing the line segment into n segments according to the roughness measurement requirement;
step S4324, calculating the highest value and the lowest value in each segment of the n segments, and calculating the difference value between the highest value and the lowest value; and
and step S4325, averaging the n-section difference values to obtain the line roughness.
In step S440, the improved anti-interference watershed segmentation algorithm is used to segment the surface pit of the measured metal, and includes the following steps:
step S441, the denoised image I after denoising is processeddnSmoothing to obtain a smooth image Ism;
Step S442, using the denoised image IdnAnd the smoothed image IsmSubtracting to obtain boundary image Ied;
Step S443, using the denoised image IdnAnd the boundary image IedAdding to obtain an enhanced image Ieh;
Step S444, for the enhanced image IehPerforming a closing operation to obtain a closed image Icl(ii) a And
step S445, for the closed image IclAnd (4) carrying out watershed algorithm to obtain a pit segmentation image.
In step S450, the statistical algorithm for parameters of sand-throwing and shot-blasting sand pits can realize statistical analysis of pit parameters on the basis of pit segmentation, and the statistical parameters include the area of the pits, the depth of the pits, and the like, and includes the following steps:
step S451, obtaining a pixel mark map of each pit, counting the number of pixel points of the pits on the pixel mark map, and obtaining the pit area according to a proportional relation; and
step S452 is to determine the boundary of the pit on the pixel mark map, and determine the average value of the boundary heights of the pits, the deepest value of the pit, and the difference between the deepest value of the pit and the average value of the boundary heights.
The method adopts a laser structured light 3D vision system, firstly, the vision system levels a measured plane according to a leveling algorithm, then, the metal surface is scanned and imaged to obtain the 3D appearance of the metal surface, and then, the roughness of the metal surface is automatically measured by utilizing various image processing algorithms. The working principle is as follows:
as shown in fig. 2A-2D, fig. 2A is an original image, and it can be seen that the brightness of the upper half of the original image is relatively dark, and the brightness of the lower half of the original image is relatively high, and fig. 2B is an image of the original image after digital leveling, and it can be seen that the brightness of the upper half and the lower half of the image is relatively balanced, which indicates that the surface of the image has not been inclined in a large range; fig. 2C is a depth map of the metal surface restored by the missing signal patch algorithm, the signal missing region (black region) in fig. 2B, which has been fully patched back in fig. 2C, and the remaining black region is a noise point; fig. 2D shows an image obtained by the denoising algorithm, in which the black noise region is completely removed.
3A-3B are pit images segmented by a watershed algorithm, wherein FIG. 3A is a pit image segmented by a general watershed algorithm, and FIG. 3B is a pit image segmented by a modified watershed algorithm, it can be seen that FIG. 3A produces over-segmentation, and the segmentation effect of FIG. 3B is much better than that of FIG. 3A.
Fig. 4 shows the result of histogram analysis based on pit extraction, and the statistical distribution can be conveniently obtained by the present invention. In the figure, the horizontal axis represents the area of the pits, the unit of the area here is the number of pixels occupied by a single pit, every 2000 is a section, and the vertical axis represents the number of pits appearing in the area section.
Fig. 5 is a roughness measurement result according to a standard. In the figure, the horizontal axis is a pixel sequence on a measuring line segment, the sequence is divided into 5 segments, the actual length corresponding to each segment is 2.5mm and is separated by a vertical dotted line, the vertical axis is the height of each measuring point on the line segment and represents the height of a metal surface, the unit is mum, a highest point and a lowest point are obtained in each segment, the highest point is represented by a mark x, and the lowest point is represented by o. The final roughness is calculated by first calculating the difference between the highest point and the lowest point of each segment, and then calculating the average value of 5 differences.
The method adopts laser structured light vision to measure the roughness of the metal surface, adopts a laser structured light 3D vision system to scan and image the metal surface to obtain the 3D appearance of the metal surface, and then utilizes an image processing algorithm to measure the roughness of the metal surface. And under the condition that the scanning plane is not parallel to the measured plane, the leveling function is also realized. The image processing algorithm comprises a roughness measurement algorithm under the condition of a set area or a set line segment; a complementary algorithm aiming at the missing signal of the laser structure light depth signal; a denoising algorithm aiming at the laser structure light depth signal; the improved watershed algorithm can realize the segmentation of surface pits under the condition of complex interference; and a statistical algorithm of the pit parameters based on the pit segmentation. The surface detection in the prior art mainly focuses on roughness, and on the basis of roughness detection, the invention adds the analysis of shot blasting and sand blasting surface pits and corresponding image processing algorithms, thereby providing richer information for subsequent surface quality evaluation and process correlation analysis.
The present invention may be embodied in other specific forms without departing from the spirit or essential attributes thereof, and it should be understood that various changes and modifications can be effected therein by one skilled in the art without departing from the spirit and scope of the invention as defined in the appended claims.
Claims (10)
1. A method for measuring the roughness of a metal surface is characterized by comprising the following steps:
s100, scanning the surface of the metal to be detected by adopting a laser structured light 3D vision system;
s200, when the scanning plane of the 3D vision system is not parallel to the surface of the metal to be detected, the 3D vision system levels the surface of the metal to be detected and obtains a leveling image;
s300, the 3D vision system scans and images the surface of the metal to be detected to obtain the 3D appearance of the surface of the metal to be detected; and
s400, measuring the surface roughness of the metal to be measured by utilizing a plurality of image processing algorithms.
2. The method for measuring the roughness of the metal surface according to claim 1, wherein in step S200, the leveling image is obtained by using a leveling algorithm, and the leveling algorithm comprises the following steps:
s201, scanning the 3D vision system to obtain an original image I of the metal surface to be detectedsrSmoothing to obtain a smoothed image Ism;
S202, using the original image IsrAnd the smoothed image IsmSubtracting to obtain a subtracted image Isu(ii) a And
s203, subtracting the image IsuAnd the original image IsrAre added to obtain the leveling image Isl。
3. The method of metal surface roughness measurement according to claim 1 or 2, wherein the plurality of image processing algorithms in step S400 comprises:
s410, a depth image missing information complementation algorithm;
s420, a depth image noise removal algorithm;
s430, specifying a line segment and a region roughness measurement algorithm;
s440, improving an anti-interference watershed segmentation algorithm; and
s450, a sand throwing and shot blasting sand pit parameter statistical algorithm.
4. The method of metal surface roughness measurement according to claim 3, wherein the depth image missing information complementing algorithm comprises the steps of:
s411, leveling the image I by using a morphological operatorslPerforming a close operation to obtain a close operation image Isc;
S412, searching the original image I of the detected metalsrThe value of the missing point is zero, and a missing region binary image I is obtainedzb;
S413, using the binary image I of the missing regionzbAnd the closed operation image IscPerforming dot multiplication to obtain a missing region complement image Izr(ii) a And
s414, filling the missing region back to the image IzrWith the original image IsrAdding them to obtain a complementary image Ire。
5. The method of metal surface roughness measurement according to claim 4, wherein the depth image noise removal algorithm comprises the steps of:
s421, for the complementary image IrePerforming Laplace filtering to obtain a high-frequency image Ilp;
S422, for the high-frequency image IlpCalculating an absolute value to obtain an absolute high-frequency image Ial;
S423, for the absolute high frequency image IalPerforming threshold segmentation to obtain high frequency binary valueImage IhbAnd the high-frequency binary image IhbComplementary set low frequency binary image Ilb;
S424, the complementing image IreCarrying out median filtering to obtain a median image Ime;
S425, using the high-frequency binary image IhbAnd the median image ImePerforming dot multiplication to obtain a high-frequency smooth image Ihs;
S426, using the low-frequency binary image IlbAnd the complementary image IreDot multiplication to obtain low-frequency complementary image Ils(ii) a And
s427, smoothing the high frequency image IhsAnd low frequency complement image IlsAdding to obtain a denoised image Idn。
6. The method of metal surface roughness measurement according to claim 3, wherein the specified line segment and area roughness measurement algorithm comprises:
s431, measuring algorithm of area roughness; and
and S432, measuring the line roughness.
7. The method of metal surface roughness measurement according to claim 6, wherein the area roughness measurement algorithm comprises:
s4311, setting a roughness measurement area to measure the area roughness; and
s4312, finding the highest point and the lowest point in the area of the measuring area, and calculating the binary difference value between the highest point and the lowest point.
8. The method of metal surface roughness measurement according to claim 6, wherein the line roughness measurement algorithm comprises:
s4321, setting a measurement line for roughness measurement to measure line roughness;
s4322, obtaining a height value on each pixel point of the measuring line;
s4323, dividing the line segment into n segments according to the roughness measurement requirement;
s4324, calculating the highest value and the lowest value in each section of the n sections, and calculating the difference value between the highest value and the lowest value; and
s4325, averaging the difference values of the n sections to obtain the line roughness.
9. The method of claim 5, wherein the improved interference-free watershed segmentation algorithm is used to segment surface pits of the measured metal, and comprises the following steps:
s441, denoising the denoised image I after denoisingdnSmoothing to obtain a smooth image Ism;
S442, using the denoised image IdnAnd the smoothed image IsmSubtracting to obtain boundary image Ied;
S443, using the denoised image IdnAnd the boundary image IedAdding to obtain an enhanced image Ieh;
S444, for the enhanced image IehPerforming a closing operation to obtain a closed image Icl(ii) a And
s445, for the closed image IclAnd (4) carrying out watershed algorithm to obtain a pit segmentation image.
10. The method of metal surface roughness measurement according to claim 3, wherein the sand throwing and shot blasting pit parameter statistical algorithm comprises the steps of:
s451, obtaining a pixel mark map of each pit, counting the number of pixel points of the pits on the pixel mark map, and obtaining the area of the pits according to a proportional relation; and
s452, determining a boundary of a pit on the pixel mark map, and determining an average value of the boundary heights of the pits, a deepest value of the pit, and a difference value between the deepest value of the pit and the average value of the boundary heights.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210015553.9A CN114526694B (en) | 2022-01-07 | 2022-01-07 | Method for measuring metal surface roughness |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210015553.9A CN114526694B (en) | 2022-01-07 | 2022-01-07 | Method for measuring metal surface roughness |
Publications (2)
Publication Number | Publication Date |
---|---|
CN114526694A true CN114526694A (en) | 2022-05-24 |
CN114526694B CN114526694B (en) | 2024-08-20 |
Family
ID=81621011
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202210015553.9A Active CN114526694B (en) | 2022-01-07 | 2022-01-07 | Method for measuring metal surface roughness |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN114526694B (en) |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2000146557A (en) * | 1998-11-05 | 2000-05-26 | Ngk Insulators Ltd | Measuring method for precision of inner surface of through hole and manufacture of base using it |
CN103267498A (en) * | 2013-05-09 | 2013-08-28 | 北京科技大学 | Automatic digital quantizing method for measuring iron ore roughness |
CN103884298A (en) * | 2014-03-20 | 2014-06-25 | 河海大学常州校区 | System and method for measuring metal surface roughness on basis of guiding mold |
KR101793526B1 (en) * | 2016-12-30 | 2017-11-06 | 한국산업기술대학교산학협력단 | Apparatus for Measuring Surface Roughness Using Image |
-
2022
- 2022-01-07 CN CN202210015553.9A patent/CN114526694B/en active Active
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2000146557A (en) * | 1998-11-05 | 2000-05-26 | Ngk Insulators Ltd | Measuring method for precision of inner surface of through hole and manufacture of base using it |
CN103267498A (en) * | 2013-05-09 | 2013-08-28 | 北京科技大学 | Automatic digital quantizing method for measuring iron ore roughness |
CN103884298A (en) * | 2014-03-20 | 2014-06-25 | 河海大学常州校区 | System and method for measuring metal surface roughness on basis of guiding mold |
KR101793526B1 (en) * | 2016-12-30 | 2017-11-06 | 한국산업기술대학교산학협력단 | Apparatus for Measuring Surface Roughness Using Image |
Non-Patent Citations (1)
Title |
---|
时小军;张玉琴;张小辉;: "基于机器视觉技术的研磨表面粗糙度检测", 机械设计与研究, no. 03, 20 June 2010 (2010-06-20) * |
Also Published As
Publication number | Publication date |
---|---|
CN114526694B (en) | 2024-08-20 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN110286124B (en) | Machine vision-based refractory brick measuring system | |
CN110766684B (en) | Stator surface defect detection system and detection method based on machine vision | |
JP5645730B2 (en) | Method for detecting closed cracks on concrete surface | |
CN116777916B (en) | Defect detection method based on metal shell of pump machine | |
CN111127402A (en) | Visual detection method for welding quality of robot | |
CN109540925B (en) | Complex ceramic tile surface defect detection method based on difference method and local variance measurement operator | |
CN110070523B (en) | Foreign matter detection method for bottle bottom | |
CN109685760A (en) | A kind of SLM powder bed powder laying image convex closure depression defect detection method based on MATLAB | |
CN113298776B (en) | Method for detecting appearance defects of metal closed water pump impeller | |
CN109166125A (en) | A kind of three dimensional depth image partitioning algorithm based on multiple edge syncretizing mechanism | |
CN111192273A (en) | Digital shot blasting coverage rate measuring method based on computer vision technology | |
CN115131359B (en) | Method for detecting pitting defects on surface of metal workpiece | |
CN116883408B (en) | Integrating instrument shell defect detection method based on artificial intelligence | |
CN113888456B (en) | Corner detection method based on contour | |
CN115115638A (en) | Oil leakage detection and judgment method for hydraulic system | |
CN109781737A (en) | A kind of detection method and its detection system of hose surface defect | |
CN115100191A (en) | Metal casting defect identification method based on industrial detection | |
CN115272338A (en) | Crown block control method based on image processing | |
CN114140384A (en) | Transverse vibration image recognition algorithm for hoisting steel wire rope based on contour fitting and centroid tracking | |
CN113155839A (en) | Steel plate outer surface defect online detection method based on machine vision | |
CN115345821A (en) | Steel coil binding belt loosening abnormity detection and quantification method based on active visual imaging | |
CN114526694B (en) | Method for measuring metal surface roughness | |
CN113298775A (en) | Self-priming pump double-sided metal impeller appearance defect detection method, system and medium | |
CN110715886B (en) | Oil wear debris online monitoring method based on optical low-coherence imaging | |
CN116818778A (en) | Rapid and intelligent detection method and system for automobile parts |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |