Nx5 taxonomy hierarchy

Answered

Comments

4 comments

  • Avatar
    Tagir Gadelshin

    Hi, Hendrick!
    sorry for the late response..

    I think it's possible, there are several ways of doing it:

    1. (recommended) Declare a new object type, that will be derived from nx.base.Vehicle. Make it hiddenDerivedType (see taxonomy.md for the details)
      And declare a new attribute, that should be an enum. And in GUI it will look like the Size attribute:

      This way your analytics will use universal taxonomy and it will look and work the same way with any other integrated analytics, across all cameras.

    2. Declare your own object type, which will use the Vehicle icon (see "icon" in taxonomy.md) and it will have its own attribute list, including the subtype. 
      This way your object type will use a custom type and it will differ from other analytics and in search, it will appear as a different object type.
    0
    Comment actions Permalink
  • Avatar
    Hendrik Baekeland

    Hello, Tagir!

    Ok, I see that I can declare a hidden object and add attributes to it. But it means that I don't use "nx.base.Car" and other base classes, and define my own enum with my own attributes for vehicle types instead. Is it correct? 


    Should it look like the following?

    "supportedTypes":
        [
            {
                "objectTypeId": "mycompany.Vehicle",
                "attributes":
                [
                "Type",
                    "Color",
                    "Model",
                    "License Plate",
                    "License Plate.Number"
                ],
                "_comment": "hidden object"
            }
        ],
        "typeLibrary":
        {
            "objectTypes":
            [
                {
                "id": "mycompany.Vehicle",
                "name": "Vehicle",
                "base": "nx.base.Vehicle",
                "attributes":
                    [
                        {
                            "type": "Enum",
                            "subtype": "mycompany.VehicleEnumType",            
                            "name": "Type",
                        },
                    ],
                }
         ],
            "enumTypes":
            [
                {
                    "id": "mycompany.VehicleEnumType",
                    "name": "Vehicle Enum Type",
                    "items":
                    [
                        "Car",
                        "Bus",
                        "Truck"
                    ]
                }
            ]
        }
         


    Thank you for your answer

    0
    Comment actions Permalink
  • Avatar
    Andrey Terentyev

    Hi Hendrick,

    It seems ok.

    If you want a hidden object type, you should declare "flags":"hiddenDerivedType" in the obcetTypes.

          {
                "id": "mycompany.Vehicle",
                "name": "Vehicle",
                "base": "nx.base.Vehicle",
               "flags":"hiddenDerivedType",
                "attributes":
                    [
                        {
                            "type": "Enum",
                            "subtype": "mycompany.VehicleEnumType",            
                            "name": "Type",
                      }
                  ]
          }

    Please, pay your attention that a comma is not needed after the last entity in a list or in an array.

    0
    Comment actions Permalink
  • Avatar
    Hendrik Baekeland

    Thanks, Andrey. 

    0
    Comment actions Permalink

Please sign in to leave a comment.