Classroom Emotion Monitoring Based on Image Processing

: One challenge of teaching and learning the lack of information during these processes, including information about students’ emotions. Emotions play a role in learning and processing information, impacting accurate comprehension. Furthermore, emotions affect students’ academic engagement and performance. Consideration of students’ emotions, and therefore their well-being, contributes to building a more sustainable society. A new way of obtaining such information is by monitoring students’ facial emotions. Accordingly, the purpose of this study was to explore whether the use of such advanced technologies can assist the teaching–learning process while ensuring the emotional well-being of secondary school students. A model of Emotional Recognition (ER) was designed for use in a classroom. The model employs a custom code, recorded videos, and images to identify faces, follow action units (AUs), and classify the students’ emotions displayed on screen. We then analysed the classified emotions according to the academic year, subject, and moment in the lesson. The results revealed a range of emotions in the classroom, both pleasant and unpleasant. We observed significant variations in the presence of certain emotions based on the beginning or end of the class, subject, and academic year, although no clear patterns emerged. Our discussion focuses on the relationship between emotions, academic performance, and sustainability. We recommend that future research prioritise the study of how teachers can use ER-based tools to improve both the well-being and performance of students.


Introduction 1.Conceptualisations of Emotions
The concept of emotions has been addressed by many authors in the fields of psychology and philosophy.First, Darwin proposed that emotions have a biological basis and that the facial expressions of emotions have an evolutionary origin [1].According to James, emotions are the perceptions of specific bodily changes in response to emotional stimuli [2].Based on that, the authors of [3] worked in collaboration with William James on the development of the James-Lange theory, which proposes that emotions result from the perception of bodily responses that occur in emotional situations.For Freud, emotions are internal impulses that may be influenced by unconscious conflicts [4].Meanwhile, Lazarus proposed that emotions result from the cognitive evaluations we make of events or situations in relation to our personal goals and values [5].
From the phenomenological perspective of Husserl [6], emotions can be regarded as the most intricate stratum of the affective experience.They exhibit a dual nature, encompassing a physical facet involving bodily changes in response to emotional states, and a cognitive facet characterised by evaluating or appreciating the possibilities of a given situation [6].These two dimensions are intricately interlaced, giving rise to the following four foundational attributes: affective intentionality, bodily resonance, inclination towards action, and function significance.student moves toward a desired goal [17,18].Furthermore, Fredrickson [19,20] suggested that positive emotions enhance academic competence because they encourage exploring, integrating diverse materials, and broadening potential methods of solving problems.
On the topic of unpleasant emotions, Fredrickson [21] found that young children with negative emotionality struggle with higher-order cognitive processes because of their lack of reflective planning and problem-solving skills.When a student's experience of negative emotion leads to fixation on the object of the emotion (such as when a child dwells on the morning's event that caused their anger), cognitive resources are redirected from educational materials to distractions that hinder learning.In this way, negative emotions interfere with scholar activities by limiting cognitive resources necessary for integrating and recalling important details.
In relation to this, it has been found that the anxiety and frustration from struggling with maths exercises can cause a negative perception and dislike of the topic [22,23].Additionally, research has found that individuals experiencing unpleasant emotions (such as sadness, frustration, or boredom) tend to process new information in a rigid and shallow manner [24,25].
Furthermore, strong and persistent anxiety impairs learning, though occasional and mild anxiety has its benefits.The same goes for other emotions and moods, which may have contrasting learning effects.Additionally, according to Efklides [26], a certain pessimism or seriousness can be advantageous for analytical and quantitative tasks, while a positive mood may be more beneficial for creative and heuristic thinking.
From another perspective, some empirical findings support the notion that the effect of emotionality on achievement might be indirect, through cognitive processes, interpersonal relationships with the teacher and peers, and motivational mechanisms, such as engagement, enjoying school, and staying on task [27].In this way, a link is proposed between motivation and academic emotions [28], as motivational behaviours involve positive and negative academic emotions, which students experience in academic settings and which explain all kinds of psychological processes during learning, as Pekrun called them [15].Specifically, positive academic emotions are usually beneficial, but negative academic emotions, such as dissatisfaction and uneasiness, can have contradictory effects.Regardless, it should be observed that students' academic emotions often impact their performance.
The effects of emotions on learning in facilitating or impeding the acquisition of new knowledge by influencing its value and desirability have been described as hedonic affects [29].For example, the satisfaction of solving maths problems enhances the acquired knowledge and skills, serving as motivation to continue the activity.Likewise, students who are in a positive frame of mind are more likely to think creatively and learn a topic meaningfully [30].
Teachers also influence students' emotions.The relationship between teachers' social and affective strategies and students' academic performance in an English language class was explored by Saeidi and Jabbarpour [31].The researchers propose that language teachers should utilise affective strategies, such as humour, positivity, fairness, encouragement, and politeness, to effectively teach and enhance student achievement.

