A teacher classroom walking distance measurement method based on a teaching video

By combining the YOLOv5 model and the Kalman filtering algorithm, the subjectivity and inefficiency of traditional classroom teaching behavior analysis are solved, enabling efficient and accurate measurement and quantitative evaluation of teachers' teaching behavior.

CN116342692BActive Publication Date: 2026-01-06SOUTHEAST UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310314473.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-03-28
Publication Date
2026-01-06
Estimated Expiration
2043-03-28

AI Technical Summary

Technical Problem

Traditional methods for analyzing classroom teaching behavior are subject to strong subjectivity, small sample size, time-consuming and labor-intensive, and lack scalability, making it difficult to objectively and accurately analyze teachers' teaching behavior.

Method used

The YOLOv5 model was used for teacher head target detection, and the Kalman filtering algorithm was used for tracking. Monocular video ranging technology was used to calculate the teacher's horizontal and vertical movement distances online. Image processing technology was used to extract teacher behavior features and generate analysis reports.

Benefits of technology

It enables efficient and objective analysis of teachers' classroom behavior, can quickly and accurately measure teachers' movement distance, simplifies the teaching evaluation process, and provides quantitative evaluation of teaching effectiveness.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116342692B_ABST
    Figure CN116342692B_ABST
Patent Text Reader

Abstract

The development of information technology makes multimedia devices and smart devices widely used in teaching, and using information technology to promote the improvement and innovation of education and teaching has become a new trend. Classroom teaching condition detection and evaluation is an inevitable requirement to improve teaching quality and learning results. Traditional teaching evaluation methods are highly subjective and inefficient, and in the digital information age, big data and artificial intelligence technology should be fully used for classroom teaching condition detection and evaluation. The interaction between teachers and students, the concentration of teachers' teaching and the classroom atmosphere can be judged by detecting the moving distance of teachers. The invention focuses on classroom teaching video, analyzes the teaching behavior of teachers, selects the moving distance of teachers as an index, and researches from the aspects of teacher target detection and tracking, video moving distance measurement, teacher behavior modeling and action recognition. In the teaching video, the teacher's face is recognized, the centroid point is taken, the teacher's face change is positioned and tracked, and the horizontal moving distance of the teacher in the platform area and the vertical moving distance of the teacher in the aisle area are measured online.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to a technology for teacher target detection and tracking, as well as movement distance measurement, in teaching videos. Specifically, it utilizes a Kalman filtering algorithm to detect and track the teacher's head. By selecting displacement measurement points for the target and designing a two-dimensional movement distance measurement method based on the geometric features of the classroom layout and camera deployment, as well as a pinhole imaging model, this method includes online selection of the centroid point of the teacher's face, calculation of the device's focal length, and measurement of lateral and longitudinal movement distances. This invention helps to incorporate teacher movement distance into classroom evaluation parameters in the context of big data, providing a more objective reflection of teacher interaction, teaching methods, and teaching effectiveness. This invention simplifies the teaching evaluation process, constructs a teacher behavior analysis system with a user-interactive interface, and achieves automatic and efficient analysis of teacher behavior in teaching videos, ultimately obtaining quantitative and objective analytical conclusions. This invention belongs to the field of information technology and software. Background Technology

[0002] With the country's vigorous promotion of the popularization and construction of intelligent teaching environments, the use of multimedia technology to assist teaching has become a trend in classroom teaching today. Using image processing technology to evaluate teachers' behavior in the classroom, specifying quantitative indicators for teachers' teaching, and providing scientific suggestions to teachers based on the analysis results is an important research area for the intelligentization of classroom teaching.

[0003] Currently, video-based human target detection algorithms generally fall into two main categories: motion-based detection methods and machine learning-based detection methods. Motion-based detection methods primarily utilize the impact of object motion on the image to achieve target detection, while machine learning-based detection methods collect a large number of positive and negative samples, extract their features, and then use machine learning methods to obtain a human detection classifier, thereby locating the human body region in the image to be detected. This invention separates the skin color region in the YCbCr color space, approximates skin pixels as ellipses, obtains the number of skin color pixels, and then locates and tracks this region.

