how to decide threshold value in opencv code example Example: imgproc.threshold threshold(src, dst, thresh, maxval, type)