我是openCV的新手,这让我很困惑 . 我有一个图像,我容忍找到一定的颜色(在这种情况下是绿色) . 然后我将它传递给canny然后找到了 . 这一切都有效,除了轮廓的数量总是我想象的两倍 . 例如,如果在我的阈值图像中,我看到3个斑点,我将获得6个轮廓,4个斑点将是8个轮廓 . 为什么?

这是我的阈值图像:
Thresholded image

这是我的原始图像,每个轮廓绘制一个边界矩形和中心点
bounded contours

它的表现如预期,除了为什么总是2倍的轮廓数?

这是我的轮廓调用参考:

/// Detect edges using canny
  Canny( imgThresholded, canny_output, canny_min, canny_min*2 );
  /// Find contours
  findContours( canny_output, contours, hierarchy, CV_RETR_TREE, CV_CHAIN_APPROX_SIMPLE, Point(0, 0) );

更新:这是它找到的每个轮廓的中点和区域 . 它在每个轮廓上基本上加倍

1 - New finger centerpoint: 460.053 , 153.751 area : 1133
2 - New finger centerpoint: 460.108 , 153.739 area : 1101
3 - New finger centerpoint: 389.901 , 128.729 area : 1406.5
4 - New finger centerpoint: 389.899 , 128.776 area : 1367.5
5 - New finger centerpoint: 310.9 , 90.155 area : 1048.5
6 - New finger centerpoint: 310.872 , 90.1272 area : 1018.5
7 - New finger centerpoint: 224.2 , 84.9257 area : 1211
8 - New finger centerpoint: 224.156 , 84.9134 area : 1178

UPDATE2:

这是cannyoutput
cannyoutput