Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

"empty" or "all black" are 2 entirely different things !

you can check for "emmpty" like:

if frame == None:

or, in later numpy versions:

if np.shape(frame) == ():

you can check, for an "all black" frame with:

if np.sum(frame) == 0:

"empty" or "all black" are 2 entirely different things !

you can check for "emmpty" "empty" like:

if frame == None:

or, in later numpy versions:

if np.shape(frame) == ():

you can check, for an "all black" frame with:

if np.sum(frame) == 0: