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

Status Page

Objects in plugin

Answered

Comments

7 comments

  • Tony Luce

    @... - Just a precursor to an answer: There's an option in the Nx Meta Client when you right click on a camera called Object Frames & Info - can you confirm you have that setting set to Show Always?

    0
  • Permanently deleted user

    Hi Tony, thanks for the fast answer. I didn't see that option before but after enabling it I don't see any difference in behavior. The objects still only shown on the objects tab and no boxes are drawn.

    1
  • Nx Support

    Can you please check, what is the object detection latency?

    Also, do you see the boxes when you try to play video from the past (archive)?

     

    Usually bounding boxes are not showing on live video if they are delivered with a large delay (about a second)

    0
  • Permanently deleted user

    That would seem to be the case. But when trying to see the archive we get the message that there's no archive. Even if the camera was being recorded. The objects detections also seem to disappear from the interface after any changes to the view are made. Things as changing the filter for the time, changing the tab or closing the interface. None of the objects are saved.

    0
  • Andrey Terentyev
    • Network Optix team

    Hello Ezequiel,

    Could you share with us the code of your implementation of DeviceAgent::pullMetadataPackets, please?

    Do you use pushMetadataPacket?

     

    0
  • Permanently deleted user

    We use pushMetadataPacket. We're receiving the metadata over a REST API and in the handler we use a public method of the device agent to call it. Here's the relevant code.


    voidAPIObjectHandler(constRest::Request&request, Http::ResponseWriterresponse)
    {
     
    const auto objectMetadataPacket = makePtr<ObjectMetadataPacket>();

    rapidjson::Document d;
    d.Parse<0>(request.body().c_str());
     

    objectMetadataPacket->setTimestampUs(d[0]["timestamp"].GetInt64());
    objectMetadataPacket->setDurationUs(10000);

    for (SizeType i = 0; i < d.Size(); i++) // Uses SizeType instead of size_t
    {

    auto objectMetadata = makePtr<ObjectMetadata>();
    if(d[i]["name"] == ini().object1JSONName){
    objectMetadata->setTypeId(ini().object1Id);
    }elseif(d[i]["name"] == ini().object2JSONName){
    objectMetadata->setTypeId(ini().object2Id);
    }elseif(d[i]["name"] == ini().object3JSONName){
    objectMetadata->setTypeId(ini().object3Id);
    }
    objectMetadata->setTrackId(nx::sdk::UuidHelper::fromStdString(d[i]["objectid"].GetString()));
    objectMetadata->addAttribute(makePtr<Attribute>(IAttribute::Type::string, "TS", std::to_string(d[i]["timestamp"].GetInt64())));
    objectMetadata->setConfidence(d[i]["score"].GetFloat());
    float width = d[i]["width"].GetFloat();
    float height = d[i]["height"].GetFloat();
    float x = d[i]["x"].GetFloat();
    float y = d[i]["y"].GetFloat();
     
    objectMetadata->setBoundingBox(Rect(x, y, width, height));
    auto bestShotPacket = makeObjectTrackBestShotPacket(nx::sdk::UuidHelper::fromStdString(d[i]["objectid"].GetString()),d[0]["timestamp"].GetInt64(),Rect(x, y, width, height));
    // auto objectMetadataPacket = new ObjectMetadataPacket();
    objectMetadataPacket->addItem(objectMetadata.get());
    }

    objectMetadataPacket->addRef();
    this->deviceAgent->pubPushMetadataPacket(objectMetadataPacket.get());

    response.send(Http::Code::Ok);
    }
     
    voidDeviceAgent::pubPushMetadataPacket(IMetadataPacket*metadataPacket)
    {
    pushMetadataPacket(metadataPacket);
    }
    0
  • Andrey Terentyev
    • Network Optix team

    Hi Ezequiel,

    > But when trying to see the archive we get the message that there's no archive.

    What exact message? Could you give the text/screenshot please? Could you send server log_file.log file?

    > Even if the camera was being recorded. The objects detections also seem to disappear from the interface after any changes to the view are made. Things as changing the filter for the time, changing the tab or closing the interface. None of the objects are saved.

    Could you give us step-by-step instruction for reproducing the behavior described?

     

    0

Please sign in to leave a comment.