imwrite() function for save images

how will use imwrite() function to save 10 images in different different folder at same or diffident directory

1 comentario

live to l e a r n  MATLAB
live to l e a r n MATLAB el 8 de Dic. de 2012
same directory different folder; now am just need to save an image into some folder in same directory which i was created already

Iniciar sesión para comentar.

Respuestas (1)

Azzi Abdelmalek
Azzi Abdelmalek el 8 de Dic. de 2012
Editada: Azzi Abdelmalek el 8 de Dic. de 2012
Im1=rand(100,100,3) % example of image
imwrite(Im1,'yourfolder/Image1.jpg')

4 comentarios

??? Error using ==> writejpg at 49 Data with 5 components not supported for JPEG files
Error in ==> writejpg at 49 error('MATLAB:writejpg:wrongNumberOfComponents', ...
while using i got this error meg (matlab2008b)
Error in ==> imwrite at 429
feval(fmt_s.write, data, map, filename, paramPairs{:});
Error in ==> Untitled at 6 imwrite(Im1,'fog/Image1.jpg');
Azzi Abdelmalek
Azzi Abdelmalek el 8 de Dic. de 2012
Post your code
Walter Roberson
Walter Roberson el 8 de Dic. de 2012
Azzi, your sample code uses 5 as the number of color panes. You need to use 3 for RGB images.
Azzi Abdelmalek
Azzi Abdelmalek el 8 de Dic. de 2012
Editada: Azzi Abdelmalek el 8 de Dic. de 2012
Yes walter, it's a typing error
Im1=rand(100,100,3) % example of image
imwrite(Im1,'yourfolder/Image1.jpg')

Iniciar sesión para comentar.

Categorías

Más información sobre Images en Centro de ayuda y File Exchange.

Etiquetas

Preguntada:

el 8 de Dic. de 2012

Community Treasure Hunt

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

Start Hunting!

Translated by