Prototype code for calculating energy level from optical flow.