ive got a problem that i cant solve. Im trying to make a temporal median filter using the method sort(), but i simply cant do it. This is the simpliest test i tried:
import cv2
def sortExample():
img = cv2.imread("guitar.jpg")
cv2.sort(img, cv2.SORT_ASCENDING)
sortExample()
And the error:
cv2.sort(img, cv2.SORT_ASCENDING) cv2.error: ......\src\opencv\modules\core\src\matrix.cpp:2367: error: (-215) src.dims <= 2 && src.channels() == 1 && func != 0
What am i doing wrong? Thanks in advance