How to convert array of data to images
3 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Ambali Odebowale
el 8 de Oct. de 2022
Respondida: Image Analyst
el 8 de Oct. de 2022
I have a file containing 500 by 20000 data points. I want to convert the data to images. Here is the code I used but I am getting error
s = load('Absorptiondata8.mat');
yo = s.Absorptiondata8;
columns = max(yo);
row = length(yo);
outputImage = false(row);
for k = 1 : row
outputImage(yo(k)) = true;
end
imshow(outputImage);
0 comentarios
Respuesta aceptada
Image Analyst
el 8 de Oct. de 2022
This is just a set of 6 small numbers - not a complete image where every pixel has an intensity value.
data = readmatrix('ab.txt')
x = data(:, 1);
y = data(:, 2);
plot(x, y, 'b.-', 'LineWidth', 2, 'MarkerSize', 40)
grid on;
Exactly how would you like to make those 6 (x,y) coordinates into an image? Would you like to use poly2mask, or perhaps exportgraphics???
0 comentarios
Más respuestas (0)
Ver también
Categorías
Más información sobre Convert Image Type 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!