필터 지우기
필터 지우기

How to open .raw files in Matlab

조회 수: 17 (최근 30일)
Joaquim
Joaquim 2016년 11월 30일
댓글: Swati Jain 2018년 5월 31일
Hi everybody, I have a 3D image stored in a .raw format, 32 bits floating point, uncompressed. The dimensions are 288x288x400. How can I open this image in Matlab?
Thanks in advance, Joaquim Costa
  댓글 수: 1
Swati Jain
Swati Jain 2018년 5월 31일
Hi, I am also trying to import an image in .raw format. My question is that, how did you know the dimensions and other details of your image?

댓글을 달려면 로그인하십시오.

채택된 답변

Jan
Jan 2016년 11월 30일
편집: Jan 2016년 12월 1일
fid = fopen(FileName, 'r);
if fid == -1
error('Cannot open file: %s', FileName);
end
data = fread(fid, 288*288*400, 'float32');
fclose(fid);
data = reshape(data, [288, 288, 400]);
  댓글 수: 5
Jan
Jan 2016년 12월 1일
@Joaquim: How do you apply flipud on a 3D-array? Please post you code instead of describing it.
Walter Roberson
Walter Roberson 2016년 12월 1일
R2014a redefines flipud, fliplr, rot90 to be able to handle arrays with multiple dimensions.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Matrices and Arrays에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by