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
댓글 수: 0
채택된 답변
Image Analyst
2014년 9월 15일
Yes. Use fread(), then use imwrite().
댓글 수: 3
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
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 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!