+++ /dev/null
-/*
- * Copyright (c) 2022 Samsung Electronics Co., Ltd All Rights Reserved
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#ifndef __TIZEN_MEDIAVISION_OBJECT_DETECT_3D_H__
-#define __TIZEN_MEDIAVISION_OBJECT_DETECT_3D_H__
-
-#include <mv_common.h>
-#include <mv_object_detection_3d_type.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif /* __cplusplus */
-
-/**
- * @file mv_object_detection_3d.h
- * @brief This file contains the Inference based Media Vision API.
- */
-
-/**
- * @addtogroup CAPI_MEDIA_VISION_INFERENCE_MODULE
- * @{
- */
-
-/**
- * @brief Creates a inference handle for object detection 3d object.
- * @details Use this function to create a inference handle. After the creation
- * the object detection 3d task has to be prepared with
- * mv_object_detection_3d_prepare() function to prepare a network
- * for the inference.
- *
- * @since_tizen 7.0
- *
- * @remarks The @a infer should be released using mv_object_detection_3d_destroy().
- *
- * @param[out] infer The handle to the inference to be created.
- *
- * @return @c 0 on success, otherwise a negative error value
- * @retval #MEDIA_VISION_ERROR_NONE Successful
- * @retval #MEDIA_VISION_ERROR_NOT_SUPPORTED Not supported
- * @retval #MEDIA_VISION_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #MEDIA_VISION_ERROR_OUT_OF_MEMORY Out of memory
- *
- * @see mv_object_detection_3d_destroy()
- * @see mv_object_detection_3d_prepare()
- */
-int mv_object_detection_3d_create(mv_object_detection_3d_h *infer);
-
-/**
- * @brief Destroys inference handle and releases all its resources.
- *
- * @since_tizen 7.0
- *
- * @param[in] infer The handle to the inference to be destroyed.
- *
- * @return @c 0 on success, otherwise a negative error value
- * @retval #MEDIA_VISION_ERROR_NONE Successful
- * @retval #MEDIA_VISION_ERROR_NOT_SUPPORTED Not supported
- * @retval #MEDIA_VISION_ERROR_INVALID_PARAMETER Invalid parameter
- *
- * @pre Create inference handle by using mv_object_detection_3d_create()
- *
- * @see mv_object_detection_3d_create()
- */
-int mv_object_detection_3d_destroy(mv_object_detection_3d_h infer);
-
-/**
- * @brief Configures the backend for the object detection 3d inference.
- *
- * @since_tizen 7.0
- *
- * @param [in] infer The handle to the inference
- *
- * @return @c 0 on success, otherwise a negative error value
- * @retval #MEDIA_VISION_ERROR_NONE Successful
- * @retval #MEDIA_VISION_ERROR_OUT_OF_MEMORY Out of memory
- * @retval #MEDIA_VISION_ERROR_INVALID_OPERATION Invalid operation
- * @retval #MEDIA_VISION_ERROR_NOT_SUPPORTED Not supported
- */
-int mv_object_detection_3d_configure(mv_object_detection_3d_h infer);
-
-/**
- * @brief Prepares the object detection 3d inference
- * @details Use this function to prepare the object detection 3d inference based on
- * the configured network.
- *
- * @since_tizen 7.0
- *
- * @param[in] infer The handle to the inference.
- *
- * @return @c 0 on success, otherwise a negative error value
- * @retval #MEDIA_VISION_ERROR_NONE Successful
- * @retval #MEDIA_VISION_ERROR_NOT_SUPPORTED Not supported
- * @retval #MEDIA_VISION_ERROR_PERMISSION_DENIED Permission denied
- * @retval #MEDIA_VISION_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #MEDIA_VISION_ERROR_INVALID_DATA Invalid model data
- * @retval #MEDIA_VISION_ERROR_OUT_OF_MEMORY Out of memory
- * @retval #MEDIA_VISION_ERROR_INVALID_OPERATION Invalid operation
- * @retval #MEDIA_VISION_ERROR_NOT_SUPPORTED_FORMAT Not supported format
- */
-int mv_object_detection_3d_prepare(mv_object_detection_3d_h infer);
-
-/**
- * @brief Performs the object detection 3d inference on the @a source.
- *
- * @since_tizen 7.0
- * @remarks This function is synchronous and may take considerable time to run.
- *
- * @param[in] source The handle to the source of the media
- * @param[in] infer The handle to the inference
- *
- * @return @c 0 on success, otherwise a negative error value
- * @retval #MEDIA_VISION_ERROR_NONE Successful
- * @retval #MEDIA_VISION_ERROR_NOT_SUPPORTED Not supported
- * @retval #MEDIA_VISION_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #MEDIA_VISION_ERROR_INTERNAL Internal error
- * @retval #MEDIA_VISION_ERROR_NOT_SUPPORTED_FORMAT Source colorspace
- * isn't supported
- *
- * @pre Create a source handle by calling mv_create_source()
- * @pre Create an inference handle by calling mv_object_detect_3d_create()
- * @pre Prepare an inference by calling mv_object_detect_3d_prepare()
- * @post
- *
- * @see mv_object_detect_3d_result_s structure
- */
-int mv_object_detection_3d_inference(mv_object_detection_3d_h infer, mv_source_h source);
-
-/**
- * @brief Gets the probability value to the detected object.
- * @details Use this function to get the probability value after calling @ref mv_object_detection_3d_inference().
- *
- * @since_tizen 7.0
- *
- * @remarks The @a result must NOT be released using free()
- *
- * @param[in] handle The handle to the face recognition object.
- * @param[out] out_probability A pointer to probability array.
- *
- * @return @c 0 on success, otherwise a negative error value
- * @retval #MEDIA_VISION_ERROR_NONE Successful
- * @retval #MEDIA_VISION_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #MEDIA_VISION_ERROR_INVALID_OPERATION Invalid operation
- *
- * @pre Request an inference by calling @ref mv_object_detection_3d_inference()
- */
-int mv_object_detection_3d_get_probability(mv_object_detection_3d_h handle, unsigned int *out_probability);
-
-/**
- * @brief Gets the number of points to the 3D bounding box of the detected object.
- * @details Use this function to get the number of points after calling @ref mv_object_detection_3d_inference().
- *
- * @since_tizen 7.0
- *
- * @remarks The @a result must NOT be released using free()
- *
- * @param[in] handle The handle to the face recognition object.
- * @param[out] out_num_of_points Number of points.
- *
- * @return @c 0 on success, otherwise a negative error value
- * @retval #MEDIA_VISION_ERROR_NONE Successful
- * @retval #MEDIA_VISION_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #MEDIA_VISION_ERROR_INVALID_OPERATION Invalid operation
- *
- * @pre Request an inference by calling @ref mv_object_detection_3d_inference()
- */
-int mv_object_detection_3d_get_num_of_points(mv_object_detection_3d_h handle, unsigned int *out_num_of_points);
-
-/**
- * @brief Gets the x and y coordinates values to the 3D bounding box of the detected object.
- * @details Use this function to get the coordinates values after calling @ref mv_object_detection_3d_inference().
- *
- * @since_tizen 7.0
- *
- * @remarks The @a result must NOT be released using free()
- *
- * @param[in] handle The handle to the face recognition object.
- * @param[out] out_x A pointer to x coordinates array.
- * @param[out] out_y A pointer to y coordinates array.
- *
- * @return @c 0 on success, otherwise a negative error value
- * @retval #MEDIA_VISION_ERROR_NONE Successful
- * @retval #MEDIA_VISION_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #MEDIA_VISION_ERROR_INVALID_OPERATION Invalid operation
- *
- * @pre Request an inference by calling @ref mv_object_detection_3d_inference()
- */
-int mv_object_detection_3d_get_points(mv_object_detection_3d_h handle, unsigned int **out_x, unsigned int **out_y);
-/**
- * @}
- */
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif /* __TIZEN_MEDIAVISION_OBJECT_DETECT_3D_H__ */
--- /dev/null
+/*
+ * Copyright (c) 2022 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef __TIZEN_MEDIAVISION_OBJECT_DETECT_3D_INTERNAL_H__
+#define __TIZEN_MEDIAVISION_OBJECT_DETECT_3D_INTERNAL_H__
+
+#include <mv_common.h>
+#include <mv_object_detection_3d_type.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif /* __cplusplus */
+
+/**
+ * @file mv_object_detection_3d.h
+ * @brief This file contains the Inference based Media Vision API.
+ */
+
+/**
+ * @addtogroup CAPI_MEDIA_VISION_INFERENCE_MODULE
+ * @{
+ */
+
+/**
+ * @brief Creates a inference handle for object detection 3d object.
+ * @details Use this function to create a inference handle. After the creation
+ * the object detection 3d task has to be prepared with
+ * mv_object_detection_3d_prepare() function to prepare a network
+ * for the inference.
+ *
+ * @since_tizen 7.0
+ *
+ * @remarks The @a infer should be released using mv_object_detection_3d_destroy().
+ *
+ * @param[out] infer The handle to the inference to be created.
+ *
+ * @return @c 0 on success, otherwise a negative error value
+ * @retval #MEDIA_VISION_ERROR_NONE Successful
+ * @retval #MEDIA_VISION_ERROR_NOT_SUPPORTED Not supported
+ * @retval #MEDIA_VISION_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #MEDIA_VISION_ERROR_OUT_OF_MEMORY Out of memory
+ *
+ * @see mv_object_detection_3d_destroy()
+ * @see mv_object_detection_3d_prepare()
+ */
+int mv_object_detection_3d_create(mv_object_detection_3d_h *infer);
+
+/**
+ * @brief Destroys inference handle and releases all its resources.
+ *
+ * @since_tizen 7.0
+ *
+ * @param[in] infer The handle to the inference to be destroyed.
+ *
+ * @return @c 0 on success, otherwise a negative error value
+ * @retval #MEDIA_VISION_ERROR_NONE Successful
+ * @retval #MEDIA_VISION_ERROR_NOT_SUPPORTED Not supported
+ * @retval #MEDIA_VISION_ERROR_INVALID_PARAMETER Invalid parameter
+ *
+ * @pre Create inference handle by using mv_object_detection_3d_create()
+ *
+ * @see mv_object_detection_3d_create()
+ */
+int mv_object_detection_3d_destroy(mv_object_detection_3d_h infer);
+
+/**
+ * @brief Configures the backend for the object detection 3d inference.
+ *
+ * @since_tizen 7.0
+ *
+ * @param [in] infer The handle to the inference
+ *
+ * @return @c 0 on success, otherwise a negative error value
+ * @retval #MEDIA_VISION_ERROR_NONE Successful
+ * @retval #MEDIA_VISION_ERROR_OUT_OF_MEMORY Out of memory
+ * @retval #MEDIA_VISION_ERROR_INVALID_OPERATION Invalid operation
+ * @retval #MEDIA_VISION_ERROR_NOT_SUPPORTED Not supported
+ */
+int mv_object_detection_3d_configure(mv_object_detection_3d_h infer);
+
+/**
+ * @brief Prepares the object detection 3d inference
+ * @details Use this function to prepare the object detection 3d inference based on
+ * the configured network.
+ *
+ * @since_tizen 7.0
+ *
+ * @param[in] infer The handle to the inference.
+ *
+ * @return @c 0 on success, otherwise a negative error value
+ * @retval #MEDIA_VISION_ERROR_NONE Successful
+ * @retval #MEDIA_VISION_ERROR_NOT_SUPPORTED Not supported
+ * @retval #MEDIA_VISION_ERROR_PERMISSION_DENIED Permission denied
+ * @retval #MEDIA_VISION_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #MEDIA_VISION_ERROR_INVALID_DATA Invalid model data
+ * @retval #MEDIA_VISION_ERROR_OUT_OF_MEMORY Out of memory
+ * @retval #MEDIA_VISION_ERROR_INVALID_OPERATION Invalid operation
+ * @retval #MEDIA_VISION_ERROR_NOT_SUPPORTED_FORMAT Not supported format
+ */
+int mv_object_detection_3d_prepare(mv_object_detection_3d_h infer);
+
+/**
+ * @brief Performs the object detection 3d inference on the @a source.
+ *
+ * @since_tizen 7.0
+ * @remarks This function is synchronous and may take considerable time to run.
+ *
+ * @param[in] source The handle to the source of the media
+ * @param[in] infer The handle to the inference
+ *
+ * @return @c 0 on success, otherwise a negative error value
+ * @retval #MEDIA_VISION_ERROR_NONE Successful
+ * @retval #MEDIA_VISION_ERROR_NOT_SUPPORTED Not supported
+ * @retval #MEDIA_VISION_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #MEDIA_VISION_ERROR_INTERNAL Internal error
+ * @retval #MEDIA_VISION_ERROR_NOT_SUPPORTED_FORMAT Source colorspace
+ * isn't supported
+ *
+ * @pre Create a source handle by calling mv_create_source()
+ * @pre Create an inference handle by calling mv_object_detect_3d_create()
+ * @pre Prepare an inference by calling mv_object_detect_3d_prepare()
+ * @post
+ *
+ * @see mv_object_detect_3d_result_s structure
+ */
+int mv_object_detection_3d_inference(mv_object_detection_3d_h infer, mv_source_h source);
+
+/**
+ * @brief Gets the probability value to the detected object.
+ * @details Use this function to get the probability value after calling @ref mv_object_detection_3d_inference().
+ *
+ * @since_tizen 7.0
+ *
+ * @remarks The @a result must NOT be released using free()
+ *
+ * @param[in] handle The handle to the face recognition object.
+ * @param[out] out_probability A pointer to probability array.
+ *
+ * @return @c 0 on success, otherwise a negative error value
+ * @retval #MEDIA_VISION_ERROR_NONE Successful
+ * @retval #MEDIA_VISION_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #MEDIA_VISION_ERROR_INVALID_OPERATION Invalid operation
+ *
+ * @pre Request an inference by calling @ref mv_object_detection_3d_inference()
+ */
+int mv_object_detection_3d_get_probability(mv_object_detection_3d_h handle, unsigned int *out_probability);
+
+/**
+ * @brief Gets the number of points to the 3D bounding box of the detected object.
+ * @details Use this function to get the number of points after calling @ref mv_object_detection_3d_inference().
+ *
+ * @since_tizen 7.0
+ *
+ * @remarks The @a result must NOT be released using free()
+ *
+ * @param[in] handle The handle to the face recognition object.
+ * @param[out] out_num_of_points Number of points.
+ *
+ * @return @c 0 on success, otherwise a negative error value
+ * @retval #MEDIA_VISION_ERROR_NONE Successful
+ * @retval #MEDIA_VISION_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #MEDIA_VISION_ERROR_INVALID_OPERATION Invalid operation
+ *
+ * @pre Request an inference by calling @ref mv_object_detection_3d_inference()
+ */
+int mv_object_detection_3d_get_num_of_points(mv_object_detection_3d_h handle, unsigned int *out_num_of_points);
+
+/**
+ * @brief Gets the x and y coordinates values to the 3D bounding box of the detected object.
+ * @details Use this function to get the coordinates values after calling @ref mv_object_detection_3d_inference().
+ *
+ * @since_tizen 7.0
+ *
+ * @remarks The @a result must NOT be released using free()
+ *
+ * @param[in] handle The handle to the face recognition object.
+ * @param[out] out_x A pointer to x coordinates array.
+ * @param[out] out_y A pointer to y coordinates array.
+ *
+ * @return @c 0 on success, otherwise a negative error value
+ * @retval #MEDIA_VISION_ERROR_NONE Successful
+ * @retval #MEDIA_VISION_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #MEDIA_VISION_ERROR_INVALID_OPERATION Invalid operation
+ *
+ * @pre Request an inference by calling @ref mv_object_detection_3d_inference()
+ */
+int mv_object_detection_3d_get_points(mv_object_detection_3d_h handle, unsigned int **out_x, unsigned int **out_y);
+/**
+ * @}
+ */
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
+#endif /* __TIZEN_MEDIAVISION_OBJECT_DETECT_3D_INTERNAL_H__ */
*/
#include "mv_private.h"
-#include "mv_object_detection_3d.h"
+#include "mv_object_detection_3d_internal.h"
#include "mv_object_detection_3d_open.h"
/**
#include "gtest/gtest.h"
#include "ImageHelper.h"
-#include "mv_object_detection_3d.h"
+#include "mv_object_detection_3d_internal.h"
#define IMAGE_PATH "/res/inference/images/cup.jpeg"