[UTC][capi-media-vision][ACR-1720] Add UTC for 3D APIs 46/282246/2
authorTae-Young Chung <ty83.chung@samsung.com>
Thu, 29 Sep 2022 05:25:15 +0000 (14:25 +0900)
committerTae-Young Chung <ty83.chung@samsung.com>
Tue, 4 Oct 2022 04:36:02 +0000 (13:36 +0900)
Change-Id: I6c2f1d20311f20c42a43d3ca247fb52d37c3e2c1
Signed-off-by: Tae-Young Chung <ty83.chung@samsung.com>
13 files changed:
packaging/utc/core-capi-media-vision-tests.spec
scripts_tpk/spec.sh
src/utc/capi-media-vision/CMakeLists.txt
src/utc/capi-media-vision/public.list
src/utc/capi-media-vision/res/3d/calibOcv.json [new file with mode: 0644]
src/utc/capi-media-vision/res/3d/calibOcv.yaml [new file with mode: 0644]
src/utc/capi-media-vision/res/3d/im0.jpeg [new file with mode: 0644]
src/utc/capi-media-vision/res/3d/im1.jpeg [new file with mode: 0644]
src/utc/capi-media-vision/tct-capi-media-vision-core_mobile.h
src/utc/capi-media-vision/tct-capi-media-vision-core_tizeniot.h
src/utc/capi-media-vision/tct-capi-media-vision-core_tv.h
src/utc/capi-media-vision/tct-capi-media-vision-core_wearable.h
src/utc/capi-media-vision/utc-mv_3d.c [new file with mode: 0755]

