Question: Use lightness method to convert the image to grayscale in MatLab. Lightness method is (Max(R,G,B)+(minR,G,B))/2. Need to solve without using max or min functions. I=imread('cars.jpg');
Use lightness method to convert the image to grayscale in MatLab. Lightness method is (Max(R,G,B)+(minR,G,B))/2. Need to solve without using max or min functions.

I=imread('cars.jpg'); R=I(:,:,1); G=I(:,:,2); B=I(:,:,3); gray imwrite(gray, 'gray.jpg') imshow(gray)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
