Dataset_Capture_Script.py
program used to capture images, I wanted the camera to only see the black conveyor belt, hence I played with the img.scale
function until I found the correct coordinates (see code snippet below). I also added lens correction although I’m not sure it makes a difference. Remember to later use exactly the same code lines in the inferencing program!"3, M10: 2, M8:1"
means that 3 nuts were found, 2 M10’s and 1 M8.
show_video_feed()
, the camera can if needed be changed from 0 to another in cap = cv2.VideoCapture(0)
.Nut sizes: M12, M10, M8, M6
Grayscale
instead of RGB
as the conveyor belt is black and the nuts quite colorless, hence no need to use colors.main.py
from its memory. Ensure this program has the proper image conversions you used in the capturing phase!