I am still in the planning stage, i would like to hear your ideas for the best course of action.
The precondition i have are:
-
The cameras are already register in milestone.
-
I need to print bounding boxes on the cameras. The bounding boxes are different to each camera and change every second.
A script i made will send this metadata, its input is the camera id and the output are bounding boxes for that camera. i already found a way to get the cameras id.
From now i need to do everything as effectively as possible.
what i think i understood:
by using the code in MultiChannelMetadataProvider sample:
var hardwareDefinition = new HardwareDefinition(
PhysicalAddress.Parse("001122334466"),
"MetadataProvider")
{
Firmware = "v10",
MetadataDevices =
{
MetadataDeviceDefintion.CreateBoundingBoxDevice(),
MetadataDeviceDefintion.CreateGpsDevice(),
CreateNonStandardDevice()
}
};
I can change it to:
MetadataDevices =
{
MetadataDeviceDefintion.CreateBoundingBoxDevice(),
MetadataDeviceDefintion.CreateBoundingBoxDevice(),
…
MetadataDeviceDefintion.CreateBoundingBoxDevice(),
} *number of cameras listed in milestone
this will create MIP DRIVER with (num of cameras) channels.
then i can use the code snippet i attached to add them as Related metadata.
I am not sure how i should send the metadata.
According to sample BoundingBoxMetadataProvider:
_metadataProviderService.Init(52123, “password”, hardwareDefinition);
_metadataProviderChannel = _metadataProviderService.CreateMetadataProvider(1);
var metadata = new MetadataStream{…boxes…}
var result = \_metadataProviderChannel.QueueMetadata(metadata, DateTime.UtcNow);
But it send metadata based on hardwareDefinition, so how can i send metadata to only 1 channel inside the hardwareDefinition?