I am writing a small program in C++ using OpenCV-2.3 API. I have an issue processing an adaptive threshold using a non rectangular mask.

So far, I was performing the adaptive threshold on the whole image and masking afterwards. I realise that,in my case , this was a mistake since the masked pixels would be used to calculate the threshold of my pixels of interest (while I simply want to exclude the former from the analysis)... However, unlike functions such as cv:: norm, cv::adaptiveThreshold does not seem to support explicitly a mask.

Do you know any obvious solution or workaround? Thank you very muck for your suggestions, Quentin

Edit
Report