Hyper Image intensity level

1 vue (au cours des 30 derniers jours)
Mona
Mona le 25 Juin 2013
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,

Réponse acceptée

Iain
Iain le 25 Juin 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 commentaires
Mona
Mona le 25 Juin 2013
Q1)-Aha so 65536 is the total number of possible intensity levels in 16 bit image?
Q2)-Do you know how to get the average of the intensities of all pixels in the hyper image?
does this code give me the average ?
the_avg = mean2(HyperImage);
Thank you very much :)
Iain
Iain le 25 Juin 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

Connectez-vous pour commenter.

Plus de réponses (2)

Mona
Mona le 25 Juin 2013
or is it just like 2D images? 256?
please help thanx

Walter Roberson
Walter Roberson le 25 Juin 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
  2 commentaires
Mona
Mona le 25 Juin 2013
how can I write this as a code? like how can I calculate the possible values of each band and multiply the values to find the intensity levels then save the number of the intensity levels in a variable ?
many many thanx,
Mona
Mona le 25 Juin 2013
I have a wavelength file that has the values of the wavelength for each band. is those are the possible values? for example: band 1: 363 band 2: 364 band 3: 364 band 4: 365 and so on
365 366 367 367

Connectez-vous pour commenter.

Catégories

En savoir plus sur Get Started with Image Processing Toolbox dans Help Center et File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by