help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Separating image band alters histogram


From: Terry Duell
Subject: Re: Separating image band alters histogram
Date: Sun, 30 Sep 2012 08:55:53 +1000
User-agent: Opera Mail/11.64 (Linux)

On Sun, 30 Sep 2012 00:51:22 +1000, Carnë Draug <address@hidden> wrote:


I don't understand the problem, it's the purpose of mat2gray to change
the histogram since it sets the minimum and max to the minimum and max
of the image. Unless the min and max of your image are 0 and 1, they
will be changed.

OK, that's the bit I didn't understand, and explains the result.

If you want to get each channel without modification, just pass the
channel, without any function.

imwrite (I1(:,:,1)), "sep-band/red.tif");

Does that works?

Yes, it gives the expected result.

Also, when you have an image of the uint8 class and wish to convert it
to class double, you should divide by 255 and not 256. Or use
im2double which already thinks about this things for you.

OK.

Thanks for your help.

Cheers,
--
Regards,
Terry Duell


reply via email to

[Prev in Thread] Current Thread [Next in Thread]