Code Monkey home page Code Monkey logo

object-trajectory-prediction's Introduction

Project Name: Moving Basketball Hoop

Computer vision extends to several actions like object trajectory prediction. By OpenCV library, the color finder with HSV values could highlight the targeted object, the ball, among the rest of the objects.

This aided to assign the location of the ball's center point in (x,y) coordinates and was saved to be connected. Accordingly, the polynomial curve of its motion in the future was predicted (shown below), and this could be a turning point for creating a flying hoop. Moreover, this formed a path to knowing whether the ball will be shotted inside the traditional fixed hoop or not.

Capture for the model

Weakness point

The weakness point is contouring any object with the same color as a ball (shown below as the basketball hoop was detected), and this can cause errors within the fitting polynomial curve.

image

Solution of weakness point

I solved this error by taking the greatest area in the contouring. To illustrate, both the hoop and the ball had the same color; however, the curve was associated with ball center because the ball consumed a greater area from the pixels in the video frames.

Mechanical design

The aim is to implement an H-bot gantry design attached to a basketball hoop that moves in XY plan to catch the ball. I am responsible for the software part: ball trajectory prediction. In this stage, I am searching for the polynomial fitting equation in 2D and the motion of a curve in 3D.

Problems

The complex problem is that I had to approximate the single 2D images into the 3D position. This decision was because the design of H-bot gantry is moving in XY plan, and the ball is projected from the Z axis that makes an angle with X and Y axes.

Procedures

1. Ball detection with its center at a position vector (X,Y,Z)
2. Plotting the motion of ball in a 3D graph with matplotlib 
3. Searching for motion in a 3D curve to predict an equation for the polynomial curve of the ball motion 

Step 1 was done as shown below

image image

Step 2 and 3 are (in progress)

The current stage is for searching for the object trajectory prediction in 3D motion as it is one of the most important and complex topics in the computer vision field.

object-trajectory-prediction's People

Contributors

arwa-fawzy avatar

Watchers

Kostas Georgiou avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.