[英]How would I implement a particle filter for vision tracking?
所以我只是在人工智能上做了sebsastian thrun的課程。 在那里,他提到了如何構建一個粒子濾波器,用於跟蹤基於航向θ和前進運動的移動xy機器人。
代碼在這里: https : //gist.github.com/soulslicer/b4765ee8e01958374d3b
在他的實施中,他做了以下事情:
1. Get Range from Sensor of all bearings after moving R=1, Theta=0.5
2. Move all the particles by R=1, Theta=0.5
3. Compute the weights of all particles ranges against the measured range from sensor
4. Resample and draw new particles
這適用於運動模型很棒。 這怎么能用於計算機視覺跟蹤? 例如,我想跟蹤黃色圓形斑點。 我將如何“移動”粒子? 我的成本函數可能是什么? 特別是移動部分,我不知道我是如何為計算機視覺跟蹤做這一步的
這是我認為它可能有用的方式,但我可能錯了:
1. Get features from image, and compute the optical flow velocities of each feature
2. Place alot of particles in the scene with varying x,y,xvel,yvel
3. For the computation of weights, we can compare the each particle's velocity and position against all features
If we can threshold out the object based on color/shape, can match image features to shapes and put that in the cost function
4. Resample and draw new particles
要使用粒子過濾,您需要:
明確定義空間也很有幫助
現在,根據您問題中的描述,我假設目標是根據計算出的最佳流量特征跟蹤黃色斑點的位置。 然后我會建模
def move(self, turn, forward):
僅使用+ random.gauss(0.0, self.turn_noise)
或+ random.gauss(0.0, self.forward_noise)
部分def move(self, turn, forward):
我看到的問題是定義觀察模型,斑點位置和最佳流量輸出之間的似然函數不是微不足道/直觀的,例如,黃色斑點是否可能位於高光流輸出區域的中心? 如果是這樣我怎么能表達這種關系作為似然函數? 出於這個原因,我會研究使用不同的觀察結果,例如,使用嘈雜的黃色斑點探測器的輸出。
我的答案是基於http://www.probabilistic-robotics.org/上的particle-filters.ppt文件第16頁。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.