Borrar filtros
Borrar filtros

How to export data from an image histogram to an Excel file

7 visualizaciones (últimos 30 días)
Mac
Mac el 13 de Oct. de 2023
Comentada: Mac el 13 de Oct. de 2023
I calculate an image histogam using this code:
a=imread('mypic.jpg');
b=rgb2gray(a);
[count,x] = imhist(b);
Now, I'd like to export the values of 'count' and 'x' to 2 separate columns in an Excel speadsheet. Please help!
Thank in advance!

Respuesta aceptada

Walter Roberson
Walter Roberson el 13 de Oct. de 2023
Editada: Walter Roberson el 13 de Oct. de 2023
T = table(x, count, 'VariableNames', {'Pixel Value', 'count'});
writetable(T, 'NameOfTheSpreadsheetGoesHere.xlsx');

Más respuestas (0)

Categorías

Más información sobre Histograms en Help Center y File Exchange.

Productos

Community Treasure Hunt

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

Start Hunting!

Translated by