opencv-python: is not a numpy array-Collection of common programming errors

I want to use the current array to be the output array of the blur operation made in the frame image and im getting this error:

TypeError:  is not a numpy array

I already checked and both are arrays of the same size and type, I dont understand why this is happening.

Part of the code:

previous = np.zeros((frameHeight,frameWidth,3),np.uint8) #blank image with 640x480 and 3 channels
difference = np.zeros((frameHeight,frameWidth,3),np.uint8)
current = np.zeros((frameHeight,frameWidth,3),np.uint8)

while True:
    # Capture a frame
    flag,frame = capture.read()
    cv2.flip(frame, flipCode=1)

    # Difference between frames
    cv2.blur(frame, current, (15,15))
  1. The arguments to cv2.blur, as described in the documentation, are the following:

    cv2.blur(src, ksize[, dst[, anchor[, borderType]]]) → dst
    

    So, I think you meant

    current= cv2.blur(frame, (15,15))
    

Originally posted 2013-11-06 03:16:11.