Is there an elegant way, in C++, to use the adaptiveThreshold with a non-square block size? e.g. 5x1 or 3x15 In my case, I want the threshold to be calculated only in X and Y direction separately.
Using python, I can realize that by slicing the image into its rows and columns.
e.g. for row in range(0, img.shape[0]): imgThr[row:row+1, :] = cv2.adaptiveThreshold(img[row:row+1, :], 255, cv2.ADAPTIVE_THRESH_MEAN_C, cv2.THRESH_BINARY, 11, 0)