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:
2 | No.2 Revision |
"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: