How to save a segmented part of a image to a variable

1 visualización (últimos 30 días)
Vaishnavi Sivakumar
Vaishnavi Sivakumar el 25 de Feb. de 2014
Comentada: Image Analyst el 1 de En. de 2015
I have segmented a HSV image. All i want is to save the segmented part of the image to be saved in a variable
  2 comentarios
Jamil
Jamil el 1 de En. de 2015
SAME QUESTION 2 ME
I want to use the output to find the contour of the image. It shows correct out while i use 'sm[]' rather 'sm'
I used the code below ----------------
img = imread('o17.jpg');
gfrgb = imfilter(img, fspecial('gaussian', 3, 3), 'symmetric', 'conv');
cform = makecform('srgb2lab', 'whitepoint', whitepoint('d65'));
lab = applycform(gfrgb,cform);
l = double(lab(:,:,1)); lm = mean(mean(l));
a = double(lab(:,:,2)); am = mean(mean(a));
b = double(lab(:,:,3)); bm = mean(mean(b));
sm = (l-lm).^2 + (a-am).^2 + (b-bm).^2;
figure;imshow(sm,[]);
Image Analyst
Image Analyst el 1 de En. de 2015
First read this and then post your question in a new discussion thread and post your image and say what you want to measure. Basically you're computing the delta E image from the mean LAB color, but I don't know how this will let you find the "contour of the image" - whatever that is (please define it in your new question).

Iniciar sesión para comentar.

Respuestas (1)

Image Analyst
Image Analyst el 25 de Feb. de 2014
I don't know what it means. You say you have segmented it. So where is that segmented image stored if it's not in a variable? Is it just stored in thin air? Where the heck is it?

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by