Detecting the position of a basketball player on a court

Hey,

I'm working on a project that will return a basketball to the player, by swiveling a chute under the hoop to aim the ball towards the player (when the player makes the shot). It needs to detect the position of a singular person on a basketball court, and aim the chute respectively. The size of the court is regulation, for my purposes, as long as the system can detect the player's position ≈20 ft from the hoop. Does anyone have any suggestion as to how this would work? I looked into gps but it didn't seem to be accurate enough. Also I thought of (somehow) detecting the position of the player relative to a grid, have the hoop as 0,0 of the grid. but I don't know how to aim it. Thanks!

There are ready systems, not very cheap, that keep track of modell railroad trains with a very good accurazy. Let the player have a loco chip in the pocket......

Are you actually expecting the shooter to stay in exactly the same spot? I am willing to bet even you cannot describe the location of the shooter on the court when you see it in person.

Paul

Hi,

Assuming the 'court' is just over 15 metres wide you could divide it into 1 meter boxes, and assume the hoop would be at 'row 0', 'line 7', ie, the middle of the first row. This would allow for left / right movement.

Could you use RFID tags, one per player?

Using active ultra-wideband (UWB) you can place a 'tag' to within a few centimeters, but that may be too expensive.

Cheaper versions can get down to around 3 feet, or one metre.

Peter

Lots of stuff on object position detection in the past, nothing very practical. Each player might wear some type of coded IR beacon for player detection, but how does the device know who shot the ball?. The below might help get you started.

Use the forum Google search function in the upper right of this page to search for the key words of your project. You will probably find many similar previous project discussions and code to get you started.

Forget about tracking players, just determine the direction the shot came from and return it the same direction.

willstheman:
a singular person on a basketball court

If that means that there will always be just one person on the court then an RPi with camera mounted above the court looking down should be able to do what you want.

I don't think you will find a solution using Arduino.
PyImageSearch has some tutorials on face detection using the Raspberry Pi.

I was working on a project that tracks when a person was looking at a Halloween skeleton, and the eyes would follow them. I never finished it, but I was getting good X-Y-Z values from the Pi. (I never finished because I am not a hardware maker).

I doubt the OP needs face detection. Simple blob detection ought to be good enough, if "a singular person on a court" means "there will be just one person on the court practicing shooting, not multiple people."

I reckon this would need a camera looking down on the playing surface and some very powerful image analysis software that is probably beyond the capability of my laptop, never mind an Arduino.

…R

For a single player a pixy cam mounted above the court may do the job. That'd be an Arduino solution.

For multiple players in the court it's getting a whole lot harder.

This seems like it might work, if you can find suitable sensors.

Mount a sensor atop a servo horn and scan. Sensor responds, note angle reading. Use angle-side-angle math to determine shooter position.

Maybe.

Would probably need something like LiDAR Lite, as it needs a range of 20m or so. Seems workable indeed.

dougp:
Mount a sensor atop a servo horn and scan.

I think you would need very fast scanning (far beyond the capability of a servo) to capture the position of a person running around a basketball court. And it would not work at all if there was a team of players.

(I am assuming that the use of the words "singular person" in the Original Post means one person among the two teams of players).

If the requirement is just for practice with a single player then why not put the scanning sensor (a photo transistor) on the chute and have the player shine a light at it for a few moments from whatever position he wants to practice his shots.

...R

I doubt my first thought would be feasible due to the distance requirement. But my thought was to use color tracking. Since this is for a single player, if one could get the tracker to follow a color out to a distance of 20 feet then one would only have to wear the correct color attire and have the chute rotate to match the tracker.

Something like in this not real useful YouTube vid.

Robin2:
I think you would need very fast scanning (far beyond the capability of a servo) to capture the position of a person running around a basketball court.

At the distances involved I don't think a properly sized servo - or a stepper motor, if that's your fancy - would have difficulty keeping up with the the angular velocity of a human.

A Panasonic Grid Eye mounted about 43 ft above the court, looking down, would cover a 50 ft square area and probably work for approximately locating one person on a bit more than half of the court (full=50'x94'). I say approximate since pixel size = six feet. May be able to get better resolution with interpolation. Capable of reading at 10 Hz.

Thanks for all the feedback! To clear this up: the system is meant for single person practice purposes only. Meaning only one person will be on the court at a time. The person will not be running around the court at top speed either. Of all the suggestions, I've looked into the camera method, but it is too advanced for my purposes, using RFID tags is interesting to look into, but might be a bit too complex as well. Using side angle side and two sensors seems like the best method, also being similar to what I was envisioning.

dougp:
This seems like it might work, if you can find suitable sensors.

Mount a sensor atop a servo horn and scan. Sensor responds, note angle reading. Use angle-side-angle math to determine shooter position.

Maybe.

I've found long range (24 ft) PIR sensors, and was thinking of mounting those to the servos to determine position of the player.

Thanks again!

Follow up and let us know how it turns out. It may help somebody else down the road. :slight_smile:

Of course!