---
title: "17"
source: "17.docx"
converted: "2026-10-01 10:26:12 +0800"
converter: "MarkForge (mdconvert)"
engine: "MarkItDown"
---

Enhancing Pineapple Cultivar Classification: A Framework for Image Quality, Feature Extraction, and Algorithmic Refinement

Mohamad Faizal Ab Jabal1, Muhammad Irfan Rozlan2, Azrina Suhaimi[[1]](#footnote-1)\*, Harshida Hasmy4

1,3,4Faculty of Computer and Mathematical Sciences, Universiti Teknologi MARA Johor Branch, Pasir Gudang Campus, 81750 Masai, Johor, Malaysia.

2Faculty of Computer and Mathematical Sciences, Universiti Teknologi MARA Terengganu Branch, Kuala Terengganu Campus, 21080, Kuala Terengganu, Terengganu, Malaysia.

1Applied Mathematics & System Development (AMSys)-Special Interest Group (SIG), Universiti Teknologi MARA Johor Branch, Pasir Gudang Campus, 81750 Masai, Johor, Malaysia.

|  |  |  |
| --- | --- | --- |
| ARTICLE INFO |  | ABSTRACT |
| *Article history:*  Received 22 June 2025  Revised 14 August 2025  Accepted 14 August 2025  Published 1 September 2025 |  | Accurate classification of pineapple cultivars is hindered by limitations in image acquisition, feature extraction, and classification algorithms. This study identifies these technical challenges and proposes methodological improvements to support reliable autonomous recognition systems. Key findings reveal deficiencies in current image datasets, leading to a proposed standardised acquisition protocol involving consistent lighting, optimal camera positioning, and suitable file formats. The HSV colour space is validated as more effective for extracting skin features, with its threshold values and post-processing steps significantly reducing classification errors. The proposed algorithmic refinements integrate chromatic and morphological attributes, particularly surface area and optimise logical operators to enhance accuracy. The study addresses two main research gaps: precise quantification of skin colour and the development of robust classification frameworks. Future work will emphasise empirical validation and the deployment of the YOLOv7 model for real-time, on-site assessment of fruit maturity in field conditions. These contributions hold strong implications for advancing precision agriculture and improving post-harvest processing. |
| *Keywords:*  Autonomous Agriculture  Colour Feature  Feature Extraction  Pineapple Classification  Pineapple Cultivar  *DOI:*  [10.24191/jcrinn.v10i2](https://doi.org/10.24191/jcrinn.v10i2.546) |  |

1. INTRODUCTION

One of the main economic drivers in many nations is the agricultural sector, and pineapple is one of the most produced and traded tropical fruits in the world (Chang et al., 2025). Despite the crop’s economic importance, most pineapple cultivars are still classified manually (Lai et al., 2023). Accurately identifying pineapple cultivars is essential for maintaining efficient supply chain operations and meeting consumer demand. Harvesting and sorting pineapples continue to be labour-intensive processes, putting significant strain on the industry's manpower and expertise. Reliance on conventional farming practices lowers operational efficiency, which is made worse by labour shortages brought on by rural migration (Lai et al., 2023; Li et al., 2024). These limitations impede producers' capacity to fulfil increasing market demand and limit the overall total growth potential of the pineapple industry (Lai et al., 2023; Li et al., 2024).

Existing research has predominantly focused on detecting ripeness rather than identifying specific pineapple cultivars. In this regard, Lai et al. (2023) created a system employing You Only Look Once version 7 algorithm (YOLOv7) to detect pineapple maturity under difficult conditions, whereas Trinh and Nguyen (2023) used YOLOv5 for real-time identification with high accuracy suitable for embedded devices to detect pineapple freshness. Additionally, Arboleda et al. (2021) used a fuzzy logic and image processing-based system to automatically assess pineapple ripeness of the 'queen' kind, increasing evaluation efficiency. Though maturity categorisation may aid in harvesting at the optimal time for optimum market value, it does not address the problem of cultivar identification, which is related with a distinct technique based on visual traits. Moreover, Logistic Regression (LR), Naïve Bayes (NB), and Support Vector Machine (SVM) have been successful in image classification applications (Wang & Chai, 2022). However, using handcrafted features during extraction poses significant hurdles for these models, making them less adaptive to complicated agricultural data.

The goal of this research is to identify a reliable approach for classifying pineapple cultivars. Along with the discussion in this paper, the challenges, advantages, and disadvantages of existing approaches will be emphasized. Furthermore, this paper proposes potential improvements to current classification approaches. The significance of this research is to highlight the research gap and opportunities for development in the classification domain. Furthermore, the findings will aid other researchers in developing an automatic pineapple cultivar detection and classification system, so that predictions about the food supply chain can be visualized and the food supply is secure. Indirectly, secure the nation's economy, which is dependent on pineapple imports and exports.

In accordance with the study's objectives, this paper is structured as follows: Section II presents a comprehensive literature review and critical analysis of related work. Section III details the proposed methodology. Section IV examines the analytical findings and provides an in-depth discussion of the results. Finally, Section V concludes the study and proposes directions for future research.

1. LITERATURE REVIEW
   1. Pineapple feature

Features are essential data used to recognize and classify objects in images. The features accessible for object recognition and classification include shape, size, texture, and colour (Jabal et al., 2022, Jabal et al., 2024). Consequently, analysis of pineapple images suggests that shape and colour are the most reliable features for use in this study. Table 1 displays the findings from the analysis.

Table 1. Pineapple features

|  |  |  |
| --- | --- | --- |
| **Cultivar** | **Features** | **Other Pineapple Name called by Local People’s** |
| Spanish | 1. Pointed leaf ends with spines. 2. Produces 2-12 basal slips at the stalk base. 3. Ideal for canning. 4. Ripe fruit changes from green to dark purple or reddish-orange. 5. Large crown. 6. Long shelf life. 7. Cylindrical fruit shape. | 1. Singapore Spanish Pineapple. 2. Selangor Green Pineapple. 3. Gandul Pineapple. |
| Smooth Cayenne | 1. Large fruit size. 2. Flat pineapple eyes. 3. Leaves are dark green. 4. Tapered fruit shape. | 1. Sarawak Pineapple. |
| Queen | 1. Tapered fruit shape. 2. Best consumed fresh. 3. Leaves are bluish-green with purple centres. 4. Spiny leaves. | 1. Moris Pineapple. 2. Yankee Pineapple. 3. Moris Elephant Pineapple. |
| Hybrid | 1. Cylindrical fruit shape. 2. Flat pineapple eyes. 3. Green leaves. 4. Slightly spiny leaves. 5. Best consumed fresh. | 1. Maspine Pineapple. 2. Josapine Pineapple. 3. N36 Pineapple. 4. MD2 Pineapple. |

Based on Table 1, features related to the crown size, leaves and the practicality of the pineapple in accommodation with the post-harvest handling come into play as major aspects contributing to the marketing and production viability of the cultivar. Various cultivars possess certain features that lend themselves to uses such as canning, fresh use, fresh-cut products. Information on agronomics is to optimising production, transport, and trade. Furthermore, Fig. 1 shows the sample of the pineapple images received from the Malaysian Pineapple Industry Board (2024). Based on Fig. 1, it contains eight sample images of pineapple according to their cultivar. The shape and colour are evident qualities that can be utilized to recognise and classify. Furthermore, the size of the pineapple might be considered as an additional feature to guarantee that it is classified accurately.

|  |  |  |  |
| --- | --- | --- | --- |
| ![A close up of a pineapple  AI-generated content may be incorrect.](data:image/png;base64...) | ![A close up of a pineapple  AI-generated content may be incorrect.](data:image/png;base64...) | ![A close-up of a pineapple  AI-generated content may be incorrect.](data:image/png;base64...) | ![A pineapple with green leaves  AI-generated content may be incorrect.](data:image/png;base64...) |
| (a) Moris | (b) Sarawak | (c) Gandul | (d) Maspine |
| ![A pineapple with green leaves  AI-generated content may be incorrect.](data:image/png;base64...) | ![A close-up of a pineapple  AI-generated content may be incorrect.](data:image/png;base64...) | ![A close-up of a pineapple  AI-generated content may be incorrect.](data:image/png;base64...) | ![A pineapple with green leaves  AI-generated content may be incorrect.](data:image/png;base64...) |
| (e) Josapine | (f) Yankee | (g) Moris Elephant | (h) MD2 |

Fig. 1. Pineapple cultivar images

Next, this study discusses potential recognition approaches proposed by other researchers. The extensive discussion will emphasize the processes involved, advantages and disadvantages of the approaches.

* 1. Feature extraction approach

Feature extraction is the crucial process before the object in the image can be classified (Jabal et al., 2024). Hence, the accuracy of the object classification result is influenced by the extraction result. Several approaches have recently been developed to extract significant features such as colour, shape, and texture that aid in the classification of pineapple cultivars or maturity levels. Such processes determine both the accuracy of the method and its practical application in real-world agricultural contexts.

Lai et al., (2023) has deployed the integration of YOLOv7 and SimAM to extract the shape and colour of the object. The colour space used to extract the colour feature is Red, Green and Blue (RGB). The authors have done a modification on MPConv structure and soft-NMS algorithm to extract the accurate result. However, the achievement of the accuracy rate is not recorded. Furthermore, the proposed approach had required high performance workstation and consumed high memory during execution. On the other hand, Manik et al., (2024) has used morphological method to extract 13 pineapple features. The first step is to eliminate the non-ROI area in the image. Second step the process continues to resize the image and segment the features according to the class. However, there is no record regarding the extraction accuracy rate reported by the authors.

In different cases, with the goal of the research to extract the shape, colour and texture feature, Wan Nurazwin et al., (2022) has implemented Analysis of Variance (ANOVA) to select and extract the crucial features from an image. However, the author does not report the achievement of the accuracy rate. Moreover, the approach needs to be improved to deal with the unconducive foreground and colour similarities in the image, which caused the approach to perform incorrect feature extraction. Next, in 2021 Arboleda et al. has used RGB colour extraction to yield the colour feature. The author has reported that the extraction accuracy rate was 90%. However, the approach has an issue to deal with the unconducive environment image.

In such cases, Jabal et al., (2024) has implemented the Hue, Saturation and Value (HSV) Histogram method to extract the colour feature. HSV colour space is used to deal with the complex foreground in the image. The extraction accuracy rate is 77.86% was recorded by the author. However, the method needs improvement to deal with the image background which tends to dark brown and black colour.

Based on the extensive discussion, the advantages and disadvantages of the existing feature extraction approaches have been highlighted. According to the report there is an improvement opportunity towards the feature extraction approach to extract the shape and colour features of the pineapple. The key point is the correct shape and colour value will influence the approach to extract the correct ROI features.

* 1. Classification approach

Proceeding with discussion, this section will extensively discuss the existing classification approaches. This discussion aims to identify the most reliable approach for pineapple classification.

Environmental considerations significantly impact the effectiveness of pineapple classification systems, especially in real-world agricultural applications. Lighting conditions, occlusion by leaves or other objects, and fruit-background similarity can all have a substantial impact on image quality and classification accuracy (Chen et al., 2023, Lai et al., 2023). Fig. 2 presents the sample pineapple image with an unconducive environment. The images have been achieved from the Facebook *Pembekal Benih Nanas MD2* (KSF Enterprise MD2, 2024). These issues stem from the intrinsic complexity of orchard ecosystems and a lack of predictability, which may affect the required robust procedures for developing design guidelines.

|  |  |
| --- | --- |
| ![A pineapple growing on a plant  AI-generated content may be incorrect.](data:image/jpeg;base64...) | ![A pineapple with a red and blue object on it  AI-generated content may be incorrect.](data:image/jpeg;base64...) |
| ![A pineapple growing in a pineapple plantation  AI-generated content may be incorrect.](data:image/jpeg;base64...) | ![A group of pineapples in a yellow basket  AI-generated content may be incorrect.](data:image/jpeg;base64...) |

Fig. 2. Unconducive environment pineapple image

Fig. 2 portrays the sunlight, leaves, shadows, the cover on top of the pineapple, and a pile of pineapples in the container all affect classification accuracy. Chen et al. (2023) and Mukhiddinov et al. (2022) agreed that differences in texture and colour can cause visual inconsistencies and hinder pineapple recognition. Furthermore, lighting variances in the dataset present significant issues, as addressed by Lai et al. (2023), who noted that variable lighting causes brightness variations, which may hide essential elements such as shape and colour, which are critical for classification.

Therefore, to deal with the unconducive environment image, Shiu et al., (2023) utilized Faster Region-based Convolutional Neural Network (R-CNN) and Mask R-CNN to detect plastic-covered pineapples. Although the technique achieved 97.46% classification accuracy rate and 73.9% of average precision rate (AP), detection performance was poor and necessitated high quality imagery from unmanned aerial vehicle (UAVs), restricting its use in resource-constrained contexts. On the other hand, Roslan et al., (2023) applied the same approach by Shiu, but for orange and apple classification. Roslan's image depicts the orchard environments. The study has successfully overcome problems caused by fluctuating lighting conditions and obstructed fruits. Moreover, the study successful achieved 91.44% of AP. However, no classification accuracy rate has been reported.

In 2023, Trinh and Nguyen deployed an improvement version of YOLOv5 to classify ripe pineapple and achieved a 98% classification accuracy rate. Moreover, the approach had achieved more than 96% of mean average precision (mAP) rate. Aside from that, the approach required a large dataset for training to assure accurate classification. Although the approach detection speed is 9.2 milliseconds (ms) per image, it took a long time to train. In such circumstances, Lai et al., (2023) were successful in classifying pineapples into 3 maturity classes by introducing an enhancement to YOLOv7. Furthermore, the approach has used the unconducive environment pineapple images. The approach was successful achieved 95.82% mAP. However, no record can be discovered of the classification's accuracy rate.

In such cases, Mukhiddinov et al., (2022) proposed a deep CNN model and an optimized YOLOv4 to classify fruits and vegetables based on unconducive environment image. Furthermore, the study observed 73.5% and 72.6% AP for fruits and vegetables respectively based on 20 classes. However, there is no record found on the classification accuracy rate. Besides, in 2021, Arboleda et al. used Fuzzy Logic to classify pineapples into 4 classes: 1) unripe, 2) overripe, 3) underripe, and 4) ripe (mature). According to the study, the classification accuracy rate was 100% for classes 1 and 2, and 90% for classes 3 and 4. However, only the conducive environment images are required by the approach. This constraint stresses the opportunity to improve the approach in dealing with an unconducive environmental image.

