Ask Your Question

Revision history [back]

Hi Steve!

I think this is a very nice project to get a good insight of what computer vision is all about. You are going to get all kinds of things on your way: unwanted shadows, noise, occlusions... But any way, the effort would be worth it when you have your neat craps system up and running.

About your problem, if you want to segment the objects on your playing area, how about using Background Subtraction (or Background Differencing) instead of just thresholding on the green color?

To perform Bacground Subtraction you should first learn a model of the background, then compare that model to your current image and subtract away the known background parts. The objects left after subtraction will likely be foreground objects (i.e: your chips, dice, etc..)

You can find plenty of information on internet about it. But I would recommend you these books:

Chapter 9 of the Book: "Learning OpenCV Computer Vision with the OpenCV Library". Gary Bradsky & Adrian Kaehler.  
Chapter 10 (p.272) of the Book: "OpenCV 2 Computer Vision Application Programming Cookbook". Robert Laganiere.

I hope this could be helpful for you.