Code covered by the BSD License  

3.0

3.0 | 2 ratings Rate this file 8 Downloads (last 30 days) File Size: 81.9 KB File ID: #9107
image thumbnail

RGB to Black and White

by

 

22 Nov 2005 (Updated )

Converts RGB images to black and white images

| Watch this File

File Information
Description

This code converts an RGB image to a black and white image in C with MEX. I this together for a school project and I couldn't find any good examples of MEX with image processing. One note the code is currently hard coded to handle only UINT8, however it should be trivial to convert that data type. Enjoy.

MATLAB release MATLAB 7.1.0 (R14SP3)
Other requirements I built this under Windows with VC 2003 & R14SP3, but there is nothing platform or compiler specific about it.
Tags for This File   Please login to tag files.
Please login to add a comment or rating.
Comments and Ratings (3)
05 Jun 2009 umer fareed

How it works? I don't know much about how to run MEX file.

06 Aug 2008 Anthony Gabrielson

Your right it did just handle grayscale. I threw in a function so it can take the grayscale image and convert it to a black & white.

08 Nov 2007 Matt -

This isn't RGB to black and white, it's RGB to gray scale.

Updates
05 Dec 2005

Cleaned up the code a bit.

Contact us