[0004] Existing target tracking algorithms mainly include: model-based tracking algorithms, region-based tracking algorithms, feature-based tracking algorithms, and variable contour-based tracking algorithms. This invention uses the classic Kalman filtering algorithm to identify and locate the teacher's face, select the centroid, calculate the focal length, and measure the lateral and longitudinal displacements.

[0005] Current teacher behavior analysis technologies mostly extract target regions from images, perform teacher target detection on the extracted images, and determine the teacher's location to ascertain whether the teacher is moving around while teaching. This method only judges based on the teacher's location, resulting in a relatively simplistic evaluation approach. This invention, however, focuses on the teacher's movement distance for more precise detection of teaching behavior. Video measurement obtains the target's two-dimensional projection information and combines this with the projection image, scene model, and camera parameters to obtain the length or three-dimensional coordinates of the target's spatial points. Human movement measurement, on the other hand, calculates the actual distance moved through video measurement. Compared to laser ranging, video ranging offers advantages such as higher operational flexibility, faster calculation speed, lower equipment cost, and richer information acquisition. Summary of the Invention

[0006] This invention, based on relevant image processing technology, researches and creates a system capable of simple analysis of teacher behavior. It trains a head detector using a YOLOv5 model to extract the target region of the teacher's head. Based on the target extraction results, it uses a Kalman filtering algorithm to achieve target tracking. It analyzes and formulates teacher behavior analysis indicators, and uses monocular video ranging, human body region estimation, facial skin color extraction, and behavior modeling techniques to calculate the teacher's movement distance. Finally, it displays the calculation results to users through a visual interface and generates a teacher behavior analysis report.

[0007] Technical Issue: Classroom behavior analysis aims to analyze the potential patterns and influencing factors of teachers' teaching activities, thereby improving the quality of classroom teaching. Traditional methods for analyzing classroom behavior mostly rely on self-evaluation, third-party evaluation, and manual coding to collect and analyze data, which suffers from drawbacks such as strong subjectivity, small sample sizes, time-consuming and labor-intensive processes, and a lack of scalability and universality. By recording and analyzing teachers' classroom teaching videos, and extracting key factors of teachers' teaching behavior based on relevant image processing technologies, classroom behavior can be identified more effectively and objectively. This is precisely the purpose of this invention.

[0008] Technical Solution: To achieve the above-mentioned objectives, the technical solution adopted by this invention is as follows: The collected video data is processed and trained; the input image is sliced; the teacher target in the video image is extracted and its facial region is marked; the teacher is located and tracked; its movement trajectory is calculated; and the focal length of the camera device is calculated based on the pixel focal length calculation method, thereby measuring the teacher's movement distance during online teaching. Extracting the teacher target requires the use of target detection algorithms. This invention uses the commonly used YOLOv5 model. Distance measurement adopts the principle of monocular video ranging. The identified teacher image is analyzed, and the evaluation index is the teacher's movement distance. The quantitative results of the teacher's behavior are output and displayed on the client side. The following is the overall workflow for measuring the teacher's movement distance during class through video:

[0009] Step 1: Process and train the acquired video data, extract each frame of the video stream to ensure that the teacher's target can be identified in each frame, accurately extract the teacher's facial pixels, and track them.

[0010] Step 2: Perform facial pixel recognition on the teacher target in the image, and extract the human skin region using the YCbCr color space, where Y represents the brightness component of the color, and Cb and Cr are the concentration offset components of blue and red, respectively. Its conversion relationship with the RGB color space is as follows:

[0011]

[0012] Step 3: Select and track the centroid of the teacher's face in the image.

[0013] To ensure that skin color clustering is unaffected by brightness Y, skin color information in the YCbCr space is compressed into a two-dimensional CbCr plane. In the CbCr plane, these skin pixels approximate an elliptical distribution, as shown in the figure. Figure 1 As shown. Let Cb be the X-axis and Cr be the Y-axis. It approximates an ellipse centered at (113, 155), with a major axis of length 23, a minor axis of length 15, and an angle of 43° between the major axis and the x-axis. Its expression is:

[0014]

[0015] in:

[0016]

