What should one use to get sigle value from the generated map in python np.mean or np.var?
CrHasher opened this issue · comments
Farkas Szilard Levente commented
I wonder which value would indicate better how sharp an image is from the generated map:
sharpness_map = lbpSharpness(img_gray, 21, 0.016)
sharpness = np.mean(sharpness_map)
# (or)
sharpness = np.var(sharpness_map)
Any suggestions?
cteckwee commented
Seems like np.mean(sharpness_map) is giving good indication of the image sharpness.
Farkas Szilard Levente commented
Seems like np.mean(sharpness_map) is giving good indication of the image sharpness.
After testing it a bit its what I ended up using.
Xin Yi commented
If you assume the ratio of the sharp region = the global sharpness of the image, the mean would be a good indicator.