How can i make .csv data set from .png images?

조회 수: 24 (최근 30일)
Md. Raihan Uddin
Md. Raihan Uddin 2018년 3월 9일
댓글: Walter Roberson 2021년 6월 25일
I have 20 .png images, i want to convert them in .csv format.
  댓글 수: 6
hazal once
hazal once 2018년 6월 28일
How can I make its reverse? CSV to Jpeg or png
Walter Roberson
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
saddam hussain 2021년 6월 25일
I have an images in jpg format how to make a csv file from this
  댓글 수: 1
Walter Roberson
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 CenterFile Exchange에서 Convert Image Type에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by