[0017] Establish a state vector, and let the target state at time k be X. K Then we have:

[0018] X = [x, y, w, h, v] x v y v w v h ] T (4)

[0019] Where x and y represent the pixel coordinates of the center point of the target detection box, respectively, w and h represent the pixel distances from the center point of the target detection box to the left and top boundaries of the target box, respectively, and v c v y These represent the rates of change of the x and y coordinates of the center point of the detection box (in pixels per frame), respectively. w v hThese represent the rates of change of the distance from the center point to the left and top boundaries, respectively (in pixels per frame). Considering that the teacher's movement speed in the classroom is generally relatively slow and does not change significantly, the teacher's movement between adjacent frames can be roughly considered as uniform motion. Therefore, a uniform motion model using Kalman filtering can be established, yielding the corresponding state transition matrix F and state observation matrix H as follows:

[0020]

[0021]

[0022] Using the state transition matrix F and the state X of the previous time step k Multiplying by -1 yields the predicted state value at time k. Using the state observation matrix H and the current state prediction value Multiplying them yields a state vector [x, y, w, h] consisting of the first four state values, which, along with the observed value Z, results in a state vector [x, y, w, h]. k The difference between the observations yields the prediction error, and the optimal estimate X of the current state can be calculated using the observation error and the Kalman gain. k This enables target tracking.

[0023] Step 4: Determine the teacher's face orientation in the image. Based on the YCbCr model, project the image pixels within the head bounding box onto the CbCr plane, filter pixels located inside the ellipse to extract the skin color region, and obtain the number of pixels in the skin color region. To eliminate the influence of distance, this system uses the ratio of the number of skin color region pixels to the pixel area of ​​the head bounding box in the image as a basis to determine the face orientation. When the proportion of skin color region pixels exceeds a certain threshold, the face is considered to be facing the camera; when the proportion is less than a certain threshold, the face is considered to be facing away from the camera.

[0024] Step 5: Establish a classroom model and calculate the pixel focal length of the camera. The classroom has three desk areas: the middle desk area is wider, and the two side desk areas are narrower. Narrow aisles exist between adjacent desk areas, and the classroom length is L. Assume the camera is positioned close to the back wall of the classroom, in the middle of the back wall, equidistant from the aisles on both sides by a distance of W, and that the classroom is a horizontal classroom (not a tiered classroom). The camera angle remains horizontal, i.e., the optical axis is perpendicular to the plane of the blackboard. The length of the classroom is not considered during measurement, and longitudinal displacement is ignored when the teacher moves in the front podium area; lateral displacement is ignored when the teacher moves in the aisles. (See diagram below.) Figure 2 and Figure 3 .

[0025] Constructing a projection model, such as Figure 4 Let P be the highest point of the teacher's face, Q be the lowest point of the teacher's face, O be the camera's pinhole, and P′ and Q′ be the images of points P and Q on the imaging plane, respectively. Therefore, the length of P′Q′ is the pixel length of PQ on the imaging plane. Assuming the distance between the human body and the shooting point is d, and the camera focal length is f, then according to the principle of similar triangles, the proportional relationship can be obtained as follows:

[0026]

[0027] The expression for calculating distance d is as follows:

[0028]

[0029] During calibration, a video frame showing the teacher positioned in front of the blackboard is selected. The distance *d* between the teacher and the camera point can be considered the length *L* of the classroom, i.e., *d = L*. The pixel focal length of the camera is calculated from the facial region within the head target frame.

[0030]

[0031] Step 6: Calculate the teacher's horizontal and vertical displacements during instruction. Define vertical and horizontal displacements: vertical displacement is the distance the teacher moves along the direction perpendicular to the blackboard plane, and horizontal displacement is the distance the teacher moves parallel to the blackboard plane. When the teacher faces the camera directly, the length of the teacher's face can be considered a fixed value. The distance between the teacher and the camera is calculated based on the vertical length of the teacher's face in the image when facing the camera, thus inferring the teacher's vertical movement distance (i.e., perpendicular to the blackboard direction); the horizontal movement distance is inferred based on the pixel horizontal coordinate transformation of the teacher's face center point in the camera.

