Pages

simple ball game by colored object motion tracking - image processing opencv javacv

DEMO VIDEO:  simple ball game by colored object motion tracking - using javacv opencv to detect the path of moving object. This is earliest version of the game.


Full Code :
Java Collision Detection and bounce

Colored object tracking in java- javacv code


You need to integrate the ideas from above links.
The full (integrated code will be uploaded shortly)

14 comments:

  1. Hello sir
    I integrated thresholding and capture program but i dont know how to integrate those two program with collision detection program.
    pls give some tips

    ReplyDelete
    Replies
    1. Once you detect the position (x,y) of moving object through capture and thresholding codes, pass these parameter into collision detection code where mouse coordinates is passed as MouseEvent for the striker. This will allows you to use the moving object's coordinates as mouse coordinate to control the striker.
      Hope This helps. Best of luck.
      I am planning to upload the complete codes (integrated) to google code. But this might take some time.
      Thanks.

      Delete
  2. hello ganesh can i ask how to rotate the camera? so that it will not look like a mirror.

    ReplyDelete
    Replies
    1. You need cvFlip function : cvFlip(img, img, 1);// l-r = 90_degrees_steps_anti_clockwise

      You can look at here : http://ganeshtiwaridotcomdotnp.blogspot.com/2011/12/javacv-capture-save-flip-show-live.html

      Thanks.

      Delete
  3. Can you share the source code? This shoud be extremly useful to learn OpenCV and Java for the junior developers.

    ReplyDelete
    Replies
    1. the codes can be found in other javacv,opencv posts ...
      just go to :
      http://ganeshtiwaridotcomdotnp.blogspot.com/search/label/OpenCV-JavaCV

      Delete
  4. Great idea for Natural Interaction.

    ReplyDelete
  5. i saw this blog and it caught my interest...we have a project regarding computer vision and i think it will help me a lot. but can you share your source code?

    ReplyDelete
    Replies
    1. the codes can be found in other javacv,opencv posts ...

      just go to :

      http://ganeshtiwaridotcomdotnp.blogspot.com/search/label/OpenCV-JavaCV

      Delete
  6. can you post the whole and complete source code wherein we can control the game using the colored object tracking?plsplsls...our project is like a hockey game but we need to control it using the camera...your code is very helpful...

    ReplyDelete
  7. i almost loosing hope in integrating the javacv code and the collision detection in controlling the ball in the game...pls i need the help of the developer of this sample game...i think i need your code as my guide in developing my project.

    ReplyDelete
  8. hi GT...pls help us on our project...we create a pc game using colored object tracking and collision detection...we based our project to your simple ball game using colored object tracking...but we are loosing hope in integrating the two separate code the collision detection and the colored object tracking.how can we integrate the two program so that we can control the ball as what your simple ball game functionality...pls we need your full integrated source code..or if you dint want to share the code..just give me some idea on how can we integrate colored object tracking and the collision detection...plsplspsls

    ReplyDelete

Your Comment and Question will help to make this blog better...