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]

asked 2017-10-19 10:43:49 -0600

updated 2017-10-19 18:30:51 -0600

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!

edit retag flag offensive reopen merge delete

Closed for the following reason question is not relevant or outdated by sturkmen
close date 2020-11-14 08:44:22.550476

Comments

you must be the 1st person on this planet, encountering that situation ..

berak gravatar imageberak ( 2017-10-19 11:46:18 -0600 )edit

btw, please restrict it to your opencv problem.

(we cannot help you with serial communication, LEGO api, android apps or libs of any kind.)

berak gravatar imageberak ( 2017-10-19 11:50:08 -0600 )edit

I edited the question. I only need help with the OpenCV part.

TheRedstoneGuy gravatar imageTheRedstoneGuy ( 2017-10-19 15:42:13 -0600 )edit

good !

have a look at the samples , the colorblob one might be quite close to what you want.

also here for installation/first steps.

berak gravatar imageberak ( 2017-10-20 07:27:54 -0600 )edit

Thanks! I will certainly try that. Is it coded in Java?

TheRedstoneGuy gravatar imageTheRedstoneGuy ( 2017-10-20 15:16:41 -0600 )edit

did you even look at it ?

berak gravatar imageberak ( 2017-10-20 17:22:16 -0600 )edit

Actually, before I didn't but now I am, and I'm also installing the CodeWorks for Android thing by Nvidia

TheRedstoneGuy gravatar imageTheRedstoneGuy ( 2017-10-20 17:25:32 -0600 )edit

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.

TheRedstoneGuy gravatar imageTheRedstoneGuy ( 2017-10-20 17:28:43 -0600 )edit