in reply to the difference between two colors, and how to describe a color
Take the results of the two convolutions, square them and add them. If the result is greater than a user-determined threshold, set the pixel black, otherwise white.Vertical Kernel: -1 -2 -1 0 0 0 +1 +2 +1 Horizontal kernel: -1 0 +1 -2 0 +2 -1 0 +1
This works for 1-D, e.g., grayscale images. For color images, decide what you want to be the boundary: Brightness? Hue? Saturation? Then segnemt according to that property, Just taking the 3-D RGB vector distance isn't the greatest idea, because humans don't differentiate colors according to that metric. All other things being the same, I'd probably try the grayscale (brightness) metric first.
Update: I concur with blokhead that there are many edge detection algorithms, none unviersally applicable. The Sobel algorithm is fairly good on a wide range of images, so is worth a try.
-Mark
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: the difference between two colors, and how to describe a color
by tachyon (Chancellor) on Oct 28, 2004 at 05:08 UTC | |
by pg (Canon) on Oct 28, 2004 at 15:02 UTC | |
|
Re^2: the difference between two colors, and how to describe a color
by pg (Canon) on Oct 28, 2004 at 16:28 UTC |