GstAnalyticsTensorProvenanceMtd
GstAnalyticsTensorProvenanceMtd stores provenance associated with a tensor without keeping the tensor data itself alive. It stores the group and tensor IDs of the associated tensor.
Tensor provenance metadata can be related to other analytics metadata. For example, a preprocessing element can create a tensor from an object detection and keep the relation between them:
GstAnalyticsRelationMeta
|
+-- GstAnalyticsODMtd
| ^
| |
| relation
| |
+-- GstAnalyticsTensorProvenanceMtd
|
+-- correlation-id = 10
The correlation ID can be stored as provenance in GstTensorListMeta. This allows derived tensor data to be associated with its provenance metadata without keeping the original tensor alive:
GstTensorListMeta
|
+-- item
|
+-- tensor "image"
|
+-- provenance
+-- "image" -> [ 10 ]
|
+--> GstAnalyticsTensorProvenanceMtd
|
+-- relation --> GstAnalyticsODMtd
The correlation ID is preserved when the provenance metadata is copied or transformed. Multiple provenance records can have the same correlation ID after copy or transform.
Tensor provenance metadata can also store a spatial transform from tensor coordinates to video buffer coordinates. A tensor decoder can use this transform to map spatial inference results back to the video buffer.
GstAnalyticsTensorProvenanceMtd
Handle containing data required to use gst_analytics_tensor_provenance_mtd APIs. This type is generally expected to be allocated on the stack.
Members
id
(guint)
–
Instance identifier.
meta
(GstAnalyticsRelationMeta *)
–
Instance of GstAnalyticsRelationMeta where the analytics-metadata identified by id is stored.
Since : 1.30
GstAnalytics.TensorProvenanceMtd
Handle containing data required to use gst_analytics_tensor_provenance_mtd APIs. This type is generally expected to be allocated on the stack.
Members
id
(Number)
–
Instance identifier.
meta
(GstAnalytics.RelationMeta)
–
Instance of GstAnalytics.RelationMeta where the analytics-metadata identified by id is stored.
Since : 1.30
GstAnalytics.TensorProvenanceMtd
Handle containing data required to use gst_analytics_tensor_provenance_mtd APIs. This type is generally expected to be allocated on the stack.
Members
id
(int)
–
Instance identifier.
meta
(GstAnalytics.RelationMeta)
–
Instance of GstAnalytics.RelationMeta where the analytics-metadata identified by id is stored.
Since : 1.30
Methods
gst_analytics_tensor_provenance_mtd_get_correlation_id
gint64 gst_analytics_tensor_provenance_mtd_get_correlation_id (const GstAnalyticsTensorProvenanceMtd * mtd)
Gets the correlation ID of mtd. The ID can be used to associate derived tensor data with this provenance metadata and is preserved when the metadata is copied.
Parameters:
mtd
–
the correlation ID
Since : 1.30
GstAnalytics.TensorProvenanceMtd.prototype.get_correlation_id
function GstAnalytics.TensorProvenanceMtd.prototype.get_correlation_id(): {
// javascript wrapper for 'gst_analytics_tensor_provenance_mtd_get_correlation_id'
}
Gets the correlation ID of mtd. The ID can be used to associate derived tensor data with this provenance metadata and is preserved when the metadata is copied.
Parameters:
the correlation ID
Since : 1.30
GstAnalytics.TensorProvenanceMtd.get_correlation_id
def GstAnalytics.TensorProvenanceMtd.get_correlation_id (self):
#python wrapper for 'gst_analytics_tensor_provenance_mtd_get_correlation_id'
Gets the correlation ID of mtd. The ID can be used to associate derived tensor data with this provenance metadata and is preserved when the metadata is copied.
Parameters:
the correlation ID
Since : 1.30
gst_analytics_tensor_provenance_mtd_get_group_id
GQuark gst_analytics_tensor_provenance_mtd_get_group_id (const GstAnalyticsTensorProvenanceMtd * mtd)
Gets the tensor group identifier.
Parameters:
mtd
–
the tensor group identifier
Since : 1.30
GstAnalytics.TensorProvenanceMtd.prototype.get_group_id
function GstAnalytics.TensorProvenanceMtd.prototype.get_group_id(): {
// javascript wrapper for 'gst_analytics_tensor_provenance_mtd_get_group_id'
}
Gets the tensor group identifier.
Parameters:
the tensor group identifier
Since : 1.30
GstAnalytics.TensorProvenanceMtd.get_group_id
def GstAnalytics.TensorProvenanceMtd.get_group_id (self):
#python wrapper for 'gst_analytics_tensor_provenance_mtd_get_group_id'
Gets the tensor group identifier.
Parameters:
the tensor group identifier
Since : 1.30
gst_analytics_tensor_provenance_mtd_get_spatial_transform
gboolean gst_analytics_tensor_provenance_mtd_get_spatial_transform (const GstAnalyticsTensorProvenanceMtd * mtd, gfloat * transform)
Gets the spatial transformation matrix. The matrix transforms coordinates from the tensor coordinate space to the coordinate space of the video buffer carrying the GstAnalyticsRelationMeta.
Parameters:
mtd
–
transform
(
[out][array fixed-size=9])
–
location for the 3x3 spatial transformation matrix in row-major order
Since : 1.30
GstAnalytics.TensorProvenanceMtd.prototype.get_spatial_transform
function GstAnalytics.TensorProvenanceMtd.prototype.get_spatial_transform(): {
// javascript wrapper for 'gst_analytics_tensor_provenance_mtd_get_spatial_transform'
}
Gets the spatial transformation matrix. The matrix transforms coordinates from the tensor coordinate space to the coordinate space of the video buffer carrying the GstAnalytics.RelationMeta.
Parameters:
Returns a tuple made of:
Since : 1.30
GstAnalytics.TensorProvenanceMtd.get_spatial_transform
def GstAnalytics.TensorProvenanceMtd.get_spatial_transform (self):
#python wrapper for 'gst_analytics_tensor_provenance_mtd_get_spatial_transform'
Gets the spatial transformation matrix. The matrix transforms coordinates from the tensor coordinate space to the coordinate space of the video buffer carrying the GstAnalytics.RelationMeta.
Parameters:
Returns a tuple made of:
Since : 1.30
gst_analytics_tensor_provenance_mtd_get_tensor_id
GQuark gst_analytics_tensor_provenance_mtd_get_tensor_id (const GstAnalyticsTensorProvenanceMtd * mtd)
Gets the tensor identifier.
Parameters:
mtd
–
the tensor identifier
Since : 1.30
GstAnalytics.TensorProvenanceMtd.prototype.get_tensor_id
function GstAnalytics.TensorProvenanceMtd.prototype.get_tensor_id(): {
// javascript wrapper for 'gst_analytics_tensor_provenance_mtd_get_tensor_id'
}
Gets the tensor identifier.
Parameters:
the tensor identifier
Since : 1.30
GstAnalytics.TensorProvenanceMtd.get_tensor_id
def GstAnalytics.TensorProvenanceMtd.get_tensor_id (self):
#python wrapper for 'gst_analytics_tensor_provenance_mtd_get_tensor_id'
Gets the tensor identifier.
Parameters:
the tensor identifier
Since : 1.30
gst_analytics_tensor_provenance_mtd_get_timestamp
gboolean gst_analytics_tensor_provenance_mtd_get_timestamp (const GstAnalyticsTensorProvenanceMtd * mtd, GstClockTime * timestamp, GstClockTime * duration)
Parameters:
mtd
–
timestamp
–
duration
–
GstAnalytics.TensorProvenanceMtd.prototype.get_timestamp
function GstAnalytics.TensorProvenanceMtd.prototype.get_timestamp(timestamp: Number, duration: Number): {
// javascript wrapper for 'gst_analytics_tensor_provenance_mtd_get_timestamp'
}
Parameters:
GstAnalytics.TensorProvenanceMtd.get_timestamp
def GstAnalytics.TensorProvenanceMtd.get_timestamp (self, timestamp, duration):
#python wrapper for 'gst_analytics_tensor_provenance_mtd_get_timestamp'
Parameters:
gst_analytics_tensor_provenance_mtd_has_spatial_transform
gboolean gst_analytics_tensor_provenance_mtd_has_spatial_transform (const GstAnalyticsTensorProvenanceMtd * mtd)
Checks whether mtd contains spatial transformation information.
Parameters:
mtd
–
Since : 1.30
GstAnalytics.TensorProvenanceMtd.prototype.has_spatial_transform
function GstAnalytics.TensorProvenanceMtd.prototype.has_spatial_transform(): {
// javascript wrapper for 'gst_analytics_tensor_provenance_mtd_has_spatial_transform'
}
Checks whether mtd contains spatial transformation information.
Parameters:
Since : 1.30
GstAnalytics.TensorProvenanceMtd.has_spatial_transform
def GstAnalytics.TensorProvenanceMtd.has_spatial_transform (self):
#python wrapper for 'gst_analytics_tensor_provenance_mtd_has_spatial_transform'
Checks whether mtd contains spatial transformation information.
Parameters:
Since : 1.30
gst_analytics_tensor_provenance_mtd_set_spatial_transform
gboolean gst_analytics_tensor_provenance_mtd_set_spatial_transform (GstAnalyticsTensorProvenanceMtd * mtd, const gfloat * transform)
Sets a spatial transform from tensor coordinates to video buffer coordinates.
Parameters:
mtd
–
transform
(
[array fixed-size=9])
–
a 3x3 transformation matrix in row-major order
Since : 1.30
GstAnalytics.TensorProvenanceMtd.prototype.set_spatial_transform
function GstAnalytics.TensorProvenanceMtd.prototype.set_spatial_transform(transform: [ Number ]): {
// javascript wrapper for 'gst_analytics_tensor_provenance_mtd_set_spatial_transform'
}
Sets a spatial transform from tensor coordinates to video buffer coordinates.
Parameters:
a 3x3 transformation matrix in row-major order
Since : 1.30
GstAnalytics.TensorProvenanceMtd.set_spatial_transform
def GstAnalytics.TensorProvenanceMtd.set_spatial_transform (self, transform):
#python wrapper for 'gst_analytics_tensor_provenance_mtd_set_spatial_transform'
Sets a spatial transform from tensor coordinates to video buffer coordinates.
Parameters:
a 3x3 transformation matrix in row-major order
Since : 1.30
gst_analytics_tensor_provenance_mtd_set_spatial_transform_from_rectangles
gboolean gst_analytics_tensor_provenance_mtd_set_spatial_transform_from_rectangles (GstAnalyticsTensorProvenanceMtd * mtd, const GstVideoRectangle * tensor_rect, const GstVideoRectangle * video_rect)
Sets a spatial transform that maps tensor_rect to video_rect.
This is a convenience function for axis-aligned scale and translation. For other transformations, use gst_analytics_tensor_provenance_mtd_set_spatial_transform.
Parameters:
mtd
–
tensor_rect
–
rectangle in tensor coordinates
video_rect
–
rectangle in video buffer coordinates
Since : 1.30
GstAnalytics.TensorProvenanceMtd.prototype.set_spatial_transform_from_rectangles
function GstAnalytics.TensorProvenanceMtd.prototype.set_spatial_transform_from_rectangles(tensor_rect: GstVideo.VideoRectangle, video_rect: GstVideo.VideoRectangle): {
// javascript wrapper for 'gst_analytics_tensor_provenance_mtd_set_spatial_transform_from_rectangles'
}
Sets a spatial transform that maps tensor_rect to video_rect.
This is a convenience function for axis-aligned scale and translation. For other transformations, use GstAnalytics.TensorProvenanceMtd.prototype.set_spatial_transform.
Parameters:
rectangle in tensor coordinates
rectangle in video buffer coordinates
Since : 1.30
GstAnalytics.TensorProvenanceMtd.set_spatial_transform_from_rectangles
def GstAnalytics.TensorProvenanceMtd.set_spatial_transform_from_rectangles (self, tensor_rect, video_rect):
#python wrapper for 'gst_analytics_tensor_provenance_mtd_set_spatial_transform_from_rectangles'
Sets a spatial transform that maps tensor_rect to video_rect.
This is a convenience function for axis-aligned scale and translation. For other transformations, use GstAnalytics.TensorProvenanceMtd.set_spatial_transform.
Parameters:
rectangle in tensor coordinates
rectangle in video buffer coordinates
Since : 1.30
gst_analytics_tensor_provenance_mtd_set_timestamp
gboolean gst_analytics_tensor_provenance_mtd_set_timestamp (GstAnalyticsTensorProvenanceMtd * mtd, GstClockTime timestamp, GstClockTime duration)
Parameters:
mtd
–
timestamp
–
duration
–
GstAnalytics.TensorProvenanceMtd.prototype.set_timestamp
function GstAnalytics.TensorProvenanceMtd.prototype.set_timestamp(timestamp: Number, duration: Number): {
// javascript wrapper for 'gst_analytics_tensor_provenance_mtd_set_timestamp'
}
Parameters:
GstAnalytics.TensorProvenanceMtd.set_timestamp
def GstAnalytics.TensorProvenanceMtd.set_timestamp (self, timestamp, duration):
#python wrapper for 'gst_analytics_tensor_provenance_mtd_set_timestamp'
Parameters:
gst_analytics_tensor_provenance_mtd_transform_point
gboolean gst_analytics_tensor_provenance_mtd_transform_point (const GstAnalyticsTensorProvenanceMtd * mtd, gfloat * x, gfloat * y)
Transforms (@x, y) from tensor coordinates to video buffer coordinates.
Parameters:
mtd
–
x
(
[inout])
–
x coordinate
y
(
[inout])
–
y coordinate
Since : 1.30
GstAnalytics.TensorProvenanceMtd.prototype.transform_point
function GstAnalytics.TensorProvenanceMtd.prototype.transform_point(x: Number, y: Number): {
// javascript wrapper for 'gst_analytics_tensor_provenance_mtd_transform_point'
}
Transforms (@x, y) from tensor coordinates to video buffer coordinates.
Parameters:
x coordinate
y coordinate
Returns a tuple made of:
Since : 1.30
GstAnalytics.TensorProvenanceMtd.transform_point
def GstAnalytics.TensorProvenanceMtd.transform_point (self, x, y):
#python wrapper for 'gst_analytics_tensor_provenance_mtd_transform_point'
Transforms (@x, y) from tensor coordinates to video buffer coordinates.
Parameters:
x coordinate
y coordinate
Returns a tuple made of:
Since : 1.30
gst_analytics_tensor_provenance_mtd_transform_rectangle
gboolean gst_analytics_tensor_provenance_mtd_transform_rectangle (const GstAnalyticsTensorProvenanceMtd * mtd, gfloat * x, gfloat * y, gfloat * width, gfloat * height)
Transforms an axis-aligned rectangle from tensor coordinates to video buffer coordinates.
Parameters:
mtd
–
x
(
[inout])
–
x coordinate of the rectangle
y
(
[inout])
–
y coordinate of the rectangle
width
(
[inout])
–
width of the rectangle
height
(
[inout])
–
height of the rectangle
Since : 1.30
GstAnalytics.TensorProvenanceMtd.prototype.transform_rectangle
function GstAnalytics.TensorProvenanceMtd.prototype.transform_rectangle(x: Number, y: Number, width: Number, height: Number): {
// javascript wrapper for 'gst_analytics_tensor_provenance_mtd_transform_rectangle'
}
Transforms an axis-aligned rectangle from tensor coordinates to video buffer coordinates.
Parameters:
x coordinate of the rectangle
y coordinate of the rectangle
width of the rectangle
height of the rectangle
Returns a tuple made of:
true on success. false if the transform is not available or does not preserve an axis-aligned rectangle.
true on success. false if the transform is not available or does not preserve an axis-aligned rectangle.
true on success. false if the transform is not available or does not preserve an axis-aligned rectangle.
Since : 1.30
GstAnalytics.TensorProvenanceMtd.transform_rectangle
def GstAnalytics.TensorProvenanceMtd.transform_rectangle (self, x, y, width, height):
#python wrapper for 'gst_analytics_tensor_provenance_mtd_transform_rectangle'
Transforms an axis-aligned rectangle from tensor coordinates to video buffer coordinates.
Parameters:
x coordinate of the rectangle
y coordinate of the rectangle
width of the rectangle
height of the rectangle
Returns a tuple made of:
True on success. False if the transform is not available or does not preserve an axis-aligned rectangle.
True on success. False if the transform is not available or does not preserve an axis-aligned rectangle.
True on success. False if the transform is not available or does not preserve an axis-aligned rectangle.
Since : 1.30
Functions
gst_analytics_tensor_provenance_mtd_get_mtd_type
GstAnalyticsMtdType gst_analytics_tensor_provenance_mtd_get_mtd_type ()
Since : 1.30
GstAnalytics.TensorProvenanceMtd.prototype.get_mtd_type
function GstAnalytics.TensorProvenanceMtd.prototype.get_mtd_type(): {
// javascript wrapper for 'gst_analytics_tensor_provenance_mtd_get_mtd_type'
}
Since : 1.30
GstAnalytics.TensorProvenanceMtd.get_mtd_type
def GstAnalytics.TensorProvenanceMtd.get_mtd_type ():
#python wrapper for 'gst_analytics_tensor_provenance_mtd_get_mtd_type'
Since : 1.30
The results of the search are