Full text
XXX-X-XXXX-XXXX-X/XX/$XX.00 ©20XX IEEE Citrus sorting dynamic control using multispectral computer vision Javier Mateos Luengo Research Centre on Production Management and Engineering (CIGIP) Universitat Politecnica de Valencia Valencia, Spain https://orcid.org/0009-0003-8007-1545 Francisco Fraile Research Centre on Production Management and Engineering (CIGIP) Universitat Politecnica de Valencia Valencia, Spain https://orcid.org/0000-0003-0852-8953 Joan Lario Femenia Research Centre on Production Management and Engineering (CIGIP) Universitat Politecnica de Valencia Valencia, Spain https://orcid.org/0000-0003-4843-3334 Marcos Terol Research Centre on Production Management and Engineering (CIGIP) Universitat Politecnica de Valencia Valencia, Spain https://orcid.org/0000-0002-3971-9851 Abstract— This paper presents the development of a dynamic control system designed to sort citrus fruits based on external defects identified through multispectral imaging. The proposed system combines PID controllers integrated through the OPC-UA protocol to facilitate real-time adjustments and optimize batch classification. By dynamically controlling classification thresholds, the system maximizes output within customer-specified tolerances, enhancing batch utilization and quality. Implementing Node-RED as an OPC-UA client enables seamless integration and real-time data processing, ensuring efficient and responsive control. Additionally, Docker containerization is employed to streamline deployment and scalability, enabling flexible and resource-efficient implementation across various operational environments. The system also introduces virtual classification tiers that dynamically adjust sorting thresholds, allowing for better utilization of each batch while maintaining adherence to strict quality specifications. Experimental evaluations demonstrate that the system significantly improves sorting quantities, optimizes classification efficiency, and reduces waste by adapting to varying conditions in real-time. These enhancements ensure high standards of quality and efficiency in citrus fruit classification while supporting sustainable agricultural and industrial practices through automated inspection. Keywords—Multispectral, Dynamic Control, Citrus, Computer Vision, Segmentation, Sorting. I. INTRODUCTION The quality of the fruit is predominantly determined by the presence and severity of skin defects. A well-polished skin with minimal defects typically implies higher quality and demands a higher price from customers. Detecting defects during the packing process helps ensure that only high-quality fruits make it to the market [1]. Additionally, accurately identifying each defect type by automated inspection system enhances fruit quality and maximizes the producer's profitability. Citrus fruits undergo a multi-step sorting process in packing facilities to ensure quality before shipment. Initial inspection removes damaged and rotten fruits, followed by washing, fungicide treatment, rinsing, waxing, and cold storage [2]. A final grading stage categorizes fruits based on size and colour to meet market standards and maximize value. In this step, current research will implement sorting dynamic control. Automated inspection using computer vision enhances accuracy and consistency compared to manual sorting. This technology analyzes fruit characteristics, detects defects, and identifies fungal infections early, preventing spoilage [1,2]. By automating the process, facilities improve quality control, efficiency, and profitability while ensuring only high-quality fruits reach consumers. Manual classification and sorting rely on labour-intensive, slow, and inconsistent visual inspections performed by workers. European citrus producers face competition from foreign countries with lower production costs, where inspection and classification are still done manually, leading to subjective and inconsistent results. Adopting automated inspection systems, such as machine vision, has become a priority in Europe to maintain high-quality standards and remain competitive [2]. The growing demand for safe and high-quality food has emphasized the need for better quality management [3]. For fresh citrus, quality standards primarily focus on ensuring the fruit is free from bruises and decay while meeting specific requirements for shape, color, and size [2]. Early detection of defects is crucial, as unnoticed issues can spread infection or hidden defects become visible during transport, increasing the risk of rejection by buyers or complaints from customers. Therefore, accurate and reliable classification during the final sorting process is crucial for various types of fruits. While numerous studies have focused on fruits such as apples and peaches, as well as vegetables like potatoes and fungi like mushrooms, this research focuses on citrus fruits, which are of significantly important in Spain, particularly in Valencia. [4,5]. Non-destructive inspection technologies play a crucial role in deploying automated inspection systems, significantly enhancing accuracy and reproducibility compared to manual methods [4,6]. Computer vision offers rapid processing, objective assessment, and high throughput, making it a valuable agricultural and food grading solution. Unlike human vision, machine vision extends beyond the visible spectrum, utilizing ultraviolet (UV) and near-infrared (NIR) radiation to detect defects more effectively [1,2]. Studies show that 2025 IEEE International Conference on Engineering, Technology, and Innovation (ICE/ITMC) | 979-8-3315-8534-1/25/$31.00 ©2025 IEEE | DOI: 10.1109/ICE/ITMC65658.2025.11106566 Authorized licensed use limited to: UNIVERSIDAD POLITECNICA DE VALENCIA. Downloaded on September 01,2025 at 09:19:56 UTC from IEEE Xplore. Restrictions apply.
TABLE I. CITRUS FEATURES OF INTEREST Parameter Description Range (%) Severity Diameter Diameter Masurement [0-100] Low Decay Brown discoloration [0-100] High Color Color Homogeneity [0-100] Low White Rotten Greenish areas indicating white rot [0-100] Very High Scars Cracks or damage on the skin [0-100] High combining NIR and visible light improves defect identification, ensuring higher-quality sorting. Standard automatic inspection systems typically use dual cameras— one for NIR detection to distinguish fruit from the background and another for colour classification [1]. Advancing nondestructive techniques for evaluating both external and internal quality attributes benefits producers, processors, and distributors by enabling faster and more precise quality control. Manual sorting and grading of fruits and vegetables are labour-intensive, time-consuming, and prone to inconsistencies [4,7]. In contrast, machines offer greater reliability and uniformity. The need to reduce labour costs has driven significant advancements in mechanization and automation in packing facilities, improving efficiency and consistency in the inspection process. Beyond the problem of identifying skin defects and their types, it is essential to adapt the classification parameters dynamically in the sorting machinery hardware. This adaptability ensures optimal utilization of each inspected batch according to specific customer needs and tolerances. This paper explores various approaches to accurately sort citrus fruits based on customer-specific batch order tolerances, ranging from 5 % to 15 %. The classification process leverages normalized features extracted from multispectral images of each inspected item, as summarized in Table I, according to predefined ranges. The rest of the paper is structured as follows. Section II outlines the objective of improving citrus fruit classification by integrating dynamic control with multispectral computer vision techniques, focusing on real-time adjustments for the classification parameters. Section III details the materials and methods, including the use of convolutional neural networks for image segmentation and classification, as well as the integration of OPC-UA and PID controllers to optimize batch sorting. Section IV presents experimental results demonstrating the effectiveness of the proposed approach in improving classification accuracy and maximizing batch utilization under different customer tolerance thresholds. Finally, Section V concludes the paper by summarizing the contributions of the dynamic control system in enhancing sorting efficiency, ensuring higher fruit quality and supporting sustainable agricultural practices through automated inspection. II. OBJECTIVE The purpose of this work is to improve and optimize the existing classification model that is based on anomaly. detection in multispectral images for citrus. For this purpose, the following tasks are performed, ranging from constant monitoring of accumulated output quantities classified by the model to the feedback of these results for the dynamic adjustment of tolerance parameters that determine the quality grade of the inspected citrus fruits. For the proposed use case, five quality categories or tiers are defined. The three real quality categories are directly linked to pneumatic actuators that automatically sort and expel the fruit units onto their respective conveyor belts. Once the quality tier is assigned to a fruit item, the system triggers the mechanism to direct the fruit to the appropriate conveyor belt. The Tier 1 category is the highest quality class, representing the premium standard for citrus fruits. Tier 2 category is the second highest quality class, which includes fruits that meet high standards but are not as premium as Tier 1. Lastly, the Tier 3 category includes lower-quality fruits that are unacceptable and do not meet the minimum customer requirements. In addition to the three main categories, two virtual categories are defined: Tier 1 Virtual and Tier 2 Virtual. These virtual tiers are used to reclassify fruits that are initially classified as Tier 2 but are promoted to Tier 1 (Tier 1 Virtual) and initially classified as Tier 3 and promoted to Tier 2 (Tier 2 Virtual) based on dynamic adjustments, ensuring that the supplier’s tolerance margins are met. The following Figure 1 shows the ten variables that need to be dynamically adjusted in real time based on the weight output result. These variables, highlighted in red and specifically located in the SecondB and FirstB columns. These variables control the dynamic values that determine the classification of a fruit item into Tier 1 Virtual or Tier 2 Virtual. Fig. 1. OPC-UA Variables dynamically adjusted. Authorized licensed use limited to: UNIVERSIDAD POLITECNICA DE VALENCIA. Downloaded on September 01,2025 at 09:19:56 UTC from IEEE Xplore. Restrictions apply.
Fig. 2. Citrus Image Segmentation. This dynamic adjustment enables the batch to be fully optimized according to the customer batch specifications while balancing optimal batch weight distribution and tier classification. III. MATERIALS AND METHODS Citrus fruits are classified using a convolutional neural network vision model that analyzes multispectral images. These images capture detailed spectral information about all fruit’s surface, enabling the detection of various defects and quality parameters. The model is designed to perform classification and segmentation tasks on each inspected item, ensuring a comprehensive fruit quality evaluation. Before the quality classification, the images are segmented to determine the Region Of Interest (RoI) on which the anomaly detection is carried out. This process is crucial for accurately identifying and classifying citrus fruits based on their quality and physical properties. The segmentation process and anomaly detection involve several steps, as illustrated in Figure 2. Each variable feature segmented is normalized on a scale from 0 to 1000, with 1000 representing the optimal value for a perfect citrus fruit according to customer specifications. A. Image Classification and Segmentation A pre-trained multispectral vision model classifies each citrus fruit into one of three quality tiers (Tier 1, Tier 2 and Tier 3) based on predefined parameters previously mentioned. Each parameter has a fixed value for determining the quality tiers and can be easily identified when attending to the spectral band in which the computer vision algorithm can detect it. To enhance the flexibility and profitability of the sorting process, virtual classes with dynamic ranges are included for Tier 1 Virtual Upper Limit (Tier 1V UL) and Tier 2 Virtual Upper Limit (Tier 2V UL). These virtual classes allow for adjustments in the classification thresholds, enabling a more fine-tuned sorting that maximizes the utilization of each batch according to specific customer requirements. In addition to the classification task, the model performs segmentation to identify and delineate the specific regions of interest on the fruit’s surface. This process involves isolating all areas affected by defects such as decay, white rotting and/or scars, and to quantify their severity to properly normalize each parameter class for all the inspected items. The spectral band assessment and results can be seen in Figure 3. Table II presents the classification limits, including the fixed values for the three real quality tiers (Tier 1, Tier 2 and Tier 3) and the dynamic ranges for the two virtual quality tiers (Tier 1 V and Tier 2 V). These parameters are crucial in determining whether a citrus fruit is classified into Tier 1, Tier 2, or Tier 3, thereby influencing the overall profitability of the sorting process. TABLE II. CITRUS CLASSIFICATION PARAMETERS Parameter Tier 1 UL Tier 1V UL Tier 2 UL Tier 2V UL Tier 3 UL Diameter 1000 (1000725) 725 (725-700) 700 Decay 1000 (1000725) 550 (550-500) 500 Color 1000 (1000725) 620 (620-605) 605 White Rotten 1000 (1000725) 900 (900-850) 850 Scars 1000 (1000725) 650 (650-600) 600 B. Dynamic Control The dynamic control system is designed to optimize the classification process by adjusting the parameters in real-time based on the overall weight of the batch relative to the maximum tolerance. The system employs multiple PID (Proportional-Integral-Derivative) controllers that act on each of the ten OPC-UA (Open Platform Communications Unified Architecture) variables, ensuring precise and responsive control over the classification thresholds. PID controllers regulate the classification parameters' dynamic values by continuously monitoring the deviation from the desired setpoint. In this context, the setpoint is the maximum tolerance the customer allows. The control law for the PID controller is given by: 𝑢 (𝑡)= 𝐾𝑝· 𝑒(𝑡)+ 𝐾𝑖 ∫𝑒 (𝜏) 𝑡 0 𝑑𝜏 + 𝐾𝑑 𝑑𝑒(𝑡) 𝑑𝑡 (1) Where: 𝑢 (𝑡) is the control signal, which is customer tolerance. 𝑒(𝑡) is the error signal, which is the difference between the customer tolerance and the actual classified tier weight. 𝐾𝑝 is the proportional gain. 𝐾𝑖 is the integral gain. Authorized licensed use limited to: UNIVERSIDAD POLITECNICA DE VALENCIA. Downloaded on September 01,2025 at 09:19:56 UTC from IEEE Xplore. Restrictions apply.
Fig. 3. 360º image spectral bands per item. 𝐾𝑑 is the derivative gain. Given the parameters tested and configured according to multiple experiments the PID controller gains are set as: 𝐾𝑝 = 1 𝐾𝑖 = 0.5 𝐾𝑑 = 0.1 Each PID controller adjusts the classification thresholds for each class limit following two approaches. A permissive approach that focuses on when the setpoint is below the maximum tolerance allowed by the customer, in which the classification thresholds are tuned to be more permissive, allowing a higher acceptance rate of citrus fruits, maximizing the utilization of the batch while still complying with customer-specified tolerance limits. On the other hand, when the overall class weight for Tier 1 and/or Tier 2 exceeds the maximum tolerance, the PID controllers tighten the classification thresholds to be more restrictive, ensuring that the batch remains within acceptable quality limits and preventing excess low-quality fruits from being classified into higher tiers. By dynamically adjusting the classification thresholds based on real-time feedback, the PID controllers enable the system to optimize the sorting process, balancing the need for high-quality output while keeping the batch utilization efficient. This approach ensures that the classification equipment adapts seamlessly to varying conditions, maintaining profitability and adherence to customer quality specifications. C. Microservices for interoperability Microservices technologies enable the deployment of dynamic control systems, enhancing the sorting process performed by the automatic inspection equipment. Equipment communication and decision-making tasks are performed by programmable logic control, inference data from automatic inspection equipment and dynamic control systems. The use of low-code Node-RED technologies enables seamless data exchange between systems. The containerized environments, thanks to Docker solutions, enable managing multiple applications with low consumption of computational resources, which can be deployed at multiple operative systems. 1) Node-RED Integration Low-code development simplifies the integration of dynamic control systems with automatic inspection equipment, reducing the need for extensive programming knowledge [8]. Node-RED microservices are based on graphical interfaces and visual components, eliminating the manual coding of pre-built elements and enabling faster, robust and scalable integration [9]. Node-RED implements a flow-based visual programming tool that facilitates seamless integration of inspection and sorting hardware via APIs, or other communication protocols as OPC-UA used in the solution proposed. One of the main advantages of Node-RED is that it can be easly deployed across Edge, Fog, and Cloud environments, and managed through a web-based interface [9]. Also, it supports various communication protocols, including OPC-UA, Modbus TCP, PROFINET, and MQTT, allowing efficient data exchange between typical industrial devices [10]. Enhancing automation, connectivity, and interaction with physical devices makes it a very promising technology for industrial and IoT applications to enhance the sorting process and increase operational performance. The Node-RED microservice performs the integration of the PID controllers within the classification hardware, which helps map all OPC-UA protocol variables on which proposed PID controllers are based. Node-RED provides an intuitive, flow-based development environment that simplifies the integration of various services and APIs, making it easier to manage and visualize data pipelines. Data can be analyzed in real-time, enabling immediate adjustments to the classification process based on current and historical conditions. Also, with Node-RED’s modular architecture it is highly scalable and adaptable to changing requirements, making it suitable for both small-scale and large-scale implementations. Lastly, Node-RED supports a wide range of protocols and can be easily extended with additional nodes and various hardware classification equipment. In the proposed work, the pipelines presented in NodeRED are built to perform corrections every three seconds to the previously defined target variables, allowing for dynamic Authorized licensed use limited to: UNIVERSIDAD POLITECNICA DE VALENCIA. Downloaded on September 01,2025 at 09:19:56 UTC from IEEE Xplore. Restrictions apply.
and real-time adjustments during the classification process. All the pipelines act as OPC-UA clients, enabling subscription and publication of the variables of interest that determine the behaviour of the equipment and its classification outcomes. The proposed flow for monitoring the OPC-UA variables related to the diameter class is presented in Figure 4. On top of the screen, there are several tabs that allow navigation through the NodeRED User Interface (UI) that allows interaction with the monitorization of each class variable. Each tab contains data pipelines with two PID controller nodes linked with the class limit variables that control the number of items categorized as Tier 1 Virtual and Tier 2 Virtual, allowing full and granular control of each variable simultaneously. The proposed flow is subscribing to all the values of a certain class, which are dynamically published to the PID controller every time the value changes or after a userfixed amount of time. The OPC-UA Item nodes on the left represent each of the variables of interest for the diameter class. To properly identify the variables, the user must provide the item id, which can be gathered from the OPC-UA server. These IDs help to identify the nodes and provide information about the current status of that specific hardware variable in real-time. By connecting these nodes with the OPC-UA Client node, the user can read and write over the variables. The OPC-UA Client node needs to subscribe to the OPC-UA server IP address, which should be accessible from within the same local network. These OPC-UA client nodes located after the PID controllers are used for writing purposes. On the other hand, OPC-UA client nodes for monitoring or graph purposes are used for reading purposes, enabling the user to create its own UI on the microservice and closed-loop feedback for the PID controller. This microservice integration approach allows users to extend the configuration to several classification tiers, anomaly classes and classification hardware equipment in a matter of minutes. The setup ensures that the classification thresholds are continuously monitored and optimized, leading to improved batch utilization and adherence to customer quality specifications. 2) Docker containerization Docker container technology offers portability, scalability, and efficient deployment while minimizing system overhead [9]. These isolated environments have the capability of running different applications or images independently on a host system, often delivering services through APIs. This ensures that containerized applications can function reliably across any platform or operative systems supporting a Docker container engine. In smart manufacturing systems supported by automatic inspection equipment, IoT, and Fog/Cloud computing, containers enhance interoperability and streamline the deployment of microservices like dynamic control systems for sorting the fruits [11]. The sorting dynamic control employs Docker for containerized deployment, providing an isolated and adaptable environment [12]. The Docker image generated presents the advantage that it is compatible with multiple operative systems like Linux, Windows, or macOS. Using Docker Compose, users can deploy easily the Sorting Dynamic Control from the specific Git repository. Fig. 4. Node RED Data Pipeline. Authorized licensed use limited to: UNIVERSIDAD POLITECNICA DE VALENCIA. Downloaded on September 01,2025 at 09:19:56 UTC from IEEE Xplore. Restrictions apply.
IV. EXPERIMENTAL RESULTS A. Experimental Environment This paper’s experimental environment consisted of a Windows 10 Enterprise LTSC workstation, specifically Microsoft Windows 10 Enterprise LTSC, Version 10.0.17763 Build 17763. The system is based on an Intel(R) Core(TM) i7-10700E CPU @ 2.90GHz with 8 cores, and it operates on an x64-based PC platform. Additionally, the dynamic control implemented is running on a Virtual Machine with Ubuntu 22.04, that runs Node-RED microservice on Docker. This setup allows efficient management and deployment of the dynamic control system, leveraging the robustness and scalability of Docker with the flexibility of the Node-RED platform for real-time data pipeline processing and automation. The experiments are conducted to inspect a batch of mandarins weighing from 9.62 to 9.70 kilograms. Two sets of experiments are performed: one with a dynamic control system enabled and another without it. The dynamic control system is employed to classify and optimize the batch based on real-time data analysis. The system’s ability to adjust parameters dynamically ensured that the mandarins are accurately categorized into different quality tiers, meeting the customer’s specifications while maintaining optimal weight distribution and quality standards. The ability is tested for the scenarios corresponding to 5%, 10% and 15% allowed tolerances that help determine the system's feasibility and potential amortization in an industrial scenario. B. Evaluating Indicators All the relevant OPC-UA variables have been analyzed to evaluate the dynamic control system. The graphs in Figure 5A and 5B illustrate the PID adjustment effect for different weight variables that are classified according to their diameter, decay, scars, color and white rotten anomalies that were detected and are critical in determining the fruit classification tier. These values represent the accumulated weights in the batch corresponding to Tier 1 Virtual and Tier 2 Virtual, respectively, and the colour represents the contribution of each anomaly class of interest to this distribution. By monitoring these indicators in real-time, the system can dynamically adjust the classification thresholds, ensuring the batch meets the desired quality standards while maximizing the utilization which is the goal. However, the PID-based solution has some limitations. PID controllers, while effective for many control problems, may struggle with highly non-linear processes or systems with significant time delays. Additionally, tuning PID parameters can be complex and time-consuming, requiring careful adjustment to avoid overshooting or oscillations. C. Results Discussion The results of the experiments demonstrated the effectiveness of the dynamic control system in handling realtime data and adjusting parameters to optimize the batch classification. The integration of the Node-RED microservice Fig. 5. PID classification. A) Tier 1 V weight distribution (15%). B) Tier 2 V weight distribution (15%). on Docker provided a seamless and scalable solution for processing and automating the data pipeline. The system successfully classified the mandarins into the appropriate quality tiers, ensuring that the batch met the required standards. In contrast, the experiments conducted without the dynamic control system showed less efficient classification and optimization, resulting in a less balanced distribution of the mandarins across the quality tiers. This comparison highlights the significant improvement in batch quality and customer satisfaction achieved with the dynamic control system. The detailed results of experiments in which the setpoints have been established to 5%, 10% and 15% for the optimal utilization of the batch can be seen in Tables III, Table IV and V, respectively, which compare the classification outcome when dynamic control is enabled and not. As can be seen, the batch distribution is enhanced when the dynamic control is active, providing a more accurate and optimal batch control according to specific customer needs. TABLE III. CITRUS CLASSIFICATION RESULT COMPARISON (5%) Quality Level No Dynamic Control With Dynamic Control Weight (kg) Weight (%) Weight (kg) Weight (%) Tier 1 3.68 37.93 3.68 37.93 Tier 1V - - 0.38 3.87 Tier 2 2.14 22.13 1.77 18.24 Tier 2V - - 0.57 5.89 Tier 3 3.87 39.94 3.30 34.05 A) B) Authorized licensed use limited to: UNIVERSIDAD POLITECNICA DE VALENCIA. Downloaded on September 01,2025 at 09:19:56 UTC from IEEE Xplore. Restrictions apply.
TABLE IV. CITRUS CLASSIFICATION RESULT COMPARISON (10%) Quality Level No Dynamic Control With Dynamic Control Weight (kg) Weight (%) Weight (kg) Weight (%) Tier 1 3.21 33.28 3.21 33.29 Tier 1V - - 1.07 11.09 Tier 2 2.63 27.24 1.56 16.14 Tier 2V - - 0.89 9.22 Tier 3 3.81 39.48 2.92 30.26 TABLE V. CITRUS CLASSIFICATION RESULT COMPARISON (15%) Quality Level No Dynamic Control With Dynamic Control Weight (kg) Weight (%) Weight (kg) Weight (%) Tier 1 2.56 26.43 2.56 26.43 Tier 1V - - 1.49 15.37 Tier 2 2.38 24.57 0.89 9.20 Tier 2V - - 1.56 16.10 Tier 3 4.75 49.00 3.19 32.90 When the dynamic control is implemented, the sum of Tier 1 and Tier 1 Virtual represents the total classified as Tier 1. Similarly, the sum of Tier 2 and Tier 2 Virtual represents the total classified as Tier 2. This approach allows for a more finetuned classification, where the “Virtual” tiers account for additional units that meet quality standards due to the optimizations provided by the dynamic control system. For instance, in the 5% setpoint experiment, the dynamic control system was able to classify an additional 3.87 Kgs into Tier 1 Virtual, which would have otherwise been classified into lower tiers without the dynamic control (Table III). Similarly, in the 10% setpoint experiment, the dynamic control system classified an additional 11.09 Kgs into Tier 1 Virtual and 9.22 Kgs units into Tier 2 Virtual (Table IV). This further demonstrates the system’s ability to adapt and optimize the classification process, leading to a higher overall quality and better batch utilization. Overall, the experimental results highlight the potential of the dynamic control system in enhancing the efficiency and accuracy of batch inspection and classification processes. The use of advanced technologies such as Docker and NodeRED, combined with real-time data analysis, offers a robust solution for optimizing batch quality and meeting customer specifications. D. Future approach In future research, work will explore reinforcement learning techniques, particularly the Bayesian Search and Deep Q-Network (DQN) approaches, to further enhance the classification process and system response. This approach will consider the temporal series evolution of both variables and output weights, which can lead to even more efficient and accurate classification outcomes. By successfully implementing and deploying Bayesian Search, the system can adapt more intelligently to variations with the batch, maximizing the use of the lot and ensuring higher overall quality. In addition to this, the implementation of networks such as DQN within the reinforcement learning field is considered to improve and allow the system to learn and optimize its actions over time, adapting to changing input conditions and ultimately improving the classification accuracy and behavior of the sorting equipment. V. CONCLUSIONS This paper highlights the importance of integrating dynamic control systems into automatic vision inspection systems to improve batch classification according to clientpredefined specifications. The dynamic control system is deployed by implementing Node-RED, OPC-UA, and Docker technologies, ensuring seamless interoperability, efficient data processing, and scalability across different manufacturing environments. The redistribution of fruit among different quality tiers increases operational performance, allowing a more precise allocation of citrus fruits to their respective categories while optimizing overall batch utilization. By dynamically adjusting classification thresholds based on real-time data, the system ensures that more fruits meet higher-quality standards, reducing waste and improving sorting efficiency. Furthermore, the implementation of virtual classification tiers enables adaptive batch optimization, allowing for realtime reclassification of borderline cases while maintaining adherence to customer specifications. The experimental evaluation of the proposed system across three different inspection accuracy scenarios—95%, 90%, and 85%— demonstrates its effectiveness in improving classification consistency, minimizing errors, and enhancing the economic feasibility of automated sorting. The integration of PID controllers ensures continuous fine-tuning of sorting parameters, addressing fluctuations in input quality and achieving an optimal balance between quality assurance and production efficiency. The results highlight the potential of dynamic control systems in transforming citrus fruit sorting processes, making them more adaptable, reliable, and cost-effective. Future work may explore the integration of advanced AI-driven predictive models and reinforcement learning techniques to further enhance classification accuracy and optimize system response in highly dynamic environments. The insights gained from this study contribute to the advancement of automated inspection technologies in the agricultural sector, supporting sustainable and high-quality food production. Future work may explore the integration of advanced AIdriven predictive models and reinforcement learning techniques to enhance the classification accuracy and optimize the system in dynamic production environments that will contribute to the advancement of automated inspection technologies in the food industry sector, supporting sustainable and high-quality food sorting. MATCH & CONTRIBUTION This contribution aligns well with the theme of the ICE IEEE 2025 conference on "AI-driven Industrial Transformation: Digital Leadership in Technology, Engineering, Innovation & Entrepreneurship”. The paper explores the integration of SCRUM elements, a popular agile project management framework, into service prototyping processes for technology and service innovation. By incorporating SCRUM principles into the service prototyping process, the authors emphasize the importance of agile methodologies in driving innovation and entrepreneurship. The research sheds light on how data-driven engineering practices can be enhanced through the adoption of agile Authorized licensed use limited to: UNIVERSIDAD POLITECNICA DE VALENCIA. Downloaded on September 01,2025 at 09:19:56 UTC from IEEE Xplore. Restrictions apply.
frameworks, enabling organizations to respond effectively to evolving market demands. This contribution addresses the conference's focus on utilizing data-driven approaches to foster innovation and entrepreneurship, making it a relevant and valuable addition to the conference proceedings. ACKNOWLEDGMENT This paper is supported by European Union’s Horizon Europe research and innovation program under grant agreement No 101092043, project AGILEHAND (Smart Grading Handling and Packaging Solutions for Soft and Deformable Products in Agile and Reconfigurable Lines). REFERENCES 1. Blasco, J.; Aleixos, N.; Gómez, J.; Moltó, E. Citrus Sorting by Identification of the Most Common Defects Using Multispectral Computer Vision. J Food Eng 2007, 83, 384–393, doi:10.1016/j.jfoodeng.2007.03.027. 2. Cubero, S.; Lee, W.S.; Aleixos, N.; Albert, F.; Blasco, J. Automated Systems Based on Machine Vision for Inspecting Citrus Fruits from the Field to Postharvest—a Review. Food Bioproc Tech 2016, 9, 1623–1639, doi:10.1007/s11947-016-1767-1. 3. Raji, V.; Rajendran, E.; Balaji, V.; Bhayal, D.K.; Rishikesh, N.; Karthikeyan, D. Advancements in Computer Vision for Automated Fruit Quality Inspection: A Focus on Apple Detection and Grading. IEEE 9th International Conference on Smart Structures and Systems, ICSSS 2023 2023, 1–6, doi:10.1109/ICSSS58085.2023.10407423. 4. Mohammadi Baneh, N.; Navid, H.; Kafashan, J. Mechatronic Components in Apple Sorting Machines with Computer Vision. Journal of Food Measurement and Characterization 2018, 12, 1135–1155, doi:10.1007/s11694-018-9728-1. 5. Londhe, D.; Nalawade, S.; Pawar, G.; Atkari, V.; Wandkar, S. Grader: A Review of Different Methods of Grading for Fruits and Vegetables. Agricultural Engineering International: CIGR Journal 2013, 15, 217–230. 6. Wang, N.; Elmasry, G.; Sevakarampalayam, S.; Qiao, J. Spectral Imaging Techniques for Food Quality Evaluation. Stewart Postharvest Review 2007, 3, doi:10.2212/spr.2007.1.1. 7. Jhawar, J. Orange Sorting by Applying Pattern Recognition on Colour Image. Phys Procedia 2016, 78, 691–697, doi:10.1016/j.procs.2016.02.118. 8. Rosa-Bilbao, J.; Boubeta-Puig, J.; Rutle, A. EDALoCo: Enhancing the Accessibility of Blockchains through a Low-Code Approach to the Development of Event-Driven Applications for Smart Contract Management. Comput Stand Interfaces 2023, 84, 103676, doi:10.1016/j.csi.2022.103676. 9. Soderi, M.; Kamath, V.; Morgan, J.; Breslin, J.G. Advanced Analytics as a Service in Smart Factories. SAMI 2022 - IEEE 20th Jubilee World Symposium on Applied Machine Intelligence and Informatics, Proceedings 2022, 425–430, doi:10.1109/SAMI54271.2022.9780768. 10. Folgado, F.J.; Calderón, D.; González, I.; Calderón, A.J. Review of Industry 4.0 from the Perspective of Automation and Supervision Systems: Definitions, Architectures and Recent Trends. Electronics (Switzerland) 2024, 13, doi:10.3390/electronics13040782. 11. Tansangworn, N. Development of IoT Edge Hub for Wireless Sensor Networks Based on Docker Container. Proceedings - 2020 IEEE International Conference on Smart Internet of Things, SmartIoT 2020 2020, 356–357, doi:10.1109/SmartIoT49966.2020.00068. 12. Sanso, S.; Guerrero, C.; Lera, I.; Juiz, C. A Platform for Lightweight Deployment of IoTApplications Based on a Function-as-a-ServiceModel. IEEE Latin America Transactions 2019, 17, 1155–1162, doi:10.1109/TLA.2019.8931204. Authorized licensed use limited to: UNIVERSIDAD POLITECNICA DE VALENCIA. Downloaded on September 01,2025 at 09:19:56 UTC from IEEE Xplore. Restrictions apply.