Questions and Answers For Image Processing
Questions and Answers For Image Processing
subplot(1, 2, 1);
imshow(enhanced_img);
title('Enhanced Image');
subplot(1, 2, 2);
imhist(enhanced_img);
title('Histogram');
% Convert to grayscale
img_gray = rgb2gray(img);
% Apply Sobel filter
edge_img = edge(img_gray, 'Sobel');
subplot(1,3,2);
imshow(img_gray);
title('Grayscale Image');
subplot(1,3,3);
imshow(edge_img);
title('Edge-detected Image');
6. How can you import an image, apply a Gaussian filter to it, print the mean value and
standard deviation of the filtered imagein MATLAB?
% Define a filter
filter = fspecial('average', [5 5]);
% Performthresholding
binary_img = img>threshold_value;
20. How to plot boundary box on object present in the image using MATLAB?