Skip to content

An elegant python program to count dominoes and the colored pips for scoring a game

License

Notifications You must be signed in to change notification settings

jjmlovesgit/pipcounter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

An application we call the "Pipcounter" to count your domino Pips from a picture

An elegant and concise python program to count the pips on your dominoes for scoring

Run the code and be sure to try the sample images to test it.

This program works best with a modern cell phone camera with images taken from directly over your dominoes.

Hi res photos and decent light work best.

Be sure to watch the video and ask any questions in the comments section

• Start: The process begins. • Read Image: An image is uploaded and read. • Resize Image: The image is resized for consistent processing. • Is Image None?: Checks if the image is null. • Yes: If the image is null, the process ends returning None. • No: If the image is not null, it proceeds to the next step. • Convert to HSV: The image is converted to HSV color space. • Apply Hue Threshold: A hue threshold is applied for color filtering. • Create Mask: A binary mask is created for the specified color range. • Search Contours: The script searches for contours in the image. • Draw Contours and Calculate Pips: Contours are drawn, and pips (dots) are counted. • Put Text on Image: The total pip count is displayed on the image. End: Return Processed Image: The processed image with pip count is returned.

image

image

https://youtu.be/0Kgm_aLunAo

About

An elegant python program to count dominoes and the colored pips for scoring a game

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages