I’m sending an event as xml to the server.
the xml has tags of object list, object, polygon (or bounding box).
but i don’t see them on the image event.
the values i send where the X,Y points of the pixel on the image (i.e for example : (224,680) , (450,600) … )
Now i saw and example that the values were doubles 0.8 , 0.9 .. what do they mean ? is there a conversion i need to do?
On an Analytics Event there are two schemes which both works.
Either you use fraction of the image, and then you can without knowledge of the image resolution place the object in the image.
Or you use pixels, with this you directly place the object in the based on the knowledge of the image and its resolution.
I believe it works because the server interpret value below 1.0 as relative fraction of the image and interpret values above 1.0 as pixels.
This works:
<AnalyticsEvent xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="urn:milestone-systems"><EventHeader><ID>00000000-0000-0000-0000-000000000000</ID><Timestamp>$timestamp$</Timestamp><Type>MyType</Type><!-- Insert Event Message here --><Message>MyAnalyticsEvent01</Message><CustomTag>TagFromXML</CustomTag><Source><!-- Insert camera URI here, if you don't have the GUID. --><!-- (For multichannel devices, URI may contain channel number after ',') --><Name>10.100.50.120</Name></Source></EventHeader><Description>
Analytics event description.
</Description><Location>
Event location 1
</Location><ObjectList><Object><BoundingBox><Top>0.2</Top><Left>0.4</Left><Bottom>0.9</Bottom><Right>0.6</Right></BoundingBox></Object></ObjectList><Vendor><Name>My Smart Video</Name></Vendor>
</AnalyticsEvent>
And this works:
<AnalyticsEvent xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="urn:milestone-systems"><EventHeader><ID>00000000-0000-0000-0000-000000000000</ID><Timestamp>$timestamp$</Timestamp><Type>MyType</Type><!-- Insert Event Message here --><Message>MyAnalyticsEvent01</Message><CustomTag>TagFromXML</CustomTag><Source><!-- Insert camera URI here, if you don't have the GUID. --><!-- (For multichannel devices, URI may contain channel number after ',') --><Name>10.100.50.120</Name></Source></EventHeader><Description>
Analytics event description.
</Description><Location>
Event location 1
</Location><ObjectList><Object><BoundingBox><Top>20</Top><Left>40</Left><Bottom>90</Bottom><Right>60</Right></BoundingBox></Object></ObjectList><Vendor><Name>My Smart Video</Name></Vendor>
</AnalyticsEvent>
( I have experimented with both XML snippets while using the Trigger Analytics Event with XML code sample.)
I suggest you create an alarm on the analytics event and see the bounding box in the Alarm View in the Smart Client.
I have a recommendation: This document is a good introduction and has valuable information: http://download.milestonesys.com/MIPSDK/Samples/TriggerAlarmFromExternal-ConceptSolution.pdf