How do I create RAW image files in MATLAB?
18 ビュー (過去 30 日間)
古いコメントを表示
MathWorks Support Team
2009 年 6 月 27 日
編集済み: MathWorks Support Team
2017 年 4 月 17 日
I would like to use MATLAB in order to create binary RAW-files to store images.
The images I try to create using FWRITE do not open properly in Adobe Photoshop.
採用された回答
MathWorks Support Team
2017 年 4 月 17 日
In order to create RAW-files for images in MATLAB, use the FWRITE function with 'uint8' or 'uint16' as the precision specifier, as in the example below (which creates a black image (all zeros) of size 100x100
cmodel=(zeros(300,100,1));
fid=fopen('blackimage.raw','w+');
cnt=fwrite(fid,cmodel,'uint8');
fclose(fid);
0 件のコメント
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Image Processing Toolbox についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!