Skip to content

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

Description

@akashrai2003

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) 👎 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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions