File Exchange

image thumbnail

Brightness Preserving Dynamic Fuzzy Histogram Equalization

version 1.8 (3.94 KB) by

BPDFHE employs fuzzy statistics of digital image to improve graylevel brightness preserved contrast

4.66667
5 Ratings

19 Downloads

Updated

View License

Brightness Preserving Dynamic Fuzzy Histogram Equalization(BPDFHE) proposes a novel modification of the brightness preserving dynamic histogram equalization technique to improve its brightness preserving and contrast enhancement abilities while reducing its computational complexity. This technique, called uses fuzzy statistics of digital images for their representation and processing. Representation and processing of images in the fuzzy domain enables the technique to handle the inexactness of gray level values in a better way, resulting in improved performance. Besides, the imprecision in gray levels is handled well by fuzzy statistics, fuzzy histogram, when computed with appropriate fuzzy membership function, does not have random fluctuations or missing intensity levels and is essentially smooth. This helps in obtaining its meaningful partitioning required for brightness preserving equalization.
Details of the method are available in

D. Sheet, H. Garud, A. Suveer, J. Chatterjee and M. Mahadevappa, "Brightness Preserving Dynamic Fuzzy Histogram Equalization", IEEE Trans., Consumer Electronics, vol. 56, no. 4, pp. 2475 - 2480, Nov. 2010. [http://dx.doi.org/10.1109/TCE.2010.5681130]

Implementation of the technique for grayscale images is outright. The function operates on non-sparce images of type uint8, uint16, int16, double and single.

Using BPDFHE for Color images can be done accordingly

rgbInputImage = imread('peppers.png');
labInputImage = applycform(rgbInputImage,makecform('srgb2lab'));
Lbpdfhe = fcnBPDFHE(labInputImage(:,:,1));
labOutputImage = cat(3,Lbpdfhe,labInputImage(:,:,2),labInputImage(:,:,3));
rgbOutputImage = applycform(labOutputImage,makecform('lab2srgb'));

Details of the technique for implementing BPDFHE on color images is detailed in

Garud, H. Sheet, D. Suveer, A. Karri, P.K. Ray, A.K. Mahadevappa, M. Chatterjee, J., "Brightness preserving contrast enhancement in digital pathology", Proc. ICIIP 2011. [http://dx.doi.org/10.1109/ICIIP.2011.6108964]

Comments and Ratings (21)

nrj

nrj (view profile)

??? Undefined function or method
'Brightness' for input arguments of type
'char'.

i have this error please help...

Nikolay S.

Nikolay S. (view profile)

Works nicely, though minor enhancement achieved in my case :(

Debdoot Sheet

Debdoot Sheet (view profile)

@Shushruth: This function can directly deal with any grayscale intensity image of form uint8, uint16, int16, single, double. For color images you can just process the intensity plane as exemplified above. As for BW/Binary image, any contrast enhancement does not introduce any change since there are only 2 gray levels, and changing contrast would imply, making either the whole image black/white.

can u provide the same for black n white images???

Debdoot Sheet

Debdoot Sheet (view profile)

You need to do the spell check. The correction to the help file has been reflected and will be up soon. Call using 'triangular' and not 'traingular'.

ismaiel

I have the following proplem
>> OUTPUTIMAGE = fcnBPDFHE(I,'traingular',5);
??? Error using ==> fcnBPDFHE at 103
Unsupported membership type declaration

Why?

Debdoot Sheet

Debdoot Sheet (view profile)

@ismaiel. I believe your query is not related to this particular submission. I hope you do not mind dropping me a few lines on my email elaborating your requirement, and I would try to see on possibilities of helping you.

ismaiel

Hi,
I need to compute the diagonal error weight matrix (W), where W(i,i) measure the average local variance of pixels with gray level i.
Can u please help me regarding this.
i will be grateful.

Debdoot Sheet

Debdoot Sheet (view profile)

Using BPDFHE for Color images can be done accordingly

rgbInputImage = imread('peppers.png');
labInputImage = applycform(rgbInputImage,makecform('srgb2lab'));
Lbpdfhe = fcnBPDFHE(labInputImage(:,:,1));
labOutputImage = cat(3,Lbpdfhe,labInputImage(:,:,2),labInputImage(:,:,3));
rgbOutputImage = applycform(labOutputImage,makecform('lab2srgb'));

Details of the technique for implementing BPDFHE on color images is detailed in

Garud, H. Sheet, D. Suveer, A. Karri, P.K. Ray, A.K. Mahadevappa, M. Chatterjee, J., "Brightness preserving contrast enhancement in digital pathology", Proc. ICIIP 2011. [http://dx.doi.org/10.1109/ICIIP.2011.6108964]

ismaiel

i have this type of error in my matlab
??? Function FCNBPDFHE expected its first input, I, to be two-dimensional.

Error in ==> fcnBPDFHE at 81
iptcheckinput(inputImage,{'uint8','uint16','int16','single','double'}, {'nonsparse','2d'}, mfilename,'I',1);

what should i do? pls help me.
note:"""I atempt to enhance clour image"""

Debdoot Sheet

Debdoot Sheet (view profile)

The transformation map returned by the function has the following characteristics.

UINT8 image - 256 element array mapping 0-255 grayscale intensities

UINT16 image - 65536 element array mapping 0-65535 grayscale intensities

INT16 image - 65536 element array mapping -32768:32767 grayscale intensities

SINGLE/DOUBLE type image - 256 element array mapping grayscale intensities in range I_min:I_max, where I_min and I_max are the minimum and maximum intensity in the input image

Shashi

Shashi (view profile)

what to do i have to do to obtain the transformation map. would figure,plot(transformationMap) after line 181 in the code give me the actual transformation mapping function

Suresh Babu

sir i am using 256x256 cameraman image as test image

Debdoot Sheet

Debdoot Sheet (view profile)

@Suresh Babu: Can you provide me with attributes of the input image. Rows x Cols, DataType. Also, the custom parameters you are passing on. This is possibly an error internal to Matlab, yet I would try to look for some way out.

Suresh Babu

i have this type of error in my matlab10

??? Maximum recursion limit of 500 reached. Use set(0,'RecursionLimit',N)
to change the limit. Be aware that exceeding your available stack space can
crash MATLAB and/or your computer.

Error in ==> imformats>find_in_registry

what should i do? pls help me

Debdoot Sheet

Debdoot Sheet (view profile)

Data handling with images of classes uint16, int16 not restricted to gray values in [0,255] and of type in single and double not restricted to [0,1] is restored in Rev 1.0 of Ver 2.0 of this function updated on 14 Dec. 2011

sri phani

bmv

bmv (view profile)

Name Size Bytes Class Attributes

F 256x256 524288 double

[outputImage] = fcnBPDFHE(F);
Subscript indices must either be real positive integers or logicals.

Error in fcnBPDFHE (line 160)
outputImage = transformationMap(inputImage);

MATLAB Version 7.13.0.564 (R2011b)
max(F(:))=5.1497e+04
min(F(:))=2.7879e+03

Subhamoy

Good Work !

Subhamoy

Updates

1.8

Update to include this a toolbox

1.7

Spell check on a calling protocol in help section.

1.6

File usage license within code modified for non conflict with BSD license clause. Example of implementation with color images added to the help documentation section.

1.2

Data casting statements for output generation reduced with using cast(). Output image mapped to gray-value range in input images of type single and double.

1.1

Support error for images of type 'uint16', 'int16', 'single', and 'double' not explicitly mapped in the range [0,1] or [0,255] is resolved.

MATLAB Release
MATLAB 7.6 (R2008a)

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

» Watch video