Complete the code to read an image file into MATLAB.
img = imread([1]);The imread function requires the filename as a string, so it must be enclosed in quotes.
Complete the code to convert the image to grayscale.
gray_img = [1](img);The function rgb2gray converts a color image to grayscale in MATLAB.
Fix the error in the code to display the image correctly.
imshow([1]);To display the processed grayscale image, use imshow(gray_img).
Fill both blanks to create a binary image by thresholding the grayscale image.
binary_img = [1](gray_img, [2]);
The imbinarize function converts grayscale images to binary using a threshold like 0.5.
Fill all three blanks to apply a Gaussian blur filter to the image.
h = fspecial([1], [2]); blurred_img = imfilter([3], h);
The fspecial function creates a Gaussian filter with size 2, then imfilter applies it to the original image.
