Info

La pregunta está cerrada. Vuélvala a abrir para editarla o responderla.

How can I save multiple pictures via imwrite with the same scale?

1 visualización (últimos 30 días)
Jonas Dallmayr
Jonas Dallmayr el 15 de Nov. de 2019
Cerrada: MATLAB Answer Bot el 20 de Ag. de 2021
Right now imwrite "assumes that the dynamic range is [0,1] and automatically scales the data by 255" but I want every picture have the same scale to compare them.

Respuestas (1)

Walter Roberson
Walter Roberson el 15 de Nov. de 2019
If you have R2018a or later, you can use normalize() to rescale the data. Otherwise you can use mat2gray() to rescale data. Or just double() the data if it is not already double precision, and divide by the maximum value you want, and im2uint8() the result.

Etiquetas

Productos

Community Treasure Hunt

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

Start Hunting!

Translated by