# How can apply this fuzzy histogram hyperbolazation to OPENCV

Hello, I found a paper that talks about image enhacement using CLAHE and fuzzy histogram hyperbolazation (FHH). Link: http://www.inase.org/library/2015/vie...

![FHH I've never applied an algorithm from the text of a paper to the code :( Anyone have an idea about how can appply this FHH using openCV with python?

Thanks

edit retag close merge delete

Well, start with equation 1. What is the goal, and how does the equation do that? Here's a hint: you're going from a Mat called g, to one called u, or mu. They're the same size, and you'll need to convert g to a CV_32F to start.

Sort by » oldest newest most voted

(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();  more

hahahaha don't worry. Thank you for responding :)

Official site

GitHub

Wiki

Documentation