[CENTER]Color segmentation
Use the matlab peppers.png image and segment the peppers based on color.
Hint:Convert the RGB image to HSV then find reliable hue ranges for each
pepper type and mark those pincels -assign ones to them
im = imread('peppers.png')
im_hsv = rgb2hsv(im);
imshow(im)
(x,y)=ginput
h_ref=im_hsv(int 16(y),int 16(x),1);
im_seg1=zeros(size(im_hsv(:,:,1)));
ind=find(im_hsv(:,:,1)>h_ref-0.02 & im_hsv(:,:,1)<h_ref+0.02);
im_seg1(ind)=1;
imshow(im_seg1);
figure;
imshow(im);
هذا كان سؤال وفي الجواب اخطاء
أش هي الاخطاء ؟!
[/center]