Klasifikasi Biji Chia dan Biji Selasih Menggunakan Algoritma k-Nearest Neighbors Berdasarkan Fitur Warna HSV

Veilind Maynius, Dylan Revelin, Michael Michael, Frans Mikael Sinaga

Abstract


Biji chia dan biji selasih sering dianggap sebagai biji yang sama, padahal sebenarnya keduanya memiliki beberapa perbedaan. Salah satu perbedaan yang membedakannya adalah warna. Meskipun tampak serupa, biji selasih memiliki warna yang lebih gelap dibandingkan dengan biji chia. Oleh karena itu, kami memutuskan untuk menggunakan Hue, Saturation, dan Value (HSV) sebagai fitur model warna untuk mendapatkan informasi warna dari kedua biji ini. Selain itu, metode Gray Level Co-occurrence Matrix (GLCM) dan deteksi tepi juga digunakan untuk membantu meningkatkan akurasi dalam mengklasifikasikan kedua jenis biji ini. Kami menerapkan algoritma k-Nearest Neighbor (k-NN) untuk melatih model dan mengukur akurasi dari setiap nilai "k" yang diuji mengunakan Stratified 5-Fold Cross-Validation. Total data gambar yang digunakan untuk melatih model dalam penelitian ini adalah 100 gambar untuk masing- masing jenis biji. Ukuran gambar yang diuji diubah menjadi 200×200 piksel. Akurasi tertinggi yang diperoleh dalam penelitian ini mencapai 94,4% pada data uji dengan parameter "k" sebesar 3 dan jumlah data citra yang digunakan adalah 90. Hasil penelitian ini menunjukkan bahwa jumlah data gambar yang digunakan untuk melatih dan menguji model akan mempengaruhi tingkat akurasi yang diperoleh. Selain itu, pemilihan nilai parameter "k" juga berpengaruh terhadap seberapa akurat model dalam mendeteksi suatu gambar.


Keywords


Biji Chia; Biji Selasih; Klasifikasi; HSV; kNN

Full Text:

PDF

References


D. R. Adawiyah, F. P. Wefiani, and K. Patricia, “Karakterisasi Serat Pangan, Kapasitas Pengikatan Air dan Kemampuan Emulsifikasi Biji Selasih dan Chia,” Jurnal Mutu Pangan?: Indonesian Journal of Food Quality, vol. 8, no. 2, pp. 63–69, Mar. 2022, doi: 10.29244/jmpi.2021.8.2.63.

R. Rasbawati and I. Irmayani, “Pemanfaatan Biji Chia (Salvia hispanica L.) untuk Meningkatkan Kualitas Susu Diversifikasi,” Jurnal Peternakan Indonesia (Indonesian Journal of Animal Science), vol. 23, no. 2, p. 159, Jun. 2021, doi: 10.25077/jpi.23.2.159-167.2021.

V. Y. Ixtaina, S. M. Nolasco, and M. C. Tomás, “Physical properties of chia (Salvia hispanica L.) seeds,” Ind Crops Prod, vol. 28, no. 3, pp. 286–293, Nov. 2008, doi: 10.1016/j.indcrop.2008.03.009.

A. Hajmohammadi, M. Pirouzifard, M. Shahedi, and M. Alizadeh, “Enrichment of a fruit-based beverage in dietary fiber using basil seed: Effect of Carboxymethyl cellulose and Gum Tragacanth on stability,” LWT, vol. 74, pp. 84–91, Dec. 2016, doi: 10.1016/j.lwt.2016.07.033.

A. D. R. Nurcahyanti et al., “AKTIVITAS ANTIOKSIDAN DAN ANTIBAKTERI EKSTRAK POLAR DAN NON POLAR BIJI SELASIH (Ocimum sanctum Linn) [Antioxidant and Antibacterial Activities from Polar and Non Polar Basil (Ocimum sanctum Linn) Seed Extracts],” 2011.

S. Sanjaya, M. L. Pura, S. K. Gusti, F. Yanto, and F. Syafria, “K-Nearest Neighbor for Classification of Tomato Maturity Level Based on Hue, Saturation, and Value Colors,” Indonesian Journal of Artificial Intelligence and Data Mining, vol. 2, no. 2, p. 101, Nov. 2019, doi: 10.24014/ijaidm.v2i2.7975.

A. I. Hanifah and A. Hermawan, “Klasifikasi Kematangan Pisang Menggunakan Metode Convolutional Neural Network,” Komputika?: Jurnal Sistem Komputer, vol. 12, no. 2, pp. 49–56, Sep. 2023, doi: 10.34010/komputika.v12i2.9999.

