简体   繁体   中英

Accessing IP cameras with OpenCV

First of all you have to understand a bit about my background. I have never worked with IP cameras before, but I will have to access multiple IP cameras simultaneously with OpenCV very soon. Apart from that, my network knowledge is not that much good.

Now the question. I know OpenCV can access IP cameras using its URL with the help of VideoCapture . There are number of questions in StackOverflow as well. But, the IP address is something that can be changed by time to time, it is dynamic. So even in a IP cam, the IP will change by time to time. So if this is the case, does this mean every time you try to access the cameras with OpenCV, you have to find the IP address of the camera manually and change the URL in OpenCV as well? I do not need to access the cameras via the internet, accessing locally is fine, via Wifi or network cables. How can I set a fixed IP address/ URL so the OpenCV code has nothing to change every time?

PS: I navigated through lot of websites (sites from more than 5 result pages of Google search) but the answers given are either too old or not that much convincing. So I decided to walk into StackOverflow for the answer.

If you can use local network, then Yes, you should use fixed IP address....if the Camera SDK is compatiable with OpenCV this you dont have have to worry about this and you can call VideoCapture directly. Or, you could use the camera SDK to get frames directly and then copy these frames to opencv image format and use opencv. This should not be too complicated.

If your router has a DHCP reservation feature, simply tell the router to always give an IP camera a certain IP. Thus when the camera polls the DHCP server when it connects to the network, it will automatically receive its reserved IP. Other clients without a reservation will simply receive a random IP like normal. You might even think about doing this for all your computers and devices; it's quick and easy.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM