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

Thread Subject:
Color to Grayscale image

Subject: Color to Grayscale image

From: Lee Hudson

Date: 28 Jul, 2006 16:39:59

Message: 1 of 2

Can anyone tell me if it is possible to convert a true color image
into a grayscale without using the Image Processing Toolbox?
Thanks,
Lee

Subject: Color to Grayscale image

From: Peter Boettcher

Date: 28 Jul, 2006 17:12:52

Message: 2 of 2

"Lee Hudson" <lee.hudson_2@philips.com> writes:

> Can anyone tell me if it is possible to convert a true color image
> into a grayscale without using the Image Processing Toolbox?

Simply, average the 3 colors together. mean(img, 3) might do just
fine. Or just take the green band for a rough approximation.

For more accuracy, look up the conversion to YUV space online, and
compute just the Y (luminance). I think that's a common definition of
grayscale...



--
Peter Boettcher <boettcher@ll.mit.edu>
MIT Lincoln Laboratory
MATLAB FAQ: http://www.mit.edu/~pwb/cssm/

Tags for this Thread

No tags are associated with this thread.

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Contact us