Preprint
Article

This version is not peer-reviewed.

Development of a Compact Automatic Sorting Machine for Kazakhstani Apple Varieties Based on Computer Vision

Submitted:

21 May 2026

Posted:

22 May 2026

You are already at the latest version

Abstract
This article presents the development and experimental study of a compact, automated apple sorting machine based on computer vision, indirect fruit weight estimation, and color grading. It is designed for use in small and medium-sized farms, where the use of industrial lines is limited by high cost and complex maintenance. The proposed machine enables non-destructive assessing and sorting of apples in a continuous flow mode without the use of mechanical weighing, includes a fruit feeding and positioning module, a computer vision system, an image processing unit, and a sorting actuator synchronized with the conveyor movement. Fruit weight and color assessment is based on visual geometric parameters (diameter, fruit height, projected area, and the proportion of surface color), extracted from digital images, followed by classification by product category using regression models. As part of the experimental study, a correlation analysis was conducted between the actual weight of apples and their geometric parameters for five varieties typical of Kazakhstan. It was shown that the projected fruit area exhibits the most stable correlation with weight, justifying its use as the primary predictor in constructing a regression model for indirect weight estimation. An assessment of the accuracy of apple classification by product categories was carried out and the influence of conveyor speed on the stability and correctness of sorting was observed. The experimental results with a total 1250 apples of five varieties - Aport Alexander, Sinap Almaty, Kazakhski Yubileinyi, Ainur, and Nursat indicated that the optimal operating mode for the machine is an apple transport speed of 0.16 m/s. In this mode, sorting throughput is approximately 400 kg/hour, with an average accuracy of 92% for the automatic classification in accordance with GOST requirements. These results confirm that the proposed approach provides sufficient real-time sorting accuracy with a simple machine design. The machine can be used as a standalone sorting solution, as well as a base platform for further expansion of functionality by integrating surface defect assessment and grade identification modules.
Keywords: 
;  ;  ;  ;  

1. Introduction

Sorting apples by product category is a key stage of post-harvest preparation, as it is at this stage that uniform lots are formed based on size, color, appearance, and degree of damage, which directly determines the selling price, storage losses, and logistics efficiency. For small and medium-sized farms, traditional manual sorting remains common, but it inevitably entails high labor intensity, limited productivity, and subjectivity in operator decisions. While industrial sorting lines offer high throughput, their cost, complex maintenance, and infrastructure requirements significantly limit their adoption in farming and academic settings. Therefore, over the past five years, there has been a steady increase in research aimed at creating compact, automated sorting systems where parameter measurement and decision-making are based on computer vision, and mechanical components (weighing, calibration, inspection) are either simplified or partially replaced by digital methods.
In a recent review, Yu et al. [22] summarize the latest technological developments in the field-based grading and sorting of apples, including key machine components, modern decision methods, and approaches. The results from different studies achieved very promising accuracies for apple color evaluation (77.9% ÷ 99%) and apple size evaluation (87.1 ÷ 99%). Regarding the selection of sensing techniques and decision-making approaches, the authors highlight NIR (near-infrared), SI (structured illumination), VIS (visible spectroscopy), LDA (linear discriminant analysis), the C4.5 decision tree, SVM (support vector machine), and YOLO as effectively integrated in various developed in-field apple grading systems, achieving accuracies ranging from 75% to 99%.
According to the authors, the present challenges include difficulties in capturing complete surface information, handling uneven illumination on spherical fruit surfaces, the high cost of spectral sensing technologies, as well as constraints related to size, throughput, and overall system cost. The cost of the equipment plays a crucial role in apple growers’ investment decisions, with the primary expenses typically arising from the processor and imaging system.
A low-cost machine vision–based system for presorting and grading of apples is presented in [25]. It is designed to remove undersized and defective fruits using a color camera, LED lighting, and a conveyor system. The processing algorithms are estimating apple orientation, shape, and size. Tested on four apple varieties - Delicious, Empire, Golden Delicious, and Jonagold, the system achieved satisfactory accuracies for only two varieties, as follows 87.6% for Delicious and 86.2% for Jonagold.
The scientific innovation lies in the development of a unified methodological framework for digital fruit quality control that combines physical measurements, computer vision, and artificial intelligence within a single hardware and software environment. A key result of the development is the creation of a prototype compact machine for automatic apple sorting, designed for a throughput of 300-400 kg/h and controlled by an intelligent software module. This machine is targeted at farms and logistics companies in Kazakhstan, where manual sorting remains predominant and does not provide the necessary precision and efficiency in sorting apples into product categories.
The scientific and methodological basis for the development of an automatic apple sorting machine is based on our previously obtained results. In [1], a methodology for determining the main physical parameters of apples based on digital image analysis, which forms the foundation for constructing metrologically correct calibration algorithms, identifying geometric features, and subsequent regression/classification processing. Another study [2] demonstrates the feasibility of identifying the varietal identity of Kazakh apples using pre-trained CNN models (transfer learning), expanding the functionality of sorting machines beyond simple size separation to varietal identification and product traceability. Thus, modern research is shifting the focus from "mechanical" sorting to comprehensive digital solutions that integrate the geometry, appearance, and semantic characteristics of the fruit.
In recent years, there has been a clear trend toward a transition from laboratory methods to engineering-integrated systems and installations. For example, field and post-harvest devices have been developed that evaluate apples based on a combination of attributes (size, color, shape, surface defects) under limited processing time, while detection and grading algorithms are adapted to the real-world environment (changes in illumination, background heterogeneity, and varietal differences) [3]. In parallel, universal architectures of visual inspection for fruit grading are being developed, where modern families of neural networks (ResNet, DenseNet, EfficientNet, etc.) are compared, and the possibility of implementing real-time systems on a relatively accessible computing base is demonstrated, which is fundamentally important for “compact” sorting machines [4].
The practical feasibility of high-speed in-line apple sorting is largely determined by the challenge of reliably detecting surface defects. In recent years there is a shift from the binary "defect/no defect" classification to more technologically useful approaches that require localization and assessment of the defective area, as it is the quantitative characteristics of the defect that enable the formation of product gradations (for example, by acceptable damage area and the number of defects per fruit) and the formalization of sorting rules. To address this problem, methods have been proposed that combine semantic segmentation with accelerated detectors, including pruned versions of YOLO, which provide real-time operation and are suitable for implementation in sorting lines [5]. Importantly, such studies consider not only recognition quality but also the issue of optimizing the model for the constraints of conveyor mode (speed, latency, and robustness to appearance variations).
Another important engineering challenge is the incompleteness of visual inspection in a single frame: a defect may be located on an invisible side of the apple. Therefore, a number of studies are focusing on creating a "complete" representation of the fruit's surface through multi-view imaging, rotation mechanisms, and algorithms that combine information from multiple images. Regarding this, approaches to apple quality grading based on multi-dimensional processing of the species and deep learning have been proposed, improving recognition stability and increasing grading accuracy under non-uniform lighting conditions (e.g., through image preprocessing) [6]. Mechanical-visual sorting systems with multiple cameras and controlled apple rotation have also been developed and experimentally tested, allowing for more uniform surface coverage and reducing the likelihood of missing local defects, which is critical for real-world in-line sorting [7].
At the recognition model level, there is a noticeable trend toward increasing the robustness of flaw detection to challenging shooting conditions: glare, non-uniform reflectivity, and high similarity between individual fruit areas (peduncle /calyx/ scars), which may be misclassified as defects. To address these issues, transfer learning strategies and lightweight architectures (e.g., based on MobileNet families) have been proposed, aimed at increasing the transferability of models to new varieties and conditions [8]. In parallel, approaches to defect segmentation are being developed that allow not only for the detection of damage but also for obtaining a defect map for subsequent technological grading decisions [9]. The need to consider stem/calyx zones and areas with similar visual characteristics is emphasized, leading to the emergence of specialized methods that combine segmentation and recognition of "difficult" areas of the apple surface [10]. For practical use in small farms, the lack of labeled data remains an important limitation; therefore, methods oriented towards small samples (small-sample learning) are being developed, where robust defect detection architectures are proposed that are suitable for implementation in real sorting systems with a limited volume of training data [11]. In addition to defects, commercial apple quality is determined by parameters such as color, shape, and deformation, which directly influence product grade. In recent years, solutions have been proposed that utilize machine vision and CNN to classify apple color and deformation using multi-frame imaging and extract informative dimensional features, allowing for the formalization of product grading criteria based on appearance [12]. Methods for detecting fruit diseases and lesions as part of the sorting process are also being actively researched, including lightweight models aimed at implementation in production grading procedures (online operation without significantly increasing the cost of hardware) [13]. To improve recognition quality with limited computing resources, hybrid architectures are being developed, focused on lightweight inference and error reduction during flaw detection [14].
A related engineering branch proposes improved versions of YOLO detectors optimized for complex conditions and small-scale damage objects, which is relevant for real-world sorting lines with non-uniform backgrounds and lighting variations [15].
Another research is focused on expanding the range of monitored parameters beyond "appearance"—specifically, assessing the internal quality of apples (sugar content, acidity, starch, etc.) and identifying internal/hidden defects. Here, hyperspectral methods and their combination with machine learning, including rotational hyperspectral imaging, are actively used, which allows for obtaining more complete information about the fruit and improving the prediction of internal quality parameters [16]. At the same time, despite the high diagnostic potential of hyperspectral approaches, their implementation in compact sorting machines is limited by the cost of sensors and the complexity of calibration. Therefore, applied research remains focused on available RGB/NIR solutions and algorithmic compensation for their limitations.
An important trend in recent years has been the pursuit of "engineering completeness" in solutions: modern research increasingly describes not a single algorithm, but an integrated sorting technology (installation/machine/system), including a mechatronic component, a vision module, grading rules, and experimental accuracy assessment in a streaming mode [17]. A number of studies emphasize the need to develop lightweight detectors for edge computing and real-time, including mechatronic systems for recognizing apple varieties and damage in the visible range, aimed at practical implementation [18]. Also, modern architectures based on transformers and multimodal circuits for disease diagnosis and damage severity assessment are being developed, which could potentially become part of expanded sorting systems (e.g., for identifying batches with phytosanitary risks) [19]. In the related field of food inspection, deep learning methods are being proposed for hyperspectral diagnostics of apple diseases and damage, confirming the general trend toward combining "sensors and intelligent processing" as the basis for future sorting machines [20].
This study aims to design a small-sized automatic apple sorting machine equipped with a computer vision system and indirect weight estimation based on visual geometric features. The developed machine should provide non-destructive classification of apples in a flow into categories corresponding to varieties of Kazakhstani origin. The engineering implementation and experimental tests of the proposed system also complement the main goal.

