copilot icon indicating copy to clipboard operation
copilot copied to clipboard

error: OpenCV(4.8.0) :-1: error: (-5:Bad argument) in function 'circle' > Overload resolution failed: > - Can't parse 'center'. Sequence item with index 0 has a wrong type

Open akashrai2003 opened this issue 2 years ago • 1 comments

I'm getting this error when I'm trying to run the code in colab where the LANE_DETECTION is called: PERSPECTIVE TRANSFORMATION MATRIX COMPUTED

error Traceback (most recent call last) in <cell line: 11>() 9 video_reader.set(1,pers_frame) 10 ret, image = video_reader.read() ---> 11 ld = LANE_DETECTION( image,fps, 12 yellow_lower = np.uint8([ 20, 50, 110]), 13 yellow_upper = np.uint8([35, 255, 255]),

1 frames /content/lane_detection.py in calc_perspective(self, lane_start) 431 cv2.line(img, (int(x2), 0), (int(x2), self.UNWARPED_SIZE[1]), (0, 0, 255), 3) 432 --> 433 cv2.circle(img_orig,tuple(self.vanishing_point),10, color=RED, thickness=5) 434 cv2.circle(img_orig,tuple(orig_points),10, color=GRAY, thickness=4) 435 cv2.imwrite(self.temp_dir+"vanishing_point.jpg",img_orig)

error: OpenCV(4.8.0) :-1: error: (-5:Bad argument) in function 'circle'

Overload resolution failed:

  • Can't parse 'center'. Sequence item with index 0 has a wrong type
  • Can't parse 'center'. Sequence item with index 0 has a wrong type

Where I think the error is due to it not recognizing the tuple(self.vanishing_point) and thus giving the error. Would like to know the fix to this

akashrai2003 avatar Oct 23 '23 06:10 akashrai2003

I have fixed this error from my end but there's another runtime error popping up. I have no clue why this project is halted.

sammyboi1801 avatar Oct 29 '23 15:10 sammyboi1801