[0032] All video frames containing the teacher's face are selected, and video frames are sampled at regular intervals to obtain a sampling sequence. The movement distance of the teacher between adjacent sampling frames is calculated. After obtaining the movement distance measurement results, a judgment needs to be made. If the movement distance is less than a certain threshold, it is considered that the teacher has not moved within the sampling interval. If it exceeds the threshold, it is considered that the teacher has moved, and the result is added to the total movement distance.

[0033] The movement patterns of teachers in classroom teaching can be simplified as follows: when a teacher is in the podium area, their movement can be considered as a horizontal movement parallel to the horizontal line of the blackboard; when a teacher is in the aisle area, their movement can be considered as a vertical movement perpendicular to the plane of the blackboard; when a teacher moves from the podium to the aisle or from the aisle to the podium, it can be considered as a combination of vertical and horizontal movement.

[0034] The change in the distance between the teacher and the screen reflects the teacher's longitudinal (i.e., perpendicular to the blackboard screen) movement distance. The length of the face is also used as a reference value when measuring this longitudinal movement distance. Based on the projection relationship of pinhole imaging, the ratio between the actual face length and the pixel length is consistent with the ratio in the focal length calibration, which is:

[0035]

[0036] Therefore, the expression for calculating distance d can be obtained as follows:

[0037]

[0038] Since the focal length f, actual length |PQ|, and pixel length |P'Q'| are known, the distance between the teacher and the shooting point in the current state can be calculated using the expression. Using the distance values ​​at two different times, the longitudinal displacement of the teacher between these two sampling times can be calculated. Assume the sampling time interval is Δt, where d is the distance between the teacher and the shooting point at time t. t At time t+Δt, the distance between the teacher and the shooting point is d. t+Δt Then, the teacher's longitudinal displacement during the time interval Δt is:

[0039] D y =|d t -d t+Δt |, (12)

[0040] When measuring lateral movement distance, the distance between the teacher and the shooting plane is taken into account, resulting in the following principle for measuring the teacher's lateral movement distance: Figure 5 Suppose that at time t and t+Δt, the teacher's positions are at points Q and R, respectively, corresponding to pixels Q' and R' in the image. A straight line QN perpendicular to the blackboard plane is drawn through point Q, and a straight line RM parallel to the blackboard plane and the horizontal line is drawn through point R. QN and RM intersect at point P. The length of the line segment PR, |PR|, represents the teacher's actual lateral displacement. A projection transformation is performed on the virtual point P to obtain its corresponding point P' on the imaging plane. Simultaneously, assume the distance from point R to the shooting point is d1, and the distance from point Q to the shooting point is d2. According to the projection relationship, we have:

[0041]

[0042]

[0043] Based on the principle of similar triangles, we can also obtain:

[0044]

[0045] also:

[0046] |P'R'|=|R'Q'|-|P'Q'|, (16)

[0047] If |NO| is known (i.e., the distance from the shooting point to the aisle), |R'Q'| can be calculated based on the pixel values ​​of the image, and the lateral movement distance D can be obtained. x The target value |PR| is expressed as follows:

[0048]

[0049] The length of |R'Q'| is extracted from the image, and d1 and d2 are calculated using the longitudinal distance measurement method. The teacher's lateral displacement can then be calculated using the above expression.

[0050] Compared to existing technologies, this solution has the following advantages:

[0051] This invention proposes a method for measuring teacher movement distance in the classroom based on teaching videos, which can quickly calculate the horizontal and vertical movement distances of teachers during the teaching process online. This invention uses the YCbCr color space for teacher facial region extraction, which is less affected by skin tone brightness; a threshold for judging face orientation is obtained through multiple sample training sessions, eliminating the influence of distance; the Kalman filtering algorithm is used to calculate the horizontal and vertical coordinates of the teacher's facial center point, enabling accurate target tracking; the pixel focal length of the camera device is calculated online, without relying on manual data input; the distance measurement module can be performed during classroom video recording, with fast calculation speed and results displayed immediately after the lesson; the distance between the person and the camera device is calculated based on the pinhole imaging principle, achieving high accuracy in measuring horizontal and vertical movement distances. Attached Figure Description

