相当于CV_FILLED的Python OpenCv cv2 [英] Python OpenCv cv2 equivalent for CV_FILLED
本文介绍了相当于CV_FILLED的Python OpenCv cv2的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
这可以按预期工作:
cv2.rectangle(image, pt1, pt2, color, thickness=cv2.cv.CV_FILLED)
但是我无法在cv2
接口中找到等效常数.我知道这只是一些负值(文档),但我喜欢常量在代码中的可读性,并希望用纯cv2
编写等效函数.
But I have not been able to find the equivalent constant in the cv2
interface. I know this is simply some negative value (from the documentation), but I like the readability of the constant in the code and would like to write the equivalent function in pure cv2
.
推荐答案
目前没有等效方法.很有可能将其添加到下一个主要版本(2.5)中,并将其命名为cv2.FILLED
.
There is no equivalent at the moment. Most likely it will be added in next major release (2.5) and will be named cv2.FILLED
.
任何方式都可以安全地假设精确值(cv2.cv.CV_FILLED == -1
)不会更改.
Any way it is safe to assume that the exact value (cv2.cv.CV_FILLED == -1
) will not be changed.
这篇关于相当于CV_FILLED的Python OpenCv cv2的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文