2 years ago

#37502

test-img

vashista

Find maximum intensity count from gray scale 16 bit tiff image

original imageI have a 16 bit tiff image. I would like to get following information from the image

  1. maximum intensity count.

  2. even though my bit size is 16 bit, why is my color bar restricted to 256 or 8 bits.

  3. histogram I have written a sample code to do the same and I do not know what are the numbers on x and y axis represent. Could you please help me with this

  4. import matplotlib.pyplot as plt

    import matplotlib.image as mpimg
    
    
    
     import numpy as np
    
    image = mpimg.imread('r1Ls01N000001.tif')
    
    plt.imshow(image,cmap='gray')
    
    plt.colorbar()
    
    plt.show()
    
    plt.hist(x=image.ravel())
    
    plt.show()
    
    imax=np.max(image)
    
    print(imax)
    

Result Imax value will be displayed as 264, is the 264 intensity count or bit number? Resulting image from my code

python

matplotlib

histogram

tiff

16-bit

0 Answers

Your Answer

Accepted video resources