官术网_书友最值得收藏!

Drawing circles

The signature for the cv2.circle() function is as follows:

img = circle(img, center, radius, color, thickness=1, lineType=8, shift=0)

This function draws a circle with a radius radius centered in the center position. Some circles are defined in the following code:

cv2.circle(image, (50, 50), 20, colors['green'], 3)
cv2.circle(image, (100, 100), 30, colors['blue'], -1)
cv2.circle(image, (200, 200), 40, colors['magenta'], 10)
cv2.circle(image, (300, 300), 40, colors['cyan'], -1)

After drawing these circles, we call the show_with_matplotlib(image, 'cv2.circle()')function. The result is shown in the next screenshot:

The full code of the examples of this section can be seen in basic_drawing.py.

主站蜘蛛池模板: 安远县| 元朗区| 光山县| 武冈市| 乌鲁木齐市| 开远市| 突泉县| 灌云县| 安达市| 红安县| 龙门县| 且末县| 承德县| 通道| 庆安县| 嘉定区| 龙南县| 龙游县| 宜都市| 竹溪县| 安义县| 宁安市| 扎兰屯市| 鹿泉市| 尼勒克县| 阜康市| 天峻县| 礼泉县| 襄汾县| 共和县| 安乡县| 宁国市| 平泉县| 鹤山市| 曲沃县| 汝州市| 平遥县| 甘孜县| 五常市| 赫章县| 休宁县|