ionic framework - Detecting centers of circles from camera images -


so i'm developing ionic app uses phone camera detect circles on fabric, picture below: enter image description here

where max size 3x3 grid , there 4 different colors (lightblue, darkblue, lightgreen , darkgreen). basically, i've broken problem down 3 steps:

  1. get center of each circle.
  2. get color @ center of each circle
  3. using positions of each circle's center, create representation of pattern 2d array

my problem figuring out best way achieve step 1. i've looked hough transform , can't find resources javascript. if there easier or better way using hough transform grateful know.

you can use image segmentation watershed algorithm described in here


Comments