Like I converted my original input to HSV color space image & applied the INRANGE function and found the green & blue lines & now i want to get rid of them and I want the image to look like in output....how shall i now get rid of the lines & replace them by the background color??
Code Snippet:
import cv2 as cv
import numpy as np
img= cv.imread('C:\input.png',1)
hsv=cv.cvtColor(img,cv.COLOR_BGR2HSV)
lower_green = np.array([30,70,20])
upper_green = np.array([70,255,255])
lower_blue = np.array([95, 110, 20])
upper_blue = np.array([135, 255, 255])
mask = cv.inRange(hsv, lower_green , upper_blue)
res = cv.bitwise_and(img,img, mask= mask)
cv.imwrite("out2.jpg", res)