diff --git a/girs/GstAnalytics-1.0.gir b/girs/GstAnalytics-1.0.gir
index 77f28c5592..6e8d12adbb 100644
--- a/girs/GstAnalytics-1.0.gir
+++ b/girs/GstAnalytics-1.0.gir
@@ -238,6 +238,24 @@ is generally expected to be allocated on the stack.
identified by @id is stored.
+
+ Retrieve location confidence level.
+
+
+ TRUE on success, otherwise FALSE.
+
+
+
+
+ instance
+
+
+
+ Confidence on object location
+
+
+
+
Retrieve location and location confidence level.
diff --git a/subprojects/gst-plugins-bad/gst-libs/gst/analytics/gstanalyticsobjectdetectionmtd.c b/subprojects/gst-plugins-bad/gst-libs/gst/analytics/gstanalyticsobjectdetectionmtd.c
index a7ee4c905c..1657ff944b 100644
--- a/subprojects/gst-plugins-bad/gst-libs/gst/analytics/gstanalyticsobjectdetectionmtd.c
+++ b/subprojects/gst-plugins-bad/gst-libs/gst/analytics/gstanalyticsobjectdetectionmtd.c
@@ -141,6 +141,33 @@ gst_analytics_od_mtd_get_location (GstAnalyticsODMtd * instance,
return TRUE;
}
+/**
+ * gst_analytics_od_mtd_get_confidence_lvl:
+ * @instance: instance
+ * @loc_conf_lvl: (out): Confidence on object location
+ *
+ * Retrieve location confidence level.
+ *
+ * Returns: TRUE on success, otherwise FALSE.
+ *
+ * Since: 1.24
+ */
+gboolean
+gst_analytics_od_mtd_get_confidence_lvl (GstAnalyticsODMtd * instance,
+ gfloat * loc_conf_lvl)
+{
+ GstAnalyticsODMtdData *data;
+
+ g_return_val_if_fail (instance && loc_conf_lvl, FALSE);
+ data = gst_analytics_relation_meta_get_mtd_data (instance->meta,
+ instance->id);
+ g_return_val_if_fail (data != NULL, FALSE);
+
+ *loc_conf_lvl = data->location_confidence_lvl;
+
+ return TRUE;
+}
+
/**
* gst_analytics_od_mtd_get_obj_type:
* @handle: Instance handle
diff --git a/subprojects/gst-plugins-bad/gst-libs/gst/analytics/gstanalyticsobjectdetectionmtd.h b/subprojects/gst-plugins-bad/gst-libs/gst/analytics/gstanalyticsobjectdetectionmtd.h
index 640c448e2f..54df6a018b 100644
--- a/subprojects/gst-plugins-bad/gst-libs/gst/analytics/gstanalyticsobjectdetectionmtd.h
+++ b/subprojects/gst-plugins-bad/gst-libs/gst/analytics/gstanalyticsobjectdetectionmtd.h
@@ -52,6 +52,10 @@ GST_ANALYTICS_META_API
gboolean gst_analytics_od_mtd_get_location (GstAnalyticsODMtd * instance,
gint * x, gint * y, gint * w, gint * h, gfloat * loc_conf_lvl);
+GST_ANALYTICS_META_API
+gboolean gst_analytics_od_mtd_get_confidence_lvl (GstAnalyticsODMtd * instance,
+ gfloat * loc_conf_lvl);
+
GST_ANALYTICS_META_API
GQuark gst_analytics_od_mtd_get_obj_type (GstAnalyticsODMtd * handle);