Spaces:
Running
on
Zero
Running
on
Zero
File size: 308 Bytes
59b2a81 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
import cv2
import numpy as np
import matplotlib.pyplot as plt
# Set the dimensions of the image
height = 256
width = 256
# Generate random pixel values
noise = np.random.rand(height, width, 3) * 255 # Scale to 255 for grayscale image
for idx in range (4):
cv2.imwrite("noise"+str(idx)+".png", noise) |