How to call integral() in python directly ?
I use integral() in the link, but I don't get the correct integral image.
My code is the following:
import cv2
snap = cv2.imread("image.png")
global sum
imageIntegral = cv2.integral( snap, sum ,-1 )
imshow("Integral Image",imageIntegral);
waitKey();
Error message:
Blockquote Traceback (most recent call last): File "C:/Users/MaiBenBen/Desktop/FASeg.py", line 6, in <module> imageIntegral = cv2.integral( snap, sum ,-1 ) TypeError: sum is not a numpy array, neither a scalar
I've been looking for a long time and still haven't found an example of python calling integral(). This link is more detailed but it has no effect.