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 (view profile)

on 14 Jul 2011
Latest activity Answered by Image Analyst

Image Analyst (view profile)

on 27 May 2014

Hi

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

Please help!

0 Comments

James

James (view profile)

2 Answers

Answer by Harsha Vardhan Rao Avunoori on 14 Jul 2011
Edited by John Kelly

John Kelly (view profile)

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

Answer by Image Analyst

Image Analyst (view profile)

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 (view profile)

Contact us