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

I have header less flat binary files(they have no extension). I want to convert those into tiff. is it possible with MATLAB

 Respuesta aceptada

Image Analyst
Image Analyst el 15 de Sept. de 2014
Yes. Use fread(), then use imwrite().

3 comentarios

using fread it gives the column matrix.I want the image with same dimensions as input image.
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.
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.

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Creating and Concatenating Matrices en Centro de ayuda y File Exchange.

Etiquetas

Preguntada:

el 15 de Sept. de 2014

Comentada:

el 17 de Sept. de 2014

Community Treasure Hunt

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

Start Hunting!

Translated by