Meanwhile in 2021, utilised an aerial image of the pineapple orchard captured by a UAV with main objective to detect and count the pineapple crown. Wan Nurazwin et al., (2021) had conduct a study on machine learning classifiers, which are Artificial Neural Network (ANN), Support Vector Machine (SVM), Random Forest (RF), Naïve Bayes (NB), Decision Tree (DT) and k-Nearest Neighbours (kNN) to investigate the reliable classification approach in order to classify between pineapple (fruit) and pineapple crown (non-fruit). Later, Variable Learning Rate Backpropagation algorithm (GDX) is one of the models in ANN known as ANN-GDX is used to detect and count the pineapple crown. The result yield from the study is exceeded above 90% of classification accuracy rate to identified crown. However, finding from the study emphasized that the approach had potential for misclassification due to the noise in the image and colour similarities between leaves and crowns. Besides, the approach requires manual annotation of training data. Additionally, to implement the approach requires high spatial-resolution images in order to generate accurate results. On the other hand, Cai et al., (2020) had proposed enhanced version of Single Shot Multi-Box Detector (SSD) to deal with unconducive environment image. The study's goal is to classify fruits into specific classes. Furthermore, the study successfully produced 92.4% of mAP. However, the classification accuracy rate unable to be found in the report. Likewise, the approach has a shortcoming in that it requires manual image annotation.

