'How to create a blank image in Matlab [closed]

I need help with Matlab code to answer the question below:

In the spatial domain, apply Gaussian noise to a blank image (thereby creating a noise-only image). Show two image examples of medium and high levels of noise with an estimated variance (i.e. noise power) of 50 and 200.



Solution 1:[1]

If you want a 3-channel all-black RGB image:

myimage = zeros(h,w,3, 'uint8');

Replace h and w with your height and width, of course.

And you can use whatever datatype you like to work with.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 L. Scott Johnson