fixed opencv smaple code so it works for drawing box around training image