Check if Mat is a black image

Viewed 4817

Maybe an easy question but since I am a noob I dont know how to do it in an elegant way. I am analyzing video. For that I am taking differences between the frames. If nothing has changed the resulting frame will be empty or black if I display it with imshow(...). How do I find out if I am looking of one of these black (empty) frames?

I tried:

Mat threshold_output;
...
threshold_output.empty() --> does not work
or
threshold_output == 0 --> compiler error

Maybe someone can tell me :).

Thx

2 Answers
Related