Distance learning is one of the teaching and learning approaches adopted after the COVID-19 pandemic. The task of getting learners interested in class is difficult for the professors. In this research, a mechanism has been developed to estimate student engagement levels and emotions. Visual data from recorded videos of students participating in learning courses are utilized due to the availability of multiple methods for measuring student engagement levels. The data from the videos recorded and sent by students is processed to determine the extent of student engagement and identify their emotions. The system has been implemented and tested, enabling the evaluation of student attention. Several algorithms and techniques have been used to implement our prototype as CNN. A private dataset has been created to train and evaluate the model. The results show that it is possible to measure participation, learn about feelings, and use them to make decisions in favor of student outcomes and improve teaching and learning methods. This technology can be applied in other scenes, such as self-driving and security, with a minor adjustment.