Artificial vision system for particle size characterization from bulk materials