This section might be summarised by emphasizing the findings following a thorough discussion. The unconducive environment image remains as the main challenge to recognise and classify the pineapple. In terms of feature extraction, shadow removal on the pineapple has the potential to remove or change the colour feature on the pineapple skin. Furthermore, the identical hue of the leaves and a portion of the pineapple skin has the potential to induce inaccurate feature extraction and ROI. Other than that, using RGB colour space in the histogram method for noise reduction is less reliable than using HSV colour space. Furthermore, miscalculation on extracted feature data by the developed equations in each classification approach developed by the previous researchers remains a major challenge in achieving an accurate pineapple cultivar classification result. Also, require manual annotation and large numbers of image for training emphasizes the limitations of the approaches. Additionally, some of the approaches demand for the high specification of the workstation for execution.

On the other hand, this study had difficulty determining from prior studies the true properties of colour features of the pineapple skin to be employed for extraction. There are numerous variables for colour features that can affect extraction. According to Jabal et al., (2022), RGB colour space, where each colour is represented by an integer between 0 and 250. Moreover, various values will be produced by combining the RGB colour space. Hence, this number can cause miscalculation during the extraction and affect the classification result. Additionally, this issue had stressed the RGB colour space is not reliable to be used for classification purposes. Another element influencing the colour of the pineapple skin in the picture is the light illumination. Compared to photography studio illumination, taking a picture in the sun will provide a distinct colour quality. This issue has the effect of causing the various colour properties to be extracted from the image and inputted to the equation used to determine classification. Consequently, the classification output that is generated will be inaccurate. This issue was discovered during the image capturing, and it can be resolved by following the correct standard operation procedure (SOP).

