Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

New to MATLAB?

convert to grayscale

Asked by James

James

on 14 Jul 2011
Latest activity Answered by Image Analyst

Image Analyst

on 27 May 2014

Hi

I want to put a video into Matlab and convert it into grayscale.

Please help!

0 Comments

James

James

2 Answers

Answer by Harsha Vardhan Rao Avunoori

Harsha Vardhan Rao Avunoori

on 14 Jul 2011
Edited by John Kelly

John Kelly

on 27 May 2014
Accepted answer

Hello James,

You can load a video into MATLAB using VideoReader().

doc VideoReader

You can apply rgb2gray() on each frame.

0 Comments

Harsha Vardhan Rao  Avunoori

Harsha Vardhan Rao Avunoori

Answer by Image Analyst

Image Analyst

on 27 May 2014

See attached demo. Put rgb2gray() in there to adapt it to do what you want.

0 Comments

Image Analyst

Image Analyst

Contact us