2. Materials and Methods

The experimental automatic apple sorting machine was designed as a compact, modular system for real-time, non-destructive, continuous assessment of fruit quality indicators and their classification into product categories. The machine's design is targeted at small and medium-sized farms and educational and research laboratories, which determine the requirements for size, energy efficiency, and process simplicity while maintaining sufficient accuracy and sorting performance.
The machine's supporting structure is a welded spatial frame made of 50 x 25 x 2 mm steel profile. The overall dimensions of the unit are 2500 x 1350 x 1200 mm (length x width x height). The frame includes longitudinal and transverse stiffeners to ensure stability under dynamic loads and vibrations during operation. The fasteners are made of carbon steel, using 8 mm diameter bolts, and the rated load of the fastening points is up to 500 kg.
The developed machine is shown in Figure 1. It includes the following functional units: an apple feeding and positioning module, a conveyor, a visual inspection zone, an image processing unit, and a sorting module. Apples are fed onto the conveyor individually and at a fixed interfruit interval, ensuring a one-to-one correspondence between the imaged object and the classification result. The design of the conveyor and guide elements ensures stable positioning of the fruits within the inspection zone and minimizes their mutual overlap.
The fruit is transported by a chain conveyor driven by a 6IK250RGU-CF induction motor. This 250-watt motor is manufactured by Ningbo Zhongda Leader Intelligent Transmission Co., Ltd., Ningbo, China. Speed control is provided by a ZD Motor Speed Control Unit manufactured by Ningbo ZD Leader Transmission Equipment Co., Ltd., Ningbo, China. The speed control system allows for variable linear speed of the conveyor, which was used in experimental studies to assess the impact of dynamic modes on sorting accuracy.
Torque transmission is achieved via a chain drive using 100.5 mm diameter steel sprockets with 12 teeth and hardened shafts with a diameter of 15-16 mm. The design ensures stable operation in continuous flow mode.
The key element of the machine is the visual inspection area (Figure 2), where digital images of apples are captured. The inspection area is equipped with an industrial vision camera with fixed focus and exposure parameters, as well as an artificial lighting system using LED sources. The lighting system is designed to ensure uniform illumination of the fruit's surface and reduce glare, shadows, and variations in ambient light. The camera and light source geometry ensures stable image formation, regardless of slight fluctuations in the apple's position on the conveyor. To ensure correct fruit orientation in the measurement zone, a mechanism for rotating the apple around its own axis is implemented. The rotation unit uses a 5840-31ZY DC gear motor (industrial OEM production, China) with a 12-24 V power supply. Rotation speed is controlled by a DC9-60C Motor Controller 20A (voltage range 9-60 V, maximum current 20 A, made in China). Forced fruit rotation minimizes the impact of orientation on the accuracy of geometric parameter measurements..
Captured images are transmitted in real time to a computing unit that implements digital image processing and analysis algorithms. The computing unit is synchronized with the conveyor's movement, allowing each frame to be linked to a specific fruit and its current position in the machine's coordinate system. This is achieved using position sensor signals and timestamps, ensuring accurate object identification in the stream.
A Logitech C270 digital camera manufactured by Logitech International S.A., Lausanne, Switzerland (assembled in China) was used as a visual inspection tool. The camera features a CMOS sensor with a resolution of 1280x720 pixels and a shooting rate of up to 30 frames per second. The camera is connected to a Raspberry Pi 4 Model B microcomputer manufactured by the Raspberry Pi Foundation, Cambridge, UK. The Raspberry Pi 4 performs video stream capture, image preprocessing, and computer vision algorithm implementation. Image processing is performed using the OpenCV (cv2) library. The algorithm includes image conversion to grayscale, threshold segmentation using Otsu's method, morphological filtering, edge detection, and calculation of the fruit's geometric parameters. For each apple, the diameter D, projected area S, and color fraction are calculated.
The calculated parameters and classification results from the Raspberry Pi 4 to the industrial controller is carried out via the MODBUS RTU protocol, which ensures stable data exchange in real time and synchronization of the computing and executive parts of the system. Based on the image processing results, a set of quantitative visual features is generated for each apple, including geometric parameters (diameter, projected area, color percentage) and surface appearance characteristics. These parameters are then used to indirectly estimate the fruit's weight and classify it into product categories according to specified criteria. The fundamental difference of the developed machine is the absence of traditional mechanical weighing of each fruit: the decision on product category is made solely on the basis of visual information and mathematical models, which allows for increased sorting speed and simplified design of the unit.
The machine control system is based on the OWEN PLC200 programmable logic controller (OWEN LLC, Moscow, Russia). The controller synchronizes the transport system, reset actuators, and exchanges data with the computing module. The operator interface is implemented using the OWEN SP307-R touch panel (OWEN LLC, Moscow, Russia), designed for setting operating modes and monitoring sorting parameters.
The sorting actuator module (Figure 3) is implemented as a set of controlled mechanisms located along the fruit's trajectory after the visual inspection zone. The fruit discharge system into the appropriate receiving containers is implemented using linear electromagnetic actuators (solenoid actuators, manufactured in China). Each discharge unit includes a rotating chute secured by a locking mechanism controlled by an electromagnet. When a control signal is sent from the controller, an electromagnet releases the latch, briefly lowering the discharge chute and redirecting the fruit to the appropriate tray. After the fruit has passed, the mechanism returns to its original position through mechanical interaction with the moving conveyor and re-engages the latch. The use of electromagnetic actuators ensures high response speed, repeatability, and positioning accuracy in flow sorting environments.
The automatic apple sorting machine operates as a continuous flow process, in which the mechanical feeding system, computer vision module, and sorting actuators function as a single technological unit. Apples are individually fed from a loading hopper onto a chain conveyor and sequentially moved along the line through a visual inspection zone. During the process, a digital image of each fruit is generated and processed by a computing unit, which extracts informative visual features (geometric parameters, projected area, and color). Based on the obtained data, a classification algorithm determines the fruit's product category and generates a control signal for the corresponding actuator. At a predetermined point along the trajectory, the apple is automatically redirected to the receiving tray for its category. All stages—from imaging to the release mechanism—are performed dynamically, without stopping the conveyor.
The fruit is transported by a chain conveyor driven by an asynchronous motor with a rated speed of 1350 rpm. The linear speed is regulated by a frequency converter and transmission kinematics (gear and chain drive), ensuring that the motor's rotational motion is matched to the required transport mode. The line is divided into functional sections, each 0.20 m long. The conveyor speed is smoothly adjusted from the control panel within the range of 0.12 to 0.20 m/s. Sorting performance depends on the fruit weight (size) and the conveyor speed. With an average fruit weight of 0.130 kilograms, the performance ranges from 270 kg/hour (at a speed of 0.12 m/s) to 470 kg/hour (at a conveyor speed of 0.20 m/s).
The visual inspection zone is working at multi-frame imaging mode: at least three consecutive images are recorded for each apple as it rotates, ensuring at least 360° surface coverage. Rotation is achieved by a geared motor, ensuring uniform angular rotation of the fruit during its linear movement. This approach minimizes the dependence of results on fetal orientation and improves the robustness of geometric characteristic calculations. The conveyor speed and frame rate are synchronized so that the exposure time is significantly shorter than the fetal transit time through the inspection zone, eliminating image blur and ensuring accurate contour segmentation.
Thus, the developed design of the automatic machine integrates a mechanical feeding and positioning subsystem, a computer vision module, and an intelligent classification algorithm into a single technological system. The adopted design and functional solutions enable continuous apple sorting without line interruption, ensuring stable operation in dynamic mode, sufficient classification accuracy, and technological simplicity. This creates the preconditions for the practical implementation of the system in small and medium-sized farms with limited resources and energy-efficient equipment requirements.
The computer vision system of the automatic apple sorting machine was developed taking into account the requirements for non-destructive testing of fruit in a continuous mode and is focused on obtaining stable, metrologically correct images suitable for quantitative analysis of geometric and visual parameters. The system's primary objectives are to generate images with minimal distortion, ensure repeatability of shooting conditions, and reduce the influence of external factors such as changes in illumination and fruit orientation.
An industrial digital vision camera with a fixed-resolution sensor, permanently mounted above the inspection zone, is used for visual inspection. The camera is equipped with a fixed-focal-length lens, eliminating image scaling during operation. Exposure, gain, and white balance parameters are fixed programmatically and remain unchanged during experiments, ensuring comparability of the resulting images for different batches of apples.
An artificial LED lighting system is used to illuminate the shooting area, providing uniform illumination of the fruit surface. The lighting elements are positioned to minimize the formation of harsh shadows and specular highlights on the apple skin, which can distort the segmentation and feature extraction results. The use of LED sources with a constant color temperature ensures stable spectral characteristics of the illumination and reduces the impact of color distortion on image analysis.
The visual inspection zone is shielded from external light, eliminating the influence of natural light and ensuring reproducible shooting conditions. This design solution is especially important when operating the machine in production areas with variable lighting conditions. The geometry of the camera and light sources are selected in such a way that the optical axis of the camera is perpendicular to the plane of the conveyor, which reduces perspective distortions and simplifies subsequent calibration.
To translate dimensional parameters from the image's pixel space into real-world linear quantities, geometric calibration of the computer vision system was performed. Calibration is performed using a reference object with known linear dimensions, placed in the shooting area. Based on the resulting images, horizontal and vertical scaling factors are calculated, allowing for the correspondence between the number of pixels and physical dimensions in millimeters. These coefficients are used in subsequent processing stages to determine the diameters, projected areas, and other geometric parameters of the apples.
The resulting images are transmitted to the computing unit in real time via a high-speed interface. They are then used in preprocessing, segmentation, and feature extraction algorithms described in the following subsections. The adopted computer vision system architecture ensures a balance between image quality and computational load, which is critical for implementing automated apple sorting in real time.
Thus, the developed computer vision system provides a robust and reproducible visual basis for non-destructive testing of apple quality indicators and their classification into product categories within an automatic sorting machine.
The operating algorithm of the machine is presented in Figure 4. The proposed scheme reflects the sequence of key stages of fruit processing and the formation of informative features used for quality assessment and subsequent classification into apple categories. Implementation of this algorithm enables automated processing of apple images and real-time quality category decisions.
The first stage involves capturing a color RGB image of the apple, obtained by the computer vision system in the visual inspection zone. To reduce the impact of color noise and simplify subsequent processing, the original image is converted to a grayscale image by extracting the luminance component. This approach preserves the key structural information about the fruit's shape while reducing computational complexity.
The second stage involves binarization of the image using automatic thresholding. The Otsu method is used to determine the optimal threshold value based on a statistical analysis of pixel brightness distribution. This results in a binary image in which the fetus is separated from the background. This method ensures the algorithm's adaptability to minor changes in illumination and image contrast. An example of image processing for each fetus is shown in Figure 5.
Next, morphological processing of the binary image is performed, aimed at removing small noise objects and filling the internal areas of the fruit. This is accomplished using closing operations, including dilation and erosion, as well as hole filling procedures. These operations smooth the contour boundaries and ensure a correct representation of the apple's shape without significantly distorting its geometric characteristics.
After morphological filtering, the fruit's contour is extracted and the connected components of the binary image are analyzed. It is assumed that only one object is present in the visual inspection zone at a time, allowing the apple's contour to be unambiguously identified as the primary connected component of the image. Based on the extracted contour, the main geometric parameters of the fruit are calculated.
The projection area and the surface color area were calculated using the multi-frame shooting mode described previously. The number of frames captured is designated as Nframes and is determined by the number of cycles activated in the camera initialization program.
To improve measurement stability, parameters were averaged across all recorded frames. The arithmetic mean of the fetal projection area was calculated using the formula:
S a v = i = 1 N f r a m e s S i N f r a m e s
where Si - object area per i-th frame.
The arithmetic mean area of the painted surface was determined in a similar manner.:
S a v . p a i n t = i = 1 N f r a m e s S p a i n t , i N f r a m e s
where Spaint,i - the area of the colored surface in the i-th frame.
The proportion of the fruit's surface color, color, was determined by the expression:
Δ c o l o r = S a v . p a i n t S a v × 100 %
The obtained values were used in subsequent variety-specific classification, for which color share thresholds were set individually for each variety based on preliminary calibration.
The basic geometric characteristics used in the study are the diameter D and height h of the apple, defined as the lengths of the principal axes of the approximating ellipse. These parameters allow for a quantitative description of the fruit's size and shape and also serve as the basis for calculating derived indicators. The fruit projection area S is defined as the number of pixels belonging to the apple's binary mask, then converted to real units using the computer vision system's calibration coefficients.
The resulting geometric features form a parameter vector that quantitatively describes each fruit. These parameters are used in subsequent stages to indirectly estimate the apples' weight and classify them into product categories. The advantages of the selected feature set include their physical interpretability, computational simplicity, and robustness to minor changes in the orientation of the fruit within the image field.
Thus, the proposed image processing algorithm ensures reliable extraction of apple geometric characteristics in real time and forms the basis for subsequent analysis and sorting steps in an automated machine.
In an automated apple sorting machine, fruit weight is considered a key quality indicator, traditionally used to determine commercial grades. However, direct mechanical weighing of each fruit in a streaming mode leads to design complexity, reduced reliability, and limited productivity of the sorting equipment. In this regard, this study implements an approach to indirectly determining apple weight based on visual parameters extracted from digital images.
As demonstrated in a number of recent studies and confirmed by the authors' previous results, the geometric characteristics of apples, in particular projected area, diameters, and derived shape coefficients, are highly correlated with actual fruit weight. In this study, a preliminary correlation analysis was conducted between the measured apple weight and a set of visual attributes, including the major diameter D, minor diameter d, projected area S, and shape index If, to select the most informative parameter. The results of control weighing on a laboratory scale were used as reference weight values.
The results of the analysis showed that the greatest correlation with apple weight is demonstrated by the fruit's projected area S, which is consistent with the findings of advanced publications on the topic and also previous studies conducted by the authors. Therefore, a regression model based on weight and projected area was chosen for indirect weight estimation in an automatic machine. [21]
To indirectly determine the weight of fruits in an automatic sorting machine, a linear regression model was used for the dependence of weight on the projection area obtained as a result of digital image processing:
m = a × S + b ,
where m – individual fruit weight, g; S - the projected area of the fetus, cm²; a and b are the regression coefficients determined from the experimental data using the least squares method.
The model was constructed separately for each studied variety using a sample size of 250 fruits. For each apple, the actual weight was recorded using a strain gauge, and the projected area was determined using computer vision by segmenting the fruit's contour and calculating the area of the binary region. Before conducting the regression analysis, the data underwent preliminary statistical processing: the accuracy of the measurements was checked, incomplete records were excluded, and outliers were removed using the ±3σ criterion separately for the variables m and S. This approach eliminated the influence of isolated anomalous observations on the model parameters and increased the stability of the coefficient estimates.
The linear dependence coefficients were determined using the least-squares method by minimizing the sum of the squared deviations of the experimental mass values from the calculated ones:
m i n i = 1 n m i a × S i b 2 ,
where mi - is the experimentally measured mass of the i-th fruit, Si - corresponding projection area, and n - sample volume. The analytical solution to the minimization problem leads to following expressions:
a = S i S ¯ m i m ¯ S i S ¯ 2 ,
b = m ¯ a × S ¯ ,
where S and m are mean values of the projected area and mass, respectively. Thus, coefficient a is defined as the ratio of the covariance between variables to the variance of the projected area, and coefficient b is the free term of the linear model, characterizing the systematic bias of the relationship.
The accuracy of the approximation was assessed using the coefficient of determination:
R 2 = 1 m i m i ^ 2 m i m ¯ 2 ,
where m i - actual value of mass, m i ^ - the calculated value of mass, m ¯ - the average value of mass.
The obtained values of the regression coefficients for different varieties were in the range of a = 2.84-3.02 g/cm² and b = −34.06…+34.12 g, with the determination coefficient R2=0.61-0.92. Differences in the coefficients are explained by varietal features of the geometry and density of the fruits; however, the structure of the dependence remains linear across the entire range of sizes studied.
This model provides sufficiently accurate weight estimation based on machine vision data and can be used in an automatic sorting algorithm. If accuracy needs to be increased in industrial settings, variety-specific calibration coefficients or adaptive adjustment of the model parameters depending on the fruit size group can be used.
Based on the estimated weight of apples and additional geometric characteristics, commodity classification criteria are developed. Commodity categories are defined as ranges of weight values and/or characteristic dimensions that comply with current regulations and accepted commercial grading practices. Threshold values for estimated weight (mmm) are defined for each category; if exceeded or not reached, the fruit is classified into the corresponding class.
When developing classification criteria, the inevitable error in indirect weight estimation is taken into account, due to biological variability in apple shape and the peculiarities of visual measurement. Therefore, category thresholds can be adjusted based on the statistical distribution of estimated and actual weight values, minimizing classification errors at the range boundaries. This approach ensures the stability of sorting and reduces the likelihood of systematic biases when assigning fruit to product categories.
The product category decision for each apple is made individually based on calculated visual parameters and a regression model for weight estimation. The resulting data is assigned to a specific fruit in the flow and transmitted to the sorting module, taking into account the time delay between the visual inspection zone and the mechanical impact point. This ensures proper synchronization of the computational and execution stages and enables continuous flow sorting without stopping the conveyor.
Thus, the proposed method for indirectly determining apple weight and forming product categories based on visual parameters eliminates the need for mechanical weighing, simplifies the design of the automated machine, and ensures sufficient classification accuracy in real time. Implementation of this approach provides the basis for improving sorting productivity and expanding the system's functionality through the integration of additional visual quality indicators.
Experimental studies of an automatic apple sorting machine were conducted to evaluate the accuracy of indirect weight determination, the correctness of product classification, and the system's robustness in flow mode. The experimental methodology was designed to replicate real-world operating conditions and ensure comparability of the results with data presented in contemporary scientific publications.
A sample of apples including various sizes and product categories, typical of both industrial and farm production is object of this study. Before the experiments, all apples were visually inspected to exclude any with significant mechanical damage not relevant to the objectives of this stage of the study. The actual weight of each apple was determined using a laboratory electronic scale and used as a reference value for assessing the accuracy of the indirect method.
The experiments were conducted in two stages. In the first stage, a training sample was formed, used to determine the coefficients of the regression model for indirect weight estimation. For each apple, the values of visual parameters extracted from images (diameter, height, projected area, color percentage) and the corresponding actual weight were calculated. Based on this data, a regression model was built and its statistical characteristics were assessed.
The second stage involved testing the automated machine in flow sorting mode. Apples were fed individually onto a conveyor and passed sequentially through a visual inspection zone without stopping. To assess the impact of dynamic factors, experiments were conducted at three different conveyor speeds: 0.12, 0.16, and 0.20 m/s. These specific speed numbers are corresponding to different sorting throughputs. For each mode, the estimated weight of the apples, the assigned product category, and the actual weight, measured separately, were recorded.
The accuracy of the indirect mass determination was assessed by comparing estimated and reference values using standard statistical metrics, including mean absolute error, root mean square error, and relative error. To analyze the robustness of the model, particular attention was paid to the distribution of errors near product category boundaries, as these are the areas where the likelihood of misclassification is highest.
The quality of sorting by product category was assessed by comparing the results of automatic classification with a control sort performed based on the actual weight of the apples. For this purpose, classification accuracy indicators were calculated, including the proportion of correctly classified fruits, as well as an error matrix reflecting the distribution of errors between adjacent categories. This approach allows for a quantitative assessment of not only the overall sorting accuracy but also the nature of errors occurring during machine operation.
Additionally, the repeatability of sorting results was analyzed across multiple runs of identical apple batches, allowing us to assess the influence of random factors and the stability of the computer vision system and image processing algorithms. All experiments were conducted under fixed shooting and lighting parameters, ensuring data comparability and eliminating the influence of external factors.
Thus, the proposed experimental research methodology allows for a comprehensive assessment of the accuracy, reliability, and practical applicability of an automatic apple sorting machine, as well as the formation of an objective basis for analyzing the results and discussing the data obtained in the next section of the article.

