Save constructed images into ascii-file?

3 ビュー (過去 30 日間)
Lizan
Lizan 2012 年 11 月 9 日
Hi,
I was wondering if its possible to save a matrix (containing image intensity ... ) into a ascii-file 2D array?
I created the file using meshgrid and then used some calculation to get some pattern. I now want to save this into a ascii file?
I have saved the data into *.mat but these test images need to be read by another software. Hence why I want to save it as ascii. I believe the format of the *.mat is double?
What if the difference between an integer and a double?
Your help is very much appreciated.

回答 (2 件)

Walter Roberson
Walter Roberson 2012 年 11 月 9 日
save -ascii
Integer data types only represent whole numbers such as 1, 8, -17
Double precision can represent numbers that are much larger or smaller ranges and which can have fractions involved, such as 3.1415926, or 2.141*10^(-195)

Image Analyst
Image Analyst 2012 年 11 月 9 日
You could also use fprintf().
But what other kind of software doesn't understand standard image file formats like PNG, TIFF, BMP, JPG, etc.? You'd be better off saving in one of those standard formats with imwrite(). Why do you have to use that software instead of continuing your analysis in MATLAB?

カテゴリ

Help Center および File ExchangeImport, Export, and Conversion についてさらに検索

タグ

製品

Community Treasure Hunt

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

Start Hunting!

Translated by