1

i am looking at developing an app for the iPhone that tracks a selected object, and monitors the size of a rectangle drawn around it.

I have seen the a demo that tracks a selected object - but was wondering if anyone can point me in the direction of examples where the size of an object (rectangle) is monitored?

Many thanks in advance,

Steve

4

1 回答 1

1

I hadn't realised how long ago it was that I asked this question. For anybody looking for an answer to this - I have done the following:

  1. Convert the current frame to a grey scale image.
  2. Use a Haar Cascade Classifier to identify vehicles in the current frame.
  3. Draw a rectangle around the vehicle, and have a look to see if we have seen this car before (based on similar position)
  4. 如果我们没有,当前汽车的大小和位置将被添加到可跟踪汽车列表中......
  5. 如果有,则将矩形的当前尺寸添加到对象数组中
  6. 矩形之间的大小差异计算为当前矩形高度的百分比 - 这应该是相当恒定和线性的。
  7. 对这个百分比应用“校准常数”——这应该给出车辆的相对速度。

如果有人想要更详细的解释,请告诉我...

于 2013-11-25T18:53:15.697 回答