Ask Your Question
0

How can apply this fuzzy histogram hyperbolazation to OPENCV

asked 2018-06-11 15:45:01 -0600

pipeecs780 gravatar image

updated 2018-06-12 15:17:04 -0600

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...

![FHHimage description

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 flag offensive close merge delete

Comments

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.

Tetragramm gravatar imageTetragramm ( 2018-06-11 23:01:13 -0600 )edit

1 answer

Sort by » oldest newest most voted
1

answered 2018-06-13 04:14:35 -0600

berak gravatar image

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

image description image description

edit flag offensive delete link more

Comments

ah, sorry, missed the python tag

berak gravatar imageberak ( 2018-06-13 04:16:07 -0600 )edit

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

pipeecs780 gravatar imagepipeecs780 ( 2018-07-23 15:15:59 -0600 )edit

Question Tools

1 follower

Stats

Asked: 2018-06-11 15:45:01 -0600

Seen: 333 times

Last updated: Jun 13 '18