Coder Social home page Coder Social logo

Parsing object instance mask about unrealcv HOT 2 CLOSED

unrealcv avatar unrealcv commented on June 17, 2024
Parsing object instance mask

from unrealcv.

Comments (2)

marioyc avatar marioyc commented on June 17, 2024

If I understood correctly the execution order is (probably with other things in the middle that I wasn't able to follow):

  1. FCameraCommandHandler::GetObjectInstanceMask
  2. FCommandDispatcher::Exec
  3. FPlayerViewMode::Object
  4. PaintObjects

and then PaintObjects calls FObjectPainter::Get().PaintRandomColors() which makes it seem like an object wouldn't have the same color across time.

from unrealcv.

qiuwch avatar qiuwch commented on June 17, 2024

Yes, the color is constant through time. See here. This code is a bit messy and needs to be cleaned up.

Getting colors for objects only needs to be executed once, so the speed does not matter much. Getting object mask needs to be executed every frame. All the performance bottleneck should be in here.

The execution order and the logic behind is: Every UnrealCV command will be executed by FCommandDispatcher. CommandDispatcher will decide which CommandHandler to use. For vget /camera/[id]/object_mask, the FCameraCommandHandler will be used. If this is still unclear, I can point to the specific location in the code. I should write a development page in unrealcv.github.io to document this.

PaintObjects happen when the game is initialized. PaintRandomColors means iterating over all objects in the scene and assign it a color. If the scene is the same (no object is deleted or added), the color will be the same, no matter running the game how many times. PaintRandomColors might not be a very good name.

from unrealcv.

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.