MATLABでRAW​画像を作成するには、​どうすればよいですか​?

12 visualizaciones (últimos 30 días)
MathWorks Support Team
MathWorks Support Team el 17 de Abr. de 2017
Respondida: MathWorks Support Team el 17 de Abr. de 2017
MATLABでRAW画像を作成するには、どうすればよいですか?
RAW画像のバイナリファイルを作成したいです。

Respuesta aceptada

MathWorks Support Team
MathWorks Support Team el 17 de Abr. de 2017
MATLABでRAW画像のバイナリファイルを作成するには、 fwrite関数を使用し、元となる画像フォーマットに合わせて'uint8'または'uint16'のオプションを追加します。
以下の例では、300x100サイズの全黒イメージのRAW画像ファイルを作成しています。
 
cmodel=(zeros(300,100,1));
fid=fopen('blackimage.raw','w+');
cnt=fwrite(fid,cmodel,'uint8');
fclose(fid);

Más respuestas (0)

Categorías

Más información sobre イメージ en Help Center y File Exchange.

Productos


Versión

R2006a

Community Treasure Hunt

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

Start Hunting!