Code covered by the BSD License  

Highlights from
Universal Color to Gray Conversion

4.0

4.0 | 1 rating Rate this file 19 Downloads (last 30 days) File Size: 2.85 MB File ID: #27578
image thumbnail

Universal Color to Gray Conversion

by Reza Farrahi Moghaddam

 

11 May 2010 (Updated 18 May 2010)

This function provides some methods to convert a color image to a gray-value image.

| Watch this File

File Information
Description

The implemented methods are:
1) 'normal', 'standard': rgb2gray of Matlab; ITU-R Recommendation BT.601.
2) 'avg', 'average': the output is the average of all three channels.
3) 'minavg', 'min_avg', 'min_average', 'minimum_average': The minimum-average method introduced in [1] for document image processing. it has less color dependency.

[1] R. Farrahi Moghaddam and M. Cheriet, A multi-scale framework for adaptive binarization of degraded document images, Pattern Recognition, 43, pp. 2186--2198, 2010, DOI: 10.1016/j.patcog.2009.12.024

USAGE:
ugray0 = universal_color_to_gray_converter(u, method_flag, method_name);
where
      u is the input color image.
      method_flag is 'method'
      method_name is one of above mentioned methods.
      ugray0 is the output gray-level image.
OR
ugray0 = universal_color_to_gray_converter(u);
where
      u is the input color image.
      ugray0 is the output gray-level image; in this case, the method is 'min_avg';

MATLAB release MATLAB 7.5 (R2007b)
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Comments and Ratings (1)
13 Feb 2012 ranjeetsinh

really good

Please login to add a comment or rating.
Updates
11 May 2010

removed unnecessary file

18 May 2010

A description/acknowledgment on the sample image is added.

Tag Activity for this File
Tag Applied By Date/Time
color to gray conversion Reza Farrahi Moghaddam 11 May 2010 11:21:36
document image processing Reza Farrahi Moghaddam 11 May 2010 11:21:36
color to gray conversion Pranav 28 Jul 2011 01:56:37
color to gray conversion puya 23 Jan 2012 11:36:20

Contact us at files@mathworks.com