Regarding CPU LOAD and HDMI Screen Flickering

Hello all,

I am currently working on gesture recognition using OpenCV on Beaglbone Black.
But i am having a problem while i am opening a window to capture a image frame.It runs fine at 320x240.

But The screen flickers while i am capturing a image at 640x320 using webcam from BBB.Same thing happens when BBB is left for a while and screensaver appears.On testing and analyzing i have found that when CPU load is increasing then screen flicker.

Please tell me something to decrease a CPU load or any other reason for flickering of screen and its way to avoid flickering.