My component need ROI information to trigger analysis event. The ROI information is defined by user. The function of plugin is designed for user to draw a detection area on each camera as ROI. To make component detect with the ROI. Plugin must save the metadata in somewhere. Is there a way to save the metadata by plugin and let component load it as config?
We assume that ROI = region of interest.
Any plugin can save data as configuration. I envision the ROI as a rectangle or other shapes that can be saved as coordinates.
To see how a plugin can store data for its own use explore the Property sample. https://doc.developer.milestonesys.com/html/index.html?base=samples/pluginsamples/property/readme.html&tree=tree_1.html
To see how to draw a line on the Image Viewer, which could be a step in having the user draw the ROI explore the Video Preview sample. https://doc.developer.milestonesys.com/html/index.html?base=samples/pluginsamples/videopreview/readme.html&tree=tree_1.html
Thank you for your reply. If the ROIs are different for each camera.
- Could these coordinates be saved with each Camera Item?
- Could Component get item with one camera ID also get these coordinates?
You might be interested in the sample called AdminTab -
As you can see, it is possible to add Properties on a camera. I hope it might be helpful.
That looks good to me. One more question. Not all cameras need to analyze. I’d like to choose camera to a list for component.
Could I use AdminTab to select camera and make Component know which camera need to be added in the list like bookmark, Configuration.Instance.GetItems(ItemHierarchy.UserDefined) or something else?
This is the code in the sample I think is the answer, the code is getting you from the item to the associated property
_associatedProperties = Configuration.Instance.GetAssociatedProperties(_associatedItem, AdminTabPluginDefinition.AdminTabPluginTabPlugin);
if (_associatedProperties.Properties.ContainsKey("Property1")) textBox1.Text = _associatedProperties.Properties["Property1"];