我正在为 ICR 使用以下代码行
im2,contours,hier =cv2.findContours(thresh.copy(),cv2.RETR_TREE,cv2.CHAIN_APPROX_SIMPLE)
for cnt in contours:
if (cv2.contourArea(cnt)>50 and cv2.contourArea(cnt)<1000):
[x,y,w,h] = cv2.boundingRect(cnt)
这给出了轮廓内的轮廓。请建议我如何在 python 中删除它。