A Mobile Application for Direct Light Compensation in Smartphone-Based Fruit Image Acquisition Systems
Bruno Bernardi, Matteo Sbaglia, Giuseppe PapuzzoThis research represents an advancement in smartphone-based image acquisition methodology, building upon a previous study to estimate the essential oil content of bergamot fruits in situ using a deep learning approach. To overcome an operational constraint due to a bulky portable dark box to standardise illumination, this study proposes a more versatile solution: a mobile application based on a colour card reference. By replacing physical shielding with digital compensation, the app functions as a local colourimetric sensor, enabling real-time correction of images acquired directly in the orchard, regardless of environmental variables such as direct sunlight or shadows. Workflow relies on an automated calibration procedure. Upon image acquisition, the application utilises ArUco Markers to autonomously detect and extract both the colour card and the fruit surface. The core of the innovation lies in the colour calibration algorithm based on RGB histogram matching logic, which calculates the precise chromatic transformation required to align the field data with the reference card data (acquired under controlled conditions). These calculated parameters are then dynamically mapped onto the fruit’s image. The final output is a normalised high-fidelity image, ready for the calculation of chromatic indices, such as the citrus colour index, or for seamless integration into predictive models. The results show that the application is a valid tool for colour calibration, thanks to the good agreement with the values obtained using the inspection chamber. The latter can therefore be replaced by the app, which allows reliable results to be obtained even when used on its own.