3. Results

Fruits of five apple varieties - Aport Alexander, Sinap Almaty, Kazakhski Yubileinyi, Ainur, and Nursat (harvest year 2025) formed the experimental sample. For each variety, 250 fruits were selected, resulting in a total experimental sample size of 1,250 samples. This sample size ensures the statistical robustness of the regression analysis and minimizes the impact of random variations on the model parameter estimates.
Samples were collected from commercial lots intended for storage and distribution, ensuring experimental conditions closely resembled actual production practices. Fruits were selected randomly without prior weight calibration, eliminating systematic sampling bias. Fruits with significant mechanical damage, peel cracks, signs of rot, and deformations that could significantly distort geometric parameters and affect the accuracy of the indirect weight estimation model were excluded from the study.
The experimental sample covered the full range of size groups for each variety, including small, medium, and large fruits. The weight ranges by variety overlapped the boundaries of existing product categories, allowing us to verify the accuracy of the classification algorithm under overlapping ranges.
Before measurements, the fruits were kept in laboratory conditions for at least 12 hours to ensure temperature stabilization. Measurements were conducted at an ambient temperature of 20-23°C and a relative humidity of 45-60%. This ensured stable optical conditions for the images and prevented moisture condensation on the peel surface.
For each fruit, the following procedures were performed: control weighing, digital image capture, geometric parameter calculation, and automatic classification by product category. The control weight was measured using a CAS DX-1200 laboratory electronic scale (CAS Corporation, Seoul, Republic of Korea) with an accuracy of ±0.01 g. The high resolution of the scale ensured reliable reference weight values used to build and calibrate the regression model.
After weighing, images were captured using a Logitech C270 camera connected to a Raspberry Pi 4 microcomputer and processed using OpenCV. Based on the segmentation results, the geometric parameters of the fruit (diameter, height, projected area, and percentage of fruit color) were determined. Based on the regression relationship between projected area and actual weight, the apples were automatically classified into product categories.
Each sample was assigned a unique identification number to ensure comparability between actual weighing data and the automated processing results. To construct the regression relationship, the data was divided into training and test sets in a 70:30 ratio. Thus, for each variety, 175 fruits were used to determine the regression coefficients, and 75 were used to test the accuracy of the model. The results of the statistical analysis are presented in Table 1.
The conducted analysis of the extended statistical indicators of the five studied apple varieties allows us to evaluate the morphometric characteristics of the fruits, the degree of variability of their parameters, as well as the suitability of the obtained data for building a regression model.
The highest average weight values are found in the Aport Alexander (169.21 g), Ainur (167.95 g), and Nursat (165.21 g) varieties, indicating that they belong to the group of relatively large-fruited varieties. A slightly lower average weight is observed for the Kazakhski Yubileinyi variety (158.73 g). The minimum weight values are observed for the Sinap Almaty variety (121.74 g). Thus, the studied sample covers a fairly wide range of fruit weights - from approximately 120 to 170 g, which is an important condition for constructing a stable regression relationship between the visual parameters of the fruits and their actual weight.
An analysis of the geometric parameters shows that the average fruit diameter D varies between 61 and 77 mm depending on the variety. The largest diameter values are characteristic of the Ainur (77.32 mm) and Aport Alexander (76.84 mm) varieties, while the smallest average diameter is observed in the Sinap Almaty variety (61.38 mm). Fruit height h varies between 60 and 75 mm, with the largest fruits by this parameter observed in the Ainur (75.11 mm) and Nursat (74.68 mm) varieties. The obtained values reflect the morphometric differences between the studied varieties and confirm the presence of stable varietal characteristics of fruit shape.
An analysis of the proportion of surface color (Δcolor) shows that the average values for most varieties range from 53% to 67%, which corresponds to the typical color characteristics of the apple varieties studied. The highest proportion of surface color is observed in the Sinap Almaty variety, while slightly lower values are characteristic of the Kazakhski Yubileinyi and Aport Alexander varieties. This parameter reflects the varietal characteristics of fruit appearance and can be used as an additional diagnostic feature when assessing their commercial quality.
The average fruit projection area S, determined by machine vision methods, ranges from 30 to 52 cm². The largest average projection area is observed for the Aport Alexander variety (51.64 cm²), which corresponds to the larger geometric dimensions of the fruits of this variety. The minimum area values are characteristic of the Sinap Almaty variety (30.11 cm²). The projection area is one of the most informative visual features used in constructing a regression model for indirectly determining fruit weight.
An assessment of the coefficient of variation reveals differences in the degree of uniformity among the studied varieties. For most varieties, the coefficient of variation for diameter D is approximately 7%, and for height h, approximately 6%, indicating a relatively high uniformity of fruit geometric dimensions within the varietal samples. Higher variability is observed for fruit weight, where the coefficient of variation ranges from 15–18%, consistent with the natural dimensional heterogeneity of commercial apple lots.
The Sinap Almaty variety exhibits the greatest variability in parameters, with a diameter coefficient of variation of 12.92% and a weight coefficient of 18.33%, indicating a wider range of fruit sizes within the sample. Meanwhile, the Aport Alexander, Ainur, and Nursat varieties are characterized by more stable morphometric parameters.
Low standard errors of the mean (SE) for all indicators indicate high accuracy of mean estimates and the statistical stability of the obtained results. Narrow 95% confidence intervals confirm the representativeness of the experimental sample and the validity of the statistical data processing.
The minimum and maximum parameter values demonstrate that the fruit size and weight ranges overlap the boundaries of various apple calibration categories, which is an important condition for verifying the accuracy of automatic sorting algorithms. The obtained statistical characteristics confirm the suitability of the generated experimental sample for developing automated fruit classification algorithms based on machine vision parameters.
To assess the relationship between the geometric and physical parameters of the fruit, a matrix of Pearson correlation coefficients was calculated (Table 2). The highest correlation was found between fruit weight and its geometric parameters. The correlation coefficient between weight and fruit height is r = 0.86, between weight and diameter r = 0.81, and between weight and projected area r = 0.88. This confirms the feasibility of using visual parameters to indirectly estimate apple weight in automated sorting systems. At the same time, the proportion of cover coloration demonstrates a weak correlation with the geometric parameters and weight of the fruit (r < 0.25), which indicates the relative independence of this trait.
A correlation analysis conducted for each apple variety studied revealed consistent patterns in the relationship between the geometric and weight-dimensional parameters of the fruit. Calculation of the Pearson correlation coefficients revealed a significant positive relationship between fruit weight and its key geometric characteristics.
An analysis of the relationship between weight and linear dimensions revealed that fruit height h is the most informative parameter. For various varieties, the correlation coefficient between weight and height ranges from r = 0.79 to 0.85, indicating a strong positive relationship between these parameters. The relationship between weight and fruit diameter D is also strong, but is somewhat less informative than h, ranging from r = 0.71 to 0.80. The results confirm that an increase in fruit geometric dimensions is accompanied by a proportional increase in weight.
A particularly strong correlation was observed between fruit weight and projected area S, determined by machine vision. For the studied varieties, the correlation coefficients ranged from r = 0.82 to 0.87, indicating a close relationship between these parameters. This result confirms the feasibility of using projected area as an informative visual indicator for indirectly assessing fruit weight in automated sorting systems.
At the same time, the analysis revealed that the proportion of fruit surface color (Δcr, %) has a weak correlation with geometric parameters and weight (r < 0.25). This indicates that this parameter is largely determined by the varietal characteristics of fruit color and has virtually no connection with their weight and size characteristics.
A comparison of the obtained correlation matrices for different varieties revealed that the nature of the relationships between parameters remains virtually identical, despite differences in average fruit size and weight. This demonstrates the stability of the identified patterns and confirms the feasibility of using common informative features when constructing a generalized regression model for weight estimation.
Thus, the results of the correlation analysis confirm that geometric parameters of fruits, primarily fruit height h and its projected area S, are highly informative for weight prediction. The obtained data substantiate the choice of projected area as one of the key parameters in developing an algorithm for automatically sorting apples by product category. The average heat map of the correlation coefficients between the parameters of different varieties is presented in Figure 6.
Heat map analysis reveals consistent positive correlations between fruit weight and its geometric parameters (D, h), as well as the projected area S. The strongest relationship is observed between weight and projected area, confirming the feasibility of using machine vision parameters to indirectly estimate fruit weight in automated sorting systems. Meanwhile, the proportion of surface color (Δcolor) demonstrates a weak correlation with the weight and size characteristics of the fruit.
For quantitative assessment of the dependence of fruit weight on visual parameters, linear regression models were built for each apple variety. (Figure 7).
The resulting regression curves demonstrate a consistent positive correlation between apple weight and its projected area. The slopes of the regression lines range from 2.84 to 3.02, indicating similar patterns of change in fruit weight across varieties with increasing geometric dimensions.
To analyze the combined influence of visual parameters on fruit weight, a three-dimensional surface plot of apple weight versus fruit projected area and the proportion of surface color was constructed (Figure 8).
The resulting surface area reflects the general pattern of apple weight increase with increasing projection area. The influence of the proportion of surface color is additional and is primarily related to the varietal characteristics of the fruit. Maximum weight values are observed in the projection area of 55–60 cm², corresponding to the large fruits of the studied varieties.
Following, an additional study was conducted on the spatial distribution of apples within the diagnostic trait system. For this purpose, a three-dimensional diagram of the distribution of fruits of different varieties was generated in terms of projected area coordinates and the proportion of surface color (Figure 9).
Analysis of the resulting distribution shows that the majority of fruits of the various varieties are concentrated in the range of 40–60 cm² of projection area. However, the proportion of surface color varies significantly more widely, reflecting the varietal characteristics of the apples.
The most compact distribution areas are observed for the Aport Alexander and Kazakhski Yubileinyi varieties, while the Ainur and Nursat varieties are characterized by a more uniform distribution of fruits across the range of characteristic values.
These results confirm the informativeness of the visual parameters used and demonstrate their applicability in developing automated apple sorting algorithms based on machine vision methods.
The experimental study assessed the morphometric characteristics and weight-and-size parameters of five apple varieties (Aport Alexander, Sinap Almaty, Kazakhskoye Yubileynoye, Ainur, and Nursat) using a sample size of 1,250 samples. Analysis of the statistical characteristics revealed that the studied varieties cover a wide range of fruit sizes and weights, typical for commercial lots without prior calibration, ensuring the representativeness of the data obtained. Correlation analysis confirmed the existence of stable relationships between the weight and geometric parameters of the fetuses obtained from digital images. The most informative parameter for indirect weight estimation was the projected area of the fetus, as evidenced by the high values of the correlation coefficients and the coefficients of determination of the regression models (R² = 0.82-0.87). The developed regression model demonstrated a good approximation of the experimental data and enabled the implementation of the prediction algorithm in automatic image processing mode.
To evaluate the efficiency and accuracy of apple sorting by product category, experimental studies of the machine were conducted at three speed modes of the apple conveyor. The results of automatic apple sorting by weight caliber are presented in Table 3. Fruit classification was performed according to the weight ranges adopted for apple calibration: very small (70–90 g), small (90–135 g), medium (135–200 g), and large (200–300 g). A separate category of substandard fruits was identified, which included apples with surface defects, insufficient proportion of surface color, or other characteristics that do not meet the requirements of commercial quality.
Experimental studies were conducted at three different conveyor speeds: 0.12, 0.16, and 0.20 m/s. This allowed us to evaluate the impact of fruit transport speed on the accuracy of automatic classification and the consistency of apple distribution across product categories.
Analysis of the fruit distribution by category revealed that, regardless of the operating mode, the largest number of apples fell into the medium-weight category (135–200 g).
In the total sample, the number of fruits in this category was 859 at a speed of 0.12 m/s, 848 at 0.16 m/s, and 807 at 0.20 m/s. This pattern corresponds to the biological characteristics of the studied varieties and the typical structure of commercial apple lots in the absence of preliminary mechanical calibration.
The proportion of small-sized fruits (90–135 g) varies by variety. The Sinap Almaty variety produces the highest proportion of this category, due to its lower average fruit weight compared to the other varieties studied. Meanwhile, the Aport Alexander, Ainur, Nursat, and Kazakhski Yubileinyi varieties are characterized by a predominance of medium-sized fruits.
The large fruit category (200–300 g) is represented by a relatively small number of samples, and this is due to natural variability in fruit size and weight within the varietal sample. Substandard fruits, identified by the machine vision system based on surface defects or insufficient coloration, average 13–16 samples per variety.

