Friday, 15 March 2013

python - Opencv stream from a camera connected to a remote machine -


I am developing Python in two different webcams in Python for streaming video and displaying. It works fine, but now I need to do this in a different scenario in which two cameras are connected to a network connected to a network connected to a different machine. My application will run on the machine 1. The video from Camera 1 can be used by OpenCV and displayed on a panel. And I also want to connect with Camera 2 to Machine 2, and want to display it in the application.

Is there any way to do this?

VLC can stream the image

Then OpenCV's Video capture can take frames from the RTSP stream such as:

  std :: string address = "Rtsp: //" & lt; username: password & gt; @ & lt ; Ip_address & gt;: & lt; port & gt; "; CV :: Video Capture Cap; If (! Cap.open (address)) {std :: cout & lt; & Lt; "Error opening video stream:" & lt; & Lt; Address & lt; & Lt; Std :: endl; Return -1; }  

Where address is something like rtsp: //127.0.0.1: 554 or rtsp: // username : Password@127.0.0.1: 554 If it is password-protected.


No comments:

Post a Comment