-
Notifications
You must be signed in to change notification settings - Fork 145
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
Using Webcam for EV3 object detection. #747
Comments
Going for Robocup? Those balls can be rather challenging to detect reliably. No idea if you can use a pixycam as a webcam, but you should be able to just get a cheap webcam and get it to work with ev3dev. A quick google suggests that the Logitech C270 and Logitech C920 works fine. The EV3 is very slow compared to a Raspberry Pi. You may get better results if you use the pi to perform the object detection and send the result to the EV3. You can send the results via a network link; just connect them the same way that you would connect an EV3 to a computer. |
The advice from @QuirkyCort is good. In addition: The USB port on the EV3 is only USB1.1, making it inadequate for even moderate video bitrates. It can work, but it won't be pleasant, and as mentioned above the processing on the EV3's slow CPU will be extremely limited. Doing the computations on an external RasPi would make a lot of sense. I've personally had success with doing color-based detection on Raspberry Pi Zero, which is on the very low end of CPU specs but is very likely to fit into your size/profile budget. If you have extra space and power, a full RasPi is certainly capable -- the RasPi 4s are super powerful, for their class! To connect a RasPi to the EV3, the easiest option is probably (?) to modify an EV3 cable so you can connect it to the RasPi via UART. I am having trouble finding the posts I know we've had about how to do this, but @dlech may know. Another option may be to plug the RasPi in via USB, using the RasPi's client (OTG) port. |
thanks @QuirkyCort and @WasabiFan I will be trying to connect a raspberry pi to ev3. |
Also is there anyway for them to communicate via USB cable? |
Raspberry Pi is a Linux computer, so connecting the EV3 to it is the same as any other Linux computer. |
@dlech Is there any way for me to connect raspberry and ev3 via Bluetooth and python? |
Connecting the RPI to EV3: https://www.ev3dev.org/docs/tutorials/connecting-to-the-internet-via-bluetooth/ Sending data from RPI to EV3: https://realpython.com/python-sockets/ |
thanks @QuirkyCort that helps a lot |
You could use GRIP, which gives you a GUI for designing an OpenCV pipeline, then creates Java or Python code to run that pipeline. |
Hey I'm trying to make an object detection code to detect black and silver balls. I'm tried to use pixycam2 but it only detect hue colors. I want to know if there is any way to use pixy as webcam and write a new algorithm with TensorFlow lite and open cv. but I don't know how to use pixy as webcam or if its possible to do so. If not is there any other way to do such a thing like using raspberry pi and then connecting it to ev3 (which I don't know how to do that). Or should I use an other webcam? But I don't know what webcam to use. can someone help me with any of those questions? that would be really appreciated.
The text was updated successfully, but these errors were encountered: