初级会员

- 积分
- 115
- 金钱
- 115
- 注册时间
- 2018-1-16
- 在线时间
- 13 小时
|
1金钱
flowDataDx = tempCoefficient * (flowDataOutX - lastOutX); /*2帧之间位移变化量,单位m*/
flowDataDy = tempCoefficient * (flowDataOutY - lastOutY);
lastOutX = flowDataOutX; /*上一次实际输出像素*/
lastOutY = flowDataOutY;
flowDataVx = 100.f * (flowDataDx); /*速度 m/s*/
flowDataVy = 100.f * (flowDataDy);
state->velocity.x += (flowDataVx - state->velocity.x) * 0.08f; /*速度LPF*/
state->velocity.y += (flowDataVy - state->velocity.y) * 0.08f; /*速度LPF*/
state->position.x += flowDataDx; /*累积位移*/
state->position.y += flowDataDy; /*累积位移*/
在这里是怎么处理成速度,看不懂求指导??
|
最佳答案
查看完整内容[请看2#楼]
v = s/t 同理位移变化量除以单位时间,得到瞬时速度,s 是 flowDataDx,因为周期100Hz, 所以t = 1/100;
|