help-octave
[Top][All Lists]
Advanced

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

Re: the number of bits of an image read with imread


From: Søren Hauberg
Subject: Re: the number of bits of an image read with imread
Date: Tue, 05 Dec 2006 19:03:14 +0100
User-agent: Thunderbird 1.5.0.8 (X11/20061115)

I'd use the class function:
  is8bits  = strcmp(class(im), "uint8");
  is16bits = strcmp(class(im), "uint16");

Søren

Eric Nowak skrev:
Hi all,
I am using octave to read 8bits and 16bits image with imread().
I need to convert the image to floats in [0,1], e.g. dividing the image values by 2^bitnb.
The pb is, I can't figure out what the bit nb is.

Of course, I can't look for the max value of an image to figure it out because:
- it is too slow
- a 16bits image may have values under 255

Any idea how to solve the problem?

Thanks,
Eric


------------------------------------------------------------------------

_______________________________________________
Help-octave mailing list
address@hidden
https://www.cae.wisc.edu/mailman/listinfo/help-octave


reply via email to

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