How to write this equation in matlab??
Afficher commentaires plus anciens
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..
Réponse acceptée
Plus de réponses (1)
David Hill
le 12 Avr 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
1 commentaire
Rocky
le 12 Avr 2020
Catégories
En savoir plus sur Image Processing and Computer Vision dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!