我试图在我的窗口上放一个速度读数但是继续得到预期的unicode对象,找到浮点数。
我已经尝试将速度改为字符串并且没有运气。每个属性都可以在终端上打印,包括速度,但我无法在cv2.putText函数中使用它。
$scope.getByID = function(id) {
$http.get("/user/" + id).then(function(response){
console.log("get");
$scope.user = response.data;
});
}
$scope.getByID(10); // pass id
提前感谢!!
dY = pts[-10][1] - pts[i][1] - distance traveled in 10 counts
px_cm = diameter / obj_size
diff_count = 10.0
fps = 6.0
time = diff_count / fps
Ydistance = float(dY / px_cm)
if Ydistance >5:
velocity = (Ydistance / time)
velocity = str(velocity)
cv2.putText(frame, velocity, (10,500), font, 4,
(255,255,255), cv2.LINE_AA)
elif Ydistance ==0.0:
continue: