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

IP Camera Support #1580

Open
myjtag opened this issue Aug 17, 2023 · 8 comments
Open

IP Camera Support #1580

myjtag opened this issue Aug 17, 2023 · 8 comments

Comments

@myjtag
Copy link

myjtag commented Aug 17, 2023

Feature Request

Please support IP cameras, Because there are a wast camera selection and prices and performances are way more optimised than USB webcams, Also the Bandwidth requirement for USB is eliminated and we can use as many Cameras as our CPU can handle, also the cable length is not that Important either, the best part is that we can have Higher resolution and or higher refresh rate camera for selection, and the prices are very low for some models.

@markmaker
Copy link
Collaborator

Those are supported. Use the OnvifIPCamera

Report back if that is not what you mean.

Because there are a wast camera selection and prices and performances are way more optimised than USB webcams ... the best part is that we can have Higher resolution and or higher refresh rate camera for selection ...

Really? Can you back this up? 😄

As for band-width, don't forget USB3.

_Mark

@myjtag
Copy link
Author

myjtag commented Aug 17, 2023

Thanks to hear that it has support for IP cameras.
I have just run a simple test with my android phone, using the IP webcam application, I can clearly see the video feed in the browser using this address http://192.168.1.3:8080/ or use this for raw video http://192.168.1.3:8080/video But I can not get any video in open pnp, uising any of the urls.
Also I think these days the cell phone cameras are great and cheap for this type of work, since xiaomi has phones for around 50$ that have 4K main cameras! also they support lower resolution with 120Hz frame rate.
pnp

@markmaker
Copy link
Collaborator

I guess you have to find out the specification of these feeds. I don't know much about IP cameras, but I guess one thing to specify is the codec. If I'm not mistaken, OpenPnP currently only support MJPEG. Maybe there are settings available in your app to switch to MJPEG, or maybe the OpenPnP codec support could be extended in the future.

Note, you don't need/want 4k resolution. This is counter-productive, because a) excessive resolution makes computer vision slow (some algorithms have computation times that grow to the fourth order of the linear resolution!), b) the extra resolution is not needed for the precision that is required for pick and place, c) the extra resolution often comes at the cost of more compression artifacts, and while they may be okay for limited human perception, they can be disruptive for precision geometry computer vision.

Note, we are using sub-pixel computer vision where it matters, so we can get a lot from little resolution, provided the image does not suffer in compression.

Whether using a phone with an app from an app store, mounted on a machine is a good idea, I leave to you. 😜

However, before you proceed, measure the lag from actual physical event to decoded image. This is much more important than resolution or fps. Such a lag may not matter for a classical webcam that streams a show or the weather. But it does matter for us.

_Mark

@myjtag
Copy link
Author

myjtag commented Aug 18, 2023

thanks, I think you should extend the IP camera support for open PNP, by the way what camera do you suggest, since I want to build a new machine that can handle small components, like 0201 and has high speed,

@markmaker
Copy link
Collaborator

by the way what camera do you suggest, since I want to build a new machine that can handle small components, like 0201 and has high speed

We still recommend using the ELP 720p camera, as it combines very good quality with reasonable resolution. It is proven to work with two cameras on the same USB 2.0 root hub. There are more advanced cameras, sure, but nobody has really documented them as better overall. For instance, I tested a global shutter 120 fps camera, it surely was faster, but it had serious flaws, clipping into false colors, for instance.

https://github.com/openpnp/openpnp/wiki/Build-FAQ#what-should-i-build

If you don't care about using two USB 2.0 ports on your computer, you can select the ELP 1080p camera, and use it at 720p with 60 fps (instead of 30fps for the recommended model). I do that on my machine.

As to 0201 components, I haven't heard of any users that pulled it off. Those are really, really small. Even the 0402 I use are so delicate. You would be a pioneer 😎

There is nothing in OpenPnP itself that would prohibit such a thing, though. Assuming that all components you use are equally smaller, you would just have your cameras a bit closer, and the controller steps per millimeter a bit higher.

If you still also mix in a few very large parts, it is equally no problem, because we have Vision Compositing a.k.a. Multi-Shot bottom vision.

_Mark

@myjtag
Copy link
Author

myjtag commented Aug 21, 2023

thanks for sharing.

@markmaker
Copy link
Collaborator

If you or somebody takes the time to specify missing IP camera protocols and/or codecs, for cameras that are becoming affordable, tested for lag and usable with OpenPnP, then I'll keep this open. Otherwise I'll close it in a few days.

@myjtag
Copy link
Author

myjtag commented Aug 22, 2023

I have tested it with some App's supporting IP camera protocols like ONVIF support, why Android phones?
because they are cheap, have good cameras and have a good enough processor that can be used to handle image processing if open pnp Add support for it, Here is the list and the app link in the list
1- IP Webcam app
https://play.google.com/store/apps/details?id=com.pas.webcam&hl=en_CA&gl=US

Also I have tested these IP cameras, with no lock
EYE guard EG-IR93040
wifi ptz camera

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

2 participants