1 | initial version |
(1) is just a minmax normalization
(2) is pow()
(3) is exp() (with a "funny" normalization term)
all in all, we get:
Mat im = imread("veins.png",0);
Ptr<CLAHE> cl = createCLAHE();
Mat draw, clout,g,final;
cl->apply(im,clout);
normalize(clout, g, 0, 1, NORM_MINMAX, CV_32F); // (1) , and we need float values further on
draw = g.clone(); // visualization
cv::pow(g,.4,g); // (2) with ẞ=0.4 (guessed)
hconcat(draw,g,draw); // visualization
cv::exp(-g,final); // (3)
hconcat(draw,final,draw); // visualization
float c = (255.0)/(exp(-1.) - 1.); // (3)
(final - 1.) *= c; // (3)
hconcat(draw,final,draw); // visualization
imshow("fuzzy",draw);
waitKey();