Code covered by the BSD License  

Highlights from
RGB to Black and White

3.0

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

RGB to Black and White

by Anthony Gabrielson

 

22 Nov 2005 (Updated 07 Aug 2008)

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  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Comments and Ratings (3)
08 Nov 2007 Matt -

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

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.

05 Jun 2009 umer fareed

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

Please login to add a comment or rating.
Updates
05 Dec 2005

Cleaned up the code a bit.

07 Aug 2008

Added a function to convert from greyscale to black & white; its optional.

Tag Activity for this File
Tag Applied By Date/Time
filtering Anthony Gabrielson 22 Oct 2008 08:07:14
mex Anthony Gabrielson 22 Oct 2008 08:07:14
rgb Anthony Gabrielson 22 Oct 2008 08:07:14
image processing Anthony Gabrielson 22 Oct 2008 08:07:14
bw Anthony Gabrielson 22 Oct 2008 08:07:14
bw david 16 Mar 2011 15:46:01
bw lhgoh 18 May 2011 08:47:06

Contact us at files@mathworks.com