Given a png image with an unknown number of green colored (rgba=0, 65535, 0, 65535) regions
1- How can I find and put the border points of only the separate green boxes to an array like:
[0] = []point{...} // the first box's points
[1] = []point{...} // the second box's points
[...] = []point{...} //
[7] = []point{...} // the last box's points
2- Which algorithm(s) should I use?
I tried canny edge detector and my own custom ones (like flood-fill) but the canny algorithm finds all the regions not only the green ones.