Intelligent line camera with adaptive workpiece flow control and optical workpiece identification For orientation recognition and quality inspection of small moving parts Encoder connection