Add mv_pose_subtract test 17/249817/3
authorKwang Son <k.son@samsung.com>
Thu, 17 Dec 2020 03:15:45 +0000 (12:15 +0900)
committerKwang Son <k.son@samsung.com>
Thu, 17 Dec 2020 07:12:17 +0000 (16:12 +0900)
Change-Id: I5fe9047902737d1ca2582c886433e7a826c1ed8f
Signed-off-by: Kwang Son <k.son@samsung.com>
test/testsuites/inference/inference_test_suite.c

index c2abbd5..e6c28b5 100644 (file)
@@ -211,11 +211,25 @@ void _pose_landmark_detected_cb(mv_source_h source,
                        &poseScore);
        if (ret != MEDIA_VISION_ERROR_NONE) {
                mv_pose_destroy(poser);
-               printf("Fail to mv_pose_compare");
+               printf("Fail to mv_pose_compare\n");
                return;
        }
 
-       printf("[Leg]:Left&Right - poseScore:[%1.4f]", poseScore);
+       printf("[Leg]:Left&Right - poseScore:[%1.4f]\n", poseScore);
+
+       mv_point_s skeleton = {MV_INFERENCE_HUMAN_POSE_HEAD - 1, MV_INFERENCE_HUMAN_POSE_NECK - 1};
+       float initf[] = {0.0, 0.0};
+       mv_vector_s dir = {2, initf};
+
+       ret =  mv_pose_subtract(poser, pose, &skeleton, &dir);
+       if (ret != MEDIA_VISION_ERROR_NONE) {
+               mv_pose_destroy(poser);
+               printf("Fail to mv_pose_subtract\n");
+               return;
+       }
+
+       printf("direction :(%1.4f, %1.4f)\n", dir.value[0], dir.value[1]);
+
 
        ret = mv_pose_destroy(poser);
        if (ret != MEDIA_VISION_ERROR_NONE) {