As the global economic landscape rapidly advances and people's quality of life continues to improve, there is a noticeable increase in the demand for various sports, including basketball. Athletes of diverse skill levels find physical, social, and emotional satisfaction in engaging in basketball activities. In contemporary times, the requisites for success in basketball, such as height, speed, accuracy, distance, and strength, are escalating. The frequency of body contact has also intensified, leading to heightened intensity in ball shooting among players and an inevitability of fouls in offensive and defensive interactions. This dynamic poses challenges to the seamless progression of the sport, and the existence of various foul rules adds an element of unpredictability and uncontrollability to the game of basketball. The data reveals interesting insights. In terms of dribble defense, the Chinese team committed 16 fouls, whereas their opponents committed 33 fouls. However, in the context of shooting defense, the Chinese team had a higher foul count compared to their opponents. Conversely, when it came to defending the ball, the Chinese team committed fewer fouls than their opponents. In the category of preventing the ball, the Chinese team had 16 fouls compared to the opponent team's 12 fouls. Overall, the Chinese team demonstrated fewer fouls than their opponents in the realm of defense. The data underscores a potential highlight the specific factors influencing foul occurrences in different defensive scenarios. The study introduces a machine vision approach, which outperformed existing methods in classifying actions as fouls or not. This innovative application showcases the effectiveness of advanced technology in addressing the challenges associated with fouls in basketball, offering a promising avenue for further research and practical implementation. The comprehensive experimental results suggest that the machine vision approach outperformed existing methods in classifying actions as fouls or not, showcasing its effectiveness in addressing the challenge of fouls in basketball.