how to write a headerless flat binary file into tiff using matlab

2 次查看(过去 30 天)
I have header less flat binary files(they have no extension). I want to convert those into tiff. is it possible with MATLAB

采纳的回答

Image Analyst
Image Analyst 2014-9-15
Yes. Use fread(), then use imwrite().
  3 个评论
David Young
David Young 2014-9-17
You can use reshape(). Since the binary input is headerless, the image dimensions are not stored there, so you have to input them some other way.
Image Analyst
Image Analyst 2014-9-17
fread() can give you a 2D matrix if the size is a 2D matrix. And no reshape is needed. For example:
oneSlice = fread(fileHandle, [rows, columns], '*uint8');
Read the documentation on sizeA in fread() again.

请先登录,再进行评论。

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Image Processing Toolbox 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by