Ask Your Question

racone's profile - activity

2018-12-14 04:46:15 -0600 commented answer AdaptiveThreshold with non-square block sizes

Thanks a lot for your help. I never heard of the Range feature before. However, it behaves different from my Python code

2018-12-13 05:59:15 -0600 marked best answer AdaptiveThreshold with non-square block sizes

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)
2018-12-13 05:59:15 -0600 received badge  Scholar (source)
2018-12-13 03:52:09 -0600 received badge  Student (source)
2018-12-13 03:51:33 -0600 asked a question AdaptiveThreshold with non-square block sizes

AdaptiveThreshold with non-square block sizes Is there an elegant way, in C++, to use the adaptiveThreshold with a non-s