Ask Your Question
0

VideoCapture returns black image, when linked with tensorflow lib

asked 2017-10-06 18:13:18 -0600

My application uses tensorflow for object detection. When I'm using video file as input, all works just fine. But when I'm trying to open wecam, it returns black frames.

The problem is only happen, when the application is beeing linked with tensorflow dynamic library. If I comment detection code and disable linking, VideoCapture works with webcam too.

Setup: Ubuntu 16.04 opencv 3.2.0 (3.3.0 was also tried) tensorflow 1.2.1 bazel 5.4

Does anyone deal with smth. similar?

edit retag flag offensive close merge delete

Comments

1

Can you make a really simple program that does the same thing? That we could test?

Try to make it as small as possible. With a few external dependencies as possible to make it easy to reproduce.

Tetragramm gravatar imageTetragramm ( 2017-10-06 23:02:04 -0600 )edit

Thank you for response. I'll do that.

Vitalich gravatar imageVitalich ( 2017-10-07 06:39:18 -0600 )edit

1 answer

Sort by ยป oldest newest most voted
1

answered 2017-10-07 01:30:19 -0600

dkurt gravatar image

Try also build only necessary modules like core, videoio, imgproc. Try to build with dnn module and w/o it to check that problem is in protobuf or not. Here is a sample of cmake arguments: https://gist.github.com/dkurt/ed78878....

edit flag offensive delete link more

Question Tools

2 followers

Stats

Asked: 2017-10-06 18:13:18 -0600

Seen: 310 times

Last updated: Oct 06 '17