How to combine the integral image with the adaptive threshold? [closed]
Hi! The integral image is three-channel. I got it. After converting to a single channel, using adaptive thresholding to process the image ,the result is blank. How to solve it?
import cv2
import numpy as np
image = cv2.imread("image.png")
rows,cols,dims=image.shape
sum = np.zeros((rows,cols),np.int32)
imageIntegral = cv2.integral(image,sum)
##imageIntegral = imageIntegral.astype(np.uint8)
dst1 = np.zeros((rows,cols)).astype("uint8")
cv2.split(imageIntegral,dst1)
dst = cv2.adaptiveThreshold(dst1, 255, cv2.ADAPTIVE_THRESH_GAUSSIAN_C, cv2.THRESH_BINARY, 75, 10);
cv2.namedWindow('image')
cv2.imshow("image",image)
cv2.namedWindow('imageIntegral')
cv2.imshow("imageIntegral",imageIntegral)
cv2.namedWindow('dst')
cv2.imshow("dst",dst)
cv2.imwrite("1.jpg",dst)
waitKey(0)
splitting it into uchar channels does not make any sense (you're loosing all significant bits in the conversion)
have a look at the docs , again.
enter code here
I think this is a fast adaptive t
your question is about using integral images, please explain.