luminance component of an image

5 visualizzazioni (ultimi 30 giorni)
az
az il 30 Nov 2018
Risposto: az il 30 Nov 2018
Hi, I have a frame of a vedio sequence I which is a 288*532 double. How can I extract only the luminance component? Thanks.

Risposta accettata

Mark Sherstan
Mark Sherstan il 30 Nov 2018
Run the following:
I = imread('test.png');
J = rgb2gray(I);
rgb2gray uses the same formual which is used to calculate luminance (to 3 decimal places the formula is):
0.299 * R + 0.587 * G + 0.114 * B
  4 Commenti
az
az il 30 Nov 2018
Thank you this is what I got. Please see the attachment.
Mark Sherstan
Mark Sherstan il 30 Nov 2018
please provide the original image, video, and any given functions.

Accedi per commentare.

Più risposte (3)

az
az il 30 Nov 2018
Hello Mark I trief to sent you the tennis_cif.yuv but the file is more than 30 K even in zipped condition. is there any way I can attach that big file? Thank you for your efforts.
  1 Commento
Image Analyst
Image Analyst il 30 Nov 2018
Modificato: Image Analyst il 30 Nov 2018
Just attach the one frame, not the entire video. One frame will certainly be small enough to attach!
And explain why using rgb2gray() on the RGB image did not work.

Accedi per commentare.


az
az il 30 Nov 2018
All I can say you need to have this file to the vedio file path to open that in mathlab. Thanks.

az
az il 30 Nov 2018
Hello Mark, this the 'I_1' the one frame of the vedio. Thank you.

Categorie

Scopri di più su Read, Write, and Modify Image in Help Center e File Exchange

Prodotti

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by