CONTOUR-BASED METRIC AND STRUCTURAL DESCRIPTORS FOR ROBUST PLANAR SHAPE RECOGNITION IN BINARY IMAGES
Abstract
Abstract: This paper presents a robust and computationally efficient framework for extracting metric and structural descriptors from contours of planar objects in binary images. The study aims to develop a compact yet highly discriminative representation capable of maintaining stability under rotation, distortion, and noise — conditions under which traditional global descriptors frequently fail. The methodological novelty lies in the integration of three complementary components: (i) a metric contour-length descriptor based on mixed 4- and 8-neighborhood distances; (ii) a library of 16 canonical 3×3 binary template masks for local structural encoding; and (iii) an extended 32-mask ternary (0/1/2) neighborhood representation that incorporates interior-adjacent pixels to capture fine-scale geometric transitions. Quantitative experiments conducted on ten planar shapes and 360 rotational variants show that the length-only baseline achieves 100% recognition, while the 16-mask descriptor yields an average misclassification of 2.3 errors per image. In contrast, the proposed 32-mask descriptor reduces this value to 0.8 and achieves perfect recognition in 90% of the shapes. Additional robustness tests under Gaussian blur (σ = 2.0), salt-and-pepper noise (density = 0.05), and morphological perturbations reveal that the extended representation retains structural distinctiveness even in degraded imaging conditions. These results demonstrate the effectiveness of the proposed contour-based feature extraction framework for industrial inspection, defectoscopy, metallurgical microstructure analysis, and biomedical image processing.