save from .jpg to .txt

2 vues (au cours des 30 derniers jours)
Tulips
Tulips le 6 Juil 2012
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 commentaires
Tulips
Tulips le 6 Juil 2012
sir, please answer this question I posted.thanks!

Connectez-vous pour commenter.

Réponses (1)

Walter Roberson
Walter Roberson le 7 Juil 2012
MyImage = imread('MyJPEG.jpg');
save( 'MyTextJPEG.txt', 'MyImage', -ascii );
  1 commentaire
Ravi Rahul Kumar Shah
Ravi Rahul Kumar Shah le 26 Mai 2022
it should be
MyImage = imread('MyJPEG.jpg');
save( 'MyTextJPEG.txt', 'MyImage', '-ascii' );

Connectez-vous pour commenter.

Catégories

En savoir plus sur Workspace Variables and MAT Files dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by