Skip to content

Commit

Permalink
Fix prob (apply wg-perception#101)
Browse files Browse the repository at this point in the history
  • Loading branch information
Tacha-S committed May 9, 2024
1 parent a8ebdf2 commit 20f7f3a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions leg_detector/src/leg_detector.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -731,9 +731,9 @@ class LegDetector

memcpy(tmp_mat.data, f.data(), f.size()*sizeof(float));

float probability = 0.5 -
forest->predict(tmp_mat, cv::noArray(), cv::ml::RTrees::PREDICT_SUM) /
forest->getRoots().size();
float probability = 0.5 + 0.5 *
static_cast<float>(forest->predict(tmp_mat, cv::noArray(), cv::ml::RTrees::PREDICT_SUM)) /
static_cast<float>(forest->getRoots().size());

tf::Stamped<tf::Point> loc((*i)->center(), scan->header.stamp, scan->header.frame_id);
try
Expand Down

0 comments on commit 20f7f3a

Please sign in to comment.