imwrite function

2 visualizaciones (últimos 30 días)
Sneha
Sneha el 3 de Abr. de 2012
I'm facing the problem that when I save my modified image by using imwrite function, the resultant image has different pixel values. How to save an image without affecting it's pixels?

Respuesta aceptada

Ashish Uthama
Ashish Uthama el 4 de Abr. de 2012
Your previous comment specified that the file format you are using is JPEG.
JPEG uses lossy compression, so you cannot expect the written values to be the same as the in-memory array.
Try writing to an uncompressed/lossless compression format like PNG or BMP.

Más respuestas (1)

Walter Roberson
Walter Roberson el 3 de Abr. de 2012
What datatype is your image, and what value range is the data you are saving, and what value range is the saved image when it is read back in? Also, which image format are you saving as?
  1 comentario
Sneha
Sneha el 4 de Abr. de 2012
im modifying a rgb image.It changes the pixel value of the part that i have modified.for eg..one of the modified pixels before imwrite has value[68,131,127],but after imwrite that same pixel has value[110 121 113].
im taking the image in JPEG format and also saving it in jpeg in imwrite.

Iniciar sesión para comentar.

Categorías

Más información sobre Read, Write, and Modify Image 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