4. Discussion

The obtained results demonstrate the impact of conveyor speed on the accuracy of automatic classification. A minimum conveyor speed of 0.12 m/s achieves the highest sorting accuracy (96.9% on average), but this significantly reduces the sorting machine's throughput. Increasing the conveyor speed to 0.20 m/s, on the other hand, leads to a significant decrease in automatic classification accuracy to 80.4–82.0% (81.2% on average), due to increased dynamic survey errors and an increase in the number of classification errors near product category boundaries.
Based on the obtained results, a conveyor speed of 0.16 m/s was adopted as the optimal operating mode for the sorting system. This mode ensures a sufficiently high automatic classification accuracy (an average of 92.1%) while maintaining the required equipment performance, making it the most rational mode for the practical application of the developed automatic apple sorting system.
The results demonstrate that a regression model relating the fruit’s projected image area to its weight is effective for automated apple sorting. Statistical processing of the experimental data allowed us to determine the main indicators of variability in the geometric and physical parameters of apples. Mean values, standard deviations, variances, standard errors, coefficients of variation, and 95% confidence intervals were calculated for the studied parameters.
Sofu et al. [23] proposed a system that classifies three apple cultivars by color, size, and weight, and detects defects such as scab, stains, and rot. Using the decision tree model C4.5 DT, they achieved 89% accuracy in estimating the apple’s height and width from four captured images, using the maximum measurement as the fruit diameter. The authors reported that their system achieves an average sorting accuracy between 73% and 96% and is capable of sorting an average of 15 apples per second. These results are similar to ours in terms of the accuracy rates.
Compared to other studies, such as the system proposed by Golpira et al. [24] with a sorting capacity of 130 kg/h, our proposed apple sorting machine demonstrates a significant improvement, achieving a capacity of approximately 400 kg/h.
Testing of the developed compact machine for automatic apple sorting by product category demonstrated the system's robust operation during continuous fruit processing, with the average accuracy of automatic classification by product category, in accordance with GOST requirements, reaching approximately 92%. The results confirm the effectiveness of computer vision methods for automated apple sorting and the feasibility of the compact machine's practical use in agricultural production.

