python中的opencv

Posted hai5111

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了python中的opencv相关的知识,希望对你有一定的参考价值。

cv2.rectangle(img, pt1, pt2, color[, thickness[, lineType[, shift]]]) → None

img – Image.
pt1 – Vertex of the rectangle.
pt2 – Vertex of the rectangle opposite to pt1 .
color – Rectangle color or brightness (grayscale image).
thickness – Thickness of lines that make up the rectangle. Negative values, like CV_FILLED , mean that the function has to draw a filled rectangle.
lineType – Type of the line. See the line() description.
8 (or omitted) - 8-connected line.
4 - 4-connected line.
CV_AA - antialiased line.
shift – Number of fractional bits in the point coordinates.

pt1:(x1,y1)

pt2:(x2,y2)

技术图片

 

以上是关于python中的opencv的主要内容,如果未能解决你的问题,请参考以下文章

python安装与配置

python安装与配置

OpenCV Python:如何避免 py3 中的 cv2.imwrite() 内存“泄漏”?

Python基础语法入门

Python基础语法入门

如何使用 OpenCV python 获取对象的大小?