【发布时间】:2015-09-06 19:46:12
【问题描述】:
我正在尝试使用 Media Flow Tracker 根据区域跟踪我的手,但边界框在一段时间后不断增加。它在前 10 秒左右正常工作。
这是一个代码sn-p:
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()
【问题讨论】:
标签: python c++ opencv kinect simplecv