F. S. Lesiangi, A. Y. Mauko, and B. S. Djahi, “Feature extraction Hue, Saturation, Value (HSV) and Gray Level Cooccurrence Matrix (GLCM) for identification of woven fabric motifs in South Central Timor Regency,” J Phys Conf Ser, vol. 2017, no. 1, p. 012010, Sep. 2021, doi: 10.1088/1742-6596/2017/1/012010.

M. K. Anam, S. Sumijan, K. Karfindo, and M. B. Firdaus, “Comparison Analysis of HSV Method, CNN Algorithm, and SVM Algorithm in Detecting the Ripeness of Mangosteen Fruit Images,” Indonesian Journal of Artificial Intelligence and Data Mining, vol. 7, no. 2, p. 348, May 2024, doi: 10.24014/ijaidm.v7i2.29739.

E. Panca Saputra, A. Saryoko, and A. Tunjung Kusumo, “Prediction of Heart Disease Using K-Nearest Neighbor and Particle Swarm Optimization (PSO) Method,” Indonesian Journal of Artificial Intelligence and Data Mining (IJAIDM), vol. 8, no. 1, pp. 229–235, 2025, doi: 10.24014/ijaidm.v8i1.33373.

J. M. Chaves-González, M. A. Vega-Rodríguez, J. A. Gómez-Pulido, and J. M. Sánchez-Pérez, “Detecting skin in face recognition systems: A colour spaces study,” Digit Signal Process, vol. 20, no. 3, pp. 806–823, May 2010, doi: 10.1016/j.dsp.2009.10.008.

F. Roberti de Siqueira, W. Robson Schwartz, and H. Pedrini, “Multi-scale gray level co-occurrence matrices for texture description,” Neurocomputing, vol. 120, pp. 336–345, Nov. 2013, doi: 10.1016/j.neucom.2012.09.042.

R. Puspadini and M. P. U. Sitompul, “Implementation of the Laplacian of Gaussian Algorithm in Edge Detection Image Processing of Zebra Cross Damage on Highways in the Langkat Regency Area,” Journal of Artificial Intelligence and Engineering Applications (JAIEA), vol. 3, no. 2, pp. 601–605, Feb. 2024, doi: 10.59934/jaiea.v3i2.442.

M. Bansal, A. Goyal, and A. Choudhary, “A comparative analysis of K-Nearest Neighbor, Genetic, Support Vector Machine, Decision Tree, and Long Short Term Memory algorithms in machine learning,” Decision Analytics Journal, vol. 3, p. 100071, Jun. 2022, doi: 10.1016/j.dajour.2022.100071.

E. Ozturk Kiyak, B. Ghasemkhani, and D. Birant, “High-Level K-Nearest Neighbors (HLKNN): A Supervised Machine Learning Model for Classification Analysis,” Electronics (Basel), vol. 12, no. 18, p. 3828, Sep. 2023, doi: 10.3390/electronics12183828.

N. A. Ibraheem, M. M. Hasan, R. Z. Khan, and P. K. Mishra, “ARPN Journal of Science and Technology:: Understanding Color Models: A Review,” ARPN Journal of Science and Technology, vol. 2, no. 3, 2012, [Online]. Available: http://www.ejournalofscience.org

T. B. Plante and M. Cushman, “Choosing color palettes for scientific figures,” Res Pract Thromb Haemost, vol. 4, no. 2, pp. 176–180, Feb. 2020, doi: 10.1002/rth2.12308.

G. B. Satrya, I. N. A. Ramatryana, and S. Y. Shin, “Compressive Sensing of Medical Images Based on HSV Color Space,” Sensors, vol. 23, no. 5, p. 2616, Feb. 2023, doi: 10.3390/s23052616.

K. Sarode, R. Savdekar, and T. Chaudhari, “Texture Feature Analysis of an Image Using Gray Level Co-Occurrence Matrix,” International Journal of Novel Research and Development, vol. 7, no. 2, pp. 139–143, 2022.

Z. Cai, Z. Ma, Z. Zuo, Y. Xiang, and M. Wang, “An Image Edge Detection Algorithm Based on an Artificial Plant Community,” Applied Sciences, vol. 13, no. 7, p. 4159, Mar. 2023, doi: 10.3390/app13074159.

J. Xu, S. Niu, and Z. Wang, “Object tracking method based on edge detection and morphology,” EURASIP J Adv Signal Process, vol. 2024, no. 1, p. 45, Apr. 2024, doi: 10.1186/s13634-024-01144-0.

