Reply by Vladimir Vassilevsky●June 16, 20112011-06-16
Dave wrote:
> If you look at computer graphics texts
Heh. Those texts are full of nonsense and pompous meaningless phrases
like "we apply a Hugh transform to the Zobel kernel processed...". In
fact they meant something very trivial. Image processing is no science
but a fairly primitive bit-byte manipulation. It has to be very fast;
therefore it has to be simple.
> and the representations of
> colour, you'll find there are 3 common systems (probably more). One is
> RGB, another is HSL (Hue, Saturation, Level). Hue represents the
> colour on the colour wheel, while the other values affect the shade
> and brightness.
Those representations have to do with the human perception and the human
convenience. Being tied to the human features when doing an image
analysis by a computer is a common mistake.
> I would suggest to looking colour conversions, ... or as you are more
> likely to find on the Internet "color conversions". A quick search for
> RGB and HSV or HSL gave the following:
> http://en.wikipedia.org/wiki/HSL_and_HSV
It doesn't matter what is the system of representation of the image. If
the image is made of 3 basic colors then the coloration is a 2d
parameter. If the OP stupident wants to do the image segmentation based
on coloration but not the luminance, then he should normalize every
pixel to the same brightness.
Vladimir Vassilevsky
DSP and Mixed Signal Design Consultant
http://www.abvolt.com
Reply by Dave●June 16, 20112011-06-16
On Jun 15, 6:06�am, Nadav <nadav...@gmail.com> wrote:
> Hi,
>
> I am trying to segment an image according to color, i am trying to
> achieve that using mean-shift segmentation.
> Segmentation should be according to color and position ( not
> intensity )
> The Algorithm in a nutshell
> 1.The image is split to regions
> 2.For each region the kernel of each of it�s associated pixels is
> calculated
> 3.The region centroid is moved to the position maximizing the kernel
> value
> 4.Neighboring regions are merged
> 5.Convergence == centroid/s are not changing ( thresholded )
>
> In order to properly calculate the kernel color is to be presented
> using a single dimension, that is, the 3D RGB color space need to be
> converted to a 1D color space such as the color spectrum color-wheel
> (http://en.wikipedia.org/wiki/File:Computer_color_spectrum.svg)
>
> A.Is it really required to convert 3D RGB to 1D in order to
> efficiently segment the image using mean-shift?
> B.How do I convert 3D RGB color to a 1D ~color-wheel~ variable ?
>
> Any help will B appreciated
>
> Nadav Rubinsteinhttp://www.sophin.com
If you look at computer graphics texts and the representations of
colour, you'll find there are 3 common systems (probably more). One is
RGB, another is HSL (Hue, Saturation, Level). Hue represents the
colour on the colour wheel, while the other values affect the shade
and brightness.
I would suggest to looking colour conversions, ... or as you are more
likely to find on the Internet "color conversions". A quick search for
RGB and HSV or HSL gave the following:
http://en.wikipedia.org/wiki/HSL_and_HSV
Cheers,
Dave
Reply by Vladimir Vassilevsky●June 15, 20112011-06-15
Nadav wrote:
> Hi,
>
> I am trying to segment an image according to color, i am trying to
> achieve that using mean-shift segmentation.
[...nonsense skipped...]
Think of each pixel as a vector in 3d space (R,G,B). Then the difference
in coloration between two pixels X, Y is the angle between the
corresponding vectors:
X * Y
acos ---------
|X| |Y|
Take it from there.
>
> Any help will B appreciated
It depends. How much is the appreciation ?
> Nadav Rubinstein
Wow. Nadav and Rubinstein at the same time?
Vladimir Vassilevsky
DSP and Mixed Signal Design Consultant
http://www.abvolt.com
Reply by Nadav●June 15, 20112011-06-15
Hi,
I am trying to segment an image according to color, i am trying to
achieve that using mean-shift segmentation.
Segmentation should be according to color and position ( not
intensity )
The Algorithm in a nutshell
1.The image is split to regions
2.For each region the kernel of each of it�s associated pixels is
calculated
3.The region centroid is moved to the position maximizing the kernel
value
4.Neighboring regions are merged
5.Convergence == centroid/s are not changing ( thresholded )
In order to properly calculate the kernel color is to be presented
using a single dimension, that is, the 3D RGB color space need to be
converted to a 1D color space such as the color spectrum color-wheel
( http://en.wikipedia.org/wiki/File:Computer_color_spectrum.svg )
A.Is it really required to convert 3D RGB to 1D in order to
efficiently segment the image using mean-shift?
B.How do I convert 3D RGB color to a 1D ~color-wheel~ variable ?
Any help will B appreciated
Nadav Rubinstein
http://www.sophin.com