Following a thorough discussion, this study moves on to the next section to perform further analysis on the highlighted issue.

1. METHODOLOGY

The unconducive environment image, undefined properties of the pineapple skin colour and standard operating procedure (SOP) are the issues concluded in the previous section. This section provides a further analysis of the highlighted issues. The discussion will begin with the analysis on the dataset and continued with the colour features. Finally, the discussion will be ended with the summary of the section.

* 1. Dataset

The dataset used in this study was obtained from the Malaysian Pineapple Industry Board (2024) and Facebook *Pembekal Benih Nanas MD2* (KSF Enterprise MD2, 2024) as presented in Fig. 1 and 2 respectively. Furthermore, for the analysis purposes, another dataset was achieved from Kaggle as depicted in Fig. 3 (Sujitra, 2024).

|  |  |
| --- | --- |
| ![A close up of a pineapple  AI-generated content may be incorrect.](data:image/png;base64...) | ![A close up of a pineapple  AI-generated content may be incorrect.](data:image/png;base64...) |
| ![A close up of a pineapple  AI-generated content may be incorrect.](data:image/png;base64...) | ![A close up of a pineapple  AI-generated content may be incorrect.](data:image/png;base64...) |

Fig. 3. Normal pineapple image

Source: Sujitra (2024)

Fig. 3 shows the sample pineapple images from Kaggle, which are the images were captured in the conducive environment same as shown in Fig. 1. However, the images in Fig. 2 contain noise, which may affect classification accuracy. Furthermore, it has been determined that the noises in the images are caused by the cover on the pineapple crown, pineapple leaves, and container used to collect the pineapple. Based on the analysis, the cover on the pineapple crown has caused the shadow on the pineapple skin. Besides, the leaves also created the shadow on the pineapple skin. Moreover, the similarity of the leaves colour might disrupt the colour of the pineapple skin that caused confusion during features extraction. Additionally, the container colour also caused disruptions during feature extraction. A pile of pineapples in the container is another factor that confuses the feature extraction, resulting in an inaccurate pineapple classification result. Next, the conducted analysis has examined the properties of the images as shown in Table 2.

