Giter VIP home page Giter VIP logo

Comments (1)

jianhengLiu avatar jianhengLiu commented on August 12, 2024

So sorry that I have missed this issue.
It seems that I added codes mistakenly while refactoring.
The correct codes should be:

if (!is_compensate)
    {
        unsigned short temp_object_id = prev_semantic_id.at<unsigned short>(y_center, x_center);

        if (temp_object_id > 0)
        {
            dynamic_objects[temp_object_id].x_vel = x_center - dynamic_objects[temp_object_id].x_center;
            dynamic_objects[temp_object_id].y_vel = y_center - dynamic_objects[temp_object_id].y_center;
        }
        else
        {
            temp_object_id = ++object_id;
        }

        dynamic_objects[temp_object_id].x_center = x_center;
        dynamic_objects[temp_object_id].y_center = y_center;
        dynamic_objects[temp_object_id].x1 = x1;
        dynamic_objects[temp_object_id].y1 = y1;
        dynamic_objects[temp_object_id].x2 = x2;
        dynamic_objects[temp_object_id].y2 = y2;

        dynamic_objects[temp_object_id].x_weight_vel =
            (dynamic_objects[temp_object_id].x_weight_vel + dynamic_objects[temp_object_id].x_vel) / 2;
        dynamic_objects[temp_object_id].y_weight_vel =
            (dynamic_objects[temp_object_id].y_weight_vel + dynamic_objects[temp_object_id].y_vel) / 2;
        dynamic_objects[temp_object_id].is_update = true;
        dynamic_objects[temp_object_id].no_update_times = 0;
        cv::rectangle(semantic_id, cv::Point(x1, y1), cv::Point(x2, y2), cv::Scalar(temp_object_id), -1);
    }

from dynamic-vins.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.