Measuring Classroom Activities

< back to resources

Measuring Average Activities in a Classroom

To calculate a heat map of locations where the children spend their time most, we divide each frame into a series of blocks, and track motion in each block. The number of pixels in a block that corresponds to motion are given a score, and the score is normalized using all the motion pixels in the frame. The scores are accumulated over frames, and a color histogram (where the number of bins is the same as the number of blocks) is plotted to generate the heat map.

A frame-differencing algorithm is implemented that takes advantage of the fast matrix calculations in Matlab to look for pixels where motion has occurred. The calculations are optimized to calculate the histogram on the fly.