AttributeError: module 'cv2.cv2' has no attribute 'fillpoly' [closed]
Iam trying to do lane detection in opencv python I installed opencv using pip install opencv-python
and pip install opencv-contrib-python
I tried several ways but am getting this error please help me out code>>>>>>>>>>>
import cv2
import numpy as np
def canny(image):
gray = cv2.cvtColor(lane_image,cv2.COLOR_RGB2GRAY)
blur = cv2.GaussianBlur(gray,(5,5),0)
canny = cv2.Canny(blur,50,150)
return canny
def region_of_interest(image):
height = image.shape[0]
polygons = np.array([
[(200,height),(1100,height),(550,250)]
])
mask = np.zeros_like(image)
cv2.fillpoly(mask,polygons,255)
return mask
image = cv2.imread('test_image.jpg')
lane_image = np.copy(image)
canny = canny(lane_image)
cv2.imshow('result',region_of_interest(canny))
cv2.waitKey(0)
seriously ?
yes please help me
please NO SCREENSHOTS OF CODE here ;(
let's revert your edit
off topics : read this
@Raghavadocs