Tool micro-defect quantification is often degraded by optical sampling limits, boundary aliasing, and non-Gaussian industrial noise. To improve segmentation fidelity and physical measurement reliability, this study proposes a physically guided reconstruction and metrology framework for milling tool defects. The framework first uses an improved ResNet18-BiFPN segmentation network supervised by a distance transform-based boundary-aware loss, which encourages mask boundaries to fit high-curvature crack and chipping regions. A tensor-guided elliptical adaptive structuring element is then introduced to restore local topology while preserving tangential connectivity and normal boundary fidelity. Finally, a stable edge region search and curvature-adaptive gray/Zernike moment fusion strategy are used for noise-robust sub-pixel localization and physical area quantification. Image-based evaluation and controlled simulation-based stress tests show that the proposed method achieves an mIoU of 92.5%, an F1-score of 97.1%, and an HD95 of 2.15 pixels. Under strong synthetic noise, the average distance error remains below 0.28 pixels. For micro-defect area measurement, the mean relative error is reduced to approximately 1.7%. These results indicate that the proposed framework can support more reliable defect metrology for tool condition monitoring under complex industrial imaging conditions.
For irregularly shaped 820CrMnTi carburizing and nitriding parts, the challenges of high reflectivity-induced overexposure, low surface contrast, and interference from minute burrs in industrial online inspection are addressed in this paper. An innovative precision detection method integrating adaptive imaging and a dual-drive heterogeneous coupling model (RGFCN) is proposed. Such parts, due to surface photovoltaic characteristic changes caused by carburizing and nitriding heat treatment and the complex on-site lighting environment, are prone to local overexposure and “false out-of-tolerance” measurements caused by outlier sensitivity in traditional inspections. First, an innovative programmatic adaptive exposure control algorithm based on grayscale histogram feedback is introduced, which dynamically adjusts imaging parameters in real time to effectively suppress high-brightness overexposure under specific working conditions. Second, a novel adaptive main-axis scanning strategy is designed to construct a dynamic follow-up coordinate system, eliminating projection errors introduced by random positioning from a geometric perspective. Additionally, Gaussian gradient energy fields are combined with the Huber M-estimation robust fitting mechanism to suppress thermal noise while automatically reducing the weight of burrs and oil stains, achieving “immunity” to non-functional defects. Meanwhile, a data-driven innovative compensation approach is introduced. Based on sample training, gradient boosting decision trees (GBDTs) are integrated to explore the nonlinear mapping relationship between multidimensional feature spaces and system residuals, achieving implicit calibration of lens distortion and environmental coupling errors. By simulating factory conditions with drastic 24 h day–night lighting fluctuations and strong oil stain interference, statistical analysis of over 1000 mass-produced parts shows that this method exhibits excellent robustness in complex environments. It reduces the false out-of-tolerance rate caused by burrs by over 90%, and the standard deviation of repeated measurements converges to the micrometer level. This effectively addresses the visual inspection challenges of irregular, highly reflective parts on dynamic production lines.