index d6647709973a0c710929e304e7e2f35b33c2bd57..8d6a04b59962b44aa73f5079638c69f9b8754bec 100755 (executable)
@@ -128,6 +128,8 @@ mkdir -p %{buildroot}%{APP_PATH}%{name}/data/res/face_recognition/images
 cp src/utc/capi-media-vision/res/face_recognition/models/* %{buildroot}%{APP_PATH}%{name}/data/res/face_recognition/models/
 cp src/utc/capi-media-vision/res/face_recognition/images/* %{buildroot}%{APP_PATH}%{name}/data/res/face_recognition/images/
 
+mkdir -p %{buildroot}%{APP_PATH}%{name}/data/res/3d/
+cp src/utc/capi-media-vision/res/3d/* %{buildroot}%{APP_PATH}%{name}/data/res/3d/
 %post
 
 %postun
index 932ab81b66ad31f4596f8ee3c0b68f5fed8ab00a..5d04d002c753213f293dc769842111cfc70f4fb3 100644 (file)
@@ -907,6 +907,15 @@ case "$1" in
                        chsmack -e "User::App::Shared" $DEVICE_PHYSICAL_STORAGE_30/res/face_recognition/images/P1/*
                        chsmack -a "User::App::Shared" $DEVICE_PHYSICAL_STORAGE_30/res/face_recognition/images/P2/*
                        chsmack -e "User::App::Shared" $DEVICE_PHYSICAL_STORAGE_30/res/face_recognition/images/P2/*
+
+                       mkdir -p $DEVICE_PHYSICAL_STORAGE_30/res/3d
+                       chsmack -a "User::App::Shared" $DEVICE_PHYSICAL_STORAGE_30/res/3d
+                       chsmack -e "User::App::Shared" $DEVICE_PHYSICAL_STORAGE_30/res/3d
+                       cp res/3d/* $DEVICE_PHYSICAL_STORAGE_30/res/3d/
+                       chsmack -a "User::App::Shared" $DEVICE_PHYSICAL_STORAGE_30/res/3d/*
+                       chsmack -e "User::App::Shared" $DEVICE_PHYSICAL_STORAGE_30/res/3d/*
+                       chmod -R 777 $DEVICE_SUITE_TARGET_30/res/3d
+                       chown -R 5000:5000 $DEVICE_SUITE_TARGET_30/res/3d
                        ;;
        "org.tizen.capi-message-port-native-utc")
                        echo "Installing pre-requisites for the package $1"
index 6e81eab4e78dc7d49fa0c6444cb3f6373d755869..65306756ba35e9f5768ee289a952e3ad1df2b243 100644 (file)
@@ -17,6 +17,7 @@ IF( DEFINED TIZENIOT || DEFINED MOBILE || DEFINED WEARABLE)
 SET(TC_SOURCES
     utc-mv_roi_tracker.c
     utc-mv_face_recognition.c
+    utc-mv_3d.c
 )
 ENDIF()
 
index d4570901bc34ffc5477b0bf81f40e0c4139e0264..df3962dd69bfed7e63f1c91efccd75cb99b2a618 100755 (executable)
@@ -98,3 +98,12 @@ mv_face_recognition_prepare
 mv_face_recognition_register
 mv_face_recognition_unregister
 mv_face_recognition_get_label
+mv_3d_create
+mv_3d_destroy
+mv_3d_configure
+mv_3d_set_depth_cb
+mv_3d_set_pointcloud_cb
+mv_3d_preapre
+mv_3d_run
+mv_3d_run_async
+mv_3d_pointcloud_write_file
diff --git a/src/utc/capi-media-vision/res/3d/calibOcv.json b/src/utc/capi-media-vision/res/3d/calibOcv.json
new file mode 100644 (file)
index 0000000..0eb0c60
--- /dev/null
@@ -0,0 +1,17 @@
+{
+        "width" : 718,
+        "height" : 496,
+        "intrinsic_matrix" :
+        [
+                1038.018,
+                0,
+                0,
+                0,
+                1038.018,
+                0,
+                322.034,
+                243.393,
+                1
+        ]
+}
+
diff --git a/src/utc/capi-media-vision/res/3d/calibOcv.yaml b/src/utc/capi-media-vision/res/3d/calibOcv.yaml
new file mode 100644 (file)
index 0000000..9c08d44
--- /dev/null
@@ -0,0 +1,37 @@
+%YAML:1.0
+---
+LEFT_CAM_INTRINSIC: !!opencv-matrix
+   rows: 3
+   cols: 3
+   dt: d
+   data: [ 1.0380180000000000e+03, 0., 3.2203699999999998e+02, 0.,
+       1.0380180000000000e+03, 2.4339300000000000e+02, 0., 0., 1. ]
+RIGHT_CAM_INTRINSIC: !!opencv-matrix
+   rows: 3
+   cols: 3
+   dt: d
+   data: [ 1.0380180000000000e+03, 0., 3.7530799999999999e+02, 0.,
+       1.0380180000000000e+03, 2.4339300000000000e+02, 0., 0., 1. ]
+LEFT_CAM_DISTCOEFFS: !!opencv-matrix
+   rows: 5
+   cols: 1
+   dt: d
+   data: [ 0., 0., 0., 0., 0. ]
+RIGHT_CAM_DISTCOEFFS: !!opencv-matrix
+   rows: 5
+   cols: 1
+   dt: d
+   data: [ 0., 0., 0., 0., 0. ]
+Image_Size:
+   - 718
+   - 496
+STEREO_ROTATION: !!opencv-matrix
+   rows: 3
+   cols: 1
+   dt: d
+   data: [ 0., 0., 0. ]
+STEREO_TRANSLATION: !!opencv-matrix
+   rows: 3
+   cols: 1
+   dt: d
+   data: [ 1.7625200000000001e+02, 0., 0. ]
diff --git a/src/utc/capi-media-vision/res/3d/im0.jpeg b/src/utc/capi-media-vision/res/3d/im0.jpeg
new file mode 100644 (file)
index 0000000..cd0e000
Binary files /dev/null and b/src/utc/capi-media-vision/res/3d/im0.jpeg differ
diff --git a/src/utc/capi-media-vision/res/3d/im1.jpeg b/src/utc/capi-media-vision/res/3d/im1.jpeg
new file mode 100644 (file)
index 0000000..1887b6d
Binary files /dev/null and b/src/utc/capi-media-vision/res/3d/im1.jpeg differ
index 0de7d1a83c8299ca913cd1376f9c98fddcbb0241..56e4a16a5d3a95b3536fbb483e78a0c26d665877 100755 (executable)
@@ -45,6 +45,8 @@ extern void utc_capi_media_vision_roi_tracker_startup(void);
 extern void utc_capi_media_vision_roi_tracker_cleanup(void);
 extern void utc_capi_media_vision_face_recognition_startup(void);
 extern void utc_capi_media_vision_face_recognition_cleanup(void);
+extern void utc_capi_media_vision_3d_startup(void);
+extern void utc_capi_media_vision_3d_cleanup(void);
 
 extern int utc_mediavision_mv_create_source_p(void);
 extern int utc_mediavision_mv_create_source_n(void);
@@ -279,6 +281,25 @@ extern int utc_mediavision_mv_face_recognition_get_label_n2(void);
 extern int utc_mediavision_mv_face_recognition_unregister_p(void);
 extern int utc_mediavision_mv_face_recognition_unregister_n1(void);
 extern int utc_mediavision_mv_face_recognition_unregister_n2(void);
+extern int utc_mediavision_mv_3d_create_p(void);
+extern int utc_mediavision_mv_3d_create_n(void);
+extern int utc_mediavision_mv_3d_destroy_p(void);
+extern int utc_mediavision_mv_3d_destroy_n(void);
+extern int utc_mediavision_mv_3d_configure_p(void);
+extern int utc_mediavision_mv_3d_configure_n(void);
+extern int utc_mediavision_mv_3d_set_depth_cb_p(void);
+extern int utc_mediavision_mv_3d_set_depth_cb_n(void);
+extern int utc_mediavision_mv_3d_set_pointcloud_cb_p(void);
+extern int utc_mediavision_mv_3d_set_pointcloud_cb_n(void);
+extern int utc_mediavision_mv_3d_prepare_p(void);
+extern int utc_mediavision_mv_3d_prepare_n1(void);
+extern int utc_mediavision_mv_3d_prepare_n2(void);
+extern int utc_mediavision_mv_3d_run_p(void);
+extern int utc_mediavision_mv_3d_run_n(void);
+extern int utc_mediavision_mv_3d_run_async_p(void);
+extern int utc_mediavision_mv_3d_run_async_n(void);
+extern int utc_mediavision_mv_3d_pointcloud_write_file_p(void);
+extern int utc_mediavision_mv_3d_pointcloud_write_file_n(void);
 
 testcase tc_array[] = {
        {"utc_mediavision_mv_create_source_p",utc_mediavision_mv_create_source_p,utc_capi_media_vision_common_startup,utc_capi_media_vision_common_cleanup},
@@ -514,6 +535,25 @@ testcase tc_array[] = {
        {"utc_mediavision_mv_face_recognition_unregister_p", utc_mediavision_mv_face_recognition_unregister_p,utc_capi_media_vision_face_recognition_startup,utc_capi_media_vision_face_recognition_cleanup},
        {"utc_mediavision_mv_face_recognition_unregister_n1", utc_mediavision_mv_face_recognition_unregister_n1,utc_capi_media_vision_face_recognition_startup,utc_capi_media_vision_face_recognition_cleanup},
        {"utc_mediavision_mv_face_recognition_unregister_n2", utc_mediavision_mv_face_recognition_unregister_n2,utc_capi_media_vision_face_recognition_startup,utc_capi_media_vision_face_recognition_cleanup},
+       {"utc_mediavision_mv_3d_create_p", utc_mediavision_mv_3d_create_p,utc_capi_media_vision_3d_startup,utc_capi_media_vision_3d_cleanup},
+       {"utc_mediavision_mv_3d_create_n", utc_mediavision_mv_3d_create_n,utc_capi_media_vision_3d_startup,utc_capi_media_vision_3d_cleanup},
+       {"utc_mediavision_mv_3d_destroy_p", utc_mediavision_mv_3d_destroy_p,utc_capi_media_vision_3d_startup,utc_capi_media_vision_3d_cleanup},
+       {"utc_mediavision_mv_3d_destroy_n", utc_mediavision_mv_3d_destroy_n,utc_capi_media_vision_3d_startup,utc_capi_media_vision_3d_cleanup},
+       {"utc_mediavision_mv_3d_configure_p", utc_mediavision_mv_3d_configure_p,utc_capi_media_vision_3d_startup,utc_capi_media_vision_3d_cleanup},
+       {"utc_mediavision_mv_3d_configure_n", utc_mediavision_mv_3d_configure_n,utc_capi_media_vision_3d_startup,utc_capi_media_vision_3d_cleanup},
+       {"utc_mediavision_mv_3d_set_depth_cb_p", utc_mediavision_mv_3d_set_depth_cb_p,utc_capi_media_vision_3d_startup,utc_capi_media_vision_3d_cleanup},
+       {"utc_mediavision_mv_3d_set_depth_cb_n", utc_mediavision_mv_3d_set_depth_cb_n,utc_capi_media_vision_3d_startup,utc_capi_media_vision_3d_cleanup},
+       {"utc_mediavision_mv_3d_set_pointcloud_cb_p", utc_mediavision_mv_3d_set_pointcloud_cb_p,utc_capi_media_vision_3d_startup,utc_capi_media_vision_3d_cleanup},
+       {"utc_mediavision_mv_3d_set_pointcloud_cb_n", utc_mediavision_mv_3d_set_pointcloud_cb_n,utc_capi_media_vision_3d_startup,utc_capi_media_vision_3d_cleanup},
+       {"utc_mediavision_mv_3d_prepare_p", utc_mediavision_mv_3d_prepare_p,utc_capi_media_vision_3d_startup,utc_capi_media_vision_3d_cleanup},
+       {"utc_mediavision_mv_3d_prepare_n1", utc_mediavision_mv_3d_prepare_n1,utc_capi_media_vision_3d_startup,utc_capi_media_vision_3d_cleanup},
+       {"utc_mediavision_mv_3d_prepare_n2", utc_mediavision_mv_3d_prepare_n1,utc_capi_media_vision_3d_startup,utc_capi_media_vision_3d_cleanup},
+       {"utc_mediavision_mv_3d_run_p", utc_mediavision_mv_3d_run_p,utc_capi_media_vision_3d_startup,utc_capi_media_vision_3d_cleanup},
+       {"utc_mediavision_mv_3d_run_n", utc_mediavision_mv_3d_run_n,utc_capi_media_vision_3d_startup,utc_capi_media_vision_3d_cleanup},
+       {"utc_mediavision_mv_3d_run_async_p", utc_mediavision_mv_3d_run_async_p,utc_capi_media_vision_3d_startup,utc_capi_media_vision_3d_cleanup},
+       {"utc_mediavision_mv_3d_run_async_n", utc_mediavision_mv_3d_run_async_n,utc_capi_media_vision_3d_startup,utc_capi_media_vision_3d_cleanup},
+       {"utc_mediavision_mv_3d_pointcloud_write_file_p", utc_mediavision_mv_3d_pointcloud_write_file_p,utc_capi_media_vision_3d_startup,utc_capi_media_vision_3d_cleanup},
+       {"utc_mediavision_mv_3d_pointcloud_write_file_n", utc_mediavision_mv_3d_pointcloud_write_file_n,utc_capi_media_vision_3d_startup,utc_capi_media_vision_3d_cleanup},
        {NULL, NULL}
 };
 
index a7f511731a89abec9ab9b3b0913f8990be17c58e..882812f96a25285eafb894af3cf9441a177dd9ec 100755 (executable)
@@ -45,6 +45,8 @@ extern void utc_capi_media_vision_roi_tracker_startup(void);
 extern void utc_capi_media_vision_roi_tracker_cleanup(void);
 extern void utc_capi_media_vision_face_recognition_startup(void);
 extern void utc_capi_media_vision_face_recognition_cleanup(void);
+extern void utc_capi_media_vision_3d_startup(void);
+extern void utc_capi_media_vision_3d_cleanup(void);
 
 extern int utc_mediavision_mv_inference_foreach_supported_engine(void);
 extern int utc_mediavision_mv_inference_create_p(void);
@@ -279,6 +281,25 @@ extern int utc_mediavision_mv_face_recognition_get_label_n2(void);
 extern int utc_mediavision_mv_face_recognition_unregister_p(void);
 extern int utc_mediavision_mv_face_recognition_unregister_n1(void);
 extern int utc_mediavision_mv_face_recognition_unregister_n2(void);
+extern int utc_mediavision_mv_3d_create_p(void);
+extern int utc_mediavision_mv_3d_create_n(void);
+extern int utc_mediavision_mv_3d_destroy_p(void);
+extern int utc_mediavision_mv_3d_destroy_n(void);
+extern int utc_mediavision_mv_3d_configure_p(void);
+extern int utc_mediavision_mv_3d_configure_n(void);
+extern int utc_mediavision_mv_3d_set_depth_cb_p(void);
+extern int utc_mediavision_mv_3d_set_depth_cb_n(void);
+extern int utc_mediavision_mv_3d_set_pointcloud_cb_p(void);
+extern int utc_mediavision_mv_3d_set_pointcloud_cb_n(void);
+extern int utc_mediavision_mv_3d_prepare_p(void);
+extern int utc_mediavision_mv_3d_prepare_n1(void);
+extern int utc_mediavision_mv_3d_prepare_n2(void);
+extern int utc_mediavision_mv_3d_run_p(void);
+extern int utc_mediavision_mv_3d_run_n(void);
+extern int utc_mediavision_mv_3d_run_async_p(void);
+extern int utc_mediavision_mv_3d_run_async_n(void);
+extern int utc_mediavision_mv_3d_pointcloud_write_file_p(void);
+extern int utc_mediavision_mv_3d_pointcloud_write_file_n(void);
 
 testcase tc_array[] = {
        {"utc_mediavision_mv_create_source_p",utc_mediavision_mv_create_source_p,utc_capi_media_vision_common_startup,utc_capi_media_vision_common_cleanup},
@@ -514,6 +535,25 @@ testcase tc_array[] = {
        {"utc_mediavision_mv_face_recognition_unregister_p", utc_mediavision_mv_face_recognition_unregister_p,utc_capi_media_vision_face_recognition_startup,utc_capi_media_vision_face_recognition_cleanup},
        {"utc_mediavision_mv_face_recognition_unregister_n1", utc_mediavision_mv_face_recognition_unregister_n1,utc_capi_media_vision_face_recognition_startup,utc_capi_media_vision_face_recognition_cleanup},
        {"utc_mediavision_mv_face_recognition_unregister_n2", utc_mediavision_mv_face_recognition_unregister_n2,utc_capi_media_vision_face_recognition_startup,utc_capi_media_vision_face_recognition_cleanup},
+       {"utc_mediavision_mv_3d_create_p", utc_mediavision_mv_3d_create_p,utc_capi_media_vision_3d_startup,utc_capi_media_vision_3d_cleanup},
+       {"utc_mediavision_mv_3d_create_n", utc_mediavision_mv_3d_create_n,utc_capi_media_vision_3d_startup,utc_capi_media_vision_3d_cleanup},
+       {"utc_mediavision_mv_3d_destroy_p", utc_mediavision_mv_3d_destroy_p,utc_capi_media_vision_3d_startup,utc_capi_media_vision_3d_cleanup},
+       {"utc_mediavision_mv_3d_destroy_n", utc_mediavision_mv_3d_destroy_n,utc_capi_media_vision_3d_startup,utc_capi_media_vision_3d_cleanup},
+       {"utc_mediavision_mv_3d_configure_p", utc_mediavision_mv_3d_configure_p,utc_capi_media_vision_3d_startup,utc_capi_media_vision_3d_cleanup},
+       {"utc_mediavision_mv_3d_configure_n", utc_mediavision_mv_3d_configure_n,utc_capi_media_vision_3d_startup,utc_capi_media_vision_3d_cleanup},
+       {"utc_mediavision_mv_3d_set_depth_cb_p", utc_mediavision_mv_3d_set_depth_cb_p,utc_capi_media_vision_3d_startup,utc_capi_media_vision_3d_cleanup},
+       {"utc_mediavision_mv_3d_set_depth_cb_n", utc_mediavision_mv_3d_set_depth_cb_n,utc_capi_media_vision_3d_startup,utc_capi_media_vision_3d_cleanup},
+       {"utc_mediavision_mv_3d_set_pointcloud_cb_p", utc_mediavision_mv_3d_set_pointcloud_cb_p,utc_capi_media_vision_3d_startup,utc_capi_media_vision_3d_cleanup},
+       {"utc_mediavision_mv_3d_set_pointcloud_cb_n", utc_mediavision_mv_3d_set_pointcloud_cb_n,utc_capi_media_vision_3d_startup,utc_capi_media_vision_3d_cleanup},
+       {"utc_mediavision_mv_3d_prepare_p", utc_mediavision_mv_3d_prepare_p,utc_capi_media_vision_3d_startup,utc_capi_media_vision_3d_cleanup},
+       {"utc_mediavision_mv_3d_prepare_n1", utc_mediavision_mv_3d_prepare_n1,utc_capi_media_vision_3d_startup,utc_capi_media_vision_3d_cleanup},
+       {"utc_mediavision_mv_3d_prepare_n2", utc_mediavision_mv_3d_prepare_n1,utc_capi_media_vision_3d_startup,utc_capi_media_vision_3d_cleanup},
+       {"utc_mediavision_mv_3d_run_p", utc_mediavision_mv_3d_run_p,utc_capi_media_vision_3d_startup,utc_capi_media_vision_3d_cleanup},
+       {"utc_mediavision_mv_3d_run_n", utc_mediavision_mv_3d_run_n,utc_capi_media_vision_3d_startup,utc_capi_media_vision_3d_cleanup},
+       {"utc_mediavision_mv_3d_run_async_p", utc_mediavision_mv_3d_run_async_p,utc_capi_media_vision_3d_startup,utc_capi_media_vision_3d_cleanup},
+       {"utc_mediavision_mv_3d_run_async_n", utc_mediavision_mv_3d_run_async_n,utc_capi_media_vision_3d_startup,utc_capi_media_vision_3d_cleanup},
+       {"utc_mediavision_mv_3d_pointcloud_write_file_p", utc_mediavision_mv_3d_pointcloud_write_file_p,utc_capi_media_vision_3d_startup,utc_capi_media_vision_3d_cleanup},
+       {"utc_mediavision_mv_3d_pointcloud_write_file_n", utc_mediavision_mv_3d_pointcloud_write_file_n,utc_capi_media_vision_3d_startup,utc_capi_media_vision_3d_cleanup},
        {NULL, NULL}
 };
 
index 8944c9dc2b0649fa5bb1f2fb42ea5b65d1224987..8c271fbe09aaa64243b7d3b4330ca94656fe169d 100755 (executable)
@@ -41,6 +41,8 @@ extern void utc_capi_media_vision_inference_pose_landmark_detect_cb2_startup(voi
 extern void utc_capi_media_vision_inference_pose_landmark_detect_cb3_startup(void);
 extern void utc_capi_media_vision_inference_pose_landmark_detect_cb4_startup(void);
 extern void utc_capi_media_vision_inference_pose_landmark_detect_cb5_startup(void);
+extern void utc_capi_media_vision_3d_startup(void);
+extern void utc_capi_media_vision_3d_cleanup(void);
 
 extern int utc_mediavision_mv_create_source_p(void);
 extern int utc_mediavision_mv_create_source_n(void);
@@ -246,6 +248,25 @@ extern int utc_mediavision_mv_pose_set_from_file_n1(void);
 extern int utc_mediavision_mv_pose_set_from_file_n2(void);
 extern int utc_mediavision_mv_pose_compare_p(void);
 extern int utc_mediavision_mv_pose_compare_n(void);
+extern int utc_mediavision_mv_3d_create_p(void);
+extern int utc_mediavision_mv_3d_create_n(void);
+extern int utc_mediavision_mv_3d_destroy_p(void);
+extern int utc_mediavision_mv_3d_destroy_n(void);
+extern int utc_mediavision_mv_3d_configure_p(void);
+extern int utc_mediavision_mv_3d_configure_n(void);
+extern int utc_mediavision_mv_3d_set_depth_cb_p(void);
+extern int utc_mediavision_mv_3d_set_depth_cb_n(void);
+extern int utc_mediavision_mv_3d_set_pointcloud_cb_p(void);
+extern int utc_mediavision_mv_3d_set_pointcloud_cb_n(void);
+extern int utc_mediavision_mv_3d_prepare_p(void);
+extern int utc_mediavision_mv_3d_prepare_n1(void);
+extern int utc_mediavision_mv_3d_prepare_n2(void);
+extern int utc_mediavision_mv_3d_run_p(void);
+extern int utc_mediavision_mv_3d_run_n(void);
+extern int utc_mediavision_mv_3d_run_async_p(void);
+extern int utc_mediavision_mv_3d_run_async_n(void);
+extern int utc_mediavision_mv_3d_pointcloud_write_file_p(void);
+extern int utc_mediavision_mv_3d_pointcloud_write_file_n(void);
 
 testcase tc_array[] = {
        {"utc_mediavision_mv_create_source_p",utc_mediavision_mv_create_source_p,utc_capi_media_vision_common_startup,utc_capi_media_vision_common_cleanup},
@@ -452,6 +473,25 @@ testcase tc_array[] = {
        {"utc_mediavision_mv_pose_set_from_file_n2", utc_mediavision_mv_pose_set_from_file_n2,utc_capi_media_vision_inference_startup2,utc_capi_media_vision_inference_cleanup2},
        {"utc_mediavision_mv_pose_compare_p", utc_mediavision_mv_pose_compare_p,utc_capi_media_vision_inference_pose_landmark_detect_cb4_startup,utc_capi_media_vision_inference_cleanup2},
        {"utc_mediavision_mv_pose_compare_n", utc_mediavision_mv_pose_compare_n,utc_capi_media_vision_inference_startup2,utc_capi_media_vision_inference_cleanup2},
+       {"utc_mediavision_mv_3d_create_p", utc_mediavision_mv_3d_create_p,utc_capi_media_vision_3d_startup,utc_capi_media_vision_3d_cleanup},
+       {"utc_mediavision_mv_3d_create_n", utc_mediavision_mv_3d_create_n,utc_capi_media_vision_3d_startup,utc_capi_media_vision_3d_cleanup},
+       {"utc_mediavision_mv_3d_destroy_p", utc_mediavision_mv_3d_destroy_p,utc_capi_media_vision_3d_startup,utc_capi_media_vision_3d_cleanup},
+       {"utc_mediavision_mv_3d_destroy_n", utc_mediavision_mv_3d_destroy_n,utc_capi_media_vision_3d_startup,utc_capi_media_vision_3d_cleanup},
+       {"utc_mediavision_mv_3d_configure_p", utc_mediavision_mv_3d_configure_p,utc_capi_media_vision_3d_startup,utc_capi_media_vision_3d_cleanup},
+       {"utc_mediavision_mv_3d_configure_n", utc_mediavision_mv_3d_configure_n,utc_capi_media_vision_3d_startup,utc_capi_media_vision_3d_cleanup},
+       {"utc_mediavision_mv_3d_set_depth_cb_p", utc_mediavision_mv_3d_set_depth_cb_p,utc_capi_media_vision_3d_startup,utc_capi_media_vision_3d_cleanup},
+       {"utc_mediavision_mv_3d_set_depth_cb_n", utc_mediavision_mv_3d_set_depth_cb_n,utc_capi_media_vision_3d_startup,utc_capi_media_vision_3d_cleanup},
+       {"utc_mediavision_mv_3d_set_pointcloud_cb_p", utc_mediavision_mv_3d_set_pointcloud_cb_p,utc_capi_media_vision_3d_startup,utc_capi_media_vision_3d_cleanup},
+       {"utc_mediavision_mv_3d_set_pointcloud_cb_n", utc_mediavision_mv_3d_set_pointcloud_cb_n,utc_capi_media_vision_3d_startup,utc_capi_media_vision_3d_cleanup},
+       {"utc_mediavision_mv_3d_prepare_p", utc_mediavision_mv_3d_prepare_p,utc_capi_media_vision_3d_startup,utc_capi_media_vision_3d_cleanup},
+       {"utc_mediavision_mv_3d_prepare_n1", utc_mediavision_mv_3d_prepare_n1,utc_capi_media_vision_3d_startup,utc_capi_media_vision_3d_cleanup},
+       {"utc_mediavision_mv_3d_prepare_n2", utc_mediavision_mv_3d_prepare_n1,utc_capi_media_vision_3d_startup,utc_capi_media_vision_3d_cleanup},
+       {"utc_mediavision_mv_3d_run_p", utc_mediavision_mv_3d_run_p,utc_capi_media_vision_3d_startup,utc_capi_media_vision_3d_cleanup},
+       {"utc_mediavision_mv_3d_run_n", utc_mediavision_mv_3d_run_n,utc_capi_media_vision_3d_startup,utc_capi_media_vision_3d_cleanup},
+       {"utc_mediavision_mv_3d_run_async_p", utc_mediavision_mv_3d_run_async_p,utc_capi_media_vision_3d_startup,utc_capi_media_vision_3d_cleanup},
+       {"utc_mediavision_mv_3d_run_async_n", utc_mediavision_mv_3d_run_async_n,utc_capi_media_vision_3d_startup,utc_capi_media_vision_3d_cleanup},
+       {"utc_mediavision_mv_3d_pointcloud_write_file_p", utc_mediavision_mv_3d_pointcloud_write_file_p,utc_capi_media_vision_3d_startup,utc_capi_media_vision_3d_cleanup},
+       {"utc_mediavision_mv_3d_pointcloud_write_file_n", utc_mediavision_mv_3d_pointcloud_write_file_n,utc_capi_media_vision_3d_startup,utc_capi_media_vision_3d_cleanup},
        {NULL, NULL}
 };
 
index f9c2c8fc753ad1c8963a23c68efb3d16d6b37ef1..4b641eb5f6c6770530c4a20e48620a5a0c244d1e 100755 (executable)
@@ -45,6 +45,8 @@ extern void utc_capi_media_vision_roi_tracker_startup(void);
 extern void utc_capi_media_vision_roi_tracker_cleanup(void);
 extern void utc_capi_media_vision_face_recognition_startup(void);
 extern void utc_capi_media_vision_face_recognition_cleanup(void);
+extern void utc_capi_media_vision_3d_startup(void);
+extern void utc_capi_media_vision_3d_cleanup(void);
 
 extern int utc_mediavision_mv_create_source_p(void);
 extern int utc_mediavision_mv_create_source_n(void);
@@ -279,6 +281,25 @@ extern int utc_mediavision_mv_face_recognition_get_label_n2(void);
 extern int utc_mediavision_mv_face_recognition_unregister_p(void);
 extern int utc_mediavision_mv_face_recognition_unregister_n1(void);
 extern int utc_mediavision_mv_face_recognition_unregister_n2(void);
+extern int utc_mediavision_mv_3d_create_p(void);
+extern int utc_mediavision_mv_3d_create_n(void);
+extern int utc_mediavision_mv_3d_destroy_p(void);
+extern int utc_mediavision_mv_3d_destroy_n(void);
+extern int utc_mediavision_mv_3d_configure_p(void);
+extern int utc_mediavision_mv_3d_configure_n(void);
+extern int utc_mediavision_mv_3d_set_depth_cb_p(void);
+extern int utc_mediavision_mv_3d_set_depth_cb_n(void);
+extern int utc_mediavision_mv_3d_set_pointcloud_cb_p(void);
+extern int utc_mediavision_mv_3d_set_pointcloud_cb_n(void);
+extern int utc_mediavision_mv_3d_prepare_p(void);
+extern int utc_mediavision_mv_3d_prepare_n1(void);
+extern int utc_mediavision_mv_3d_prepare_n2(void);
+extern int utc_mediavision_mv_3d_run_p(void);
+extern int utc_mediavision_mv_3d_run_n(void);
+extern int utc_mediavision_mv_3d_run_async_p(void);
+extern int utc_mediavision_mv_3d_run_async_n(void);
+extern int utc_mediavision_mv_3d_pointcloud_write_file_p(void);
+extern int utc_mediavision_mv_3d_pointcloud_write_file_n(void);
 
 testcase tc_array[] = {
        {"utc_mediavision_mv_create_source_p",utc_mediavision_mv_create_source_p,utc_capi_media_vision_common_startup,utc_capi_media_vision_common_cleanup},
@@ -514,6 +535,25 @@ testcase tc_array[] = {
        {"utc_mediavision_mv_face_recognition_unregister_p", utc_mediavision_mv_face_recognition_unregister_p,utc_capi_media_vision_face_recognition_startup,utc_capi_media_vision_face_recognition_cleanup},
        {"utc_mediavision_mv_face_recognition_unregister_n1", utc_mediavision_mv_face_recognition_unregister_n1,utc_capi_media_vision_face_recognition_startup,utc_capi_media_vision_face_recognition_cleanup},
        {"utc_mediavision_mv_face_recognition_unregister_n2", utc_mediavision_mv_face_recognition_unregister_n2,utc_capi_media_vision_face_recognition_startup,utc_capi_media_vision_face_recognition_cleanup},
+       {"utc_mediavision_mv_3d_create_p", utc_mediavision_mv_3d_create_p,utc_capi_media_vision_3d_startup,utc_capi_media_vision_3d_cleanup},
+       {"utc_mediavision_mv_3d_create_n", utc_mediavision_mv_3d_create_n,utc_capi_media_vision_3d_startup,utc_capi_media_vision_3d_cleanup},
+       {"utc_mediavision_mv_3d_destroy_p", utc_mediavision_mv_3d_destroy_p,utc_capi_media_vision_3d_startup,utc_capi_media_vision_3d_cleanup},
+       {"utc_mediavision_mv_3d_destroy_n", utc_mediavision_mv_3d_destroy_n,utc_capi_media_vision_3d_startup,utc_capi_media_vision_3d_cleanup},
+       {"utc_mediavision_mv_3d_configure_p", utc_mediavision_mv_3d_configure_p,utc_capi_media_vision_3d_startup,utc_capi_media_vision_3d_cleanup},
+       {"utc_mediavision_mv_3d_configure_n", utc_mediavision_mv_3d_configure_n,utc_capi_media_vision_3d_startup,utc_capi_media_vision_3d_cleanup},
+       {"utc_mediavision_mv_3d_set_depth_cb_p", utc_mediavision_mv_3d_set_depth_cb_p,utc_capi_media_vision_3d_startup,utc_capi_media_vision_3d_cleanup},
+       {"utc_mediavision_mv_3d_set_depth_cb_n", utc_mediavision_mv_3d_set_depth_cb_n,utc_capi_media_vision_3d_startup,utc_capi_media_vision_3d_cleanup},
+       {"utc_mediavision_mv_3d_set_pointcloud_cb_p", utc_mediavision_mv_3d_set_pointcloud_cb_p,utc_capi_media_vision_3d_startup,utc_capi_media_vision_3d_cleanup},
+       {"utc_mediavision_mv_3d_set_pointcloud_cb_n", utc_mediavision_mv_3d_set_pointcloud_cb_n,utc_capi_media_vision_3d_startup,utc_capi_media_vision_3d_cleanup},
+       {"utc_mediavision_mv_3d_prepare_p", utc_mediavision_mv_3d_prepare_p,utc_capi_media_vision_3d_startup,utc_capi_media_vision_3d_cleanup},
+       {"utc_mediavision_mv_3d_prepare_n1", utc_mediavision_mv_3d_prepare_n1,utc_capi_media_vision_3d_startup,utc_capi_media_vision_3d_cleanup},
+       {"utc_mediavision_mv_3d_prepare_n2", utc_mediavision_mv_3d_prepare_n1,utc_capi_media_vision_3d_startup,utc_capi_media_vision_3d_cleanup},
+       {"utc_mediavision_mv_3d_run_p", utc_mediavision_mv_3d_run_p,utc_capi_media_vision_3d_startup,utc_capi_media_vision_3d_cleanup},
+       {"utc_mediavision_mv_3d_run_n", utc_mediavision_mv_3d_run_n,utc_capi_media_vision_3d_startup,utc_capi_media_vision_3d_cleanup},
+       {"utc_mediavision_mv_3d_run_async_p", utc_mediavision_mv_3d_run_async_p,utc_capi_media_vision_3d_startup,utc_capi_media_vision_3d_cleanup},
+       {"utc_mediavision_mv_3d_run_async_n", utc_mediavision_mv_3d_run_async_n,utc_capi_media_vision_3d_startup,utc_capi_media_vision_3d_cleanup},
+       {"utc_mediavision_mv_3d_pointcloud_write_file_p", utc_mediavision_mv_3d_pointcloud_write_file_p,utc_capi_media_vision_3d_startup,utc_capi_media_vision_3d_cleanup},
+       {"utc_mediavision_mv_3d_pointcloud_write_file_n", utc_mediavision_mv_3d_pointcloud_write_file_n,utc_capi_media_vision_3d_startup,utc_capi_media_vision_3d_cleanup},
        {NULL, NULL}
 };
 
diff --git a/src/utc/capi-media-vision/utc-mv_3d.c b/src/utc/capi-media-vision/utc-mv_3d.c
new file mode 100755 (executable)
index 0000000..a21c78e
--- /dev/null
@@ -0,0 +1,1048 @@
+/**
+ * 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.
+ */
+
+#include "assert.h"
+
+#include <mv_3d.h>
+#include <mv_3d_type.h>
+
+#include <glib.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <unistd.h>
+
+#include <image_util.h>
+#include <system_info.h>
+#include <storage.h>
+#include "tct_common.h"
+
+#define FILE_PATH_SIZE 1024
+#define API_NAMESPACE "[MediaVision]"
+#define MV3D_BASE_IMAGE_FILENAME "im0.jpeg"
+#define MV3D_EXTRA_IMAGE_FILENAME "im1.jpeg"
+#define MV3D_CALIBRATION_FILENAME "calibOcv.yaml"
+#define MV3D_POINTCLOUD_OUT_FILENAME "test.pcd"
+#define MV3D_DEPTH_FEATURE "http://tizen.org/feature/vision.3d.depth"
+#define MV3D_POINTCLOUD_FEATURE "http://tizen.org/feature/vision.3d.pointcloud"
+#define MV3D_DEPTH_WIDTH 718
+#define MV3D_DEPTH_HEIGHT 496
+#define MV3D_MINIMUN_DISPARITY 8
+#define MV3D_MAXIMUM_DISPARITY 65
+#define MV3D_SAMPLING_RATIO 0.01
+#define MV3D_OUTLIER_REMOVAL_POINTS 3
+#define MV3D_OUTLIER_REMOVAL_RAIDUS 0.5
+#define TIMEOUT_CB 5000
+
+GMainLoop *g_MainLoop = NULL;
+int g_nTimeoutId;
+
+const char *gMv3dExampleDir = NULL;
+static bool gIsMv3dSupported = false;
+static bool gIsMv3dDepthSupported = false;
+static bool gIsMv3dPointCloudSupported = false;
+static int gStartupError;
+
+static mv_engine_config_h gEngineConfigHandle = NULL;
+static mv_source_h gBaseSourceHandle = NULL;
+static mv_source_h gExtraSourceHandle = NULL;
+static bool gMv3dDepthCallBackInvoked = false;
+static bool gMv3dPointCloudCallBackInvoked = false;
+static int gMv3dPcdWriteResultErr;
+static gboolean TimeoutFunction(gpointer data)
+{
+       GMainLoop *pMainLoop = NULL;
+       pMainLoop = (GMainLoop *)data;
+       if (pMainLoop != NULL)
+               g_main_loop_quit(pMainLoop);
+
+       return false;
+}
+
+#define RUN_POLLING_LOOP {\
+       g_MainLoop = g_main_loop_new(NULL, false); \
+               g_nTimeoutId = g_timeout_add(TIMEOUT_CB, TimeoutFunction, g_MainLoop); \
+               g_main_loop_run(g_MainLoop); \
+               g_source_remove(g_nTimeoutId); \
+               g_MainLoop = NULL; \
+               g_nTimeoutId = 0; \
+}
+
+#define QUIT_GMAIN_LOOP { \
+       if (g_MainLoop) { \
+               g_main_loop_quit(g_MainLoop); \
+                       g_MainLoop = NULL; \
+       } \
+}
+
+static int set_3d_engine_config(mv_engine_config_h engine_cfg)
+{
+    int ret = mv_engine_config_set_int_attribute(
+                       engine_cfg, MV_3D_DEPTH_MODE, MV_3D_DEPTH_MODE_STEREO);
+    assert_eq(MEDIA_VISION_ERROR_NONE, ret);
+
+    ret = mv_engine_config_set_int_attribute(
+                       engine_cfg, MV_3D_DEPTH_WIDTH, MV3D_DEPTH_WIDTH);
+    assert_eq(MEDIA_VISION_ERROR_NONE, ret);
+
+    ret = mv_engine_config_set_int_attribute(
+                       engine_cfg, MV_3D_DEPTH_HEIGHT, MV3D_DEPTH_HEIGHT);
+    assert_eq(MEDIA_VISION_ERROR_NONE, ret);
+
+    ret = mv_engine_config_set_int_attribute(
+                       engine_cfg, MV_3D_DEPTH_MIN_DISPARITY, MV3D_MINIMUN_DISPARITY);
+    assert_eq(MEDIA_VISION_ERROR_NONE, ret);
+
+    ret = mv_engine_config_set_int_attribute(
+                       engine_cfg, MV_3D_DEPTH_MAX_DISPARITY, MV3D_MAXIMUM_DISPARITY);
+    assert_eq(MEDIA_VISION_ERROR_NONE, ret);
+
+    char calibFilename[FILE_PATH_SIZE];
+    snprintf(calibFilename, FILE_PATH_SIZE, "%s/%s", gMv3dExampleDir, MV3D_CALIBRATION_FILENAME);
+    ret = mv_engine_config_set_string_attribute(
+            engine_cfg, MV_3D_DEPTH_STEREO_CONFIG_FILE_PATH, calibFilename);
+    assert_eq(MEDIA_VISION_ERROR_NONE, ret);
+
+    ret = mv_engine_config_set_double_attribute(
+            engine_cfg, MV_3D_POINTCLOUD_SAMPLING_RATIO, MV3D_SAMPLING_RATIO);
+    assert_eq(MEDIA_VISION_ERROR_NONE, ret);
+
+    ret = mv_engine_config_set_int_attribute(
+            engine_cfg, MV_3D_POINTCLOUD_OUTLIER_REMOVAL_POINTS, MV3D_OUTLIER_REMOVAL_POINTS);
+    assert_eq(MEDIA_VISION_ERROR_NONE, ret);
+
+    ret = mv_engine_config_set_double_attribute(
+            engine_cfg, MV_3D_POINTCLOUD_OUTLIER_REMOVAL_RADIUS, MV3D_OUTLIER_REMOVAL_RAIDUS);
+    assert_eq(MEDIA_VISION_ERROR_NONE, ret);
+
+    char mediaFilename[FILE_PATH_SIZE];
+    snprintf(mediaFilename, FILE_PATH_SIZE, "%s", "/tmp");
+    ret = mv_engine_config_set_string_attribute(
+            engine_cfg, MV_3D_POINTCLOUD_OUTPUT_FILE_PATH, mediaFilename);
+    assert_eq(MEDIA_VISION_ERROR_NONE, ret);
+
+    return ret;
+}
+
+static int load_image_to_media_source(
+        const char *file_path,
+        mv_source_h source)
+{
+    if (NULL == file_path || NULL == source)
+    {
+        printf("File path or source is NULL\n");
+        return MEDIA_VISION_ERROR_INVALID_PARAMETER;
+    }
+
+    unsigned long width = 0;
+    unsigned long height = 0;
+    unsigned long long buffer_size = 0;
+    unsigned char *data_buffer = NULL;
+    int ret1 = IMAGE_UTIL_ERROR_NONE;
+    int ret2 = MEDIA_VISION_ERROR_NONE;
+    image_util_decode_h _decoder = NULL;
+
+    ret1 = image_util_decode_create(&_decoder);
+    if (ret1 != IMAGE_UTIL_ERROR_NONE) goto _LOAD_IMAGE_FAIL;
+    ret1 = image_util_decode_set_input_path(_decoder, file_path);
+    if (ret1 != IMAGE_UTIL_ERROR_NONE) goto _LOAD_IMAGE_FAIL;
+    ret1 = image_util_decode_set_colorspace(_decoder, IMAGE_UTIL_COLORSPACE_RGB888);
+    if (ret1 != IMAGE_UTIL_ERROR_NONE) goto _LOAD_IMAGE_FAIL;
+    ret1 = image_util_decode_set_output_buffer(_decoder, &data_buffer);
+    if (ret1 != IMAGE_UTIL_ERROR_NONE) goto _LOAD_IMAGE_FAIL;
+    ret1 = image_util_decode_run(_decoder, &width, &height, &buffer_size);
+    if (ret1 != IMAGE_UTIL_ERROR_NONE) goto _LOAD_IMAGE_FAIL;
+
+    // Only grayscale and RGB jpegs in test set:
+    mv_colorspace_e source_colorspace = MEDIA_VISION_COLORSPACE_RGB888;
+
+    ret2 = mv_source_clear(source);
+    if (ret2 != MEDIA_VISION_ERROR_NONE) goto _LOAD_IMAGE_FAIL;
+
+    ret2 = mv_source_fill_by_buffer(
+                    source, data_buffer, (unsigned int)buffer_size,
+                    (unsigned int)width, (unsigned int)height,
+                    source_colorspace);
+
+_LOAD_IMAGE_FAIL:
+    image_util_decode_destroy(_decoder);
+    if(data_buffer)
+        free(data_buffer);
+
+    assert_eq(IMAGE_UTIL_ERROR_NONE, ret1);
+    assert_eq(MEDIA_VISION_ERROR_NONE, ret2);
+
+    return MEDIA_VISION_ERROR_NONE;
+}
+
+static void _depth_cb(mv_source_h source,
+       unsigned short* depth,
+       unsigned int width,
+       unsigned int height,
+       void* user_data)
+{
+    gMv3dDepthCallBackInvoked = true;
+    QUIT_GMAIN_LOOP;
+}
+
+static void _pointcloud_cb(mv_source_h source,
+       mv_3d_pointcloud_h pointcloud,
+       void *user_data)
+{
+    gMv3dPointCloudCallBackInvoked = true;
+}
+
+/**
+ * @function   utc_capi_media_vision_3d_startup
+ * @description        3d module UTC startup code
+ * @parameter  NA
+ * @return             NA
+ */
+void utc_capi_media_vision_3d_startup(void)
+{
+    printf("capi-media-vision 3d tests STARTUP is launched\n");
+
+    system_info_get_platform_bool(MV3D_DEPTH_FEATURE, &gIsMv3dDepthSupported);
+    system_info_get_platform_bool(MV3D_POINTCLOUD_FEATURE, &gIsMv3dPointCloudSupported);
+
+    if (gIsMv3dDepthSupported || gIsMv3dPointCloudSupported)
+        gIsMv3dSupported = true;
+    else
+        gIsMv3dSupported = false;
+
+    char pszValue[CONFIG_VALUE_LEN_MAX] = {0,};
+    if (true == GetValueForTCTSetting("DEVICE_SUITE_TARGET_30", pszValue, API_NAMESPACE)) {
+        PRINT_UTC_LOG("[Line : %d][%s] 'DEVICE_SUITE_TARGET_30' Values Received %s\\n", __LINE__, API_NAMESPACE, pszValue);
+
+        gMv3dExampleDir=(char*)calloc(strlen(pszValue)+strlen("/res/res/3d")+1, sizeof(char));
+        snprintf(gMv3dExampleDir, strlen(pszValue)+strlen("/res/res/3d")+1, "%s/res/res/3d", pszValue);
+
+    } else {
+        PRINT_UTC_LOG("[Line : %d][%s] GetValueForTCTSetting returned error for 'DEVICE_SUITE_TARGET_30'\\n", __LINE__, API_NAMESPACE);
+    }
+
+    gStartupError = mv_create_engine_config(&gEngineConfigHandle);
+    if (MEDIA_VISION_ERROR_NONE != gStartupError) {
+        gEngineConfigHandle = NULL;
+        printf("mv_engine_config_h create is failed\n");
+        return;
+    }
+
+    printf("capi-media-vision 3d tests STARTUP is completed\n");
+}
+
+/**
+ * @function   utc_capi_media_vision_3d_cleanup
+ * @description        3d module UTC cleanup code
+ * @parameter  NA
+ * @return             NA
+ */
+void utc_capi_media_vision_3d_cleanup(void)
+{
+    printf("capi-media-vision 3d tests CLEANUP is launched\n");
+
+    if (gEngineConfigHandle) {
+        mv_destroy_engine_config(gEngineConfigHandle);
+        gEngineConfigHandle = NULL;
+    }
+
+    if (gBaseSourceHandle) {
+        mv_destroy_source(gBaseSourceHandle);
+        gBaseSourceHandle = NULL;
+    }
+
+    if (gExtraSourceHandle) {
+        mv_destroy_source(gExtraSourceHandle);
+        gExtraSourceHandle = NULL;
+    }
+    printf("capi-media-vision 3d tests CLEANUP is completed\n");
+}
+
+/**
+ * @brief Positive test case of mv_3d_create()
+ * @testcase        utc_mediavision_mv_3d_create_p
+ * @since_tizen     7.0
+ * @description     Create 3d handle
+ */
+int utc_mediavision_mv_3d_create_p(void)
+{
+    printf("mv_3d_create_p\n");
+
+    mv_3d_h mv3d_handle = NULL;
+    int ret = mv_3d_create(&mv3d_handle);
+    if (!gIsMv3dSupported) {
+        assert_eq(ret, MEDIA_VISION_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+    assert_eq(MEDIA_VISION_ERROR_NONE, ret);
+
+    ret = mv_3d_destroy(mv3d_handle);
+    assert_eq(MEDIA_VISION_ERROR_NONE, ret);
+
+    printf("mv_3d_create_p pass\n");
+
+    return 0;
+}
+
+/**
+ * @brief Negative test case of mv_3d_create()
+ * @testcase        utc_mediavision_mv_3d_create_n
+ * @since_tizen     7.0
+ * @description     Create 3d handle,
+ *                  but fail because input parameter is NULL
+ */
+int utc_mediavision_mv_3d_create_n(void)
+{
+    printf("mv_3d_create_n\n");
+
+    int ret = mv_3d_create(NULL);
+    if (!gIsMv3dSupported) {
+        assert_eq(ret, MEDIA_VISION_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+
+    assert_eq(MEDIA_VISION_ERROR_INVALID_PARAMETER, ret);
+
+    printf("mv_3d_create_n pass\n");
+
+    return 0;
+}
+
+/**
+ * @brief Positive test case of mv_3d_destroy()
+ * @testcase        utc_mediavision_mv_3d_destroy_p
+ * @since_tizen     7.0
+ * @description     Destroy 3d handle
+ */
+int utc_mediavision_mv_3d_destroy_p(void)
+{
+    printf("mv_3d_destroy_p\n");
+
+    mv_3d_h mv3d_handle = NULL;
+    int ret = mv_3d_create(&mv3d_handle);
+    if (!gIsMv3dSupported) {
+        assert_eq(ret, MEDIA_VISION_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+    assert_eq(MEDIA_VISION_ERROR_NONE, ret);
+
+    ret = mv_3d_destroy(mv3d_handle);
+    assert_eq(MEDIA_VISION_ERROR_NONE, ret);
+
+    printf("mv_3d_destroy_p pass\n");
+
+    return 0;
+}
+
+/**
+ * @brief Negative test case of mv_3d_destroy()
+ * @testcase        utc_mediavision_mv_3d_destroy_n
+ * @since_tizen     7.0
+ * @description     Destroy 3d handle,
+ *                  but fail because input parameter is NULL
+ */
+int utc_mediavision_mv_3d_destroy_n(void)
+{
+    printf("mv_3d_destroy_n\n");
+
+    int ret = mv_3d_destroy(NULL);
+    if (!gIsMv3dSupported) {
+        assert_eq(ret, MEDIA_VISION_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+
+    assert_eq(MEDIA_VISION_ERROR_INVALID_PARAMETER, ret);
+
+    printf("mv_3d_destroy_n pass\n");
+
+    return 0;
+}
+
+/**
+ * @brief Positive test case of mv_3d_configure()
+ * @testcase        utc_mediavision_mv_3d_configure_p
+ * @since_tizen     7.0
+ * @description     Configure 3d handle
+ */
+int utc_mediavision_mv_3d_configure_p(void)
+{
+    printf("mv_3d_configure_p\n");
+
+    mv_3d_h mv3d_handle = NULL;
+    int ret = mv_3d_create(&mv3d_handle);
+    if (!gIsMv3dSupported) {
+        assert_eq(ret, MEDIA_VISION_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+    assert_eq(MEDIA_VISION_ERROR_NONE, ret);
+
+    assert_eq(gStartupError, MEDIA_VISION_ERROR_NONE);
+
+    assert_eq(set_3d_engine_config(gEngineConfigHandle), MEDIA_VISION_ERROR_NONE);
+
+    ret = mv_3d_configure(mv3d_handle, gEngineConfigHandle);
+    assert_eq(MEDIA_VISION_ERROR_NONE, ret);
+
+    ret = mv_3d_destroy(mv3d_handle);
+    assert_eq(MEDIA_VISION_ERROR_NONE, ret);
+
+    printf("mv_3d_configure_p pass\n");
+
+    return 0;
+}
+
+/**
+ * @brief Negative test case of mv_3d_configure()
+ * @testcase        utc_mediavision_mv_3d_configure_n
+ * @since_tizen     7.0
+ * @description     Configure 3d handle,
+ *                  but fail because input parameter is NULL
+ */
+int utc_mediavision_mv_3d_configure_n(void)
+{
+    printf("mv_3d_configure_n\n");
+
+    mv_3d_h mv3d_handle = NULL;
+    int ret = mv_3d_create(&mv3d_handle);
+    if (!gIsMv3dSupported) {
+        assert_eq(ret, MEDIA_VISION_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+    assert_eq(MEDIA_VISION_ERROR_NONE, ret);
+
+    assert_eq(gStartupError, MEDIA_VISION_ERROR_NONE);
+
+    assert_eq(set_3d_engine_config(gEngineConfigHandle), MEDIA_VISION_ERROR_NONE);
+
+    ret = mv_3d_configure(NULL, gEngineConfigHandle);
+    assert_eq(MEDIA_VISION_ERROR_INVALID_PARAMETER, ret);
+
+    ret = mv_3d_configure(mv3d_handle, NULL);
+    assert_eq(MEDIA_VISION_ERROR_INVALID_PARAMETER, ret);
+
+    ret = mv_3d_destroy(mv3d_handle);
+    assert_eq(MEDIA_VISION_ERROR_NONE, ret);
+
+    printf("mv_3d_configure_n pass\n");
+
+    return 0;
+}
+
+/**
+ * @brief Positive test case of mv_3d_set_depth_cb()
+ * @testcase        utc_mediavision_mv_3d_set_depth_cb_p
+ * @since_tizen     7.0
+ * @description     Set depth callback to 3d handle
+ */
+int utc_mediavision_mv_3d_set_depth_cb_p(void)
+{
+    printf("mv_3d_set_depth_cb_p\n");
+
+    mv_3d_h mv3d_handle = NULL;
+    int ret = mv_3d_create(&mv3d_handle);
+    if (!gIsMv3dSupported) {
+        assert_eq(ret, MEDIA_VISION_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+    assert_eq(MEDIA_VISION_ERROR_NONE, ret);
+
+    assert_eq(gStartupError, MEDIA_VISION_ERROR_NONE);
+
+    assert_eq(set_3d_engine_config(gEngineConfigHandle), MEDIA_VISION_ERROR_NONE);
+
+    ret = mv_3d_configure(mv3d_handle, gEngineConfigHandle);
+    assert_eq(MEDIA_VISION_ERROR_NONE, ret);
+
+    ret = mv_3d_set_depth_cb(mv3d_handle, _depth_cb, NULL);
+    assert_eq(MEDIA_VISION_ERROR_NONE, ret);
+
+    ret = mv_3d_destroy(mv3d_handle);
+    assert_eq(MEDIA_VISION_ERROR_NONE, ret);
+
+    printf("mv_3d_set_depth_cb_p pass\n");
+
+    return 0;
+}
+
+/**
+ * @brief Negative test case of mv_3d_set_depth_cb()
+ * @testcase        utc_mediavision_mv_3d_set_depth_cb_n
+ * @since_tizen     7.0
+ * @description     Set depth callback to 3d handle,
+ *                  but fail because input parameter is NULL
+ */
+int utc_mediavision_mv_3d_set_depth_cb_n(void)
+{
+    printf("mv_3d_set_depth_cb_n\n");
+
+    mv_3d_h mv3d_handle = NULL;
+    int ret = mv_3d_create(&mv3d_handle);
+    if (!gIsMv3dSupported) {
+        assert_eq(ret, MEDIA_VISION_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+    assert_eq(MEDIA_VISION_ERROR_NONE, ret);
+
+    assert_eq(gStartupError, MEDIA_VISION_ERROR_NONE);
+
+    assert_eq(set_3d_engine_config(gEngineConfigHandle), MEDIA_VISION_ERROR_NONE);
+
+    ret = mv_3d_configure(mv3d_handle, gEngineConfigHandle);
+    assert_eq(MEDIA_VISION_ERROR_NONE, ret);
+
+    ret = mv_3d_set_depth_cb(mv3d_handle, NULL, NULL);
+    assert_eq(MEDIA_VISION_ERROR_INVALID_PARAMETER, ret);
+
+    ret = mv_3d_set_depth_cb(NULL, _depth_cb, NULL);
+    assert_eq(MEDIA_VISION_ERROR_INVALID_PARAMETER, ret);
+
+    ret = mv_3d_destroy(mv3d_handle);
+    assert_eq(MEDIA_VISION_ERROR_NONE, ret);
+
+    printf("mv_3d_set_depth_cb_n pass\n");
+
+    return 0;
+}
+
+/**
+ * @brief Positive test case of mv_3d_set_pointcloud_cb()
+ * @testcase        utc_mediavision_mv_3d_set_pointcloud_cb_p
+ * @since_tizen     7.0
+ * @description     Set pointcloud callback to 3d handle
+ */
+int utc_mediavision_mv_3d_set_pointcloud_cb_p(void)
+{
+    printf("mv_3d_set_pointcloud_cb_p\n");
+
+    mv_3d_h mv3d_handle = NULL;
+    int ret = mv_3d_create(&mv3d_handle);
+    if (!gIsMv3dSupported) {
+        assert_eq(ret, MEDIA_VISION_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+    assert_eq(MEDIA_VISION_ERROR_NONE, ret);
+
+    assert_eq(gStartupError, MEDIA_VISION_ERROR_NONE);
+
+    assert_eq(set_3d_engine_config(gEngineConfigHandle), MEDIA_VISION_ERROR_NONE);
+
+    ret = mv_3d_configure(mv3d_handle, gEngineConfigHandle);
+    assert_eq(MEDIA_VISION_ERROR_NONE, ret);
+
+    ret = mv_3d_set_pointcloud_cb(mv3d_handle, _pointcloud_cb, mv3d_handle);
+    assert_eq(MEDIA_VISION_ERROR_NONE, ret);
+
+    ret = mv_3d_destroy(mv3d_handle);
+    assert_eq(MEDIA_VISION_ERROR_NONE, ret);
+
+    printf("mv_3d_set_pointcloud_cb_p pass\n");
+
+    return 0;
+}
+
+/**
+ * @brief Negative test case of mv_3d_set_pointcloud_cb()
+ * @testcase        utc_mediavision_mv_3d_set_pointcloud_cb_n
+ * @since_tizen     7.0
+ * @description     Set pointcloud callback to 3d handle,
+ *                  but fail because input parameter is NULL
+ */
+int utc_mediavision_mv_3d_set_pointcloud_cb_n(void)
+{
+    printf("mv_3d_set_pointcloud_cb_n\n");
+
+    mv_3d_h mv3d_handle = NULL;
+    int ret = mv_3d_create(&mv3d_handle);
+    if (!gIsMv3dSupported) {
+        assert_eq(ret, MEDIA_VISION_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+    assert_eq(MEDIA_VISION_ERROR_NONE, ret);
+
+    assert_eq(gStartupError, MEDIA_VISION_ERROR_NONE);
+
+    assert_eq(set_3d_engine_config(gEngineConfigHandle), MEDIA_VISION_ERROR_NONE);
+
+    ret = mv_3d_configure(mv3d_handle, gEngineConfigHandle);
+    assert_eq(MEDIA_VISION_ERROR_NONE, ret);
+
+    ret = mv_3d_set_pointcloud_cb(mv3d_handle, NULL, NULL);
+    assert_eq(MEDIA_VISION_ERROR_INVALID_PARAMETER, ret);
+
+    ret = mv_3d_set_pointcloud_cb(NULL, _pointcloud_cb, NULL);
+    assert_eq(MEDIA_VISION_ERROR_INVALID_PARAMETER, ret);
+
+    ret = mv_3d_destroy(mv3d_handle);
+    assert_eq(MEDIA_VISION_ERROR_NONE, ret);
+
+    printf("mv_3d_set_pointcloud_cb_n pass\n");
+
+    return 0;
+}
+
+/**
+ * @brief Positive test case of mv_3d_prepare()
+ * @testcase        utc_mediavision_mv_3d_prepare_p
+ * @since_tizen     7.0
+ * @description     Prepare 3d handle
+ */
+int utc_mediavision_mv_3d_prepare_p(void)
+{
+    printf("mv_3d_prepare_p\n");
+
+    mv_3d_h mv3d_handle = NULL;
+    int ret = mv_3d_create(&mv3d_handle);
+    if (!gIsMv3dSupported) {
+        assert_eq(ret, MEDIA_VISION_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+    assert_eq(MEDIA_VISION_ERROR_NONE, ret);
+
+    assert_eq(gStartupError, MEDIA_VISION_ERROR_NONE);
+
+    assert_eq(set_3d_engine_config(gEngineConfigHandle), MEDIA_VISION_ERROR_NONE);
+
+    ret = mv_3d_configure(mv3d_handle, gEngineConfigHandle);
+    assert_eq(MEDIA_VISION_ERROR_NONE, ret);
+
+    ret = mv_3d_set_depth_cb(mv3d_handle, _depth_cb, NULL);
+    assert_eq(MEDIA_VISION_ERROR_NONE, ret);
+
+    ret = mv_3d_set_pointcloud_cb(mv3d_handle, _pointcloud_cb, mv3d_handle);
+    assert_eq(MEDIA_VISION_ERROR_NONE, ret);
+
+    ret = mv_3d_prepare(mv3d_handle);
+    assert_eq(MEDIA_VISION_ERROR_NONE, ret);
+
+    ret = mv_3d_destroy(mv3d_handle);
+    assert_eq(MEDIA_VISION_ERROR_NONE, ret);
+
+    printf("mv_3d_prepare_p pass\n");
+
+    return 0;
+}
+
+/**
+ * @brief Negative test case of mv_3d_prepare()
+ * @testcase        utc_mediavision_mv_3d_prepare_n1
+ * @since_tizen     7.0
+ * @description     Prepare 3d handle,
+ *                  but fail because input parameter is NULL
+ */
+int utc_mediavision_mv_3d_prepare_n1(void)
+{
+    printf("mv_3d_prepare_n1\n");
+
+    mv_3d_h mv3d_handle = NULL;
+    int ret = mv_3d_create(&mv3d_handle);
+    if (!gIsMv3dSupported) {
+        assert_eq(ret, MEDIA_VISION_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+    assert_eq(MEDIA_VISION_ERROR_NONE, ret);
+
+    assert_eq(gStartupError, MEDIA_VISION_ERROR_NONE);
+
+    assert_eq(set_3d_engine_config(gEngineConfigHandle), MEDIA_VISION_ERROR_NONE);
+
+    ret = mv_3d_configure(mv3d_handle, gEngineConfigHandle);
+    assert_eq(MEDIA_VISION_ERROR_NONE, ret);
+
+    ret = mv_3d_set_depth_cb(mv3d_handle, _depth_cb, NULL);
+    assert_eq(MEDIA_VISION_ERROR_NONE, ret);
+
+    ret = mv_3d_set_pointcloud_cb(mv3d_handle, _pointcloud_cb, mv3d_handle);
+    assert_eq(MEDIA_VISION_ERROR_NONE, ret);
+
+    ret = mv_3d_prepare(NULL);
+    assert_eq(MEDIA_VISION_ERROR_INVALID_PARAMETER, ret);
+
+    ret = mv_3d_destroy(mv3d_handle);
+    assert_eq(MEDIA_VISION_ERROR_NONE, ret);
+
+    printf("mv_3d_prepare_n1 pass\n");
+
+    return 0;
+}
+
+/**
+ * @brief Negative test case of mv_3d_prepare()
+ * @testcase        utc_mediavision_mv_3d_prepare_n2
+ * @since_tizen     7.0
+ * @description     Prepare 3d handle,
+ *                  but fail because mv_3d_prepare() calls before mv_3d_configure()
+ */
+int utc_mediavision_mv_3d_prepare_n2(void)
+{
+    printf("mv_3d_prepare_n2\n");
+
+    mv_3d_h mv3d_handle = NULL;
+    int ret = mv_3d_create(&mv3d_handle);
+    if (!gIsMv3dSupported) {
+        assert_eq(ret, MEDIA_VISION_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+    assert_eq(MEDIA_VISION_ERROR_NONE, ret);
+
+    assert_eq(gStartupError, MEDIA_VISION_ERROR_NONE);
+
+    assert_eq(set_3d_engine_config(gEngineConfigHandle), MEDIA_VISION_ERROR_NONE);
+
+    ret = mv_3d_set_depth_cb(mv3d_handle, _depth_cb, NULL);
+    assert_eq(MEDIA_VISION_ERROR_NONE, ret);
+
+    ret = mv_3d_set_pointcloud_cb(mv3d_handle, _pointcloud_cb, mv3d_handle);
+    assert_eq(MEDIA_VISION_ERROR_NONE, ret);
+
+    ret = mv_3d_prepare(mv3d_handle);
+    assert_eq(MEDIA_VISION_ERROR_INVALID_OPERATION, ret);
+
+    ret = mv_3d_destroy(mv3d_handle);
+    assert_eq(MEDIA_VISION_ERROR_NONE, ret);
+
+    printf("mv_3d_prepare_n2 pass\n");
+
+    return 0;
+}
+
+/**
+ * @brief Positive test case of mv_3d_run()
+ * @testcase        utc_mediavision_mv_3d_run_p
+ * @since_tizen     7.0
+ * @description     Run 3d handle
+ */
+int utc_mediavision_mv_3d_run_p(void)
+{
+    printf("mv_3d_run_p\n");
+
+    char baseImageFilename[FILE_PATH_SIZE];
+    snprintf(baseImageFilename, 1024, "%s/%s", gMv3dExampleDir, MV3D_BASE_IMAGE_FILENAME);
+    int ret = mv_create_source(&gBaseSourceHandle);
+    assert_eq(MEDIA_VISION_ERROR_NONE, ret);
+
+    ret = load_image_to_media_source(baseImageFilename, gBaseSourceHandle);
+    assert_eq(MEDIA_VISION_ERROR_NONE, ret);
+
+    char extraImageFilename[FILE_PATH_SIZE];
+    snprintf(extraImageFilename, 1024, "%s/%s", gMv3dExampleDir, MV3D_EXTRA_IMAGE_FILENAME);
+    ret = mv_create_source(&gExtraSourceHandle);
+    assert_eq(MEDIA_VISION_ERROR_NONE, ret);
+
+    ret = load_image_to_media_source(extraImageFilename, gExtraSourceHandle);
+    assert_eq(MEDIA_VISION_ERROR_NONE, ret);
+
+    mv_3d_h mv3d_handle = NULL;
+    ret = mv_3d_create(&mv3d_handle);
+    if (!gIsMv3dSupported) {
+        assert_eq(ret, MEDIA_VISION_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+    assert_eq(MEDIA_VISION_ERROR_NONE, ret);
+
+    assert_eq(gStartupError, MEDIA_VISION_ERROR_NONE);
+
+    assert_eq(set_3d_engine_config(gEngineConfigHandle), MEDIA_VISION_ERROR_NONE);
+
+    ret = mv_3d_configure(mv3d_handle, gEngineConfigHandle);
+    assert_eq(MEDIA_VISION_ERROR_NONE, ret);
+
+    ret = mv_3d_set_depth_cb(mv3d_handle, _depth_cb, NULL);
+    assert_eq(MEDIA_VISION_ERROR_NONE, ret);
+
+    ret = mv_3d_set_pointcloud_cb(mv3d_handle, _pointcloud_cb, mv3d_handle);
+    assert_eq(MEDIA_VISION_ERROR_NONE, ret);
+
+    ret = mv_3d_prepare(mv3d_handle);
+    assert_eq(MEDIA_VISION_ERROR_NONE, ret);
+
+    ret = mv_3d_run(mv3d_handle, gBaseSourceHandle, gExtraSourceHandle, NULL);
+    assert_eq(MEDIA_VISION_ERROR_NONE, ret);
+    assert_eq(true, gMv3dDepthCallBackInvoked);
+
+    ret = mv_3d_destroy(mv3d_handle);
+    assert_eq(MEDIA_VISION_ERROR_NONE, ret);
+
+    printf("mv_3d_run_p pass\n");
+
+    return 0;
+}
+
+/**
+ * @brief Negative test case of mv_3d_run()
+ * @testcase        utc_mediavision_mv_3d_run_n
+ * @since_tizen     7.0
+ * @description     Run 3d handle,
+ *                  but fail because input parameter is NULL
+ */
+int utc_mediavision_mv_3d_run_n(void)
+{
+    printf("mv_3d_run_n1\n");
+
+    mv_3d_h mv3d_handle = NULL;
+    int ret = mv_3d_create(&mv3d_handle);
+    if (!gIsMv3dSupported) {
+        assert_eq(ret, MEDIA_VISION_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+    assert_eq(MEDIA_VISION_ERROR_NONE, ret);
+
+    assert_eq(gStartupError, MEDIA_VISION_ERROR_NONE);
+
+    assert_eq(set_3d_engine_config(gEngineConfigHandle), MEDIA_VISION_ERROR_NONE);
+
+    ret = mv_3d_configure(mv3d_handle, gEngineConfigHandle);
+    assert_eq(MEDIA_VISION_ERROR_NONE, ret);
+
+    ret = mv_3d_set_depth_cb(mv3d_handle, _depth_cb, NULL);
+    assert_eq(MEDIA_VISION_ERROR_NONE, ret);
+
+    ret = mv_3d_set_pointcloud_cb(mv3d_handle, _pointcloud_cb, mv3d_handle);
+    assert_eq(MEDIA_VISION_ERROR_NONE, ret);
+
+    ret = mv_3d_prepare(mv3d_handle);
+    assert_eq(MEDIA_VISION_ERROR_NONE, ret);
+
+    ret = mv_3d_run(mv3d_handle, NULL, NULL, NULL);
+    assert_eq(MEDIA_VISION_ERROR_INVALID_PARAMETER, ret);
+
+    ret = mv_3d_destroy(mv3d_handle);
+    assert_eq(MEDIA_VISION_ERROR_NONE, ret);
+
+    printf("mv_3d_run_n pass\n");
+
+    return 0;
+}
+
+/**
+ * @brief Positive test case of mv_3d_run_async()
+ * @testcase        utc_mediavision_mv_3d_run_async_p
+ * @since_tizen     7.0
+ * @description     Run 3d handle asynchronously
+ */
+int utc_mediavision_mv_3d_run_async_p(void)
+{
+    printf("mv_3d_run_p\n");
+
+    char baseImageFilename[FILE_PATH_SIZE];
+    snprintf(baseImageFilename, 1024, "%s/%s", gMv3dExampleDir, MV3D_BASE_IMAGE_FILENAME);
+    int ret = mv_create_source(&gBaseSourceHandle);
+    assert_eq(MEDIA_VISION_ERROR_NONE, ret);
+
+    ret = load_image_to_media_source(baseImageFilename, gBaseSourceHandle);
+    assert_eq(MEDIA_VISION_ERROR_NONE, ret);
+
+    char extraImageFilename[FILE_PATH_SIZE];
+    snprintf(extraImageFilename, 1024, "%s/%s", gMv3dExampleDir, MV3D_EXTRA_IMAGE_FILENAME);
+    ret = mv_create_source(&gExtraSourceHandle);
+    assert_eq(MEDIA_VISION_ERROR_NONE, ret);
+
+    ret = load_image_to_media_source(extraImageFilename, gExtraSourceHandle);
+    assert_eq(MEDIA_VISION_ERROR_NONE, ret);
+
+    mv_3d_h mv3d_handle = NULL;
+    ret = mv_3d_create(&mv3d_handle);
+    if (!gIsMv3dSupported) {
+        assert_eq(ret, MEDIA_VISION_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+    assert_eq(MEDIA_VISION_ERROR_NONE, ret);
+
+    assert_eq(gStartupError, MEDIA_VISION_ERROR_NONE);
+
+    assert_eq(set_3d_engine_config(gEngineConfigHandle), MEDIA_VISION_ERROR_NONE);
+
+    ret = mv_3d_configure(mv3d_handle, gEngineConfigHandle);
+    assert_eq(MEDIA_VISION_ERROR_NONE, ret);
+
+    ret = mv_3d_set_depth_cb(mv3d_handle, _depth_cb, NULL);
+    assert_eq(MEDIA_VISION_ERROR_NONE, ret);
+
+    ret = mv_3d_set_pointcloud_cb(mv3d_handle, _pointcloud_cb, mv3d_handle);
+    assert_eq(MEDIA_VISION_ERROR_NONE, ret);
+
+    ret = mv_3d_prepare(mv3d_handle);
+    assert_eq(MEDIA_VISION_ERROR_NONE, ret);
+
+    ret = mv_3d_run_async(mv3d_handle, gBaseSourceHandle, gExtraSourceHandle, NULL);
+    RUN_POLLING_LOOP;
+    assert_eq(MEDIA_VISION_ERROR_NONE, ret);
+    assert_eq(true, gMv3dDepthCallBackInvoked);
+
+    ret = mv_3d_destroy(mv3d_handle);
+    assert_eq(MEDIA_VISION_ERROR_NONE, ret);
+
+    printf("mv_3d_run_p pass\n");
+
+    return 0;
+}
+
+/**
+ * @brief Negative test case of mv_3d_run_async()
+ * @testcase        utc_mediavision_mv_3d_run_async_n
+ * @since_tizen     7.0
+ * @description     Run 3d handle asynchronously
+ *                  but fail because input parameter is NULL
+ */
+int utc_mediavision_mv_3d_run_async_n(void)
+{
+    printf("mv_3d_run_async_n\n");
+
+    mv_3d_h mv3d_handle = NULL;
+    int ret = mv_3d_create(&mv3d_handle);
+    if (!gIsMv3dSupported) {
+        assert_eq(ret, MEDIA_VISION_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+    assert_eq(MEDIA_VISION_ERROR_NONE, ret);
+
+    assert_eq(gStartupError, MEDIA_VISION_ERROR_NONE);
+
+    assert_eq(set_3d_engine_config(gEngineConfigHandle), MEDIA_VISION_ERROR_NONE);
+
+    ret = mv_3d_configure(mv3d_handle, gEngineConfigHandle);
+    assert_eq(MEDIA_VISION_ERROR_NONE, ret);
+
+    ret = mv_3d_set_depth_cb(mv3d_handle, _depth_cb, NULL);
+    assert_eq(MEDIA_VISION_ERROR_NONE, ret);
+
+    ret = mv_3d_set_pointcloud_cb(mv3d_handle, _pointcloud_cb, mv3d_handle);
+    assert_eq(MEDIA_VISION_ERROR_NONE, ret);
+
+    ret = mv_3d_prepare(mv3d_handle);
+    assert_eq(MEDIA_VISION_ERROR_NONE, ret);
+
+    ret = mv_3d_run_async(mv3d_handle, NULL, NULL, NULL);
+    assert_eq(MEDIA_VISION_ERROR_INVALID_PARAMETER, ret);
+
+    ret = mv_3d_destroy(mv3d_handle);
+    assert_eq(MEDIA_VISION_ERROR_NONE, ret);
+
+    printf("mv_3d_run_async_n pass\n");
+
+    return 0;
+}
+
+static void _depth_cb1(mv_source_h source,
+       unsigned short* depth,
+       unsigned int width,
+       unsigned int height,
+       void* user_data)
+{
+    gMv3dDepthCallBackInvoked = true;
+}
+
+static void _pointcloud_cb1(mv_source_h source,
+       mv_3d_pointcloud_h pointcloud,
+       void *user_data)
+{
+    gMv3dPointCloudCallBackInvoked = true;
+    mv_3d_h mv3d_handle = (mv_3d_h)user_data;
+
+    char outfilename[FILE_PATH_SIZE];
+    snprintf(outfilename, 1024, "/tmp/%s", gMv3dExampleDir, MV3D_POINTCLOUD_OUT_FILENAME);
+    gMv3dPcdWriteResultErr = mv_3d_pointcloud_write_file(
+                                            mv3d_handle,
+                                            pointcloud,
+                                            MV_3D_POINTCLOUD_TYPE_PCD_BIN,
+                                            MV3D_POINTCLOUD_OUT_FILENAME);
+}
+
+/**
+ * @brief Positive test case of mv_3d_pointcloud_write_file()
+ * @testcase        utc_mediavision_mv_3d_pointcloud_write_file_p
+ * @since_tizen     7.0
+ * @description     Write pointcloud file
+ */
+int utc_mediavision_mv_3d_pointcloud_write_file_p(void)
+{
+    printf("utc_mediavision_mv_3d_pointcloud_write_file_p\n");
+
+    char baseImageFilename[FILE_PATH_SIZE];
+    snprintf(baseImageFilename, 1024, "%s/%s", gMv3dExampleDir, MV3D_BASE_IMAGE_FILENAME);
+    int ret = mv_create_source(&gBaseSourceHandle);
+    assert_eq(MEDIA_VISION_ERROR_NONE, ret);
+
+    ret = load_image_to_media_source(baseImageFilename, gBaseSourceHandle);
+    assert_eq(MEDIA_VISION_ERROR_NONE, ret);
+
+    char extraImageFilename[FILE_PATH_SIZE];
+    snprintf(extraImageFilename, 1024, "%s/%s", gMv3dExampleDir, MV3D_EXTRA_IMAGE_FILENAME);
+    ret = mv_create_source(&gExtraSourceHandle);
+    assert_eq(MEDIA_VISION_ERROR_NONE, ret);
+
+    ret = load_image_to_media_source(extraImageFilename, gExtraSourceHandle);
+    assert_eq(MEDIA_VISION_ERROR_NONE, ret);
+
+    mv_3d_h mv3d_handle = NULL;
+    ret = mv_3d_create(&mv3d_handle);
+    if (!gIsMv3dSupported) {
+        assert_eq(ret, MEDIA_VISION_ERROR_NOT_SUPPORTED);
+        return 0;
+    }
+    assert_eq(MEDIA_VISION_ERROR_NONE, ret);
+
+    assert_eq(gStartupError, MEDIA_VISION_ERROR_NONE);
+
+    assert_eq(set_3d_engine_config(gEngineConfigHandle), MEDIA_VISION_ERROR_NONE);
+
+    ret = mv_3d_configure(mv3d_handle, gEngineConfigHandle);
+    assert_eq(MEDIA_VISION_ERROR_NONE, ret);
+
+    ret = mv_3d_set_depth_cb(mv3d_handle, _depth_cb1, NULL);
+    assert_eq(MEDIA_VISION_ERROR_NONE, ret);
+
+    ret = mv_3d_set_pointcloud_cb(mv3d_handle, _pointcloud_cb1, mv3d_handle);
+    assert_eq(MEDIA_VISION_ERROR_NONE, ret);
+
+    ret = mv_3d_prepare(mv3d_handle);
+    assert_eq(MEDIA_VISION_ERROR_NONE, ret);
+
+    ret = mv_3d_run(mv3d_handle, gBaseSourceHandle, gExtraSourceHandle, NULL);
+    assert_eq(MEDIA_VISION_ERROR_NONE, ret);
+    assert_eq(true, gMv3dDepthCallBackInvoked);
+    assert_eq(MEDIA_VISION_ERROR_NONE, gMv3dPcdWriteResultErr);
+
+    ret = mv_3d_destroy(mv3d_handle);
+    assert_eq(MEDIA_VISION_ERROR_NONE, ret);
+
+    printf("utc_mediavision_mv_3d_pointcloud_write_file_p pass\n");
+
+    return 0;
+}
+
+/**
+ * @brief Positive test case of mv_3d_pointcloud_write_file()
+ * @testcase        utc_mediavision_mv_3d_pointcloud_write_file_n
+ * @since_tizen     7.0
+ * @description     Write pointcloud file,
+ *                  fail because input parameter is NULL
+ */
+int utc_mediavision_mv_3d_pointcloud_write_file_n(void)
+{
+    printf("utc_mediavision_mv_3d_pointcloud_write_file_n\n");
+
+    char outfilename[FILE_PATH_SIZE];
+    snprintf(outfilename, 1024, "%s/%s", gMv3dExampleDir, MV3D_POINTCLOUD_OUT_FILENAME);
+    int ret = mv_3d_pointcloud_write_file(NULL,
+                                          NULL,
+                                          MV_3D_POINTCLOUD_TYPE_PCD_BIN,
+                                          outfilename);
+    assert_eq(MEDIA_VISION_ERROR_INVALID_PARAMETER, ret);
+
+    printf("utc_mediavision_mv_3d_pointcloud_write_file_n pass\n");
+
+    return 0;
+}
\ No newline at end of file