I got it working:
cv2.boxFilter(imgcv1, 0, (7,7), imgcv1, (-1,-1), False, cv2.BORDER_DEFAULT)
I was giving the points as 7 instead of (7,7) and was giving depth as 1, instead of 0. Also Python takes False as Boolean and I was trying 0 in place of it. Aah, lots of mistakes. Hope it helps some other beginner like me someday.