[0052] Figure 1 Skin color is elliptical in the CbCr plane;

[0053] Figure 2 Common classroom layout models;

[0054] Figure 3 A diagram illustrating the teacher's movement area within the classroom;

[0055] Figure 4 Focal length calibration scheme based on face pixel length (side view);

[0056] Figure 5 Lateral movement distance measurement scheme (top view);

[0057] Figure 6 A scheme for measuring teacher movement distance based on facial pixels;

[0058] Figure 7 Procedure for measuring the distance the teacher moves between adjacent sampling frames. Detailed Implementation

[0059] The technical solution and effects of the present invention will be described in detail below with reference to the accompanying drawings.

[0060] Example: This invention extracts and analyzes sample videos, tracks the teacher's face, calculates the device's focal length, and measures the teacher's horizontal and vertical displacement. It has high accuracy and strong real-time performance.

[0061] Step 1: Target detection and tracking are fundamental to the teacher analysis system. This involves detecting the teacher's head and extracting its movement trajectory. The image samples in the dataset are categorized into four classes: TruePosition (TP), FalsePosition (FP), FalseNegative (FN), and TrueNegative (TN). In the context of human target detection, these are defined as follows: TruePosition represents the number of positive samples correctly identified as positive by the algorithm; FalsePosition represents the number of negative samples correctly identified as positive by the algorithm; FalseNegative represents the number of positive samples incorrectly identified as negative by the algorithm; and TrueNegative represents the number of negative samples correctly identified as negative by the algorithm. Based on these definitions, the following metrics for analyzing detection performance can be obtained.

[0062] Precision represents the proportion of samples correctly identified as heads by the algorithm out of all samples identified as heads by the algorithm. Recall represents the proportion of samples correctly identified as heads out of the actual head samples. Accuracy represents the proportion of samples correctly identified by the algorithm out of all samples. After 100 iterations, the precision reached 97.5%, the recall reached 91.4%, and the accuracy reached 95.1%, indicating good detection performance.

[0063] Step 2: Perform tracking tests on the local video and plot the trajectory of the target detection box. Since teachers' postures frequently change, making it difficult to determine reference points on the teacher's body, this solution considers that teachers generally maintain an upright posture in the classroom, and their faces do not tilt significantly. Therefore, when the teacher faces the camera directly, the length of the teacher's face can be considered a fixed value. This solution calculates the distance between the teacher and the camera based on the vertical length of the teacher's face in the image when facing the camera, thus inferring the teacher's longitudinal movement distance (i.e., perpendicular to the blackboard direction); and infers the teacher's lateral movement distance based on the pixel horizontal coordinate transformation of the teacher's face center point in the camera. Compared to traditional solutions, this solution eliminates the cumbersome calibration process required in traditional calibration-based monocular video measurement schemes, while also better adapting to the distance measurement needs in a classroom environment.

[0064] Step 3: The detection bounding box obtained from teacher target detection is prone to jitter, causing frequent small movements of the target coordinates, thus affecting the accuracy of distance measurement. This solution uses video frame sampling. First, all video frames containing the teacher's face are selected, and video frames are sampled at certain intervals to obtain a sampling sequence. The movement distance of the teacher between adjacent sampling frames is calculated, thus greatly reducing the impact of jitter and slight shaking during movement on the movement distance measurement. After obtaining the movement distance measurement result, it needs to be judged. If the movement distance is less than a certain threshold, it is considered that the teacher has not moved within the sampling interval. If it exceeds the threshold, it is considered that the teacher has moved, and the result is added to the total movement distance. The overall process is as follows: Figure 6 .

[0065] Step 4: Extract the face region from the video. The results show that when the face is facing forward, the proportion of the skin color region is generally above 0.3, while when the face is facing away from the camera, the proportion of the skin color region is below 0.1. Therefore, this system selects 0.3 as the threshold for judging a face facing forward and 0.1 as the threshold for judging a face facing away from the camera. When the proportion exceeds 0.3, it is considered that the face is facing forward towards the camera, and when the proportion is less than or equal to 0.1, it is considered that the face is facing away from the camera.

