In this course, we learned the theories, algorithms, and computational methods of computer vision, including Sensor Selection, Image Processing and Analysis, Motion Analyses, 3D Reconstruction, Pointcloud Processing, Feature Tracking, and Object Detection. In the programming applications in Python, we learned to use Computer Vision related libraries, such as OpenCV, Tkinter, Numpy, Qt and etc. In the final project, we tried to identify, inspect and detect the defects (such as particles, flowlines and scratches) on the injection molded parts. We successfully developed a Python algorithm to perform dynamic defect detection on injection molded parts in real time with the hardware modules of a camera, an LED ring light and Arduino. We first input the image from Arduino and the camera to the Python algorithm and converted it to grayscale and binary. Then we performed Morphological Operations to reduce noise in the order of Dilate>Erode>Erode>Dilate. Next, we found and drew all contours, ranked them by area, found and filled the N largest contours, where N is a tunable parameter. Finally, we performed Thinning Operation and output the defect images. We also performed all the above operations and show results to users with a UI built by Tkinter in real time.
(Dilate > Erode > Erode > Dilate)
(N is a tunable parameter)