5. Conclusions

A prototype of a compact automatic apple sorting machine was developed. It is suitable for non-destructive flow classification and sorting of apple fruits by product category. The experimental machine ensures stable fruit transport at conveyor speeds ranging from 0.12 to 0.20 m/s. During testing, an experimental sample of 1,250 fruits was collected, including five apple varieties: Aport Alexander, Sinap Almaty, Kazakhski Yubileinyi, Ainur, and Nursat (250 samples of each variety), enabling a representative evaluation of the developed automatic sorting system.
A computer vision system has been developed and calibrated to provide multi-frame imaging of fruit surfaces during conveyor transport. The system ensures stable apple contour detection and produces a set of informative images that allow for the determination of the geometric parameters of fruit of various varieties and sizes during the flow mode operation of a sorting system.
A digital image processing algorithm has been implemented that enables the automatic extraction of geometric and color characteristics of fruits. The algorithm determines key apple parameters, including diameter (D), fruit height (h), projected area (S), and the proportion of surface color (Δcolor, %). The resulting features are used to generate a diagnostic set of parameters, which is used to indirectly estimate fruit weight and subsequently classify them by product category.
Correlation analysis was performed, confirming a stable statistical relationship between the actual weight of apples and their geometric characteristics. It was found that the most informative parameter is the projected fruit area, which has the highest correlation with apple weight and can be effectively used as a diagnostic feature for indirectly assessing fruit weight during automatic sorting.
Variety-specific regression models for indirectly assessing apple weight were developed, allowing fruit weight to be determined without the use of weighing sensors. The developed models enable automatic classification of apples by product category (very small - 70–90 g, small - 90–135 g, medium - 135–200 g, large - 200–300 g). Analysis of the experimental sample distribution revealed that the largest number of fruits fell into the medium-weight category, which corresponds to the biological characteristics of the apple varieties studied.
Experimental testing of the developed machine was done. It demonstrated the impact of conveyor speed on the accuracy of automatic fruit classification. At a speed of 0.12 m/s, a maximum sorting accuracy of 96.9% was achieved. At a speed of 0.16 m/s, classification accuracy was 92.1%. Increasing the conveyor speed to 0.20 m/s resulted in a decrease in automatic classification accuracy to 81.2%, due to increased dynamic imaging errors and a higher probability of classification errors in flow mode. The experimental results indicated that the optimal operating mode for the machine is an apple transport speed of 0.16 m/s. In this mode, sorting throughput is approximately 400 kg/hour, with an accuracy of approximately 92% for the automatic classification of apples into product categories.

