Real Time Human Motion Tracking with Image Alignment Optimization