3. Sorting based on quality
If i=3 is selected than sorting will be done on basis of quality
Grading vegetables on basis of quality is very important
factor, for health benefits .here we done our experiment on
tomatoes. There are several factors which decide the quality
of tomatoes. We have checked quality on basis of whether its
spotted tomato or spotless.
For finding defects or spots we following steps were done
1. With the help of matlab function „regionprop‟ first
„centroid‟ and „bounding box‟ were found.
2. Then this bounding box was passed to overall binary
image and all pixel values were checked. Pixel location
where value found is zero is counted. This is done because
all the pixel location where there is any defect that will
appear as black.
3. Then particular threshold value is selected by user if the
counted value is greater than the threshold value than the
tomato will be declared as defected, otherwise it‟s a good
tomato.
All algorithms for image processing were written in
MATLAB 7.12.0.635(R2011a). (The Math-works, inc,
USA). Figure 4 in next page showing flowchart sequence of
the work done in this research