Mangifera indica real-time quality classifications using codebook segmentation and mass-size correlation equations