GstAnalytics.RelationMeta¶
Fields¶
None
Methods¶
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Details¶
- class GstAnalytics.RelationMeta¶
An opaque
Gst.Meta
that can be used to hold various types of results from analysis processes.The content should be accessed through the API.
New in version 1.24.
- add_cls_mtd(confidence_levels, class_quarks)¶
- Parameters:
- Returns:
Added successfully
- cls_mtd:
Handle updated to newly added classification meta.
- Return type:
(
bool
, cls_mtd:GstAnalytics.ClsMtd
)
Add analytic classification metadata to self.
New in version 1.24.
- add_od_mtd(type, x, y, w, h, loc_conf_lvl)¶
- Parameters:
- Returns:
Added successfully
- od_mtd:
Handle updated with newly added object detection meta. Add an object-detetion metadata to self.
- Return type:
(
bool
, od_mtd:GstAnalytics.ODMtd
orNone
)
New in version 1.24.
- add_one_cls_mtd(confidence_level, class_quark)¶
- Parameters:
- Returns:
Added successfully
- cls_mtd:
Handle updated to newly added classification meta.
- Return type:
(
bool
, cls_mtd:GstAnalytics.ClsMtd
)
Add analytic classification metadata to self.
New in version 1.24.
- add_tracking_mtd(tracking_id, tracking_first_seen)¶
- Parameters:
- Returns:
Added successfully
- trk_mtd:
Handle updated with newly added tracking meta. Add an analytic tracking metadata to self.
- Return type:
(
bool
, trk_mtd:GstAnalytics.TrackingMtd
)
New in version 1.24.
- exist(an_meta_first_id, an_meta_second_id, max_relation_span, cond_types)¶
- Parameters:
an_meta_first_id (
int
) – First analysis-metaan_meta_second_id (
int
) – Second analysis-metamax_relation_span (
int
) – Maximum number of relation between an_meta_first_id and an_meta_second_id. A value of 1 mean only only consider direct relation.cond_types (
GstAnalytics.RelTypes
) – condition on relation types.
- Returns:
True
if a relation between exit between an_meta_first_id and an_meta_second_id, otherwiseFalse
.- relations_path:
If not
None
this list will be filled with relation path between an_meta_first_id and an_meta_second_id. List value should be access withGLib.SList
API. Use GPOINTER_TO_INT(iter->data) where iter is aGLib.SList
element to get analysis-meta id on the relation path. Free this list with g_slist_free (relations_path) after using.
- Return type:
Verify existence of relation(s) between an_meta_first_d and an_meta_second_id according to relation condition cond_types. It optionally also return a shortest path of relations ( compliant with cond_types) between an_meta_first_id and an_meta_second_id.
New in version 1.24.
- get_cls_mtd(an_meta_id)¶
- Parameters:
an_meta_id (
int
) – Id ofGstAnalytics.ClsMtd
instance to retrieve- Returns:
True
if successful.- rlt:
Will be filled with relatable meta
- Return type:
(
bool
, rlt:GstAnalytics.ClsMtd
)
Fill rlt if a analytics-meta with id == an_meta_id exist in self instance, otherwise this method return
False
and rlt is invalid.New in version 1.24.
- Parameters:
an_meta_id (
int
) – Id ofGstAnalytics.Mtd
involved in relation to queryrelation_type (
GstAnalytics.RelTypes
) – Type of relation to filter on.type (
int
) – Type ofGstAnalytics.Mtd
to filter onstate (
object
) – Opaque data to store state of the query. If state point toNone
, the first analytics-metadata directly related to an_meta_id will be set in rlt_mtd. Doesn’t need to be free.rlt_mtd (
GstAnalytics.Mtd
) – Handle updated to directly related relatable meta.
- Returns:
True
if rlt_mtd was updated, other wiseFalse
- state:
Opaque data to store state of the query. If state point to
None
, the first analytics-metadata directly related to an_meta_id will be set in rlt_mtd. Doesn’t need to be free.
- Return type:
New in version 1.24.
- get_mtd(an_meta_id, type)¶
- Parameters:
an_meta_id (
int
) – Id ofGstAnalytics.Mtd
instance to retrievetype (
int
) – Filter on a specific type of analysis, useGstAnalytics.MTD_TYPE_ANY
to match any type
- Returns:
True
if successful.- rlt:
Will be filled with relatable meta
- Return type:
(
bool
, rlt:GstAnalytics.Mtd
)
Fill rlt if a analytics-meta with id == an_meta_id exist in self instance, otherwise this method return
False
and rlt is invalid.New in version 1.24.
- get_od_mtd(an_meta_id)¶
- Parameters:
an_meta_id (
int
) – Id ofGstAnalytics.ODMtd
instance to retrieve- Returns:
True
if successful.- rlt:
Will be filled with relatable meta
- Return type:
(
bool
, rlt:GstAnalytics.ODMtd
)
Fill rlt if a analytics-meta with id == an_meta_id exist in self instance, otherwise this method return
False
and rlt is invalid.New in version 1.24.
- get_relation(an_meta_first_id, an_meta_second_id)¶
- Parameters:
- Returns:
relation description between first and second analysis-meta.
- Return type:
Get relations between first and second analysis-meta. Ids (an_meta_first_id and an_meta_second_id) must be from a call to gst_analytics_mtd_get_id (handle).
New in version 1.24.
- get_tracking_mtd(an_meta_id)¶
- Parameters:
an_meta_id (
int
) – Id ofGstAnalytics.Mtd
instance to retrieve- Returns:
True
if successful.- rlt:
Will be filled with relatable meta
- Return type:
(
bool
, rlt:GstAnalytics.TrackingMtd
)
Fill rlt if a analytics-meta with id == an_meta_id exist in self instance, otherwise this method return
False
and rlt is invalid.New in version 1.24.
- iterate(state, type, rlt_mtd)¶
- Parameters:
state (
object
orNone
) – Opaque data to store iteration state, initialize toNone
, no need to free it.type (
int
) – Type ofGstAnalytics.Mtd
to iterate on or useGstAnalytics.MTD_TYPE_ANY
for any.rlt_mtd (
GstAnalytics.Mtd
) – Handle updated to iterated GstAnalyticsRelatableMtd.
- Returns:
False
if end was reached and iteration is completed.- Return type:
New in version 1.24.
- set_relation(type, an_meta_first_id, an_meta_second_id)¶
- Parameters:
type (
GstAnalytics.RelTypes
) – aGstAnalytics.RelTypes
defining relation between two analysis-metaan_meta_first_id (
int
) – first meta idan_meta_second_id (
int
) – second meta id
- Returns:
- Return type:
Sets the relation (
GstAnalytics.RelTypes
) between an_meta_first and an_meta_second. Ids must have been obtained a call to gst_analytics_mtd_get_id(handle).New in version 1.24.