Hyper Image intensity level
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
Hi,
How can I find The total number of possible intensity levels in 3D hyper image?
is it the total number of bands? or the sum of the wavelength values ? I'm not sure
I'm calculating the threshold Otsu for hyper image.
Many thanx,
0 comentarios
Respuesta aceptada
Iain
el 25 de Jun. de 2013
You need to know the bit depth of each "slice" of your hypercube. (We can't tell you this, but its normally 8 bit for a standard RGB image, but can be as high as 24 or as low as 4, for whatever it is that you're looking at.)
Once you know that:
total_number_of_colours = 2^depth_slice_1 * 2^depth_slice_2 * 2^depth_slice_3 ...
Intensity is a little bit different,
Basic_max_intensity = (2^depth_slice_1 - 1) + (2^depth_slice_2 - 1) + (2^depth_slice_3 - 1) ...
Optical_max = (2^depth_slice_1 - 1)*scale_1 + (2^depth_slice_2 - 1) *scale_2 + (2^depth_slice_3 - 1) * scale_3 ... % Where "scale" is a conversion from pixel values to an optical power or energy.
7 comentarios
Iain
el 25 de Jun. de 2013
Q1)-Aha so 65536 is the total number of possible intensity levels in 16 bit image?
65536 is the total number of possible values a 16 bit integer can take. Your image is stored in 16 bit integers. This does NOT mean that all 65536 are used by your image format and that there isn't something else to look at in your image format. - You need to check the documentation of the file format you have been given to know the possible intensity levels in your files.
Q2)-Do you know how to get the average of the intensities of all pixels in the hyper image?
average = mean(HyperImage(:));
Will take the average of every 16 bit element in HyperImage
Más respuestas (2)
Walter Roberson
el 25 de Jun. de 2013
Each portion of information will have a number of possible states. Multiply together the number of states per portion.
For example, if band #1 had 5 possible values, and band #2 had 32 possible values, then the total number of intensity levels would be (5 x 32) = 160.
When a particular portion is defined as being a certain number of bits, and all of the variations are allowed, then the number of states for that portion is 2 to the power of the number of bits. I could, for example, have defined band #2 as having 5 bits, 2^5 = 32
Ver también
Categorías
Más información sobre Get Started with Image Processing Toolbox en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!