问题标签 [particle-filter]
For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.
python - Gui for Particlefilter with Python
I'm trying to implement a particle filter and I chose python for it because I kinda like python. By now i have written my gui using tkinter and python 3.4.
I use the tkinter.canvas object to display a map (png image loaded with PIL) and then i create dots for each particle like:
dot = canvas.create_oval(x, y, x + 1, y + 1)
When the robot moves I calculate the new position of each particle with the control command of the robot, the particles position and the particles alignment. To move the particle tkinter.canvas has two methods:
canvas.move()
canvas.coords()
But both methods seem to update the gui immediately which is OK when there are about 100 particles but not if there are 200 - 5000 (what I actually should have in the beginning for the global localization). So my problem is the performance of the gui.
So my actual question is: Is there a way in tkinter to stop the canvas from updating the gui, then change the gui and then update the gui again? Or can you recommend me a module that is better than tkinter for my use-case?
matlab - 在matlab中使用粒子滤波器进行配准
我编写了以下代码作为在一篇名为“E. Arce-Santana, D. Campos-Delgado and A. Alba, Affine image registrationguided byparticle filter , IET Image Process. 6 (2012 ) 的文章中介绍的配准算法的实现。 )”。
问题一:当我运行代码时,无论我选择多少粒子或迭代,输出仍然不准确。不知道是什么问题?
问题 2:我评论了一个用于更新粒子权重的公式,我的问题是,我是否实现了等式写入或出现在它上面的那个(依赖于熵)是正确的,因此删除评论的那个并留下基于熵的方程?
代码如下:
c++ - HOG特征相似度测量?
我正在尝试为基于检测的跟踪实现粒子过滤器,目前正在尝试根据外观模型更新权重。在跟踪之前,我有一个基于 HOG+SVM 的检测器,这意味着目前,我对每个检测到的人都有 HOG 向量。对于新生成的粒子,我想根据 HOG 向量与检测器的 HOG 向量的相似性来设置权重。那么对可以测量HOG向量相似性的算法有什么建议吗?谢谢
c++ - 这个测试是重言式的吗?
鉴于一些
有什么区别
和if(true)
?有什么区别吗?我认为它们是等效的,但似乎并非如此?有人知道为什么吗?
好的,我是 cpp 的新手,我很抱歉这个问题。但我确实需要解决这个问题 double sigmaX = 0.1; 双 sigmaY = 0.1;
` 在 measure_prob 函数中,我发现 if(true) 或 if(x>=0 || x<0) 给出不同的结果。当 if(true) 它可以跟踪两个对象,但是当我使用 if(x>=0 || x<0) 时,它会快速收敛到一个对象。我真的很困惑……
python - 使用粒子过滤器回溯
我刚刚为室内跟踪实现了一个粒子过滤器。它看起来不错,但有时粒子会进入房间并被困在那里。
什么是回溯的聪明方法?我保存了粒子最后 10 次运动的状态。
谢谢
positioning - Range-based positioning/trilateration: Solving with a Kalman-Filter, smoothing with a particle filter (et vice versa)?
So, in this question I'd be grateful for hints and further information if I am correct or no.
To calculate the position upon range-measurments to fixed anchors (like GPS) you need to solve the trilateration problem, for example: non-linear least squares, geometrical algorithms or the particle filter, which also is able to solve the trilateration-problem as such.
Due to noise/errors the result might be a jagged line -> you can use the Kalman-Filter to smooth it. So far: Particle - calculation, Kalman - smoothing. Now:
Is it possible to use a Kalman-Filter NOT to smoothen an already existing result, BUT to solve the trilateration as such?
Regarding the particle filter: How to use the particle filter NOT to solve trilateration, BUT to smoothen an already existing result (e.g. calculated with NLLS)?
Best and thank you for any hints, papers, videos, solutions etc.!
python - 在python中绘制多元法线的快速方法
我正在使用顺序蒙特卡罗方法来估计某种金融模型。然而,这种方法在计算上确实很昂贵,瓶颈归结为从多元高斯分布中采样。假设我使用的样本(粒子)数量为 5000,问题的维度为 5。这意味着我将有 5000 个形状为 (5,) 的不同均值向量,5000 个形状为 (5,5) 的不同协方差数组),我需要从这 5000 对中抽取 5000 个样本。我该如何快速完成?到目前为止,我最快的解决方案是:
其中 np.einsum 是 numpy 中做爱因斯坦求和的函数,mean 和 covs 是上面提到的给定的 5000 对。
我认为在 for 循环中执行 cholesky 的步骤非常缓慢,但在这种情况下我找不到任何进行矢量化计算的方法。欢迎大家提出意见。
matlab - matlab中RGB组合的直方图
我有一个 RGB 图像(uint8 类型),我想执行以下过程:
- 将图像量化为 16 级(每层)
- 计算每个RGB 组合的直方图:首先我需要一个 16*16*16 矩阵来保存这些值 - 即,如果我们表示直方图矩阵
hist
,那么hist(2,9,3)
应该保存直方图中的像素数量,强度级别为 r=2,g= 9, b=3 etc. 下一阶段是将其重塑为 4096*1 向量(但这是最简单的部分)
现在我有以下实现:
此实现有效,但速度非常慢 - 我需要重复该过程 100 次(作为实现粒子过滤器的一部分),即使在尺寸为 ~80*40 的非常小的图像(实际上是图像部分)上执行它需要很长时间。我正在寻找一种更有效的方法来做到这一点。谢谢!