Trying to open .ras image.

5 ビュー (過去 30 日間)
Dimitris Chatzopoulos
Dimitris Chatzopoulos 2021 年 3 月 30 日
コメント済み: Shubham Khatri 2021 年 4 月 9 日
Hi everyone,
I am trying to open a .ras image for a school project and I can't. I've tried imfinfo(), imread(), fopen and fread but I can't really get something out of it. The hint that I have is this.
>> f=fopen('filename');
>> rawdata=fread(f);
>> plot(rawdata(1:2500));
>> plot(rawdata(1:2500)); title('Some raw info of the first 2500 bytes... ')
The info I get from the file is the following:
info =
struct with fields:
Filename: '*******************************'
FileModDate: '17-Mar-2021 21:37:00'
FileSize: 402741
Format: 'RAS'
FormatVersion: [ ]
Width: 640
Height: 480
BitDepth: 8
ColorType: 'indexed'
FormatSignature: 1.5041e+09
Length: 307200
Type: 1
MapType: 1
MapLength: 768
  1 件のコメント
Shubham Khatri
Shubham Khatri 2021 年 4 月 9 日
Can you share some more info with imread. What is the message when you use imread?

サインインしてコメントする。

回答 (1 件)

Shubham Khatri
Shubham Khatri 2021 年 4 月 9 日
Hello,
Generally, the inbuilt imread function is used to open .ras files as it supports the SUN Raster file format.
The exact supported .ras file formats are described in detail.
Hope it helps

カテゴリ

Help Center および File ExchangeImage Processing and Computer Vision についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by