Table 2. Sample of image properties

|  |  |
| --- | --- |
| **Image** | **Description** |
| ![A pineapple with green leaves  AI-generated content may be incorrect.](data:image/png;base64...)  (a) | Dimension: $295 ×638$ pixels  Bit Depth: 32  Format: PNG  Colour: sRGB |
| ![A pineapple growing in a plant  AI-generated content may be incorrect.](data:image/jpeg;base64...)  (b) | Dimension: 720$ ×960$ pixels  Bit Depth: 24  Format: JPG  Colour: sRGB |
| ![A close up of a pineapple  AI-generated content may be incorrect.](data:image/png;base64...)  (c) | Dimension: 417$ ×598$ pixels  Bit Depth: 32  Format: PNG  Colour: sRGB |

Table 2 shows that the collection of datasets used in this study has a variety of image dimension and 2 types of file formats. The most common file format are Portable Network Graphic (PNG) and Joint Photographic Expert Group (JPG). Moreover, the colour for all images is standard Red, Green, and Blue (sRGB). Based on Table 2, the bit depth of the image is a key to determine the value of the RGB used for extraction. The higher of the bit depth, the higher the tones of the colour, indicating that the colour generated by the camera is similar to the actual colour visible to the human eye. Furthermore, the significance of the higher tones of the colour will increase the contradiction of distinguishing ROI features from non-ROI features in the image, even if the colours are slightly similar, such as the green colour of the leaves and the green colour of the pineapple skin. As a result, the 24-bit depth in image (b) may hinder ROI differentiation due to noise interference during feature extraction.

* 1. Colour features

The finding from the analysis towards the datasets, green and yellow are the dominant colours on the pineapple skin. However, the gradient of the green and yellow has difficulty the extraction when the various values have been generated from the RGB colour space and impacted the calculation process. Therefore, instead of using RGB colour space. The analysis has been conducted on other colour spaces such as HSV and YCbCr to identify the actual colour values of the pineapple skin, which is known as colour feature.

|  |  |  |  |
| --- | --- | --- | --- |
| **Obtain Image** | **Range Values of RGB Colour Components** | **Colour Distribution** | **Generated Result** |
| ![A pineapple with green leaves  AI-generated content may be incorrect.](data:image/png;base64...)  (a) | ![A screenshot of a graph  AI-generated content may be incorrect.](data:image/png;base64...) | ![A white box with a yellow and orange gradient  AI-generated content may be incorrect.](data:image/png;base64...) | ![A yellow and black object with black background  AI-generated content may be incorrect.](data:image/png;base64...) |
| ![A pineapple growing in a plant  AI-generated content may be incorrect.](data:image/jpeg;base64...)  (b) | ![A graph of different colored lines  AI-generated content may be incorrect.](data:image/png;base64...) | ![A white box with a green and orange trail  AI-generated content may be incorrect.](data:image/png;base64...) | ![A close up of a yellow object  AI-generated content may be incorrect.](data:image/png;base64...) |
| ![A close up of a pineapple  AI-generated content may be incorrect.](data:image/png;base64...)  (c) | ![A screenshot of a graph  AI-generated content may be incorrect.](data:image/png;base64...) | ![A white box with a yellow spot  AI-generated content may be incorrect.](data:image/png;base64...) | ![A close up of a pineapple  AI-generated content may be incorrect.](data:image/png;base64...) |

Fig. 4. Colour features analysis using RGB colour space

