|
@@ -10,7 +10,7 @@ data::BoxArray person_cross_line(const data::BoxArray& boxes, const cv::Point& l
|
|
|
{
|
|
|
cv::Point bottom_center((box.left + box.right) / 2, box.bottom);
|
|
|
// > 0 代表在线段的左侧
|
|
|
- if ((center.x - line_start.x) * (line_end.y - line_start.y) - (center.y - line_start.y) * (line_end.x - line_start.x) > 0)
|
|
|
+ if ((bottom_center.x - line_start.x) * (line_end.y - line_start.y) - (bottom_center.y - line_start.y) * (line_end.x - line_start.x) > 0)
|
|
|
{
|
|
|
if (person_side.find(box.class_id) == person_side.end())
|
|
|
{
|