Magic Line: An Integrated Method for Fast Parts Counting and Orientation Recognition Using Industrial Vision Systems