I want to make a printable scannable code, something like snapcode or Spotify code. The code will have a grid with three rows and five columns of coloured dots. Each coloured dot will point to a number or character so that a hash will be formed.
I would like to start with a way to find the coloured pattern of the scanned code. So that each colour and position of the dots will be known, to construct the hash. The code will be scanned with smartphones or tablets.
In my search, I saw Hough transformation, Image segmentation/moment analysis/templating, Surf, Canny edge detection and more. Lots of ways. But I'm wondering, what the best way is to (always correctly) recognize the coloured pattern?
Edit, added images: