Need to make a tracker that detects ping pong balls, and then display a color on the right side of the screen corresponding to where the ping pong ball is. [closed]
Hello! I want to make a ping pong ball tracker (that detects a ping pong ball) and then display a color on the right side of the screen corresponding to where the ping pong ball is. What I mean is, if the ping-pong ball is on the right side of the screen, it'll be one color. If it's straight ahead, it'll be a different color. If it's on the left side, it'll be a different color. (From this point on, I explain what would be helpful, but the OpenCV help I need is in the beginning of this post.) This is a way to communicate with my VEX IQ kit (a robotics kit, similar to Lego Mindstorms). I could use a Bluetooth radio, but I don't have one, and I'm not in the market for one. Also, I will be using normal orange ping pong balls. I will also be using my Samsung Galaxy S8 as the Android phone. I'm a total NOOB at OpenCV. I have some experience with Java though, so if this could be coded in Java, it would really help. So far, nothing has worked for me. I could use any version of OpenCV for this. Most preferably OpenCV 3.3.0. Also, I don't know how to get OpenCV projects ported to Android. And I need the color to be on the right half of the screen. I'm using Vex IQ's color sensor to detect the colors. Thanks! (Also maybe include some code since I'm a complete noob at OpenCV)
Edit: I just need help with the OpenCV part. I will work on the Android/Vex IQ part later. Thanks again!
you must be the 1st person on this planet, encountering that situation ..
btw, please restrict it to your opencv problem.
(we cannot help you with serial communication, LEGO api, android apps or libs of any kind.)
I edited the question. I only need help with the OpenCV part.
good !
have a look at the samples , the colorblob one might be quite close to what you want.
also here for installation/first steps.
Thanks! I will certainly try that. Is it coded in Java?
did you even look at it ?
Actually, before I didn't but now I am, and I'm also installing the CodeWorks for Android thing by Nvidia
After I install it, I'm gonna try to run the samples, but I believe the samples won't run on my Android phone because the samples are pretty old (I have Android 7). I'll update this question after I try to run the samples.