Borrar filtros
Borrar filtros

how to separate each layer of concentric circular strip of different color?

1 visualización (últimos 30 días)
i have a code for concentric circular strip and i want to separate each layer so how to do? code is given below.
X = ones(256,1)*[-128:127]; Y = [-128:127]'*ones(1,256);
Z = X.^2 + Y.^2;
% mesh(Z);
image = zeros(256,256);
image(find(Z<= 60^2)) = 0.3;
image(find(Z<= 40^2)) = 0.5;
image(find(Z<= 20^2)) = 0.8;
imshow(image);

Respuesta aceptada

KSSV
KSSV el 9 de Mzo. de 2017
X = ones(256,1)*[-128:127];
Y = [-128:127]'*ones(1,256);
Z = X.^2 + Y.^2;
% mesh(Z);
image = zeros(256,256);
image(find(Z<= 60^2)) = 0.3;
image(find(Z<= 40^2)) = 0.5;
image(find(Z<= 20^2)) = 0.8;
subplot(221)
imshow(image);
%%pick between 0.3 and 0.5
Zi = image ;
Zi(image~=0.3) = 255;
subplot(222)
imshow(Zi)
Zi = image ;
Zi(image~=0.5) = 255 ;
subplot(223)
imshow(Zi)
Zi = image ;
Zi(image~=0.8) = 255 ;
subplot(224)
imshow(Zi)

Más respuestas (0)

Categorías

Más información sobre Image Processing Toolbox en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by