save from .jpg to .txt

조회 수: 4 (최근 30일)
Tulips
Tulips 2012년 7월 6일
댓글: Ravi Rahul Kumar Shah 2022년 5월 26일
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!

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

답변 (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 CenterFile Exchange에서 Workspace 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