Author Contributions

Conceptualization, J.A.; Project Administration, J.A.; Data Curation, A.M., A.K. and E.N.; Resources, D.Z. and D.S.; Software and Formal Analysis, D.Z, A.N. and T.G.; Writing—Original Draft Preparation, J.A., T.G. and E.N.; Visualization, D.Z and E.N.; Writing—Review and Editing, P.D. All authors have read and agreed to the published version of the manuscript.

Funding

The research was conducted by the European Union-NextGenerationEU through the National Recovery and Resilience Plan of the Republic of Bulgaria, project No., BG-RRP-2.013–0001-C01.

Institutional Review Board Statement

Not applicable.

Data Availability Statement

The raw/processed data required to reproduce these findings cannot be shared at this time, as the data also form part of an ongoing study. However, the data can be provided to readers when kindly requested.

Conflicts of Interest

The authors declare no conflicts of interest.

References

  1. Alikhanov, J.; Moldazhanov, A.; Kulmakhambetova, A.; Zinchenko, D.; Nurtuleuov, A.; Shynybay, Z.; Georgieva, T.; Daskalov, P. Methodology for Determining the Main Physical Parameters of Apples by Digital Image Analysis. AgriEngineering 2025, 7, 57. [Google Scholar] [CrossRef]
  2. Alikhanov, J.; Georgieva, T.; Nedelcheva, E.; Moldazhanov, A.; Kulmakhambetova, A.; Zinchenko, D.; Nurtuleuov, A.; Shynybay, Z.; Daskalov, P. Deep Learning-Based Identification of Kazakhstan Apple Varieties Using Pre-Trained CNN Models. AgriEngineering 2025, 7, 331. [Google Scholar] [CrossRef]
  3. Hu, G.; Zhang, E.; Zhou, J.; Zhao, J.; Gao, Z.; Sugirbay, A.; Jin, H.; Zhang, S.; Chen, J. Infield Apple Detection and Grading Based on Multi-Feature Fusion. Horticulturae 2021, 7, 276. [Google Scholar] [CrossRef]
  4. Nazrul, I.; Owais, A. M. Real-time visual inspection system for grading fruits using computer vision and deep learning techniques. Inf. Process. Agric. 2022, Volume 9(Issue 1), 24–37. [Google Scholar] [CrossRef]
  5. Liang, X.; Jia, X.; Huang, W.; He, X.; Li, L.; Fan, S.; Li, J.; Zhao, C.; Zhang, C. Real-Time Grading of Defect Apples Using Semantic Segmentation Combination with a Pruned YOLO V4, Network. Foods 2022, 11, 3150. [Google Scholar] [CrossRef]
  6. Ji, W.; Wang, J.; Xu, B.; Zhang, T. Apple Grading Based on Multi-Dimensional View Processing and Deep Learning. Foods 2023, 12, 2117. [Google Scholar] [CrossRef]
  7. Lee, J.-H.; Vo, H.-T.; Kwon, G.-J.; Kim, H.-G.; Kim, J.-Y. Multi-Camera-Based Sorting System for Surface Defects of Apples. Sensors 2023, 23, 3968. [Google Scholar] [CrossRef]
  8. Si, H.; Wang, Y.; Zhao, W.; Wang, M.; Song, J.; Wan, L.; Song, Z.; Li, Y.; Fernando, B.; Sun, C. Apple Surface Defect Detection Method Based on Weight Comparison Transfer Learning with MobileNetV3. Agriculture 2023, 13, 824. [Google Scholar] [CrossRef]
  9. Agarla, M.; Napoletano, P.; Schettini, R. Quasi Real-Time Apple Defect Segmentation Using Deep Learning. Sensors 2023, 23, 7893. [Google Scholar] [CrossRef]
  10. Yang, L.; Mu, D.; Xu, Z.; Huang, K. Apple Surface Defect Detection Based on Gray Level Co-Occurrence Matrix and Retinex Image Enhancement. Appl. Sci. 2023, 13, 12481. [Google Scholar] [CrossRef]
  11. Hu, X.; Hu, Y.; Cai, W.; Xu, Z.; Zhao, P.; Liu, X.; She, Q.; Hu, Y.; Li, J. Automatic Detection of Small Sample Apple Surface Defects Using ASDINet. Foods 2023, 12, 1352. [Google Scholar] [CrossRef]
  12. Qiu, D.; Guo, T.; Yu, S.; Liu, W.; Li, L.; Sun, Z.; Peng, H.; Hu, D. Classification of Apple Color and Deformity Using Machine Vision Combined with CNN. Agriculture 2024, 14, 978. [Google Scholar] [CrossRef]
  13. Han, B.; Lu, Z.; Dong, L.; Zhang, J. Lightweight Non-Destructive Detection of Diseased Apples Based on Structural Re-Parameterization Technique. Appl. Sci. 2024, 14, 1907. [Google Scholar] [CrossRef]
  14. Bao, D.; Liu, X.; Xu, Y.; Fang, Q.; He, X. Detection of Defective Apples Using Learnable Residual Multi-Head Attention Networks Integrated with CNNs. Electronics 2024, 13, 4861. [Google Scholar] [CrossRef]
  15. Shan, W.; Yue, Y. Apple Defect Detection in Complex Environments. Electronics 2024, 13, 4844. [Google Scholar] [CrossRef]
  16. Wang, X.; Han, J.; Liu, C.; Feng, T. Non-destructive assessment of apple internal quality using rotational hyperspectral imaging. Front Plant Sci. 2024, 15, 1432120. [Google Scholar] [CrossRef]
  17. Han, B.; Zhang, J.; Almodfer, R.; Wang, Y.; Sun, W.; Bai, T.; Dong, L.; Hou, W. Research on Innovative Apple Grading Technology Driven by Intelligent Vision and Machine Learning. Foods 2025, 14, 258. [Google Scholar] [CrossRef]
  18. Olguín-Rojas, J.C.; Vasquez, J.I.; López-Canteñs, G.d.J.; Herrera-Lozada, J.C.; Mota-Delfin, C. A Lightweight YOLO-Based Architecture for Apple Detection on Embedded Systems. Agriculture 2025, 15, 838. [Google Scholar] [CrossRef]
  19. Zhou, C.; Ge, X.; Chang, Y.; Wang, M.; Shi, Z.; Ji, M.; Wu, T.; Lv, C. A Multimodal Parallel Transformer Framework for Apple Disease Detection and Severity Classification with Lightweight Optimization. Agronomy 2025, 15, 1246. [Google Scholar] [CrossRef]
  20. Zhang, H.; Ye, N.; Gong, J.; Xue, H.; Wang, P.; Jiao, B.; Yin, L.; Qiao, X. Hyperspectral Imaging-Based Deep Learning Method for Detecting Quarantine Diseases in Apples. Foods 2025, 14, 3246. [Google Scholar] [CrossRef] [PubMed]
  21. Xie, Z.; Wang, J.; Yang, Y.; et al. Image processing based modeling for Rosa roxburghii fruits mass and volume estimation. Sci. Rep. 2024, 14, 15507. [Google Scholar] [CrossRef] [PubMed]
  22. Yu, J.; Zhang, Z.; Li, Y.; Hua, W.; Wei, X.; Igathinathane, C.; Mhamed, M.; Zhang, W.; Jiao, X.; Yang, L.; Zhang, M.; Li, H. In-field grading and sorting technology of apples: A state-of-the-art review. Comput. Electron. Agric. Vol. Volume 226(2024), 109383. [CrossRef]
  23. Sofu, M. M.; Er, O.; Kayacan, M.C.; Cetişli, B. Design of an automatic apple sorting system using machine vision. Comput. Electron. Agric. 2016, Volume 127, Pages 395–405. [Google Scholar] [CrossRef]
  24. Golpira, H.; Golpîra, H. Improvement of an apple sorting machine using PSNR criterion. IEEE Int. Conf. on Advanced Mechatronic Systems (IEEE ICAMechS), Japan, Tokyo, 2012; pp. 729–732. [Google Scholar]
  25. Mizushima, A.; Lu, R. A low-cost color vision system for automatic estimation of apple fruit orientation and maximum equatorial diameter. Trans. ASABE 2013, 56(3), 813–827. [Google Scholar] [CrossRef]
