Ask Your Question

Revision history [back]

If you want to extract a rectangular area from dist, the recommended way is

dist.operator()(Rect(i,j-2,5,1))

So, your statement in the loop should read

search_mask = dist.operator()(Rect(i, j - 2, 5, 1)).clone();