save from .jpg to .txt

1 回表示 (過去 30 日間)
Tulips
Tulips 2012 年 7 月 6 日
hi,can I know how to save .jpg file that contains pixels value to a .txt file. fyi, i'm not sure why my .txt file is empty after I save as .txt file and also use ascii syntax.thanks!
  2 件のコメント
Tulips
Tulips 2012 年 7 月 6 日
sir, please answer this question I posted.thanks!
Walter Roberson
Walter Roberson 2012 年 7 月 7 日

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

回答 (1 件)

Walter Roberson
Walter Roberson 2012 年 7 月 7 日
MyImage = imread('MyJPEG.jpg');
save( 'MyTextJPEG.txt', 'MyImage', -ascii );
  1 件のコメント
Ravi Rahul Kumar Shah
Ravi Rahul Kumar Shah 2022 年 5 月 26 日
it should be
MyImage = imread('MyJPEG.jpg');
save( 'MyTextJPEG.txt', 'MyImage', '-ascii' );

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

カテゴリ

Help Center および File ExchangeWorkspace Variables and MAT Files についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by