Changed black frame detection to average-luma based. Lowered threshold.

Changed black frame detection to average-luma based. Lowered threshold. Tested it with a fake webcam and with an external webcam that I covered totally or partially with my finger. Worked as intended.

Also some minor things.
Why not simply return true?
And if not, why is this exit condition different from the exit condition on the loop?
As in one is threshold on acc/pixels and the other is acc/(pixels+1).