I am working in MATLAB and have created a function, which I will call in the command window. Here is the code:
function y=intensity(img)
tic
im = imread(img);
R = im(:,:,1);
G = im(:,:,2);
B = im(:,:,3);
r = im2double(R);
g = im2double(G);
b = im2double(B);
rgbsum = r + g + b;
intensity =...