As the main channel for systematic Marxist theoretical education and ideological and political education (IPE) for physical education (PE) students, the ideological and political (I&P) course is of great importance in guiding and cultivating PE students. In the education informatization and global online education development, this paper took Marxist theory, especially the theory of IPE, as the theoretical basis from the perspective of blended teaching, which was commonly practiced in I&P theory courses in Chinese colleges. Combining the research results of pedagogy, teaching theory, curriculum teaching theory, and network teaching, it goes deep into the teaching and even the curriculum teaching level to discuss the reform of the I&P theory courses in the new media environment. In this paper, the human hand image recognition and tracking algorithm was used to study it. Through the investigation and research experiment on the interaction system of PE students’ I&P classroom, we can understand the factors that affect students’ attention. In the teaching method based on extracurricular learning, the probability of keeping students focused was significantly increased by 23.67%. In the classroom, if video technology is used to improve classroom teaching, the probability of students’ attention in the classroom can be increased by 14.78%. Therefore, it is urgent to study the interaction of IPE for PE students.