how to mask an image?

sheno39 · Feb 19, 2022 · 1.9K views
Question
I = imread('E:\M.E 3rd semester\project\coding\flower.jpg'); I = rgb2gray(I); J=ones(3,3)/9; K = conv2(I,J,'same'); Warning: CONV2 on values of class UINT8 is obsolete. Use CONV2(DOUBLE(A),DOUBLE(B)) or CONV2(SINGLE(A),SINGLE(B)) instead.   Can anyone help to correct the error?
Expert Answer
Profile picture of Kshitij Singh
Kshitij Singh PhD Expert
Answered Sep 12, 2026
I = im2double(imread('..'));
I = rgb2gray(I);
J = ones(3)/9;
K = conv2(I,J,'same');

 

100% Run Guarantee 3-Hour Fast-Track Delivery

Need a Custom Version or Complete Simulation for This Problem?

Our 500+ PhD engineers build, debug, and optimize working MATLAB scripts and Simulink (.slx) models tailored to your exact assignment rubrics with zero plagiarism.

Tested on MATLAB R2024b / R2026a
Turnitin 0% Plagiarism Report
Free 7-Day Revisions Guarantee
Have a different question? Ask here

Get a Free Consultation or a Sample Assignment Review!