Add algorithms/image_utils/image_utils.py
and move there randomGaussianImage
and showImageWithMatplotlib
This commit is contained in:
10
algorithms/image_utils/image_utils.py
Normal file
10
algorithms/image_utils/image_utils.py
Normal file
@@ -0,0 +1,10 @@
|
||||
from PIL import Image
|
||||
import numpy as np
|
||||
from matplotlib import pyplot as plt
|
||||
|
||||
def randomGaussianImage(scale, size):
|
||||
return np.random.normal(loc = 0, scale = scale, size = size)
|
||||
|
||||
def showImageWithMatplotlib(npArray):
|
||||
plt.imshow(npArray)
|
||||
plt.show()
|
Reference in New Issue
Block a user