I am using HyperSpy software for image processing using python code below.
I am trying to plot the grayscale image shown below (SI[3]) but after filtering out unwanted pixels values (background noise). so the shells shown in the image have a pixel intensity of 24,400 and above, while the background hvae less than that.
I want to re-plot the image such that the scalebar is cropped from 0-24,400 (only the bright pixels remain in the image while the rest are set to 0).
Another thing is I plan count the number of these pixels with value of 24,400 and above. how can i count the number of pixels?
import hyperspy.api as hs
import numpy as np
#load the data
SI = hs.load("SI HAADF 0945 230 nm.emd")
#plot the image
SI[3].plot()
output:
