def normalize(self, to=1.0):
"""
This function ...
:param to:
:return:
"""
# Calculate the sum of all the pixels
sum = np.nansum(self)
# Calculate the conversion factor
factor = to / sum
# Multiply the frame with the conversion factor
self.__imul__(factor)
# -----------------------------------------------------------------
评论列表
文章目录