Machine Vision for Quality Inspection of Cotton in the Textile Industry