Fig. 4 presents the findings of the analysis, demonstrating that the RGB component values exhibit significant variation, which is essential for determining the colour value of each pixel in the pineapple skin. However, accurately identifying the true colour value remains challenging due to the wide range of RGB values, which influences the noise elimination process and may result in the unintended removal of key features within the ROI. For instance, in image (a), to effectively exclude the pineapple crown from the ROI, the green component value must be constrained between >50 and ≤250, while the blue component must range from 0 to <150. Nevertheless, the results indicate that the noise elimination process not only removes the pineapple crown but also eliminates regions within the ROI that share similar colour properties, potentially affecting the accuracy of feature extraction. A similar issue is observed in images (b) and (c), where portions of the ROI have also been inadvertently removed, as evidenced in the generated results section.

Next, the analysis is continued with the HSV colour space as shown in Fig. 5. The saturation (S) and value (V) components have a normalised range of 0 to 1, as shown in the figure. When compared to the RGB counterparts, the range of values for these components is quite narrow. Furthermore, the hue (H) component regularly has a threshold value below 1. As a result, the noise is successfully eliminated from the ROI as presents in generated result for image (a) and (c). However, the consequent image (b) is not completely clean, as some noise artifacts remain. Nevertheless, the ROI in image (b) exhibits more apparent clarity and focus compared to the ROI in image (b) from Fig. 4.

|  |  |  |  |
| --- | --- | --- | --- |
| **Obtain Image** | **Range Values of HSV Colour Components** | **Colour Distribution** | **Generated Result** |
| ![A pineapple with green leaves  AI-generated content may be incorrect.](data:image/png;base64...)  (a) | ![A diagram of a circle with a diagram and a diagram of a circle  AI-generated content may be incorrect.](data:image/png;base64...) | ![A drawing of a smoke  AI-generated content may be incorrect.](data:image/png;base64...) | ![A pineapple with many small yellow flowers  AI-generated content may be incorrect.](data:image/png;base64...) |
| ![A pineapple growing in a plant  AI-generated content may be incorrect.](data:image/jpeg;base64...)  (b) | ![A diagram of a circle with different colors  AI-generated content may be incorrect.](data:image/png;base64...) | ![A white box with a colorful explosion  AI-generated content may be incorrect.](data:image/png;base64...) | ![A pineapple in the dark  AI-generated content may be incorrect.](data:image/png;base64...) |
| ![A close up of a pineapple  AI-generated content may be incorrect.](data:image/png;base64...)  (c) | ![A diagram of a sun and a diagram of a sun  AI-generated content may be incorrect.](data:image/png;base64...) | ![A black and yellow gradient on a white box  AI-generated content may be incorrect.](data:image/png;base64...) | ![A close up of a pineapple  AI-generated content may be incorrect.](data:image/png;base64...) |

Fig. 5. Colour features analysis using HSV colour space

The analysis is then carried out using the YCbCr colour space, as seen in Fig. 6. Comparable to the RGB colour system, the range value of each component in the YCbCr colour space is 0 to 250. Furthermore, the obtained result for each image is similar to that shown in Fig. 4. However, the generated result of image (b) in Fig. 6 has less noise than the generated image (b) in Fig. 4. Moreover, in general the range value of Y component is >10 and ≤230. Then, the range value of Cb component is >0 and ≤150. Next, the range value of Cr component is ≥140 and ≤180.

|  |  |  |  |
| --- | --- | --- | --- |
| **Obtain Image** | **Range Values of YCbCr Colour Components** | **Colour Distribution** | **Generated Result** |
| ![A pineapple with green leaves  AI-generated content may be incorrect.](data:image/png;base64...)  (a) | ![A screenshot of a graph  AI-generated content may be incorrect.](data:image/png;base64...) | ![A drawing of a yellow and orange object  AI-generated content may be incorrect.](data:image/png;base64...) | ![A pineapple with yellow flowers  AI-generated content may be incorrect.](data:image/png;base64...) |
| ![A pineapple growing in a plant  AI-generated content may be incorrect.](data:image/jpeg;base64...)  (b) | ![A screenshot of a graph  AI-generated content may be incorrect.](data:image/png;base64...) | ![A white box with orange paint on it  AI-generated content may be incorrect.](data:image/png;base64...) | ![A close up of a face  AI-generated content may be incorrect.](data:image/png;base64...) |
| ![A close up of a pineapple  AI-generated content may be incorrect.](data:image/png;base64...)  (c) | ![A screenshot of a graph  AI-generated content may be incorrect.](data:image/png;base64...) | ![A white box with a colorful line  AI-generated content may be incorrect.](data:image/png;base64...) | ![A close up of a pineapple  AI-generated content may be incorrect.](data:image/png;base64...) |

Fig. 6. Colour features analysis using YCbCr colour space

Based on the comprehensive discussion, there is no specific value can be determined as the value of the pineapple skin colour. But the finding has shown that the range of the colour value from each component is possible to be used to extract the colour feature of the pineapple skin. Table 3 emphasises the finding from the conducted analysis.

Table 3. Range of the colour value for each component

