1

I need your help, I have an error with the following function:

blur = cv2.GaussianBlur(res, (15,15),0) ^ IndentationError: unindent does not match any outer indentation level

Can anybody help me? I have the opencv 3.0.0

my code is :

import cv2
import numpy as np


cap = cv2.VideoCapture(0)

while True :

    _,  frame = cap.read()
    hsv = cv2.cvtColor(frame, cv2.COLOR_BGR2HSV)


    # hsv hue sat value
    lower_red = np.array ([50,0,0])
    upper_red= np.array([100,255,255])

    mask = cv2.inRange(hsv, lower_red, upper_red)
    res= cv2.bitwise_and(frame, frame, mask= mask)

    kernel = np.ones((15,15), np.float32)/ 225
    smoothed = cv2.filter2D(res, -1, kernel)

    blur = cv2.GaussianBlur(res, (15,15),0)


    cv2.imshow('frame',frame )
    #cv2.imshow('mask', mask)
    cv2.imshow('res', res)
    cv2.imshow('smoothed', smoothed)
    cv2.imshow('gaussian', blur)

    k = cv2.waitKey(5) & 0xFF
    if k==27:
        break



    cap.release()
    cv2.destroyAllWindows()
user2974951
  • 67
  • 13
wolf
  • 33
  • 1
  • 5

0 Answers0