I have an image represented as a uint16 numpy array (orig_arr
) with a skewed distribution. I would like to create a new array (noise_arr
) of random values, but that matches the mean and standard deviation of orig_img
.
I believe this will require two main steps:
- Measure the mean and distribution of
orig_arr
- Create a new array of random values using the mean and distribution measured in step 1
I'm pretty much lost on how to do this, but here's a sample image and a bit of code to get you started:
Sample image: https://drive.google.com/open?id=1bevwW-NHshIVRqni5O62QB7bxcxnUier (looks blank but it's not)
orig_arr = cv2.imread('sample_img.tif', -1)
orig_mean = np.mean(orig_arr)
orig_sd = np.std(orig_arr)
print(orig_mean)
18.676384933578962
print(orig_sd)
41.67964688299941