Multi-Stage Machine Vision Inspection Algorithm for Injection-Molding Quality of USB Cable Connectors
Abstract
The injection molding of USB cable connectors requires preventive process control before molding and reliable appearance inspection after molding. This paper presents a multi-stage machine vision algorithm for injection-molding quality inspection of USB cable connectors. The inspection procedure is decomposed into three image-level binary classification tasks: in-mold alignment inspection before injection, top-side appearance inspection after injection, and bottom-side appearance inspection after injection. To reduce label leakage caused by equipment overlays in production images, a de-marking preprocessing procedure suppresses high-saturation red and green marks, masks the top status area, converts images into grayscale, enhances local contrast using CLAHE, and normalizes image size. A 1992-dimensional fused feature vector is constructed by combining HOG, LBP, grayscale histogram, edge-density, intensity-statistical, and geometric descriptors. Linear SVM, RBF SVM, Logistic Regression, and Random Forest are compared under the same preprocessing and feature-extraction pipeline. The experiment is conducted on 4144 production-line images, including 2000 in-mold images, 1089 top-side appearance images, and 1055 bottom-side appearance images. The results show that Logistic Regression provides the best overall balance among the compared models. It achieves 100.00% accuracy for in-mold inspection, 99.08% accuracy for top-side appearance inspection, and 100.00% accuracy for bottom-side appearance inspection. The top-side task has five false alarms among 500 OK test images and no missed NG samples; the other two tasks have no false alarms and no missed detection on the evaluated test sets. Exact binomial confidence intervals are reported to avoid over-interpreting perfect point estimates from finite test sets. The proposed pipeline, therefore, provides a practical baseline for online inspection, while larger cross-date and cross-batch validation remains necessary before full-scale deployment.