f



Binary image for HSV image

dear all,

i'm trying to convert a colourful image into different binary images
for each of its colour.

how can i read a HSV image and determine how many level of hue exist
in that image?
then display it according to its binary images for each hue level.

thanks of your help
0
dericlaw2 (6)
3/7/2006 3:44:43 AM
comp.soft-sys.matlab 211264 articles. 26 followers. lunamoonmoon (257) is leader. Post Follow

1 Replies
1362 Views

Similar Articles

[PageSpeed] 5

Deric Law wrote:
>
>
> dear all,
>
> i'm trying to convert a colourful image into different binary
> images
> for each of its colour.
>
> how can i read a HSV image and determine how many level of hue
> exist
> in that image?
> then display it according to its binary images for each hue level.
>
> thanks of your help

Read in your image as a RGB image
Image_rgb = imread(MyImage.jpg);

Convert it to hsv
Image_hsv = rgb2hsv(Image_rgb);

Extract yout hue image

Image_hue = Image_hsv(:,:,1);

You can use imhist to extract the information regarding your occupied
hue levels

Getting the binary images of each hue level can be done using im2bw.

help imread

help rgb2hsv

help imhist

help im2bw

Hope that helps

Regards

Dave Robinson
0
dave.robinson (1276)
3/7/2006 10:17:23 AM
Reply: