nitu
nitu

Reputation: 1

How to implement local thesholding in opencv

I want to binarize an image using some local thresholding technique. I have successfully applied otsu technique but unable to implement any local technique(niblack or sauvola). Acc. to me the steps could be: 1.first of all we need to select the window size. 2. calculate the threshold value for the window. 3. then binarize that window. 4. repeat these steps for whole image.

if these steps are correct then how to implement it in visual c++ AND OPENCV? (I mean how to apply different loops etc) OR I M WRONG SOMEWHERE? I am beginner in this area.

Upvotes: 0

Views: 2384

Answers (1)

sixela
sixela

Reputation: 106

Niblack and Sauvola are already implemented into the extended modules of opencv: opencv_contrib. Download it and install it like this, and check the module ximgproc. It contains a method called niBlackThreshold.

Upvotes: 1

Related Questions