This invention relates to the fields of precision instrument manufacturing and
precision testing and measurement technology, specifically a
microstructure parameter measurement method based on a UNet network. First, addressing the presence of numerous prominent textures and scratches in the background region of the image of the test part, a region segmentation method based on a UNet network is employed to improve segmentation accuracy and overcome the influence of
noise. Then, a dataset is collected and
image enhancement is performed to improve the model's generalization ability.
Horizontal and vertical flipping enriches the
pose of the
microstructure, and random variations in the HSV color
gamut enhance the model's robustness to different lighting environments. After segmenting the target region, edge points are extracted and then fitted. Due to the presence of
processing defects, outliers need to be removed before fitting. For micropore structures,
outlier removal involves connecting edge sequence points to remove protrusions, and finally selecting the region with the largest
connected component as the repaired feature region. For microgroove structures,
outlier removal involves using the RANSAC
algorithm for multiple iterations to filter out all interior points satisfying the "correct solution," and then using the data that best fits as input for
least squares fitting, which can better estimate
model parameters. This invention can improve the visual measurement accuracy of micro-holes and micro-grooves at the
micrometer to
millimeter level in workpieces.