"Masalah kesehatan mental semakin menjadi perhatian utama dalam masyarakat saat ini, sehingga manajemen stres menjadi sangat penting untuk menjaga kesejahteraan. Berbagai teknologi untuk mendeteksi stres telah dikembangkan, salah satu metode yang menjanjikan adalah penggunaan imaging photoplethysmography (iPPG) yang diperoleh dari video wajah yang direkam menggunakan kamera konvensional. Penelitian ini bertujuan untuk meningkatkan akurasi klasifikasi stres dengan memanfaatkan sinyal iPPG berbasis kamera web. Dalam penelitian ini, diusulkan dua pendekatan baru pada tahap pra-pemrosesan untuk meningkatkan kualitas deteksi stres. Pendekatan pertama adalah pemilihan Region of Interest (ROI), yang berfokus pada empat area wajah: dahi, pipi kiri, pipi kanan, dan seluruh wajah. Pendekatan kedua adalah penerapan metode frame alignment untuk mengatasi artefak gerakan yang sering kali mempengaruhi kualitas sinyal. Untuk mendeteksi stres, digunakan teknik pembelajaran mesin sebagai metode klasifikasi, dengan parameter utama penanda stres berupa heart rate (HR) dan variabilitas detak jantung heart rate variability (HRV). Data yang digunakan dalam penelitian ini merupakan data primer yang diperoleh dari video wajah 80 peserta, dengan rentang usia 18 hingga 25 tahun. Tugas aritmatika digunakan sebagai pemicu stres, di mana peserta diminta menyelesaikan soal matematika. Proses pengambilan data dilakukan di laboratorium dengan kondisi pencahayaan sebesar 220 lux. Kamera web yang digunakan adalah kamera laptop dengan kecepatan 30 frame per detik (fps). Sebanyak 265 fitur yang berkaitan dengan stres berhasil diekstraksi dari video tersebut, dan data kemudian disegmentasi menggunakan validasi silang 5-fold. Untuk mengurangi noise akibat artefak gerakan, diterapkan metode frame alignment yang menunjukkan perbaikan signifikan dalam mengoreksi noise. Hasil penelitian menunjukkan adanya perbedaan signifikan dalam rata-rata HR antara kondisi stres dan non-stres. Pada parameter HRV, perubahan signifikan ditemukan pada frekuensi rendah Low-Frequency (LF), yang sering dikaitkan dengan respon stres. Beberapa algoritma pembelajaran mesin diuji untuk klasifikasi, dan memberikan hasil akurasi yang tinggi. Decision Tree memperoleh akurasi 0,955 dengan waktu proses 3,13 ms. K-Nearest Neighbors (KNN) akurasi 0,981 dengan waktu proses 2,54 ms, dan Logistic Regression mencapai akurasi 0,985 dengan waktu proses 4,181 ms. Algoritma lain seperti Naïve Bayes akurasi 0,97, waktu 2,659 ms, Support Vector Machine (SVM) akurasi 0,985, waktu 6,71 ms, Random Forest akurasi 0,958, waktu 27,07 ms, dan RBF SVM akurasi 0,985, waktu 9,637 ms juga dievaluasi. Di antara algoritma tersebut, Logistic Regression menunjukkan akurasi klasifikasi tertinggi sebesar 0,985 dengan waktu inferensi 4,181 ms, menjadikannya model yang paling efisien untuk deteksi stres. Metode deteksi stres yang dikembangkan berhasil mendeteksi stres menggunakan kamera RGB dengan mengatasi masalah artefak gerakan melalui frame alignment. Selain itu, pemilihan empat ROI wajah yang spesifik memberikan informasi stres yang lebih andal dibandingkan dengan penggunaan ROI seluruh wajah. Sistem ini merupakan langkah maju yang signifikan dalam deteksi stres non-invasif berbasis kamera web, dengan potensi aplikasi dalam manajemen kesehatan mental dan penilaian stres. Pengembangan di masa mendatang dapat mengeksplorasi peningkatan resolusi video untuk menghasilkan sinyal yang lebih presisi, serta penggabungan model pembelajaran mendalam untuk deteksi stres yang lebih akurat. Penerapan sistem ini pada kamera mobile juga dapat menjadi solusi yang lebih praktis untuk pemantauan stres secara real-time dalam kehidupan sehari-hari.
Mental health issues have increasingly become a major concern in today's society, making stress management crucial for maintaining well-being. Various technologies for stress detection have been developed, and one promising method is the use of imaging photoplethysmography (iPPG) obtained from facial videos recorded using conventional cameras. This study aims to improve the accuracy of stress classification by utilizing iPPG signals derived from webcam-based recordings. In this research, two novel approaches are proposed at the preprocessing stage to enhance stress detection quality. The first approach is the selection of Regions of Interest (ROI), focusing on four facial areas: the forehead, left cheek, right cheek, and the entire face. The second approach involves the application of frame alignment methods to address motion artifacts, which often affect signal quality. Machine learning techniques were employed as the classification method for stress detection, with key stress indicators including heart rate (HR) and heart rate variability (HRV). The data used in this study comprises primary data obtained from facial videos of 80 participants aged 18 to 25 years. Arithmetic tasks were employed as stressors, requiring participants to solve mathematical problems. Data collection was conducted in a laboratory under lighting conditions of 220 lux. The webcam used was a laptop camera operating at a speed of 30 frames per second (fps). A total of 265 stress-related features were successfully extracted from the videos, and the data was segmented using 5-fold cross-validation. To reduce noise caused by motion artifacts, a frame alignment method was applied, demonstrating significant improvement in noise correction. The results revealed significant differences in average HR between stressed and non-stressed conditions. For HRV parameters, significant changes were observed in Low-Frequency (LF) components, often associated with stress responses. Several machine learning algorithms were tested for classification, yielding high accuracy results. Decision Tree achieved an accuracy of 0.955 with a processing time of 3.13 ms, K-Nearest Neighbors (KNN) achieved 0.981 with 2.54 ms, and Logistic Regression reached 0.985 with 4.181 ms. Other algorithms such as Naïve Bayes (accuracy 0.97, time 2.659 ms), Support Vector Machine (SVM) (accuracy 0.985, time 6.71 ms), Random Forest (accuracy 0.958, time 27.07 ms), and RBF SVM (accuracy 0.985, time 9.637 ms) were also evaluated. Among these, Logistic Regression demonstrated the highest classification accuracy of 0.985 with an inference time of 4.181 ms, making it the most efficient model for stress detection. The developed stress detection method successfully detected stress using RGB cameras by addressing motion artifact issues through frame alignment. Additionally, selecting specific facial ROIs provided more reliable stress information compared to using the entire face as an ROI. This system represents a significant advancement in non-invasive webcam-based stress detection, with potential applications in mental health management and stress assessment. Future developments could explore higher video resolution to yield more precise signals and integrate deep learning models for more accurate stress detection. Implementing this system on mobile cameras could also offer a more practical solution for real-time stress monitoring in daily life."