Saturated,binarize,color convert im
2 views (last 30 days)
Show older comments
This is my code, but i have an Error unrecognized colorconvert
Clear all close all clc
im=imread('G:\khanom hashemi\saratani\1.jpg');
figure;imshow(im)
HSV = rgb2hsv(im);
[h,s,v] = imsplit(HSV);
V=im2bw(v,.65);
r=im2bw(s,.6);
w=and(r,V);
SE = strel('disk',3);
w1=imclose(r,SE);
BW2 = imfill(w1,'holes');
SE = strel('disk',77);
BW2 =imerode(BW2,SE);
figure;imshow(BW2)
r=im(:,:,1);
r(~BW2) = 0;
g=im(:,:,2);
g(~BW2) = 0;
b=im(:,:,3);
b(~BW2) = 0;
im = cat(3,r,g,b);
saturated = Binarize[ColorConvert[im, "Grayscale"], .9]
figure;imshow(im) [L,N] = superpixels(im,500); figure
<<
>>
0 Comments
Accepted Answer
Ameer Hamza
on 5 Sep 2020
saturated = Binarize[ColorConvert[im, "Grayscale"], .9]
This is not correct MATLAB syntax. The equivalent MATLAB command is
saturated = imbinarize(rgb2gray(im), 0.9);
0 Comments
More Answers (0)
See Also
Categories
Find more on Startup and Shutdown in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!