How to use external camera or webcam with cone_detectortf ?

asked 2019-05-03 06:27:37 -0500

updated 2019-05-03 06:47:13 -0500

berak gravatar image


I'm relatively new to oOpenCVand I"m trying to use this GitHub code in python:

Everything works fine with different video files, but when I try to use my webcam I get the following error :

Frames per second using video.get(cv2.CAP_PROP_FPS) : 29.97002997
Capturing 120 frames
Time taken: 9.97166395187 seconds
Estimated frames per second: 12.0340998833
Traceback (most recent call last):
  File "", line 169, in <module>
  File "", line 126, in main
    boxes = np.vstack(boxes)
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/numpy/core/", line 283, in vstack
    return _nx.concatenate([atleast_2d(_m) for _m in tup], 0)
ValueError: need at least one array to concatenate

I maybe think it is a resolution problem but I'm not able to fix it, Hopely someone is able to help me :)

thanks in regards,

edit retag flag offensive close merge delete


we can't help with 3rd party repos.

it will get better, if you can come up with a minimal, reproducable example.

berak gravatar imageberak ( 2019-05-06 03:32:43 -0500 )edit