Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- I have OpenCV 3.1 installed with ffmpeg and gstreamer enabled, all compiled from source with appropriate libs.
- Plenty of pages out there to show you how to piece that together ;)
- I used this to set up my usb c270 logitech webcam omn the Raspberry pi to stream mjpeg to my ubuntu 16.04 box.
- (Works!)
- https://iotalot.com/2016/05/28/video-streaming-using-raspberry-pi-3-and-usb-webcam/
- On the Ubuntu side I catch (receive) the stream in OpenCV with the following Python code:
- Python 2 Opencv 3.1 Ubuntu 16.04 mjpeg_streamer cam receiver:
- --------------------------------------
- import numpy as np
- import cv2
- cap = cv2.VideoCapture('http://192.168.2.62:9090/?action=stream')
- while(cap.isOpened()):
- ret, frame = cap.read()
- #gray = cv2.cvtColor(frame, cv2.COLOR_BGR2GRAY)
- cv2.imshow('frame',frame)
- if cv2.waitKey(1) & 0xFF == ord('q'):
- break
- cap.release()
- cv2.destroyAllWindows()
- ------------------------------------------
- #https://www.facebook.com/mrlunk
Add Comment
Please, Sign In to add comment