View License

Download apps, toolboxes, and other File Exchange content using Add-On Explorer in MATLAB.

» Watch video

Highlights from
Universal Color to Gray Conversion

Join the 15-year community celebration.

Play games and win prizes!

» Learn more

4.5
4.5 | 2 ratings Rate this file 10 Downloads (last 30 days) File Size: 3.32 MB File ID: #27578 Version: 2.0
image thumbnail

Universal Color to Gray Conversion

by

 

11 May 2010 (Updated )

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.
4) 'dual', 'dual_transform': The Dual Transform [2].
[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
[2] R. Farrahi Moghaddam, et.al., "A maximal-information color to gray conversion method
for document images: Toward an optimal grayscale representation for document image
binarization," 2013, [arXiv preprint http://arxiv.org/abs/1306.6058 arXiv:1306.6058, June 2013].
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';

Acknowledgements

This file inspired Modified Haussdorf Fractal Dimension.

MATLAB release MATLAB 7.5 (R2007b)
MATLAB Search Path
/
/universal_color_to_gray_converter
Other requirements Matlab MCR 8.4 win64 (2014b) [Download from here: http://www.mathworks.com/supportfiles/downloads/R2014b/deployment_files/R2014b/installers/win64/MCR_R2014b_win64_installer.exe
Tags for This File   Please login to tag files.
Please login to add a comment or rating.
Comments and Ratings (5)
18 May 2016 sindhuja annareddy

sir how to get pixlabeler tool , where i can get it

Comment only
20 May 2015 Reza Farrahi Moghaddam

Thanks Dan for noticing the missing part. Dual and PCA methods are not stable yet. I will add them soon. For now, they have been disabled.

Comment only
19 May 2015 Dan

Dan (view profile)

my_convert_using_pca_to_dual and my_convert_using_pca
functions are missing.

Could the author provide them from completeness sake?

Comment only
27 Oct 2012 Hossein Ziaei Nafchi

Thank you Dr. Farrahi Moghaddam.

13 Feb 2012 ranjeetsinh

really good

Updates
11 May 2010 1.1

removed unnecessary file

18 May 2010 1.2

A description/acknowledgment on the sample image is added.

19 May 2015 1.3

Bug fixed.

20 May 2015 1.3

Error fixed.

27 May 2015 1.4

Auto Scaling of the final output.

29 May 2015 1.4

Auto scaling update.

01 Jun 2015 2.0

Dual Transform is linked.

Contact us