add drawSpecificTargetsInFrame and findClosestTargetID function,add confs dictionary to repository
This commit is contained in:
@@ -800,6 +800,8 @@ void SingleObjectTrackerBase::init(cv::Mat img_, const cv::Rect& bounding_box_)
|
||||
}
|
||||
void SingleObjectTrackerBase::track(cv::Mat img_, TargetsInFrame& tgts_)
|
||||
{
|
||||
|
||||
|
||||
Rect rect;
|
||||
bool ok = trackImpl(img_, rect);
|
||||
|
||||
@@ -809,6 +811,10 @@ void SingleObjectTrackerBase::track(cv::Mat img_, TargetsInFrame& tgts_)
|
||||
tgts_.setFPS(1000.0 / std::chrono::duration_cast<std::chrono::milliseconds>(t1 - this->_t0).count());
|
||||
this->_t0 = std::chrono::system_clock::now();
|
||||
tgts_.setTimeNow();
|
||||
double z = 0;
|
||||
double x = 0;
|
||||
double y = 0;
|
||||
|
||||
|
||||
if (ok)
|
||||
{
|
||||
@@ -818,6 +824,10 @@ void SingleObjectTrackerBase::track(cv::Mat img_, TargetsInFrame& tgts_)
|
||||
tgt.setLOS(tgt.cx, tgt.cy, this->camera_matrix, img_.cols, img_.rows);
|
||||
int ow = int(round(rect.width));
|
||||
int oh = int(round(rect.height));
|
||||
|
||||
|
||||
|
||||
|
||||
if (this->_use_width_or_height == 0)
|
||||
{
|
||||
double z = this->camera_matrix.at<double>(0, 0) * this->_object_ws / ow;
|
||||
@@ -1199,14 +1209,5 @@ void CommonObjectDetectorBase::_load()
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user