Deteksi Warna Dasar Menggunakan Metode Thresholding HSV dengan OpenCV

Authors

  • Zidanul Akbar Universitas Islam Negeri Sumatera Utara
  • Asrul Suwondo Universitas Islam Negeri Sumatera Utara
  • Rizky Ramadhan Universitas Islam Negeri Sumatera Utara
  • Abdul Halim Hasugian Universitas Islam Negeri Sumatera Utara

DOI:

https://doi.org/10.61132/neptunus.v3i3.1020

Keywords:

Color Detection, HSV, Image Processing, OpenCV, Thresholding

Abstract

Digital image processing is a rapidly developing branch of computer science and has many applications in everyday life. One of the fields that most often utilizes this technique is object detection and color identification in images and videos. This study specifically aims to implement the thresholding method in the HSV (Hue, Saturation, Value) color space to detect three basic colors, namely red, green, and blue, in digital images. The research process begins with uploading images using the Google Colab platform, a cloud-based computing environment that makes it easy for users to run Python programs without requiring additional software installation. After the image is uploaded, the next step is to convert it from the RGB (Red, Green, Blue) color space to the HSV color space. This conversion is important because the HSV color space is more suitable for use in the color segmentation process. The Hue value represents the type of color, Saturation shows the level of saturation, while Value describes the level of brightness. Once the image is in the HSV color space, the next step is to determine the HSV value range for each basic color. This range is determined based on experimental results and references from related literature. Using this range, masking is performed to extract the appropriate pixels so that only the red, green, or blue portions of the image are visible, while the other colors are reduced. The results show that the thresholding method in the HSV color space is capable of detecting primary colors with a good level of visual accuracy, especially in simple images with contrasting backgrounds. The implementation of this program is relatively lightweight, easy to run directly in Google Colab, and does not require high-spec hardware. Therefore, this method is very suitable for use as basic learning material for digital image processing, both for students and novice researchers.

References

Ahadi, A. H., Gustina, G., Syawal, M. F., Aminuddin, F. H., & Anzari, Y. (2024). Implementasi sistem pendeteksi warna objek dengan OpenCV-Python. SENTRI: Jurnal Riset Ilmiah, 3(7), 3573–3578. https://doi.org/10.55681/sentri.v3i7.3185

Amrozi, M. A., Figo, S. W. D., & Wahyusari, R. (2024). Perbandingan segmentasi ruang warna HSV dan YCbCr untuk deteksi objek. Infomatek, 26(2), 217–222. https://doi.org/10.23969/infomatek.v26i2.19025

Erza, F., Fitriyah, H., & Setiawan, E. (2022). Sistem object tracking pada quadcopter menggunakan segmentasi citra dengan deteksi warna HSV dan metode regresi linier berbasis Raspberry Pi. Jurnal Teknologi Informasi dan Ilmu Komputer, 9(7), 1733–1740. https://doi.org/10.25126/jtiik.2022976808

Fajar Wibowo, C., Izzul Haq, F., Maulana Ansaris, F., & Agustin, S. (2024). Analisis persentase warna blue gem pada skin case hardened di Counter Strike 2 menggunakan OpenCV dan Python. JATI (Jurnal Mahasiswa Teknik Informatika), 8(4), 7241–7247. https://doi.org/10.36040/jati.v8i4.10140

Fitriyah, H., Maulana, R., Komputer, F. I., Malang, U. B., & Korespondensi, P. (2021). Weed detection in HSV color-space based on shape features using. Jurnal Teknologi Informasi dan Ilmu Komputer, 8(5), 929–938. https://doi.org/10.25126/jtiik.202184719

Islami, F. (2021). Implementation of HSV-based thresholding method for iris detection. Journal of Computer Networks, Architecture, and High-Performance Computing, 3(1), 98–104. https://doi.org/10.47709/cnahpc.v3i1.939

Mulyana, D. I., Arinal, V., & Akbarulloh, F. (2024). Efektivitas penggunaan ruang warna HSV untuk klasifikasi daging sapi segar dan busuk dalam industri pangan. Jurnal JTIK (Jurnal Teknologi Informasi dan Komunikasi), 9(1), 244–254. https://doi.org/10.35870/jtik.v9i1.3129

Nur Rochim, F., Desky Sompie, G., Mua'mmar, Imam Saputra, R., & Rosyani, P. (2024). Perancangan sistem deteksi warna real-time menggunakan metode Gaussian blur dan ruang warna HSV. Biner: Jurnal Ilmu Komputer, Teknik dan Multimedia, 2(2), 178–183. https://journal.mediapublikasi.id/index.php/Biner

Purwoko, J. D. G., Pratama, J. Y., & Hartanto, A. D. (2021). Mendeteksi objek berdasarkan warna menggunakan HSV color space secara realtime. Intechno Journal (Information Technology Journal), 3(2), 44–48. https://doi.org/10.24076/intechnojournal.2021v3i2.1554

Putri, A. S., Setyawan, G. E., & Tibyani. (2018). Sistem deteksi warna pada quadcopter AR.Drone menggunakan metode color filtering hue saturation and value (HSV). Jurnal Pengembangan Teknologi Informasi dan Ilmu Komputer, 2(9), 3202–3207. http://j-ptiik.ub.ac.id

Sari, D. A. L., Mulyadi, A., & Pratama, A. (2020). Deteksi objek berwarna real-time berdasarkan visualisasi webcam. Zetroem: Jurnal Ilmiah Mahasiswa Teknik Elektro, 2(1), 21–24. https://ejournal.unibabwi.ac.id/index.php/Zetroem/article/view/1336

Setiyani, A., Maison, M., & Fuady, S. (2022). Perancangan sistem deteksi objek bola dengan metode coloring HSV berbasis VB.Net untuk robot sepak bola beroda. Jurnal Engineering, 4(2), 67–73. https://doi.org/10.22437/jurnalengineering.v4i2.19835

Sulistiyowati, I., Maulana Ichsan, H., & Anshory, I. (2024). Konveyor penyortir objek dengan deteksi warna menggunakan kamera ESP-32 berbasis OpenCV Python. Prosiding TAU SNARS-TEK Seminar Nasional Rekayasa dan Teknologi, 4(1), 35–41. https://doi.org/10.47970/snarstek.v2i1.711

Suradi, A. A. M., Rasyid, M. F., Mushaf, M., & Rizal, M. (2023). Deteksi tingkat kematangan buah apel menggunakan segmentasi ruang warna HSV. Seminar Ilmiah Sistem Informasi dan Teknologi Informasi, 12(1), 19–26.

Wibowo, J. S. (2020). Deteksi dan klasifikasi citra berdasarkan warna kulit menggunakan HSV. Jurnal Teknologi Informasi DINAMIK, 16(2), 118–123.

Downloads

Published

2025-08-22

How to Cite

Zidanul Akbar, Asrul Suwondo, Rizky Ramadhan, & Abdul Halim Hasugian. (2025). Deteksi Warna Dasar Menggunakan Metode Thresholding HSV dengan OpenCV . Neptunus: Jurnal Ilmu Komputer Dan Teknologi Informasi, 3(3), 256–264. https://doi.org/10.61132/neptunus.v3i3.1020

Similar Articles

1 2 3 4 > >> 

You may also start an advanced similarity search for this article.