使用opencv检测python中的圆形黑色斑点

时间:2018-02-22 18:53:01

标签: python-2.7 opencv cv2

我想检测opencv2中的圆形黑色斑点

<ul>
<li class="one skrollable skrollable-between" data-bottom-top="transform:translateY(0px);" data-top-bottom="transform:translateY(-50px);></li>
<li class="two skrollable skrollable-between" data-bottom-top="transform:translateY(0px);" data-top-bottom="transform:translateY(-120px);"></li>
<li class="three skrollable skrollable-between" data-bottom-top="transform:translateY(0px);" data-top-bottom="transform:translateY(-70px);"></li>
</ul>

ul {display:flex; flex-direction:column;}
li.one {align-self: flex-end; flex-basis: 570px;}
li.two {align-self:flex-start; flex-basis:500;}
li.three {align-self:flex-end; flex-basis: 450px;}

我收到错误:

detector = cv2.SimpleBlobDetector(params)

keypoints = detector.detect(im)
  

TypeError:自我类型不正确(必须是&#39; Feature2D&#39;或者它   衍生物)

1 个答案:

答案 0 :(得分:0)

您可以改用它:

.multiline {
  white-space: pre-wrap;
}

<div class="multiline">
    A multiline text
    for demo purpose
</div>

从cv2版本2开始,这种情况发生了变化。