by Baker » Sun Mar 04, 2012 7:19 pm
Inner mysteries to unravel:
1) Flood fill
2) Edge detection
3) Complex selection
In a way those aren't hard. In a way, they require a bit of efficiency. And they are all related.
Input: For instance, let's say there is an image with a solid white background color.
Output: Let's say you wish to change that background color to green.
In theory ...
1) Generate an alpha mask with alpha = black (not solid) for areas of the background color and ...
2) alpha = white (solid) for areas not touching any area next to the background color and ...
3) an alpha scale for areas bordered by either of the above in proportion to how many or 8 maximum neighboring pixels (top, right, bottom, left, top right, top left, bottom right, bottom left ... but edge of image pixels do not have all of these) are of each type.
4) Then again, some of the neighboring pixels may be other bordering pixels.
The night is young. How else can I annoy the world before sunsrise?

Inquisitive minds want to know ! And if they don't -- well like that ever has stopped me before ..