Extracting the green-screen region borders 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.
Here is a brute force algorithm. This requires some temporary storage (another image, an array, etc.) to record the visited pixels.


Start at the first pixel and continue iterating over the image until you find a green pixel. Mark each read pixel as "visited".
Extract the set of green neighbor pixels and record them. Also tag them as "visited". The idea is to find all the green pixels connected to the one found in [1].
If any pixels in the source image are left, go back to [1].


This will give you a set of contiguous green pixel regions where each pixel appears 1 or 0 times.