Quality control in textile industry via machine vision