how to get adaptive contrast enhancement transformation of the gray image ?

can this be done without using adapthisteq()?
the local variation of the lesions obtained by
g=255((sigmoid(color)-sigmoid(graymin))/(sigmoid(graymax) - sigmoid(graymin)) where # * sigmoid(color) = 1/(1+exp((mean - colorimage)/variance) # * sigmoid(graymin) is the min sigmoid value of the grayimage # * sigmoid(graymax) is the max sigmoid value of the grayimage
how can i get colorimage subtracted from meanimage which is grayscale

 Accepted Answer

Sure, you can do almost whatever you want if you write it yourself. You can make a color image out of a grayscale image and then subtract:
grayImage3D = cat(3, grayImage, grayImage, grayImage);
% Cast to float to avoid clipping at 0.
newImage = double(rgbImage) - double(grayImage3D); % It's floating point now.

6 Comments

how can i obtain the maximum and minimum intensity value of greenchannel image and its value is in 1*700 size but it should be subtracted from meanimage of the greenchannel image with size 605*700 what should i do
minValue = min(grayImage(:));
maxValue = max(grayImage(:));
subtractedImage = grayImage - uint8(minValue);
fmax = 1./(1+exp((double(meanimage) - $)./(double(varianceimage)));
fmin = 1./(1+exp((double(meanimage) - $)./(double(varianceimage)));
were $ should be replaced by maximum and minimum value of greenchannel image(size of 1*700) respectively and mean and variance are greenchannel image with size (605*700)if i replace it as you given ??? Error using ==> minus Class of operand is not supported.
Error in ==> Untitled2 at 30
fmax = 1./(1+exp(((meanimage) - uint8(Gmax)))./(varianceimage));
what should i do , please correct it.
I have no idea what Gmax, varianceimage, or meanimage are, so I don't know how to correct it, other than meanimage must be a uint8, or else don't use int8 around Gmax.
Gmax is the maximum intensity value of greenchannel image(1*700) varianceimage &meanimage are greenchannel images (605*700)
??? Undefined function or method 'exp' for input arguments of type
'uint8'.
Error in ==> Untitled2 at 30
fmax = 1./(1+exp((uint8(meanimage)
-uint8(Gmax)))./uint8(varianceimage));
You gotta learn to read the error messages. It says it doesn't want uint8, so what do you think you should do now?

Sign in to comment.

More Answers (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!