[0066] Step 5: To test the accuracy of the movement distance measurement, a series of videos of human movement were filmed in an actual classroom environment. During filming, the camera was fixed to the back wall of the classroom at a height of 1.7 meters, and adjusted left and right to ensure the distance between the camera and the center lines of the aisles on both sides was approximately the same. Measurements showed the classroom length to be 8 meters and the width from the center lines of the aisles to be 1.95 meters. The subjects were required to remain in the middle of the aisles while walking. Based on the data obtained from the filming and the measurements, corresponding test experiments were conducted. The experimental procedure is as follows: Figure 7 .

[0067] The accuracy of measuring the teacher's movement distance depends on the accuracy of the focal length calibration of the shooting equipment; therefore, calculating an accurate focal length is crucial. This invention employs a method based on the pixel length of the face, combined with a small amount of classroom length, to achieve rapid and simple calibration. Video frames conforming to the condition of "the person is in front of the blackboard and facing the shooting point" are selected. The head target is identified, and the face region is extracted. The coordinate range of the face region in the pixel coordinate system is calculated to obtain the pixel length of the face, and the focal length is calculated using the pinhole imaging principle. In this experiment, the maximum and minimum values ​​of the vertical coordinate of the human face pixel in the image coordinate system were detected to be 580 and 533, respectively, and the face pixel length was 48. Based on relevant data, the actual length of the human face is generally around 18-20 cm. This method presets the actual target face length |PQ| = 0.20 m, and calculates the pixel focal length value. The relative error with the accurate result is 2.64%, indicating that the scheme adopted by this system is relatively accurate and can meet the accuracy requirements for measuring the teacher's moving distance.

[0068] Step 6: When the subject moves in the middle of the aisle, it can be considered as longitudinal movement. Let point A be a certain point in the podium area, and point B be the distance from the back of the second table in the aisle. The longitudinal distance between the two is 3.8 meters. The subject moves from point A to point B in the podium area, and the longitudinal distance the teacher moves during this process can be calculated. In addition, to more accurately reflect the distance measurement effect, this experiment was repeated 5 times, with the subject moving from A to B each time. The relative error of each experiment was calculated, and the results are shown in Table 1.

[0069] Table 1. Measurement results of longitudinal movement distance

[0070]

[0071] When moving within the podium area, the teacher's movement can be considered lateral. In a real-world teaching environment, two points A and B were marked on the podium, and the distance between A and B was measured to be 5.4 meters. The experiment began in the middle of the podium, then the subject moved from the middle to point A (right foot reaching point A), then to point B (right foot at point B), repeating this movement between points A and B. After multiple experiments, the error was calculated, and the results of five experiments are shown in Table 2. It can be seen that the relative error can be controlled to below 10%, which meets the accuracy requirements for measuring the teacher's movement distance, considering the changes in posture and possible measurement errors in actual human movement.

[0072] Table 2. Measurement results of lateral movement distance

[0073]

[0074] It should be noted that the above embodiments are not intended to limit the scope of protection of the present invention. Equivalent transformations or substitutions made based on the above technical solutions all fall within the scope of protection of the claims of the present invention.

Claims

