In today's intensely competitive environment, businesses strive to optimize production efficiency to reduce costs, increase profitability, and ensure customer satisfaction. This focus on efficiency and quality enables businesses to operate more effectively, gain a competitive advantage in the market, and move towards sustainable growth. This study uses image processing techniques to detect missing segments in the assembly of ball joints automatically. In the automotive industry, performing quality control of critical components before assembly and detecting and classifying the defective ones is essential. Many quality control methods can be applied with existing technologies. This paper proposes an automatic real-time control based on image processing techniques to detect ball joint missing segments, a common defect in the automotive industry. In the company, operators perform defect detection by visual inspection. In this system, production continues in cases where the operator cannot detect the defect. This system aims to detect the errors made by the operator during the assembly operations and provide instant feedback. The developed system uses OpenCV library algorithms that are highly accurate in detecting defects in manual assembly processes so that missing components are removed from the production chain, and production quality is significantly improved. Accuracy is over 94% when identifying missing segments, about 30% better than traditional methods. In tests, 1200 ball joints were run through the system, resulting in 1150 defects being correctly identified and removed from the production line. Accuracy is high thanks to the application of various image processing techniques such as grayscale conversion, edge detection, and shape recognition. This also provides real-time feedback to the operator so the system can reduce detection and response time from 15 seconds to 5 seconds. This increases production speed and reduces the error rate in manual assembly processes by 20%. This paper also highlights the potential of image processing technology in manufacturing. It will contribute to improved quality control mechanisms to increase the reliability and efficiency of production lines in the automotive industry.