title: To show a boundary around a specific color in a image using opencv in python
body: <p>Actually i am working on color detection in python using opencv and I want to show a boundary around red color 
  Here is my python code.</p>
  
  <pre><code>import cv2
  import numpy as np
  
  
  cap = cv2.VideoCapture(0)
  
  while(1):
  
    _, frame = cap.read()
    frame=np.fliplr(frame)
    hsv = cv2.cvtColor(frame, cv2.COLOR_BGR2HSV)
  
    lower_red = np.array([0,170,175])
    upper_red = np.array([20,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)
    cv2.imshow('Original',frame)
    cv2.imshow('Averaging',smoothed)
    _, puck = cv2.threshold(smoothed, 30, 255, cv2.THRESH_BINARY)
    cv2.imshow('Puck',puck)
    k = cv2.waitKey(5) &amp; 0xFF
    if k == 27:
      break
  
  cv2.destroyAllWindows()
  cap.release()
  </code></pre>
  
  <p>I am able to find the red color but i have some confusion to detect the position of the area where color is occurring.
  Thanks</p>