Detecting balls on a pool table

I am currently working on a project where I need to be able to reliably get the position of the balls in the pool table.

I am using Kinect v2 over a table as a source.

The original image looks like this (after converting it to 8-bit from 16-bit, discarding pixels that are not around the table level):

pool table top view kinect depth raw

Then I subtract the reference image with an empty table from the current image.

After the threshold and alignment, it looks like this: image

Processed Depth Processor Processed Pool Kiosk

It is quite easy to detect individual balls in one image, the problem is that I have to do this constantly at a frequency of 30 frames per second.

Difficulties:

  • Image with low resolution (512 * 424), a ball about 4-5 pixels in diameter.
  • Kinect (2 ).
  • - , , .
  • , , ( ),
  • , , , : , ..

, , :

  • 16 8
  • Thresholding

, , , . , . ( , Kinect , )

.

+4
1

:

IRL . , "" , / -.

:

  • . (, , 117% - ).
  • ( , ): , ( ). (, , , ).

. , . , , , .

, findContours() minEnclosingCircle(). , , , (, ..). () Adrian OpenCV

pyimagesearch.com       OpenCV

Python, OpenCV .

OpenCV 2.4, OpenCV 2.4 (, Lucas-Kanade). OpenCV 3.0, (, TLD).

Moments: , , , ( )

+1

Source: https://habr.com/ru/post/1661440/


All Articles