|
@@ -1358,7 +1358,7 @@ class SpeedingViolation(object):
|
|
|
# 使用浅拷贝代替深拷贝
|
|
|
self._data = self._raw_data.copy()
|
|
|
# 预处理数据 - 转换速度单位
|
|
|
- self._data["v"] *= 3.6 # 转换为 km/h
|
|
|
+ # self._data["v"] *= 3.6 # 转换为 km/h
|
|
|
return self._data
|
|
|
|
|
|
def process_violations(self):
|
|
@@ -1674,7 +1674,8 @@ class WarningViolation(object):
|
|
|
lane_width = self.data["lane_width"]
|
|
|
|
|
|
# 计算阈值
|
|
|
- threshold = (lane_width - car_width) / 2
|
|
|
+ # threshold = (lane_width - car_width) / 2
|
|
|
+ threshold = (lane_width - car_width)
|
|
|
|
|
|
# 找到满足条件的行
|
|
|
self.data["is_violation"] = self.data["laneOffset"] > threshold
|