L. Lei, Z. Jia, and Z. Wu, “Research on Image Classification and Key Technologies Based on 3D Feature Extraction Algorithm,” J Sens, vol. 2022, pp. 1–14, Aug. 2022, doi: 10.1155/2022/5859925.

H. Yun, “Prediction model of algal blooms using logistic regression and confusion matrix,” International Journal of Electrical and Computer Engineering (IJECE), vol. 11, no. 3, p. 2407, Jun. 2021, doi: 10.11591/ijece.v11i3.pp2407-2413.

C. Hung, J. Filbert Wijaya, I. Adiputra Pardosi, and F. Mikael Sinaga, “Prediksi Fluktuasi Harga Bitcoin Dengan Menggunakan Random Forest Classifier,” Jl. Thamrin No.124 Medan, vol. 24, no. 2, pp. 95–108, Oct. 2023, doi: 10.55601/jsm.24i2.pg.

I. Tougui, A. Jilbab, and J. El Mhamdi, “Impact of the Choice of Cross-Validation Techniques on the Results of Machine Learning-Based Diagnostic Applications,” Healthc Inform Res, vol. 27, no. 3, pp. 189–199, Jul. 2021, doi: 10.4258/hir.2021.27.3.189.

M. Rhifky Wayahdi, D. Syahputra, S. Hafiz, and N. Ginting, “EVALUATION OF THE K-NEAREST NEIGHBOR MODEL WITH K-FOLD CROSS VALIDATION ON IMAGE CLASSIFICATION,” INFOKUM, vol. 9, no. 1, pp. 1–6, Dec. 2020, [Online]. Available: http://infor.seaninstitute.org/index.php/infokum/index

G. Xie and W. Lu, “Image Edge Detection Based On Opencv,” International Journal of Electronics and Electrical Engineering, vol. 1, no. 2, pp. 104–106, 2013, doi: 10.12720/ijeee.1.2.104-106.

F. T. Kurniati, I. Sembiring, A. Setiawan, I. Setyawan, and R. R. Huizen, “GLCM-Based Feature Combination for Extraction Model Optimization in Object Detection Using Machine Learning,” Jurnal Ilmiah Teknik Elektro Komputer dan Informatika, vol. 9, no. 4, pp. 1196–1205, Jan. 2024, doi: 10.26555/jiteki.v9i4.27842.

P. Cai, Z. Cai, Y. Fan, and W. Wu, “Image Contour Detection Based on Visual Pathway Information Transfer Mechanism,” Neural Process Lett, vol. 56, no. 1, p. 6, Feb. 2024, doi: 10.1007/s11063-024-11486-3.

S. Ünalan, O. Günay, I. Akkurt, K. Gunoglu, and H. O. Tekin, “A comparative study on breast cancer classification with stratified shuffle split and K-fold cross validation via ensembled machine learning,” J Radiat Res Appl Sci, vol. 17, no. 4, p. 101080, Dec. 2024, doi: 10.1016/j.jrras.2024.101080.

S. Dutta, A. Arunachalam, and S. Misailovic, “To Seed or Not to Seed? An Empirical Analysis of Usage of Seeds for Testing in Machine Learning Projects,” in 2022 IEEE Conference on Software Testing, Verification and Validation (ICST), IEEE, Apr. 2022, pp. 151–161. doi: 10.1109/ICST53961.2022.00026.

Q. A’yuniyah et al., “Implementasi Algoritma Naïve Bayes Classifier (NBC) untuk Klasifikasi Penyakit Ginjal Kronik,” Jurnal Sistem Komputer dan Informatika (JSON), vol. 4, no. 1, p. 72, Sep. 2022, doi: 10.30865/json.v4i1.4781.

J. Jasril and S. Sanjaya, “Learning Vector Quantization 3 (LVQ3) and Spatial Fuzzy C-Means (SFCM) for Beef and Pork Image Classification,” Indonesian Journal of Artificial Intelligence and Data Mining, vol. 1, no. 2, p. 60, Oct. 2018, doi: 10.24014/ijaidm.v1i2.5024.




DOI: https://doi.org/10.55601/jsm.v26i1.1688

Refbacks

  • There are currently no refbacks.


Open Access

Indexing JSM:

   

      

 

Fakultas Informatika
Universitas Mikroskil
Jl. Thamrin No. 124 Medan - 20212
Gedung C.L6
Telp. 061-4573767
Email : jsm.fi@mikroskil.ac.id