save from .jpg to .txt

3 visualizaciones (últimos 30 días)
Tulips
Tulips el 6 de Jul. de 2012
Comentada: Ravi Rahul Kumar Shah el 26 de Mayo de 2022
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 comentarios
Tulips
Tulips el 6 de Jul. de 2012
sir, please answer this question I posted.thanks!

Iniciar sesión para comentar.

Respuestas (1)

Walter Roberson
Walter Roberson el 7 de Jul. de 2012
MyImage = imread('MyJPEG.jpg');
save( 'MyTextJPEG.txt', 'MyImage', -ascii );
  1 comentario
Ravi Rahul Kumar Shah
Ravi Rahul Kumar Shah el 26 de Mayo de 2022
it should be
MyImage = imread('MyJPEG.jpg');
save( 'MyTextJPEG.txt', 'MyImage', '-ascii' );

Iniciar sesión para comentar.

Categorías

Más información sobre Low-Level File I/O en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by