Borrar filtros
Borrar filtros

how to get gray color

40 visualizaciones (últimos 30 días)
kmla
kmla el 19 de Sept. de 2018
Respondida: Image Analyst el 19 de Sept. de 2018
hi, how to get a gray color, I use its value but it gives me black color
grayImg = insertShape(I,'line',[270 20 30 200],'LineWidth',10,'Color', [0.75 0.75 0.75] ); figure,imshow(grayImg);

Respuesta aceptada

Image Analyst
Image Analyst el 19 de Sept. de 2018
Try using gray levels instead of the 0-1 range. (It's inconsistent, I know)
grayImage = imread('cameraman.tif');
subplot(2, 2, 1);
imshow(grayImage);
title('Original Image', 'fontSize', fontSize);
drawnow;
grayImg = insertShape(grayImage, 'line', [270 20 30 200], ...
'LineWidth', 10, 'Color', [0.75 0.75 0.75]*255 );
subplot(2, 2, 2);
imshow(grayImg);
impixelinfo;

Más respuestas (0)

Categorías

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

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by