Intellipaat Back

Explore Courses Blog Tutorials Interview Questions
0 votes
in Python by (16.4k points)

I'm using python and OpenCV to get a picture from the webcam, and I need to realize how to draw a hover over my picture, simply a straightforward green hover with straightforward fill


import cv2

import numpy

import sys

if __name__ == '__main__':

    #get current frame from webcam

    cam = cv2.VideoCapture(0)

    img =

    #how draw a circle????

    cv2.imshow('WebCam', img)


1 Answer

0 votes
by (26.4k points)

Try the following code:, center, radius, color, thickness=1, lineType=8, shift=0) → None

Draws a circle.


img (CvArr) – Image where the circle is drawn

center (CvPoint) – Center of the circle

radius (int) – Radius of the circle

color (CvScalar) – Circle color

thickness (int) – Thickness of the circle outline if positive, otherwise this indicates that a filled circle is to be drawn

lineType (int) – Type of the circle boundary, see Line description

shift (int) – Number of fractional bits in the center coordinates and radius value\

Come and Join this python certification course to gain more knowledge

Related questions

Browse Categories