Figure 1. General view of the compact apple sorting machine with a control cabinet: 1 - machine frame, 2 - apple loading bin, 3 - apple discharge chutes, 4 - chain conveyor, 5 - conveyor rotation motor, 6 - fruit rotation motor, 7 - inductive conveyor position sensor, 8 - fruit discharge mechanism electromagnets, 9 - LED ring, 10 - web camera, 11 - control cabinet, 12 - motor controller, 13 - control panel power supply, 14 - fruit rotation motor speed controller, 15 - pulse power supply, 16 - interface converter, 17 - Raspberry pi 4 single-board computer, 18 - machine control touch panel, 19 - conveyor rotation speed controller.
Figure 1. General view of the compact apple sorting machine with a control cabinet: 1 - machine frame, 2 - apple loading bin, 3 - apple discharge chutes, 4 - chain conveyor, 5 - conveyor rotation motor, 6 - fruit rotation motor, 7 - inductive conveyor position sensor, 8 - fruit discharge mechanism electromagnets, 9 - LED ring, 10 - web camera, 11 - control cabinet, 12 - motor controller, 13 - control panel power supply, 14 - fruit rotation motor speed controller, 15 - pulse power supply, 16 - interface converter, 17 - Raspberry pi 4 single-board computer, 18 - machine control touch panel, 19 - conveyor rotation speed controller.
Preprints 214743 g001
Figure 2. Visual inspection area.
Figure 2. Visual inspection area.
Preprints 214743 g002
Figure 3. Fruit separation area of the compact apple sorting machine.
Figure 3. Fruit separation area of the compact apple sorting machine.
Preprints 214743 g003
Figure 4. Operating algorithm of the developed compact apple sorting machine.
Figure 4. Operating algorithm of the developed compact apple sorting machine.
Preprints 214743 g004
Figure 5. An example of processing an apple image: highlighting contours and surface coloring.
Figure 5. An example of processing an apple image: highlighting contours and surface coloring.
Preprints 214743 g005
Figure 6. Heat maps of correlations between parameters of different varieties.
Figure 6. Heat maps of correlations between parameters of different varieties.
Preprints 214743 g006
Figure 7. Regression dependences of apple weight on the fruit projection area for different varieties.
Figure 7. Regression dependences of apple weight on the fruit projection area for different varieties.
Preprints 214743 g007
Figure 8. Three-dimensional surface of the dependence of the mass of different apple varieties on the projection area of the fruit and the proportion of the surface covering color.
Figure 8. Three-dimensional surface of the dependence of the mass of different apple varieties on the projection area of the fruit and the proportion of the surface covering color.
Preprints 214743 g008
Figure 9. Three-dimensional distribution of apples of the studied varieties in the space of visual attributes: fruit projection area and proportion of surface color.
Figure 9. Three-dimensional distribution of apples of the studied varieties in the space of visual attributes: fruit projection area and proportion of surface color.
Preprints 214743 g009
Table 1. Statistical indicators of apple parameters.
Table 1. Statistical indicators of apple parameters.
Statistical indicator D, mm h, mm m, g color, % S, cm²
Aport Alexander Variety
Mean 76.84 74.92 169.21 56.12 51.64
Std. Error 5.61 4.52 26.08 9.21 6.48
Variance 31.47 20.43 680.17 84.82 41.99
Standard Error (SE) 0.35 0.29 1.65 0.58 0.41
Coefficient of Variation, % 7.30 6.03 15.41 16.41 12.55
95% CI Lower 76.14 74.36 165.96 54.97 50.83
95% CI Upper 77.54 75.48 172.46 57.27 52.45
Min. 69.02 70.84 128.94 41.00 37.95
Max 89.12 84.63 213.86 73.00 61.27
Sinap Almaty Variety
Mean 61.38 60.52 121.74 67.38 30.11
Std. Error 7.93 4.18 22.31 8.44 5.13
Variance 62.88 17.47 497.74 71.23 26.32
Standard Error (SE) 0.50 0.26 1.41 0.53 0.32
Coefficient of Variation, % 12.92 6.91 18.33 12.53 17.04
95% CI Lower 60.39 60.00 118.96 66.33 29.47
95% CI Upper 62.37 61.04 124.52 68.43 30.75
Min. 37.6 54.21 78.14 56.00 14.7
Max 85.2 73.41 176.82 84.00 45.5
Kazakhski Yubileinyi Variety
Mean 75.14 73.46 158.73 53.74 48.61
Std. Error 5.43 4.36 24.84 8.62 6.02
Variance 29.48 19.01 617.03 74.30 36.24
Standard Error (SE) 0.34 0.28 1.57 0.55 0.38
Coefficient of Variation, % 7.23 5.93 15.65 16.04 12.38
95% CI Lower 74.47 72.92 155.64 52.67 47.86
95% CI Upper 75.81 74.00 161.82 54.81 49.36
Min. 66.87 69.15 124.72 41.00 35.84
Max 87.54 82.63 182.42 72.00 60.82
Ainur Variety
Mean 77.32 75.11 167.95 3.48 50.72
Std. Error 5.58 4.41 25.71 0.81 6.21
Variance 31.14 19.45 661.00 0.66 38.56
Standard Error (SE) 0.35 0.28 1.63 0.05 0.39
Coefficient of Variation, % 7.22 5.87 15.31 23.28 12.24
95% CI Lower 76.63 74.56 164.75 3.38 49.95
95% CI Upper 78.01 75.66 171.15 3.58 51.49
Min. 68.42 70.52 129.41 2.10 37.48
Max 88.23 83.97 211.32 5.30 61.14
Nursat Variety
Mean 76.11 74.68 165.21 4.62 49.88
Std. Error 5.49 4.37 25.14 0.53 6.14
Variance 30.14 19.10 632.02 0.28 37.70
Standard Error (SE) 0.35 0.28 1.59 0.03 0.39
Coefficient of Variation, % 7.21 5.85 15.22 11.47 12.31
95% CI Lower 75.43 74.14 162.08 4.55 49.12
95% CI Upper 76.79 75.22 168.34 4.69 50.64
Min. 67.93 69.72 128.03 3.10 36.92
Max 87.81 83.15 209.87 5.20 60.94
Table 2. Pearson correlation matrix.
Table 2. Pearson correlation matrix.
Parameter D, mm h, mm m, g Δcolor, % S , cm2
Aport Alexander Variety
D, mm 1.000 0.69 0.78 0.17 0.75
h, mm 0.69 1.000 0.83 0.14 0.81
m, g 0.78 0.83 1.000 0.10 0.86
Δcolor, % 0.17 0.14 0.10 1.000 0.20
S , cm2 0.75 0.81 0.86 0.20 1.000
Sinap Almaty Variety
D, mm 1.000 0.61 0.71 0.15 0.69
h, mm 0.61 1.000 0.79 0.12 0.77
m, g 0.71 0.79 1.000 0.08 0.82
Δcolor, % 0.15 0.12 0.08 1.000 0.18
S , cm2 0.69 0.77 0.82 0.18 1.000
Kazakhski Yubileinyi Variety
D, mm 1.000 0.67 0.76 0.16 0.74
h, mm 0.67 1.000 0.82 0.13 0.80
m, g 0.76 0.82 1.000 0.09 0.85
Δcolor, % 0.16 0.13 0.09 1.000 0.19
S , cm2 0.74 0.80 0.85 0.19 1.000
Ainur Variety
D, mm 1.000 0.67 0.76 0.16 0.74
h, mm 0.67 1.000 0.82 0.13 0.80
m, g 0.76 0.82 1.000 0.09 0.85
Δcolor, % 0.16 0.13 0.09 1.000 0.19
S , cm2 0.74 0.80 0.85 0.19 1.000
Nursat Variety
D, mm 1.000 0.68 0.79 0.17 0.76
h, mm 0.68 1.000 0.84 0.14 0.82
m, g 0.79 0.84 1.000 0.10 0.86
Δcolor, % 0.17 0.14 0.10 1.000 0.21
S , cm2 0.76 0.82 0.86 0.21 1.000
Table 3. Results of automatic sorting of apples by product categories at different conveyor speeds.
Table 3. Results of automatic sorting of apples by product categories at different conveyor speeds.
Apple variety Number of
samples
Very small (70–90g) Small
(90–135g)
Medium (135–200g) Large
(200–300g)
Substandard (defects/ coloring) Accuracy of automatic classification, %
Conveyor speed0.12m/s
Aport Alexander 250 0 29 187 21 13 97.2
Sinap Almaty 250 19 118 95 3 15 95.8
Kazakhski Yubileinyi 250 0 35 196 5 14 96.6
Ainur 250 0 26 189 21 14 97.9
Nursat 250 0 27 192 18 13 97.1
Total 1250 19 235 859 68 69 96.9
Conveyor speed0.16m/s
Aport Alexander 250 0 31 185 20 14 92.4
Sinap Almaty 250 20 120 92 2 16 90.8
Kazakhski Yubileinyi 250 0 37 194 4 15 91.7
Ainur 250 0 28 187 20 15 93.2
Nursat 250 0 29 190 17 14 92.6
Total 1250 20 245 848 63 74 92.1
Conveyor speed0.20m/s
Aport Alexander 250 2 36 177 22 13 81.5
Sinap Almaty 250 24 126 84 4 12 80.4
Kazakhski Yubileinyi 250 2 43 185 6 14 81.0
Ainur 250 1 34 179 22 14 82.0
Nursat 250 1 35 182 19 13 81.3
Total 1250 30 274 807 73 66 81.2
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.
Copyright: This open access article is published under a Creative Commons CC BY 4.0 license, which permit the free download, distribution, and reuse, provided that the author and preprint are cited in any reuse.
Prerpints.org logo

Preprints.org is a free preprint server supported by MDPI in Basel, Switzerland.

Subscribe

Disclaimer

Terms of Use

Privacy Policy

Privacy Settings

© 2026 MDPI (Basel, Switzerland) unless otherwise stated