Azzera filtri
Azzera filtri

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

7 visualizzazioni (ultimi 30 giorni)
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!

Risposta accettata

Walter Roberson
Walter Roberson il 13 Ott 2023
Modificato: Walter Roberson il 13 Ott 2023
T = table(x, count, 'VariableNames', {'Pixel Value', 'count'});
writetable(T, 'NameOfTheSpreadsheetGoesHere.xlsx');

Più risposte (0)

Prodotti

Community Treasure Hunt

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

Start Hunting!

Translated by