Is the Nx Cloud up? Visit our Status Page for the current health and performance of the Nx Cloud.

Status Page

Draw Line, Polygon, Polyline within NX SDK Plugin

Answered

Comments

4 comments

  • Andrey Terentyev
    • Network Optix team

    Hello Linh Nguyen,

    Polygon, Polyline etc. are not about objects a plugin passes to the Server.
    They are about ROI - Region Of Interest.

    ROI is a type of setting that can be defined in the manifest. The multiple ROI settings can be defined in the manifest.
    ROI settings are displayed in the Nx Desktop which allows defining actual regions.

    Being defined, regions are passed to a plugin when OK or Apply button is pressed in the Nx Desktop dialog.

    A plugin can do whatever it needs to do with the regions.

    See src/nx/sdk/settings_model.md for more details on settings model and samples/stub_analytics_plugin/src/nx/vms_server_plugins/analytics/stub/settings_model.h of stub_analytics_plugin

    Please, see these posts for where to process received settings including ROIs.
    https://support.networkoptix.com/hc/en-us/community/posts/360049123873-Change-settings-inside-the-plugin
    https://support.networkoptix.com/hc/en-us/community/posts/360039368793-I-have-a-question-about-ROI-metadataSDK-

    0
  • Permanently deleted user

    Can you please explain the user stories? 

    What do you plan to use polyline and polygon for? What creates those objects?

    0
  • Permanently deleted user

    Thank you for your support. 

    My scenario is following:

    We draw Polygon, Line and Polyline from VA Manager side and sent that information to plugin (by Socket) (as I understand, plugin will received this information and draw on NX desktop). The data information is saved like relative value. For example: We draw a polygon which have 5 points (0.11, 0.38, 0.59, 0.1, 0.8, 0.59, 0.46, 0.88, 0.09, 0.47) (not pixel value). Now I understand, before I sent this information to the receiving object part code (only draw Rectangle). I read 2 links Andrey recommended. I think it is getPluginSideSettings method will solve my problem (was it fixed?). But these method will read information from json file (not sending via Socket). Am I correct?

    0
  • Andrey Terentyev
    • Network Optix team

    Hello Linh,

    > I read 2 links Andrey recommended. I think it is getPluginSideSettings method will solve my problem (was it fixed?).

    Yes, it's fixed.

    > But these method will read information from json file (not sending via Socket). Am I correct?

    Yes, the json object being sent is a manifest. The manifest can contain so-called ROI (Region Of Interests) setting declarations. ROI can be displayed by Nx Desktop on a video stream.
    getPluginSideSettings is called so to say "on demand", when the "Plugin settings" dialog is opened. That means you can't send ROI setting when you'd like to, i.e. you have to wait for someone opens camera's the "Plugin settings" dialog in Nx Desktop.

    0

Please sign in to leave a comment.