|  |  |  |
| --- | --- | --- |
| **R** | **G** | **B** |
| ≥ 100 | > 50 and ≤ 250 | 0 to < 150 |
|  |  |  |
| **H** | **S** | **V** |
| < 1 | > 0 and < 1 | > 0 and < 1 |
|  |  |  |
| **Y** | **Cb** | **Cr** |
| > 10 and ≤ 230 | > 0 and ≤ 150 | ≥ 140 and ≤ 180 |

Although the range of the colour value is shown in Table 3, still, further study needs to be conducted to ensure the extraction will extract the accurate ROI features. In other words, there is a possibility to discover the actual range or colour value of the pineapple skin.

1. FINDINGS

Following extensive analysis, the study revealed numerous important concerns that require action. First, there is concern about the pineapple image dataset's quality and representation. Second, the extraction approach used in the study has limitations that must be addressed. Finally, the classification approach must be refined to improve accuracy and dependability.

Data quality is the primary concern requiring improvement. High-quality images can be achieved by implementing a standard operating procedure (SOP) and selecting an appropriate camera. Key variables to consider when developing the SOP include lighting conditions, camera-to-object distance, minimal or controlled background noise, and saving images in PNG or JPEG file formats.

Subsequent analysis indicates that the HSV colour space is more reliable for extracting colour features from pineapple skin. However, post-extraction image enhancement is necessary to improve output quality and minimise classification errors. The recommended threshold values for each HSV component, as presented in Table 3, can be applied for this purpose.

Finally, the classification approach requires refinement to enhance the accuracy. The algorithm should be enhanced to incorporate two critical parameters in its computations: colour features and pineapple surface morphology. Furthermore, the logical operators employed in the classification process must be optimised to ensure accurate categorical assignment of images.

The identified research gaps present significant opportunities for further investigation and methodological advancement in this domain. Empirical validation is necessary, with systematic verification of experimental results to confirm the reliability of the proposed solution.

1. CONCLUSION and Future work

In conclusion, environmental interference in pineapple imaging represents a critical challenge requiring resolution. Image noise has been identified as a primary contributor to classification inaccuracies. Analytical findings reveal two key research priorities: first, the need to precisely define pineapple skin colour characteristics, and second, the development of robust classification methodologies.This study establishes HSV colour space as the most effective model for extracting region-of-interest colour features from pineapple skin. Furthermore, this study has proposed incorporating morphological parameters (specifically surface area measurements) and optimised logical operators within the classification algorithm to address these challenges.

The identified research gaps, namely colour definition and classification refinement, are fundamental challenges that must be addressed to enable the development of reliable autonomous pineapple recognition systems.Future research directions should prioritise experimental validation to demonstrate the practical efficacy of the proposed methodology. Additionally, this investigation will explore the applicability of the YOLOv7 algorithm for processing suboptimal pineapple images under real-world conditions. Specifically, subsequent work will focus on developing the algorithm's capability to assess pineapple maturity directly on the tree, thereby facilitating automated harvest determination.

1. ACKNOWLEDGMENTS/FUNDING

We are grateful to UiTM Johor Branch Pasir Gudang Campus and UiTM Terengganu Branch Kuala Terengganu Campus for providing us with the resources and facilities we require to further our academic goals. We thank our department for creating a very efficient research environment and acknowledge all individuals who contributed to this endeavour.

1. CONFLICT OF INTEREST STATEMENT

The authors agree that this research was conducted in the absence of any self-benefits, commercial or financial conflicts and declare the absence of conflicting interests with the funders.

1. AUTHORS’ CONTRIBUTIONS

**Mohamad Faizal Ab Jabal:** conceptualisation, writing, validation, and data curation. **Muhammad Irfan Rozlan:** concept, approach, and software. **Azrina Suhaimi:** handles conceptualization, methodology, formal analysis, investigation, and proofreading. **Harshida Hasmy:** manages resources, formal analysis, and investigations.

1. REFERENCES

Arboleda, E., Jesus, C., & Tia, L. (2021). Pineapple maturity classifier using image processing and fuzzy logic. IAES International Journal of Artificial Intelligence (IJ-AI), 10(4), 830–838. <https://doi.org/10.11591/ijai.v10.i4.pp830-838>

Cai, J., Tao, J., Ma, Y., Fan, X., & Cheng, L. (2020). Fruit image recognition and classification method based on improved single shot multi-box detectors. Journal of Physics: Conference Series, 1629(1), 012010. <https://doi.org/10.1088/1742-6596/1629/1/012010>

Chang, H., Meng, Q., Wu, Z., Tang, L., Qiu, Z., Ni, C., Chu, J., Fang, J., Huang, Y., & Li, Y. (2025). Accurate ripening stage classification of pineapple based on a visible and near-infrared hyperspectral imaging system. Journal of AOAC International, *108*(3), 293-303. <https://doi.org/10.1093/jaoacint/qsaf010>