Emotions' Assessment
Until now, it has been difficult to recognise students' emotions [32].Self-assessment is one of the most widely used ways to measure emotions [33][34][35].Individuals report their emotional experience using rating scales or questionnaires that request ratings of intensity and valence (positive or negative) and descriptions of the emotions experienced.Alternatively, in clinical or research settings, researchers can use direct observation of emotions through facial expressions and nonverbal language [36].
Taking another approach, physiological responses, such as heart rate, skin conductance, and brain activation patterns, can infer the presence and intensity of emotions [37,38].These measurements may be obtained using technologies such as electrocardiograms (ECGs), electrodermal activity monitors, or neuroimaging techniques [39].
Adding to those options, in recent years, advancements in technology have allowed for the development of AI-based cameras that can detect and recognise facial expressions, enabling the assessment and monitoring of basic emotions in various settings, including the classroom [40,41].Hence, the use of facial expression recognition technology has become a promising tool for assessing and monitoring emotions in real-time, providing valuable insights for both researchers and practitioners in the fields of psychology, education, and healthcare [42].
Facial expressions serve as a conduit for understanding individuals' emotional states [43].In the educational field, employing AI-based methodologies enables continuous monitoring of students' emotions.This approach facilitates monitoring how diverse methodologies, educational scenarios, evaluative contexts, etc., influence emotions.In this way, it allows for pre-emptive and targeted interventions to guide or enhance emotional experiences.Against that background, the purpose of this study was to explore whether the use of these advanced technologies can assist the teaching-learning process, despite the complexity of the teaching task, while ensuring the emotional well-being of students.To that end, continuous monitoring with a laptop camera and software was used in this study to explore the basic emotions of secondary school students in the classroom.The specific objectives were as follows: Analyse the students' manifestations of emotions in the classroom.II.Compare the emotions at the beginning and at the end of the class.III.Relate the different emotions to the subject and academic year.

Materials and Methods
This study adopted an exploratory observational design to monitor the emotions of secondary school students in six different class groups over 4 weeks.
The secondary school is located in Cambrils, a coastal town in northeastern Spain, which has three cohorts of four secondary education courses, and two cohorts of two bachelor's degree courses.The average number of students per class is 32 and the number of students that participated in the experiment is shown in Table 1.Classes are equally mixed by gender.The experiment occurred during the first term of the school year.Most students had already studied the subject technology in previous years, but it was a new subject for the first-grade students in secondary education.The same went for the optional subject, the Green project.Six class groups were recorded during the experiment.The first two groups consisted of 16 students from the first year of secondary school, aged 12-13, who were enrolled to study technology and the Green project.The second group consisted of 24 students from the fourth year of secondary school, aged 15-16, who were enrolled in robotics.The third and fourth groups consisted of 24 students from the first year of the bachelor's degree, aged 16-17; those in the third group were studying technology, while those in the fourth group were studying robotics.The last group comprised 12 students from the second year of the bachelor's degree, aged 17-18, who were enrolled in technology.Every student group had a female teacher assigned to them. Figure 1 illustrates the arrangement of the students in the classroom, and Figure 2 shows some students attending class.
The laptop was placed in a high position in front of the class, in order to focus on the students' faces, with the webcam directed towards them.
The experiment led us to take 47 videos.The dataset was annotated in a semi-automated procedure, with both manual and automatic annotations.

