Skip to content

Commit 9267b48

Browse files
committed
push frame when videoCapture opened
1 parent cd7276f commit 9267b48

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

modules/bioinspired/samples/retinaDemo.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,10 @@ int main(int argc, char* argv[])
6868
else
6969
videoCapture.open(parser.get<int>("camera"));
7070

71-
videoCapture >> inputFrame;
71+
if (videoCapture.isOpened())
72+
{
73+
videoCapture >> inputFrame;
74+
}
7275

7376
if(inputFrame.empty())
7477
{

0 commit comments

Comments
 (0)