Back to Browse

Robot Computer Vision Based Outlet Detection with OpenCV. Light enough for Raspberry Pi Robotics.

329 views
Jul 16, 2020
1:02

Computer Vision Based Outlet Detection for Robot with OpenCV. If you find my videos helpful, you can say thank you and help me to make more tutorials with a cup of coffee or by picking up a copy of Practical Robotics in C++. Thank you for your support! https://www.buymeacoffee.com/practicalrobot Practical Robotics in C++: https://amzn.to/3CJAqHs As an Amazon Associate I earn from qualifying purchases. ************************************************************************************** EDIT: Practical Robotics in C++ : learn to build autonomous robots is now available on Amazon in most markets or the publisher's web store! Practical Robotics in C++: https://amzn.to/3CJAqHs https://bpbonline.com/products/practical-robotics-in-c ************************************************************************************** While the publisher is delayed for a couple more weeks with staffing issues due to COVID19, I thought I'd start messing with an idea I've had for a while to detect outlets with just a very lightweight algorithm. The yellow dots are possible holes, the green dots are holes that are thought to be part of an outlet. The purpose is two-fold: First, a robot that can plug itself into any outlet to charge has some possibilities that a robot that requires a dock does not - plus it's really cool. Second: Outlets don't usually move - and if we have a list of known outlets and their locations, we can use them as a landmark to help reduce the error or uncertainty as to the robot's location. My wife wasn't interested in letting me put QR codes or April tags all over the house, so I'll settle for outlets for now. This is just my first attempt using OpenCV to first detect shapes that may be outlet holes, then determine if there are any groups of three that meet enough relative dimensional and location criteria to likely be an outlet. Although not extensively tested, you can see that it does pretty well with few false positives. Range about one meter with me holding the camera in my shaky hand. I think I can refine the detection criteria once I try it on a robot and use the laser data for range and angle. Why write my own to detect outlets instead of using a trained classification model? Speed. Running YOLO_V3 even on my very fast laptop only publishes about 5-8 results per second (without enabling the GPU) and the fans are screaming. Running full image classification on a Raspberry Pi can take minutes per image (unless you send the image to a networked computer like I show you here: https://www.youtube.com/watch?v=G1gDpmNq7R8&t=805s). You can see this ROS node that I haven't even tried runs at close to 30HZ - which is probably only limited because that's how fast my camera publishes. If testing proves it necessary, this node can be used to detect a possible outlet then just the necessary images can be run through a classifier or alternate means of verification. Stay tuned - once I get some more testing and implement some usefulness in an actual robot I'll do a tutorial on the Youtube channel that builds on the robot tracking and the computer vision work that we learn in Practical Robotics in C++ so you can implement outlet detection for yourself. Give me a follow to stay in the loop!

Download

0 formats

No download links available.

Robot Computer Vision Based Outlet Detection with OpenCV. Light enough for Raspberry Pi Robotics. | NatokHD