[英]How to draw rectangle over contour in JavaCV?
I found contours in an image by using cvFindContours
. 我通过使用
cvFindContours
在图像中找到了轮廓。 Now I want to draw rectangle over them. 现在,我想在它们上方绘制矩形。 Am I right that I should use the
cvBoundingRect
method? 我应该使用
cvBoundingRect
方法吗? The first parameter of this function is a CvArr
object, but I found that the contours are CvSeq
objects. 该函数的第一个参数是
CvArr
对象,但我发现轮廓是CvSeq
对象。 How can I solve this problem? 我怎么解决这个问题?
Solved. 解决了。
You can cast CvSeq
to CvArr
您可以将
CvSeq
为CvArr
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.