Saturated,binarize,color convert im

1 visualización (últimos 30 días)
Samira Hashemi
Samira Hashemi el 4 de Sept. de 2020
Respondida: Ameer Hamza el 5 de Sept. de 2020
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
<<
>>

Respuesta aceptada

Ameer Hamza
Ameer Hamza el 5 de Sept. de 2020
saturated = Binarize[ColorConvert[im, "Grayscale"], .9]
This is not correct MATLAB syntax. The equivalent MATLAB command is
saturated = imbinarize(rgb2gray(im), 0.9);

Más respuestas (0)

Community Treasure Hunt

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

Start Hunting!

Translated by