How to save image with opened imfreehand line
7 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Hi I've been trying to save a grayscale image with opened imfreehand line (in my case I set the line up to red colour), but to no avail.
I'd like the saved image exactly as what was seen after drawing the line.
Any helps are much appreciated.
Many regards DE
0 comentarios
Respuesta aceptada
Image Analyst
el 4 de Feb. de 2013
I thought I already gave you the answer in http://www.mathworks.com/matlabcentral/answers/59898#comment_125529 This looks like the same question. Why wasn't this a follow up to that posting? Why is it a brand new question? It looks the same to me.
5 comentarios
Image Analyst
el 5 de Feb. de 2013
rgbImage = cat(3, grayImage, grayImage, grayImage);
for k = 1:length(x)
row = y(k);
column = x(k);
% Assign red, green, and blue values to this pixel.
rgbImage(row, column, 1) = 255;
rgbImage(row, column, 2) = 0;
rgbImage(row, column, 3) = 0;
end
imwrite(rgbImage, fullFileName);
Más respuestas (0)
Ver también
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!