Experiment's Procedure
Previously, we investigated the effect of the emotions of two students attending classes in two different subjects for several hours.To end that work, in this experiment, we used an improved configuration and a scenario of more students.The aim was to develop and apply a code capable of detecting faces and ER, then transfer the data collected into a database for further analysis.Based on that, we would explore the initial links between studentsʹ emotions, subjects, time of day, and academic performance [40].
Python was used as the programming environment in which we developed the code for acquiring and processing images (face detection, identification, and ER).Besides the language itself, Python has many instructions in libraries that can simplify complex tasks by introducing just a few lines of code.In addition, to facilitate programming, a code editor (IDE) was needed to create and execute the code; in this case, we used Visual Studio Code.Furthermore, Py-Feat (Python Facial Expression Analysis
The laptop was placed in a high position in front of the class, in order to focus on the students' faces, with the webcam directed towards them.
The experiment led us to take 47 videos.The dataset was annotated in a semi-automated procedure, with both manual and automatic annotations.

Experiment's Procedure
Previously, we investigated the effect of the emotions of two students attending classes in two different subjects for several hours.To end that work, in this experiment, we used an improved configuration and a scenario of more students.The aim was to develop and apply a code capable of detecting faces and ER, then transfer the data collected into a database for further analysis.Based on that, we would explore the initial links between studentsʹ emotions, subjects, time of day, and academic performance [40].
Python was used as the programming environment in which we developed the code for acquiring and processing images (face detection, identification, and ER).Besides the language itself, Python has many instructions in libraries that can simplify complex tasks by introducing just a few lines of code.In addition, to facilitate programming, a code editor (IDE) was needed to create and execute the code; in this case, we used Visual Studio Code.Furthermore, Py-Feat (Python Facial Expression Analysis
The laptop was placed in a high position in front of the class, in order to focus on the students' faces, with the webcam directed towards them.
The experiment led us to take 47 videos.The dataset was annotated in a semi-automated procedure, with both manual and automatic annotations.

Experiment's Procedure
Previously, we investigated the effect of the emotions of two students attending classes in two different subjects for several hours.To end that work, in this experiment, we used an improved configuration and a scenario of more students.The aim was to develop and apply a code capable of detecting faces and ER, then transfer the data collected into a database for further analysis.Based on that, we would explore the initial links between students' emotions, subjects, time of day, and academic performance [40].
Python was used as the programming environment in which we developed the code for acquiring and processing images (face detection, identification, and ER).Besides the language itself, Python has many instructions in libraries that can simplify complex tasks by introducing just a few lines of code.In addition, to facilitate programming, a code editor (IDE) was needed to create and execute the code; in this case, we used Visual Studio Code.Furthermore, Py-Feat (Python Facial Expression Analysis Toolbox) from a GitHub portal was also used to promptly process, analyse, and visualise the facial expression data.
In each class, the students were recorded using the camera on the laptop to obtain data; 50 min to 1 h of video was recorded and saved in an .mp4file for each class.The video included as many students as there were in the field of view of the webcam.This camera could clearly focus on the front of the room as well as the back, which allowed us

Computer Code
The code used for the experiment was the Windows computer interpreter Command Prompt (Figure 3), which allowed us to convert the recorded videos of 50 to 60 min duration into images, keeping an image from every 10 s, thus achieving an average of 300-360 images per recorded class.

Computer Code
The code used for the experiment was the Windows computer interpreter Command Prompt (Figure 3), which allowed us to convert the recorded videos of 50 to 60 min duration into images, keeping an image from every 10 s, thus achieving an average of 300-360 images per recorded class.
Then, these images, with the help of a code editor for a desktop computer, Visual Studio Code (Figure 4), were processed in the same command to be converted into AUs and emotions.The images saved for the ER through the code were deleted once all the data were available since these images were no longer useful.
The code protected the privacy of the students, making it impossible to track a particular student.Then, these images, with the help of a code editor for a desktop computer, Visual Studio Code (Figure 4), were processed in the same command to be converted into AUs and emotions.The images saved for the ER through the code were deleted once all the data were available since these images were no longer useful.As shown in Table 2, a .csvfile was obtained with all the emotions obtained from the students detected in the images.The code protected the privacy of the students, making it impossible to track a particular student.
As shown in Table 2, a .csvfile was obtained with all the emotions obtained from the students detected in the images.Ethical approval was given by the Ethics Committee of the Rovira i Virgili University before data collection because this experiment involved contact with humans, and more precisely, with minors (under the age of 18).They reviewed and approved this experiment with the reference number: CEIPSA-2021-TD-0019. Written informed consent was obtained from all students and their parents.In addition, at the beginning of the academic year, the parents of all students in the school signed a consent form in favour of or against their children being photographed or recorded.Students without parental consent sat out of the camera's reach.

Results
We chose to apply nonparametric data analysis techniques because they are useful when data cannot be assumed to follow a specific parametric distribution, such as the normal distribution.

Students' Emotions That Manifested in the Classroom
The heatmap in Figure 5 shows the correlations observed between the variables of interest.Pearson correlation coefficients were used to evaluate the strengths and directions of the linear relationships between the variables.We found that all emotions correlated with each other, positively or negatively.We highlight the positive correlations, which were significant between the emotio disgust and anger (0.447, p < 0.001) and between sadness and fear (0.417, p < 0.001).T significant negative correlations, meanwhile, were between anger and fear (−0.321,We highlight the positive correlations, which were significant between the emotions disgust and anger (0.447, p < 0.001) and between sadness and fear (0.417, p < 0.001).The significant negative correlations, meanwhile, were between anger and fear (−0.321, p < 0.001) and between anger and sadness (−0.291, p < 0.001).

Comparison of Emotions at the Beginning and at the End of the Class
When comparing the emotions during the first five minutes of class and the last five minutes (Table 3), using a nonparametric Mann-Whitney U test, we found significant differences (Table 4).Specifically, fear was present with greater intensity at the beginning of the class (1.634 × 10 6 , p > 0.001) (Figure 6).Happiness followed the same trend, with greater intensity at the beginning than at the end of the class (1.658 × 10 6 , p < 0.001) and, to a lesser level, the same was true of anger (1.607 × 10 6 , p = 0.002).
On the contrary, sadness was somewhat less intense at the beginning and increased at the end of the class (1.425 × 10 6 , p = 0.003).Finally, there were some emotions, including a neutral emotion, for which no significant differences were observed; or in the case of disgust, the observed difference had no practical significance when we analysed the descriptive information of the variable.
On the contrary, sadness was somewhat less intense at the beginning and in at the end of the class (1.425 × 10 6 , p = 0.003).Finally, there were some emotions, in a neutral emotion, for which no significant differences were observed; or in the disgust, the observed difference had no practical significance when we analysed scriptive information of the variable.

Different Emotions According to the Subject and Academic Year
Our Kruskal-Wallis analysis (Table 5) indicated statistically significant differences in all emotional responses among academic years.Specifically, anger varied significantly between academic years (1, 5, 6) (H = 215.711,p < 0.001), as did disgust (H = 222.708,p < 0.001) (5,6).Fear and surprise showed significant differences (H = 13.627,H = 127.004,p < 0.001) between academic years (1, 5), while happiness and sadness (H = 556.320,H = 190.068,p < 0.001) also varied (1,5,6).Having identified differences among groups through the Kruskal-Wallis analysis, subsequent post hoc comparisons were executed by employing Dunn's test with Bonferroni adjustment to evaluate specific variations between pairs of groups (Table 6).The outcomes were as follows: -Anger: Differences were observed in all pairs of subjects, with the most pronounced difference (p < 0.001) between the first year of the bachelor's degree (5), with the least anger, and the second year of the bachelor's degree (6), with the greatest anger.-Disgust: There were significant differences between the first year of secondary school (1) and the first ( 5) and second years of the bachelor's degree ( 6), both comparisons with a significance of p < 0.001.Students in the first year of secondary school had the lowest disgust and those in the second year of the bachelor's degree had the highest.-Fear: No significant differences were observed between the groups.-Happiness: Significant differences were found between the first year of secondary school (1) and the first (5) (p < 0.001) and second year (6) (p < 0.001) years of the bachelor's degree.Students in the first year of the bachelor's degree displayed lower happiness compared to those in the other two academic years.-Sadness: There were significant differences between all pairs of academic years (p < 0.001).Students in the first year of secondary school (1), who exhibited the greatest level of sadness, differed significantly from those in the first (2) and second (6) years of the bachelor's degree; and to a lesser extent, there was a significant differ-ence between those in the first and second years of the bachelor's degree, with greater sadness among those in the second year.-Surprise: Significant differences were observed between the first year of secondary school (1) and the first year of the bachelor's degree, with greater surprise among students in the latter.Similarly, differences existed between the first and second years of the bachelor's degree, with greater surprise among students in the first year.After detecting significant differences between groups using Kruskal-Wallis analysis, post hoc comparisons were carried out using Dunn's test with Bonferroni adjustment to assess specific differences between pairs of groups.The results highlighted the following: -Disgust: Differences between all subject pairs (p < 0.001).The greatest disgust was in Tech, followed by Glob and, finally, Green.-Fear: Differences between subject pairs Glob and Green (p < 0.001) and Green and Tech (p < 0.001).The greatest fear was found in Green.-Happiness: Differences between all subject pairs (p < 0.001).The greatest happiness score appeard in Tech.-Sadness: Differences between all subject pairs (p < 0.001).The highest sadness score was in Green.-Surprise: Differences between all subject pairs (p < 0.001).The highest surprise score was in Tech.

Discussion
In this research, it was observed that students experience many emotions throughout a class [46].Emotions significantly influence our cognitive functions [47], linked to cognitive skills such as attention, working memory, planning, decision-making, critical thinking, problem-solving, and reasoning [48].However, we did not find a clear pattern for associating emotions with a subject, generating results that may initially seem contradictory.For instance, a student may be frustrated by their lack of understanding of a subject, and stress can either enhance or hinder learning and memory, depending on its intensity and duration.This study did not consider non-academic factors that could affect the emotional experience in the classroom.These factors include physical or mental conditions, events before class, influence from close peers, and expectations of meeting someone.
In terms of learning performance, pleasant emotions, such as enjoyment of learning, have been correlated with better performance on placement tests [49].In addition, research has shown that emotional-psychological satisfaction is a determinant variable in students' academic performance.Regarding the presence of emotions in different school subjects, in technology, we observed greater emotions, as well as positive emotions that would promote learning such as surprise and happiness.Although these results are not conclusive, it is important to note that emotions affect learning in science, depending on the subject matter.In terms of negative emotions, it has been found that in physics and chemistry subjects, similar to technology, students show low interest, likely as they consider those to be difficult, boring, or useless subjects [50].In secondary education, emotions were more positive towards natural sciences and more negative towards physics and chemistry [51].Similarly, Dávila [52] pointed out that students in compulsory secondary education often experience negative emotions such as boredom, nervousness, and worry when learning physics and chemistry.However, it is important to consider that embracing pessimism or seriousness can be beneficial for analytical and quantitative tasks [27].In the Green project, which required a more practical and holistic learning approach than technology, there was greater fear and sadness, which theoretically would not encourage learning.However, in order to fully interpret this outcome, we need to consider the context, external factors, and personal variables, rather than just the subject.Nonetheless, it seems that the ability to detect and understand emotions in the classroom context offers the potential to improve pedagogical practices, especially in subjects like the Green project, which may mean education on sustainability can become more effective.
In regard to the moment an emotion arose during the lesson, we found more fear at the beginning of the class than at the end.We propose that this was due to students adapting to their school environment and their initial lack of knowledge about what to expect from the class and teacher.Likewise, we found greater happiness at the beginning of class compared to the end, which may be due to the excitement of joining peers and the positive expectation of learning new things, which may diminish as the demands of academic tasks progress.
In terms of the relationship between emotions and academic years, no definite pattern was evident, with pleasant and unpleasant emotions existing simultaneously in different academic years.In the first year of secondary education, we observed increased anger and sadness, but also more joy; in the bachelor's degree, we observed greater disgust and surprise.Based on these findings, we propose that emotions may be more connected to the subject than the academic year.
Nevertheless, the school and classroom environment are important factors influencing achievement emotions [53]; furthermore, it can be assumed that classmates play an important role in affecting students' achievement emotions.Similarly, it can be expected that students' valuation of subjects is influenced by parents who value a subject highly or like a particular subject, and by teachers who teach a subject with enthusiasm.In this regard, our results show individual differences in emotional experiences in teaching and subjects, but these results are sample-specific; therefore, more research is needed.
This study is connected to goals 3 and 4 of the Sustainable Development Goals (SDGs) due to its interdisciplinary nature.Health and Well-being Goal 3 comprises ensuring healthy lives and promoting well-being for everyone, at all ages.In this sense, our developed tools have the potential to be used to prevent mental health problems, as they allow for the early identification of negative and positive emotions.Our research also contributes to promoting a healthy school environment by considering students' emotions.Meanwhile, Goal 4, Quality Education, focuses on achieving inclusive, equitable, and quality education for all individuals and encouraging lifelong learning opportunities.In this regard, understanding emotions can make it easier to support the participation of all students, which is essential to ensuring that everyone has equal opportunities to engage in and contribute to learning.
There are several implications of this study, which could affect the entire educational community: students, teachers, administrators, families, and mental health professionals.For a start, our findings extend the latest understanding of how emotions affect the learning experience of each student in different disciplines.Accordingly, they may help educators adapt their teaching methods to address students' emotional needs.The findings also identify factors in each subject or moment during the lesson that relate to certain emotions, which may facilitate the implementation of strategies to mitigate emotions considered unpleasant and encourage pleasant ones.An additional implication of this study is that it may affect how the classroom's emotional climate is assessed, potentially in terms of developing future monitoring tools.Alternatively, the findings presented herein demonstrate that the tools we utilized could be applied with precision in other secondary schools, as the system is based on a simple and successfully tested code.We wish to highlight though that the assessment of their advantages in terms of ethical considerations rests with the appropriate experts, despite our evidence of privacy preservation.This study's limitations include how the precision of emotion monitoring via camera can be influenced by environmental conditions, camera quality, and student movement.Furthermore, emotions are complex phenomena that can be produced not only by the classroom context but also by subject content or by prior, external, or personal factors.Related to this, emotional responses to an academic situation differ for each individual.However, here, we have tried to find general tendencies.A final limitation to note is that the algorithm categorises emotions but does not assign them to a specific individual.Although this aspect fully protects the students' privacy, it does not allow for monitoring emotions throughout the sessions or relating them to other variables, such as academic performance.

Conclusions
This study's purpose has been achieved as we have provided evidence that technology can serve as a valuable tool to support the teaching-learning process, prioritising the emotional well-being of students.Furthermore, the concrete aims of this study-(1) to analyse the students' manifestations of emotions in the classroom, (2) compare the emotions at the beginning and at the end of the class, and (3) relate the different emotions to the subject and academic year-have also been fulfilled, at least partially.However, we have not obtained conclusive results for the second and third objectives because some results seem inconclusive or contradictory.Perhaps this is because we have evidenced the complexity of the emotional phenomena and/or perhaps it is because more data are needed to analyse and find patterns that more clearly relate emotions to the moment in the lesson, academic year, and subject.
From a technological point of view, this study makes a useful contribution in that we developed and applied an innovative code system to detect students' emotions during class.The system uses a vision-based model, with a webcam that records the class and then a developed code that detects and analyses the students' facial expressions, categorising them into one of six basic emotions or a neutral emotion.The developed emotional expression recognition software is sufficiently accurate to identify the emotions of the learners, though it is only possible to obtain suitable images of the participants in close-up and when they are looking fully or partially at the camera.
Future research should focus on specific ways to improve the integration and effectiveness of emotion monitoring in the classroom, considering ethics.It would be useful to develop an interactive tool for teachers, such as by investigating how to design interfaces and tools that enable teachers to interpret and use emotional information effectively in the classroom, with the aim of improving students' well-being and performance, or developing systems that provide specific suggestions (change in methodology, personalised attention) for how to address identified emotional needs.
Emotion monitoring is set to continue to grow as part of a holistic approach to education that considers academic development but also the well-being of students and their readiness to contribute to a more sustainable society, while empowering the students themselves.

5 of 14
Sustainability 2024, 16, x FOR PEER REVIEW 5 of 15the arrangement of the students in the classroom, and Figure2shows some students attending class.

Figure 3 .
Figure 3. Sample of the code in Command Prompt.Figure 3. Sample of the code in Command Prompt.

Figure 3 .
Figure 3. Sample of the code in Command Prompt.Figure 3. Sample of the code in Command Prompt.

15 Figure 4 .
Figure 4. Sample of the code in Visual Studio Code.

Figure 4 .
Figure 4. Sample of the code in Visual Studio Code.

Sustainability 2024 ,Figure 5 .
Figure 5. Spearman's rho heatmap.Note: Pink tones represent negative correlations between va iables, and blue tones positive ones.The intensity of the colour shows the strength of the correla tion: the paler shades represent the weakest correlations and the darkest represent the strongest Asterisks represent different significance levels associated with p-values.Two asterisks (**) p < 0 and three asterisks (***) p < 0.001.

Figure 5 .
Figure 5. Spearman's rho heatmap.Note: Pink tones represent negative correlations between variables, and blue tones positive ones.The intensity of the colour shows the strength of the correlation: the paler shades represent the weakest correlations and the darkest represent the strongest.Asterisks represent different significance levels associated with p-values.Two asterisks (**) p < 0.01, and three asterisks (***) p < 0.001.

Figure 6 .
Figure 6.Emotional changes at the start and end of class.

Figure 6 .
Figure 6.Emotional changes at the start and end of class.

Table 1 .
Students involved in the experiment.

Table 2 .
Example of some of the emotions detected among a class.

Table 2 .
Example of some of the emotions detected among a class.

Table 3 .
Statistics of emotions at the beginning and end of the class.
a More than one mode exists.For nominal and ordinal data, the first mode is reported.For continuous data, the mode with the highest density estimated is reported, but multiple modes may exist.We recommend visualising the data to check for multimodality.

Table 4 .
Results of the Mann-Whitney U test.

Table 5 .
Kruskal-Wallis results for emotions by academic year.

Table 5 .
Kruskal-Wallis results for emotions by academic year.

Table 6 .
Kruskal-Wallis results for emotions by subjects.