|
On May 19, 12:22=A0pm, "Volker Klink" <klinkv.NOS...@yahoo.de> wrote:
> Hi all!
>
> I guess this must be very simple but apparently it's too
> complicated for me (or it's too late to be still in the
> lab....).
> I would like to manipulate image data in the same way as
> "imshow" does, when u call it with [ ]. So I want the same
> appearance of the image regardless how i call imshow...
> The MatLAb help says:
>
> imshow(I,[low high]) displays the grayscale image I,
> specifying the display range for I in [low high]. The value
> low (and any value less than low) displays as black; the
> value high (and any value greater than high) displays as
> white. Values in between are displayed as intermediate
> shades of gray, using the default number of gray levels. If
> you use an empty matrix ([]) for [low high], imshow uses
> [min(I(:)) max(I(:))]; that is, the minimum value in I is
> displayed as black, and the maximum value is displayed as white.
>
> I tried to stretch the histogramm manually so the minimum
> value in would be zero and the maximum value =3D 255 (similar
> to imadjust(I)) does but that doesn't work.
> Anyone has ac lue?
> Thanks a lot!
> Volker
--------------------------------------------------------
Volker:
I don't understand. How could the image of a given, single array look
the same regardless of how you call imshow()? If you pass in
different [low high] values or different colormaps, it WILL look
different. It has to and that is what it is designed to do. The only
way to get the images to look the same, despite different arguments to
imshow(), is to pass it different images.
What doesn't work? You didn't give your code. Basically the output
image would be something like 255*(imageArray - minValue) / (maxValue-
MinValue). Is that what you did?
Regards,
ImageAnalyst
|