擅长:python、mysql、java
<p>在使用findContours和converxhull中的等高线时,在获得opencv2.4.3之后,我遇到了同样的问题。由于我不想降级,将contours数组元素强制转换为int可以暂时解决问题。在</p>
<pre><code>contours, _ = cv2.findContours(noBg,cv2.RETR_LIST ,cv2.CHAIN_APPROX_SIMPLE,offset = (0,0))
hull_contour = cv2.convexHull(contours[0].astype('int'))
</code></pre>