To solve my last question How to do histogram matching with normal distribution as reference? I want to create an image with normal distribution. For that for every pixel of the new image I want to choose a number from 0 to 255 randomly and with normal distribution. I've done this:
normal_image = np.random.normal(0, 1, size = (M,N))
But the dtype of this image is float64. So then I did this:
normal_image = np.random.normal(0, 1, size = (M,N)).astype('uint8')
But I'm not sure if this is a correct approach. Should I choose random numbers from the integers 0 to 255 based on normal distribution?(Which I don't know how to do this!)
Would you please guide me?