- c - 在位数组中找到第一个零
- linux - Unix 显示有关匹配两种模式之一的文件的信息
- 正则表达式替换多个文件
- linux - 隐藏来自 xtrace 的命令
我正在尝试使用 Media Flow Tracker 根据区域跟踪我的手,但边界框在一段时间后不断增加。它在前 10 秒左右正常工作。
这是一个代码片段:
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()
最佳答案
我将从以下行中删除对 dilate
的调用:
filtered = depth.stretch(0, 180).binarize().dilate(1)
来自 SimpleCV documentation :
dilate(iterations=1) Apply a morphological dilation. An dilation has the effect of smoothing blobs while intensifying the amount of noise blobs. This implementation uses the default openCV 3X3 square kernel Erosion is effectively a local maxima detector, the kernel moves over the image and takes the maxima value inside the kernel.
filtered
变量在每次使用 filtered.findBlobs()
进行循环迭代时使用。这些 Blob 的强度和密度用于确定边界框的尺寸。
您正在调用 stretch
函数和 dilate。随着时间的推移,对 dilate
的调用导致噪声被检测为手的一部分,因此边界框相应增加。
关于python - 尽管初始大小固定,但跟踪对象的 BoundingBox/ROI 的大小不断增加,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30961640/
我只是问自己,这些 bbox 值是通过以下方式打印出来的: gs -dSAFER -dNOPAUSE -dBATCH -sDEVICE=bbox myfile.pdf %%BoundingBox: 4
我想测试两个 BoundingBox 是否相交。我有一个列表: List Mapa_BB = new List(); 然后我将边界框添加到这个列表中,效果很好——我通过将它更改为一个字符串然后绘制它来
我有一个模型矩阵,用于跟踪网格在我的世界中的位置。每次调用 glRotate() 和 glTranslate() 我都会相应地调用 modelMatrix.rotate() 和 modelMatrix
作为引用,这源于 Vision API 中的一个问题。我正在努力使用 Vision 通过 VNDetectFaceRectanglesRequest 检测图像中的人脸,它在确定图像中正确的人脸数量和提
我正在为我的 DirectX 11/12 管道中的任何 3D 模型实现一个 ModelClass。 我的具体问题在于计算我希望用作 ModelClass 成员的 BoundingBox 结构的最小值和
我正在使用iOS Vision框架通过VNRecognizeTextRequest调用执行OCR,并且试图在结果VNRecognizedText观察结果中定位每个单独的字符。但是,当我在任何bound
我正在尝试在边界框内创建随机纬度/经度。下面的代码创建纬度/经度并将它们绘制在 map 上......虽然它们位于正确的国家/地区,但它们不在正确的“框”中 我的边界框是这样的: top_left =
在我的场景中,我有一个简单的立方体: var test = new THREE.Mesh(new THREE.CubeGeometry(10,10,10), new THREE.MeshBasicMa
我正在使用 Google 提供的 Android Map Utils(compile 'com.google.maps.android:android-maps-utils:0.4')在我的 map
我在使用 Core ML & Vision 在已识别对象周围显示边界框时遇到问题。 水平检测似乎工作正常,但是,垂直框太高,越过视频的顶部边缘,没有一直到达视频的底部,也没有跟随视频的运动相机正确。在
我希望将我的 map 以我的 geojsonLayer 为中心。到目前为止我有: GeoJsonLayer layer = new GeoJsonLayer(mymap,geojson); layer
http://download.redis.io/redis-stable/deps/geohash-int/geohash_helper.c从上面的网址,我们知道有两个概念,一个是geohashBo
我正在集成一个用早期 Swift 编写的库。由于该库与 Swift 4 的兼容版本不可用,我正在自己删除错误。 有这一行: let pathBounds = CGPathGetBoundingBox(
我需要在应用旋转后找出几何体的边界框。 要旋转的代码 - 取自 Three JS 的示例编辑器 object.rotation.x = xRadians; object.rotation.y = yR
我正在尝试使用 Media Flow Tracker 根据区域跟踪我的手,但边界框在一段时间后不断增加。它在前 10 秒左右正常工作。 这是一个代码片段: def main(): display =
我正在尝试使用 Rahpael 库在 javascript 中创建一些带有文本的按钮。我想知道样式文本的大小,然后再绘制以避免这种情况,以便我可以创建适当的背景(按钮)。另外我想避免在 Canvas
我正在编写一个游戏来查找 2 个图像之间的差异。我创建了 CCSprite 的子类 Spot。首先我尝试创建小图像并根据其位置添加自身,但后来我发现位置很难确定,因为很难避免 1 或 2 个像素的偏移
我想了解有关自定义手势识别器的更多信息,所以我正在阅读 Ray Wenderlich 教程,我计划对其进行修改以了解详细信息以及我可以轻松更改的内容以了解每个部分的工作原理,但它是在以前版本的 Swi
这个问题在这里已经有了答案: Is there a fully featured OBB class for Ogre3D? (1 个回答) 关闭 9 年前。 是否有任何 Ogre 函数可以获取 S
尝试在 SCNNode 中设置 boundingBox 检测时,使函数起作用时出现问题。我希望能够调用 boundingBox 函数来检测 SCNNode 内的对象并在点击按钮时隐藏/显示这些对象,下
我是一名优秀的程序员,十分优秀!