How to write this equation in matlab??
Show older comments
Hello everyone.In the below equation can anyone suggest me how to write this eqn in matlab..
L_in (x,y)=0.299.I_in^R (x,y)+0.587I_in^G (x,y)+0.114I_in^B (x,y).
where I_in is input image.
Many thanks in advance..
Accepted Answer
More Answers (1)
David Hill
on 12 Apr 2020
If I is X-Y-3 matrix, then:
L=0.299*I(:,:,1)+0.587*I(:,:,2)+0.114*I(:,:,3);
You should look at:
L = rgb2gray(I);%converts with built in matlab function
Categories
Find more on Image Processing and Computer Vision in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!