I don't understand how imagesc function works (scales), but my images plotted using via that function look better than using imshow. Is there any way to save the scaled image in the workspace instead of displaying it? I tried to debug built-in imagesc.m, but found nothing that scales data. If anyone knows how it's done, please, let me know.
No products are associated with this question.
If M is your image, then
minM = min(M(:)); maxM = max(M(:)); scaledM = (M - minM) ./ (maxM - minM);
This will be in the range 0 to 1, so if you want to work with uint8 then uint8(scaledM .* 255)
Play games and win prizes!Learn more