How can i make .csv data set from .png images?
24 ビュー (過去 30 日間)
古いコメントを表示
I have 20 .png images, i want to convert them in .csv format.
6 件のコメント
Walter Roberson
2018 年 6 月 28 日
For csv to image file, sometimes you can just reshape() and imwrite(), but sometimes you have to do griddata() and imwrite() the result. It depends what the values in the data file represent and whether you have a grid of them or just scattered values.
回答 (1 件)
saddam hussain
2021 年 6 月 25 日
I have an images in jpg format how to make a csv file from this
1 件のコメント
Walter Roberson
2021 年 6 月 25 日
RGBImage = imread('fingerprint.jpg');
csvwrite(filename, reshape(RGBImage, size(RGBImage,1),[]));
This "unrolls" the M x N x 3 .jpg image into a csv that stores M rows and (N*3) columns.
You might prefer other arrangements for larger images: if you were to be using the data with Excel, you would risk exceeding the maximum number of columns of .xls and .xlsx files.
参考
カテゴリ
Help Center および File Exchange で Convert Image Type についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!