How to open .raw files in Matlab
12 次查看(过去 30 天)
显示 更早的评论
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
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
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
2016-12-1
@Joaquim: How do you apply flipud on a 3D-array? Please post you code instead of describing it.
Walter Roberson
2016-12-1
R2014a redefines flipud, fliplr, rot90 to be able to handle arrays with multiple dimensions.
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Convert Image Type 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!