Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to modify for a url stream? #72

Open
erinline opened this issue May 27, 2022 · 0 comments
Open

How to modify for a url stream? #72

erinline opened this issue May 27, 2022 · 0 comments

Comments

@erinline
Copy link

erinline commented May 27, 2022

I'm streaming video from a robot's camera to a web server, and I want to capture the web server stream in this handtracking program. I tried changing line 69 in detect_single_threaded.py to

cap = cv2.VideoCapture('http://localhost:8080/stream_viewer?topic=/image_raw', cv2.CAP_FFMPEG)

but it crashes. I have also tried using cv2.CAP_GSTREAMER but same crash. Ideas?

Error is:

Error converting to RGB
Traceback (most recent call last):
  File "detect_single_threaded.py", line 96, in <module>
    detection_graph, sess)
  File "/home/erinline/src/biometrics/handtracking/utils/detector_utils.py", line 90, in detect_objects
    feed_dict={image_tensor: image_np_expanded})
  File "/home/erinline/.local/lib/python3.7/site-packages/tensorflow/python/client/session.py", line 950, in run
    run_metadata_ptr)
  File "/home/erinline/.local/lib/python3.7/site-packages/tensorflow/python/client/session.py", line 1142, in _run
    np_val = np.asarray(subfeed_val, dtype=subfeed_dtype)
TypeError: int() argument must be a string, a bytes-like object or a number, not 'NoneType'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant