Facing Syntax error while using this piece of code:
kernel_1 = np.ones((5, 5), np.uint8)
img_open = cv2.morphologyEx(img, op= cv2.MORPH_OPEN,kernel_1)
Error Message:
img_open = cv2.morphologyEx(img, op= cv2.MORPH_OPEN,kernel_1) ^ SyntaxError: positional argument follows keyword argument
in img_open = cv2.morphologyEx(img, op= cv2.MORPH_OPEN,kernel_1)
op= cv.MORPH_OPEN
is keyword argument and img
, kernel_1
is positional argument.
python not allow keyword argument before positional argument
try cv2.morphologyEx(img, cv2.MORPH_OPEN,kernel_1)