How to convert a .tif file into a .mat file?

32 ビュー (過去 30 日間)
Anish
Anish 2011 年 12 月 1 日
回答済み: primrose khaleed 2014 年 5 月 20 日
I intend to get the haar wavelet coefficients of an user specified .tif image using the dwt2 command.However, dwt2 command requires that the variable depicting the image be loaded into the workspace.Now the load command can load variables only from a .mat file.Hence,I need to convert the user specified .tif file into a .mat file.Kindly help. Other solutions for the above problem will also be appreciated

採用された回答

Junaid
Junaid 2011 年 12 月 1 日
If it is so, then you simply convert that tiff into mat file like this..
let say tif file name is "Example.tiff";
A = imread('Example.tiff');
save('myTiff2mat','A');
Where 'myTiff2mat' is file name you want to be...
  1 件のコメント
Anish
Anish 2011 年 12 月 1 日
Thanks for the answer.
It proved really helpful

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

その他の回答 (3 件)

Wayne King
Wayne King 2011 年 12 月 1 日
You can use imread() to read a TIFF file.
  1 件のコメント
Anish
Anish 2011 年 12 月 1 日
Thanks for helping

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


MOHAMED
MOHAMED 2014 年 5 月 12 日
how to convert .mat file to .jpg ? any suggestion

primrose khaleed
primrose khaleed 2014 年 5 月 20 日
i want to create .mat files of multyply images..this files consist of testing and traning images then enter this files into neural network...how can do it ???how to creat input matrix and target matrix in .mat files?

カテゴリ

Help Center および File ExchangeDiscrete Multiresolution Analysis についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by