Chen, Y., Zheng, L., & Peng, H. (2023). Assessing pineapple maturity in complex scenarios using an improved RetinaNet algorithm. Engenharia Agrícola, 43(2), e20220180. <https://doi.org/10.1590/1809-4430-eng.agric.v43n2e20220180/2023>

KSF Enterprise MD2. (2024). Pembekal benih nanas MD2 [Facebook page]. Facebook. <https://www.facebook.com/Ksfenterprisemd2/photos?locale=ms_MY>

Jabal, M. F. A., Hamid, S., Othman, N. Z. S., & Rahim, M. S. M. (2022). Spot filtering adaptive thresholding (SFAT) method for early pigment spot detection on iris surface. In Saba, T., Rehman, A., Roy, S. (Eds), Prognostic models in healthcare: AI and statistical approaches (pp. 347–370). Springer Nature Singapore. <https://doi.org/10.1007/978-981-19-2057-8_13>

Jabal, M. F. A., Abdullah, A. N. H., Najjar, F. H., Hamid, S., Khalid, A. K., & Manan, W. D. W. A. (2024). A novel color feature for the improvement of pigment spot extraction in iris images. Journal of Image and Graphics, 12(4), 410–416. <https://doi.org/10.18178/joig.12.4.410-416>

Lai, Y., Ma, R., Chen, Y., Wan, T., Jiao, R., & He, H. (2023). A pineapple target detection method in a field environment based on improved YOLOv7. Applied Sciences, 13(4), 2691. <https://doi.org/10.3390/app13042691>

Li, J., Liu, Y., Li, C., Luo, Q., & Lu, J. (2024). Pineapple detection with YOLOv7-tiny network model improved via pruning and a lightweight backbone sub-network. Remote Sensing, 16(15), 2805. <https://doi.org/10.3390/rs16152805>

Malaysian Pineapple Industry Board. (2024). Home [Official government website]. <https://www.mpib.gov.my/en/home/>

Manik, F. Y., Harumy, T. H. F., Akasah, W., Hidayat, W., Simanjuntak, R. F., & Sianturi, V. J. (2024, April 19). Identification of pineapple maturity utilizing digital image using hybrid machine learning method. AIP Conference Proceedings, 2987(1), 020050. <https://doi.org/10.1063/5.0199826>

Mukhiddinov, M., Muminov, A., & Cho, J. (2022). Improved classification approach for fruits and vegetables freshness based on deep learning. Sensors, 22(21), 8192. <https://doi.org/10.3390/s22218192>

Roslan, M. I., Ibrahim, Z., Adnan, N. A. K., Diah, N. M., Narawi, N. A. A., & Arif, Y. M. (2023). Fruit detection and recognition using Faster R-CNN with FPN30 pre-trained network. In 2023 IEEE 8th International Conference on Recent Advances and Innovations in Engineering (ICRAIE) (pp. 1–6). IEEE. <https://doi.org/10.1109/ICRAIE59459.2023.10468169>

Shiu, Y.-S., Lee, R.-Y., & Chang, Y.-C. (2023). Pineapples' detection and segmentation based on Faster and Mask R-CNN in UAV imagery. Remote Sensing, 15(3), 814. <https://doi.org/10.3390/rs15030814>

Sujitra, A. (2024). Phulae pineapple translucent flesh symptom dataset [Dataset]. Kaggle. <https://www.kaggle.com/datasets/sujitraarw/phulae-pineapple-translucency-defect>

Trinh, T. H., & Nguyen, H. H. C. (2023). Implementation of YOLOv5 for real-time maturity detection and identification of pineapples. Traitement du Signal, 40(4), 1445–1455. <https://doi.org/10.18280/ts.400413>

Syazwani, R. W. N., Asraf, H. M., Amin, M. M. S., & Dalila, K. N. (2022). Automated image identification, detection and fruit counting of top-view pineapple crown using machine learning. Alexandria Engineering Journal, 61(2), 1265–1276. <https://doi.org/10.1016/j.aej.2021.06.053>

Wang, H. H., & Chai, S. Y. (2022). Novel feature extraction for pineapple ripeness classification. Journal of Telecommunications and Information Technology, 1, 14–22. <https://doi.org/10.26636/jtit.2022.156021>

|  |  |
| --- | --- |
| ![A picture containing text, clipart  Description automatically generated](data:image/png;base64...) | © 2025 by the authors. Submitted for possible open access publication under the terms and conditions of the Creative Commons Attribution (CC BY) license (http://creativecommons.org/licenses/by/4.0/). |

1. \* Corresponding author. *E-mail address*:  azrin253@uitm.edu.my [↑](#footnote-ref-1)
