I have a 3D grayscale image, and I want to compute an adaptive threshold function. In other words, i want to convert gray to binary, using one of the algorithms described here. I prefer python. I tried to use cv2.adaptiveThreshold but it only works for 2D data. Continue reading...