1. A teacher's classroom walking distance measurement method based on a teaching video, characterized by, The measurement method comprises the following steps: Step 1) processing and training the collected video data, and slicing the input image; Step 2) facial pixel recognition of the teacher target in the image; Step 3) centroid selection and tracking of the teacher face in the image; Step 4) determining the orientation of the teacher face in the image; Step 5) establishing a classroom model and calculating the pixel focal length of the camera equipment; Step 6) calculating the horizontal and vertical displacement of the teacher during teaching; Wherein, the step 5) is specifically as follows: a classroom model is established, the classroom length is L, it is assumed that the shooting device position is close to the rear wall of the classroom, and is located in the middle of the rear wall, and the distance with the both sides of the corridor is equal, the distance is W, the optical axis is perpendicular to the plane where the blackboard is located, the length change of the classroom is not considered in the measurement, wherein the highest point of the teacher face is the lowest point of the teacher face is the point is a camera pinhole, and respectively the point and the image of the point and the point in the imaging plane, the length of the pixel length in the imaging plane, a video frame when the teacher is located in the front part of the blackboard is selected, at this time, the distance of the teacher from the shooting point can be regarded as the length of the classroom , i.e. , the preset actual length of the target face is , and the face pixel length can be extracted through image information, so that the pixel focal length of the shooting device can be estimated through the face area in the head target frame, i.e. ; Step 6) comprises the following steps: 6-1) defining the vertical displacement as the moving distance of the teacher along the vertical direction of the blackboard plane, and the horizontal displacement as the moving distance of the teacher parallel to the blackboard plane, and regarding the length of the teacher's face as a fixed value when the teacher faces the camera with a front face, between adjacent sampling frames, if the moving distance of the teacher is less than a certain threshold, it is considered that the teacher does not move within the sampling interval time, and if it exceeds the threshold, it is considered that the teacher has moved, and the result is accumulated into the total moving distance; 6-2) According to the projection relationship of pinhole imaging, the proportional relationship between the actual length of the face and the pixel length, and the proportional relationship in the focal length calibration are consistent, and the distance The calculation expression is as follows: , Assuming the sampling time interval is When The distance between the teacher and the shooting point at time , The distance between the teacher and the shooting point at time , The longitudinal displacement of the teacher in time , 6-3) The lateral movement distance measurement is performed, assuming that at moment and moment, the position of the teacher is at point and point, respectively, the pixel points in the corresponding image are and , a straight line perpendicular to the blackboard plane is drawn through point, a straight line parallel to the blackboard plane and the horizontal line is drawn through , and , intersecting at point , at this time, the length of the line segment is the actual lateral displacement of the teacher, a projection transformation is performed on the virtual point, obtaining the corresponding point in the imaging plane, while assuming that the distance from point to the shooting point is , the distance from point to the shooting point is , according to the projection relationship, there is: , , According to the principle of similar triangles, we can also get: , In addition: , If It is known that The lateral movement distance can be calculated according to the pixel value of the image That is, the target value The expression is as follows: , extracting on the image length, and a longitudinal distance measurement method is used to calculate and , the teacher's lateral displacement is calculated.

2. The teacher classroom walking distance measurement method based on teaching video according to claim 1, characterized in that, wherein, Step 2) is as follows: the skin color information in YCbCr space is compressed to a two-dimensional CbCr plane, in which the skin pixel points are approximately elliptical distribution, Cb is the X axis and Cr is the Y axis, , respectively represent the horizontal and vertical pixel coordinates of the center point of the target detection frame, which is approximately an ellipse with the center point (113, 155), the length of the major axis is 23, the length of the minor axis is 15, and the angle between the major axis and the X axis is 43°, and the expression is: 。 3. The teacher classroom walking distance measurement method based on teaching video according to claim 1, characterized in that, wherein, Step 3) comprises the following steps: 3-1) Establish the state vector, let The target state at time instant is Then, we have: , wherein , respectively represent the horizontal and vertical pixel coordinates of the center point of the target detection frame, , respectively represent the horizontal and vertical pixel coordinates of the center point of the target detection frame, , respectively represent the horizontal and vertical pixel coordinates of the center point of the target detection frame, , respectively represent the horizontal and vertical pixel coordinates of the center point of the target detection frame, 3-2) Establish a uniform velocity model for Kalman filtering and obtain the corresponding state transition matrix. and state observation matrix Using the state transition matrix The state at the previous moment Multiplying them together gives us the current time. State prediction value Using the state observation matrix and current state prediction value Multiplying them together yields a state vector composed of the first four state values. , and the observed value The difference between the observations yields the prediction error, and the optimal estimate of the current state can be calculated using the observation error and the Kalman gain. This enables target tracking.

4. The teacher classroom walking distance measurement method based on teaching video according to claim 1, characterized in that, wherein Step 4) is as follows: the face region in the video is extracted, and the proportion exceeding 0.3 is considered as a front face facing the camera, and the proportion less than or equal to 0.1 is considered as a back face facing the camera.

Citation Information

Patent Citations

  • Student class attention detection method

    CN109657553A

  • Multi-dimensional classroom quantification system and method based on computer vision

    CN110334610A