Banana Sugars
Green bananas have a very high starch content and are not suitable for eating raw. However as bananas ripen, their starch converts to fruit sugars and the raw fruit becomes readily digestible. A common method for measuring the conversion of starch to sugars in fruit is to use refractometry, to measure the Total Dissolved Solids expressed as degrees Brix (°Bx). One degree Brix is equal to one gram of sucrose in 100 grams of solution.
The procedure that Sagitto used was to take a 30gm portion of flesh from the centre of the banana, and blend this for 30 seconds with 90ml of water. The resulting mixture was measured with a digital refractomer. The mean of triplicate readings was multiplied by three, to account for the dilution effect of the water3.
Brix for 113 bananas were measured in this way. Values ranged from 1.4 °Bx to 17.4 °Bx, with a mean value of 10.9 °Bx
Machine Vision and Bananas
The bananas were placed in simple lightbox, illuminated with LED light strips, and photographed using an iPad camera. Each banana had a unique 3-digit label. A machine vision application was created to automatically read these labels and the banana image. The average colour of each banana image was measured, and the detailed colour information was stored in Sagitto's servers along with the image itself.
For each banana, a report was produced and a unique QR code was generated. Clicking on the QR code opens up a more detailed report and gives access to the source image.
Hue Angles
The iPad camera recorded colours as triplets of red, green and blue values. We transformed these into the HSL (hue, saturation, luminance) colour space, and used the hue angle as the main characteristic to differentiate individual bananas. As the plot below shows, hue angles in the training set ranged from 31 degrees to 77 degrees.
Ripeness versus Sweetness
We can easily determine the ripeness of a banana by touch, and using our own eyes to assess colour changes in the fruit skin. However ripeness doesn't always equate to sweetness. One surprising result of our experiment was that sometimes two bananas with very different degrees of ripeness (as indicated by their colour and firmness) could have very similar Brix levels.
While Brix is a useful and objective measure of fruit 'sweetness', it does have one big drawback : it is a highly destructive method of measurement! Perhaps one might be able to apply machine vision and NIR spectroscopy to predict Brix levels in bananas, leaving the bananas free to be eaten another day?
Predicting Brix Using Machine Vision
We used the colour data collected from our machine vision application to build a model that predicted Brix of bananas, using only the colour data. As the following plot shows, there was a reasonable relationship between colour and Brix levels - but as we have already shown with bananas B208 and B226, predicting the Brix of an individual banana just using its colour is not a very reliable approach.
Predicting Brix Using NIR Spectroscopy
We used Sagitto's miniature NIR spectrometer to scan each banana, and built a machine learning model using only this NIR data. The resulting model was considerably better than the one built just with colour data. However we suspected that if we could combine both colour and NIR data, we might be able to get an even more accurate model.
Predicting Brix By Combining Machine Vision and NIR
As we suspected, when we built a model for Brix of bananas using both colour and NIR data, the result was even better.
Timing Issues With Sensor Fusion Models
What we have described above is a form of sensor fusion. One of the key challenges with sensor fusion applications is timing - data from different sensors is collected at different times, which means that models that rely on data from multiple sensors needs to be intelligent enough to know when all the data is available. Sagitto addresses this timing challenge by using AI Agents, that access the data through our API. But that is a story for another time.
Conclusion
Visual inspection by itself can be insufficient to identify the 'sweetness' of fruit, as measured by Total Dissolved Solids. However when image data is combined with NIR spectra then accurate models for measuring fruit sugars are much more achievable.
References
1. Liew, C.Y. & Lau, C.Y.. (2012). Determination of quality parameters in Cavendish banana during ripening by NIR spectroscopy. International Food Research Journal. 19. 751-758.
2. Ofosu, D.O., Appiah, F. and Banful, B. (2020) Interactive Effect of Variety and Irradiation Dose on Postharvest Behaviour of Fruits of Two Plantain (Musa sp AAB) Varieties from the Green Stage to the Onset of Ripening. American Journal of Plant Sciences, 11, 372-381.https://doi.org/10.4236/ajps.2020.113027
3. Mendoza, Fernando & Aguilera, J.M.. (2006). Application of Image Analysis for Classification of Ripening Bananas. Journal of Food Science. 69. E471 - E477. 10.1111/j.1365-2621.2004.tb09932.x.
4. Lien, Nguyen & Baranyai, Laszlo & Nagy, David & Mahajan, Pramod & Zsom-Muha, Viktória & Zsom, Tamás. (2021). Color analysis of horticultural produces using hue spectra fingerprinting. MethodsX. 8. 101594. 10.1016/j.mex.2021.101594.