9
增加我試圖根據使用介質流跟蹤,但邊框區域跟蹤我的手,保持一段時間後增加。它在前10秒左右正常工作。的BoundingBox/ROI的大小來追蹤對象保持在固定儘管初始大小
這裏有一個代碼片段:
def main():
display = SimpleCV.Display()
cam = Kinect()
ts = []
bb = None
img = cam.getDepth().flipHorizontal()
while display.isNotDone():
depth = cam.getDepth().flipHorizontal()
filtered = depth.stretch(0, 180).binarize().dilate(1)
if bb is None:
blobs = filtered.findBlobs()
if blobs:
hand = blobs.filter(abs(7000 - blobs.area()) < 500)
print hand
if hand:
bb = hand[0].boundingBox()
print bb
if bb is not None:
ts = filtered.track("mftrack", ts, img, bb)
if ts:
ts.drawBB()
ts.showPixelVelocityRT()
ts.drawPath()
filtered.show()
我會試一試,讓你知道。 –
我看到一些改進,但仍然是同樣的問題。 –
盒子最終會達到最大尺寸還是會無限增長? – ross