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
<<
>>

 採用された回答

Ameer Hamza
Ameer Hamza 2020 年 9 月 5 日

0 投票

saturated = Binarize[ColorConvert[im, "Grayscale"], .9]
This is not correct MATLAB syntax. The equivalent MATLAB command is
saturated = imbinarize(rgb2gray(im), 0.9);

その他の回答 (0 件)

カテゴリ

ヘルプ センター および File ExchangeProgramming についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by