フィルターのクリア

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

7 ビュー (過去 30 日間)
Mac
Mac 2023 年 10 月 13 日
コメント済み: Mac 2023 年 10 月 13 日
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!

採用された回答

Walter Roberson
Walter Roberson 2023 年 10 月 13 日
編集済み: Walter Roberson 2023 年 10 月 13 日
T = table(x, count, 'VariableNames', {'Pixel Value', 'count'});
writetable(T, 'NameOfTheSpreadsheetGoesHere.xlsx');
  1 件のコメント
Mac
Mac 2023 年 10 月 13 日
Many thanks to you,
It works very well.

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeHistograms についてさらに検索

製品

Community Treasure Hunt

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

Start Hunting!

Translated by