From f83c16e578267bc769cec80efcd99a6c7d9af255 Mon Sep 17 00:00:00 2001 From: Andrzej Kapolka Date: Fri, 28 Jun 2013 12:27:50 -0700 Subject: [PATCH] Goodbye, skeltrack. You won't be missed. --- cmake/modules/FindSkeltrack.cmake | 44 - interface/external/skeltrack/AUTHORS | 1 - interface/external/skeltrack/CMakeLists.txt | 14 - interface/external/skeltrack/COPYING | 165 -- .../skeltrack/include/skeltrack-joint.h | 90 - .../skeltrack/include/skeltrack-skeleton.h | 95 - .../skeltrack/include/skeltrack-smooth.h | 36 - .../skeltrack/include/skeltrack-util.h | 127 -- .../external/skeltrack/include/skeltrack.h | 28 - .../skeltrack/lib/MacOS/libskeltrack.a | Bin 52416 -> 0 bytes .../skeltrack/lib/UNIX/libskeltrack.a | Bin 53760 -> 0 bytes .../external/skeltrack/src/skeltrack-joint.c | 159 -- .../skeltrack/src/skeltrack-skeleton.c | 2027 ----------------- .../external/skeltrack/src/skeltrack-smooth.c | 226 -- .../external/skeltrack/src/skeltrack-util.c | 626 ----- 15 files changed, 3638 deletions(-) delete mode 100644 cmake/modules/FindSkeltrack.cmake delete mode 100644 interface/external/skeltrack/AUTHORS delete mode 100644 interface/external/skeltrack/CMakeLists.txt delete mode 100644 interface/external/skeltrack/COPYING delete mode 100644 interface/external/skeltrack/include/skeltrack-joint.h delete mode 100644 interface/external/skeltrack/include/skeltrack-skeleton.h delete mode 100644 interface/external/skeltrack/include/skeltrack-smooth.h delete mode 100644 interface/external/skeltrack/include/skeltrack-util.h delete mode 100644 interface/external/skeltrack/include/skeltrack.h delete mode 100644 interface/external/skeltrack/lib/MacOS/libskeltrack.a delete mode 100644 interface/external/skeltrack/lib/UNIX/libskeltrack.a delete mode 100644 interface/external/skeltrack/src/skeltrack-joint.c delete mode 100644 interface/external/skeltrack/src/skeltrack-skeleton.c delete mode 100644 interface/external/skeltrack/src/skeltrack-smooth.c delete mode 100644 interface/external/skeltrack/src/skeltrack-util.c diff --git a/cmake/modules/FindSkeltrack.cmake b/cmake/modules/FindSkeltrack.cmake deleted file mode 100644 index a05e0c2990..0000000000 --- a/cmake/modules/FindSkeltrack.cmake +++ /dev/null @@ -1,44 +0,0 @@ -# Try to find the Skeltrack library to perform skeleton tracking via depth camera -# -# You must provide a SKELTRACK_ROOT_DIR which contains lib and include directories -# -# Once done this will define -# -# SKELTRACK_FOUND - system found Skeltrack -# SKELTRACK_INCLUDE_DIRS - the Skeltrack include directory -# SKELTRACK_LIBRARIES - Link this to use Skeltrack -# -# Created on 6/25/2013 by Andrzej Kapolka -# Copyright (c) 2013 High Fidelity -# - -if (SKELTRACK_LIBRARIES AND SKELTRACK_INCLUDE_DIRS) - # in cache already - set(SKELTRACK_FOUND TRUE) -else (SKELTRACK_LIBRARIES AND SKELTRACK_INCLUDE_DIRS) - find_path(SKELTRACK_INCLUDE_DIRS skeltrack.h ${SKELTRACK_ROOT_DIR}/include) - - if (APPLE) - find_library(SKELTRACK_LIBRARIES libskeltrack.a ${SKELTRACK_ROOT_DIR}/lib/MacOS/) - elseif (UNIX) - find_library(SKELTRACK_LIBRARIES libskeltrack.a ${SKELTRACK_ROOT_DIR}/lib/UNIX/) - endif () - - if (SKELTRACK_INCLUDE_DIRS AND SKELTRACK_LIBRARIES) - set(SKELTRACK_FOUND TRUE) - endif (SKELTRACK_INCLUDE_DIRS AND SKELTRACK_LIBRARIES) - - if (SKELTRACK_FOUND) - if (NOT SKELTRACK_FIND_QUIETLY) - message(STATUS "Found Skeltrack: ${SKELTRACK_LIBRARIES}") - endif (NOT SKELTRACK_FIND_QUIETLY) - else (SKELTRACK_FOUND) - if (SKELTRACK_FIND_REQUIRED) - message(FATAL_ERROR "Could not find Skeltrack") - endif (SKELTRACK_FIND_REQUIRED) - endif (SKELTRACK_FOUND) - - # show the SKELTRACK_INCLUDE_DIRS and SKELTRACK_LIBRARIES variables only in the advanced view - mark_as_advanced(SKELTRACK_INCLUDE_DIRS SKELTRACK_LIBRARIES) - -endif (SKELTRACK_LIBRARIES AND SKELTRACK_INCLUDE_DIRS) diff --git a/interface/external/skeltrack/AUTHORS b/interface/external/skeltrack/AUTHORS deleted file mode 100644 index 751f7ed02c..0000000000 --- a/interface/external/skeltrack/AUTHORS +++ /dev/null @@ -1 +0,0 @@ -Joaquim Rocha - Creator diff --git a/interface/external/skeltrack/CMakeLists.txt b/interface/external/skeltrack/CMakeLists.txt deleted file mode 100644 index 21ef04931b..0000000000 --- a/interface/external/skeltrack/CMakeLists.txt +++ /dev/null @@ -1,14 +0,0 @@ -cmake_minimum_required(VERSION 2.8) -include_directories(include) - -# grab the implementation and header files from src dirs -file(GLOB SKELTRACK_SRCS src/*.c include/*.h) - -find_package(PkgConfig REQUIRED) -pkg_check_modules(GLIB2 glib-2.0) - -string(REPLACE ";" " " CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${GLIB2_STATIC_CFLAGS} ${GLIB2_STATIC_LDFLAGS}") -message("${CMAKE_C_FLAGS}") - -add_library(skeltrack ${SKELTRACK_SRCS}) - diff --git a/interface/external/skeltrack/COPYING b/interface/external/skeltrack/COPYING deleted file mode 100644 index 65c5ca88a6..0000000000 --- a/interface/external/skeltrack/COPYING +++ /dev/null @@ -1,165 +0,0 @@ - GNU LESSER GENERAL PUBLIC LICENSE - Version 3, 29 June 2007 - - Copyright (C) 2007 Free Software Foundation, Inc. - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - - This version of the GNU Lesser General Public License incorporates -the terms and conditions of version 3 of the GNU General Public -License, supplemented by the additional permissions listed below. - - 0. Additional Definitions. - - As used herein, "this License" refers to version 3 of the GNU Lesser -General Public License, and the "GNU GPL" refers to version 3 of the GNU -General Public License. - - "The Library" refers to a covered work governed by this License, -other than an Application or a Combined Work as defined below. - - An "Application" is any work that makes use of an interface provided -by the Library, but which is not otherwise based on the Library. -Defining a subclass of a class defined by the Library is deemed a mode -of using an interface provided by the Library. - - A "Combined Work" is a work produced by combining or linking an -Application with the Library. The particular version of the Library -with which the Combined Work was made is also called the "Linked -Version". - - The "Minimal Corresponding Source" for a Combined Work means the -Corresponding Source for the Combined Work, excluding any source code -for portions of the Combined Work that, considered in isolation, are -based on the Application, and not on the Linked Version. - - The "Corresponding Application Code" for a Combined Work means the -object code and/or source code for the Application, including any data -and utility programs needed for reproducing the Combined Work from the -Application, but excluding the System Libraries of the Combined Work. - - 1. Exception to Section 3 of the GNU GPL. - - You may convey a covered work under sections 3 and 4 of this License -without being bound by section 3 of the GNU GPL. - - 2. Conveying Modified Versions. - - If you modify a copy of the Library, and, in your modifications, a -facility refers to a function or data to be supplied by an Application -that uses the facility (other than as an argument passed when the -facility is invoked), then you may convey a copy of the modified -version: - - a) under this License, provided that you make a good faith effort to - ensure that, in the event an Application does not supply the - function or data, the facility still operates, and performs - whatever part of its purpose remains meaningful, or - - b) under the GNU GPL, with none of the additional permissions of - this License applicable to that copy. - - 3. Object Code Incorporating Material from Library Header Files. - - The object code form of an Application may incorporate material from -a header file that is part of the Library. You may convey such object -code under terms of your choice, provided that, if the incorporated -material is not limited to numerical parameters, data structure -layouts and accessors, or small macros, inline functions and templates -(ten or fewer lines in length), you do both of the following: - - a) Give prominent notice with each copy of the object code that the - Library is used in it and that the Library and its use are - covered by this License. - - b) Accompany the object code with a copy of the GNU GPL and this license - document. - - 4. Combined Works. - - You may convey a Combined Work under terms of your choice that, -taken together, effectively do not restrict modification of the -portions of the Library contained in the Combined Work and reverse -engineering for debugging such modifications, if you also do each of -the following: - - a) Give prominent notice with each copy of the Combined Work that - the Library is used in it and that the Library and its use are - covered by this License. - - b) Accompany the Combined Work with a copy of the GNU GPL and this license - document. - - c) For a Combined Work that displays copyright notices during - execution, include the copyright notice for the Library among - these notices, as well as a reference directing the user to the - copies of the GNU GPL and this license document. - - d) Do one of the following: - - 0) Convey the Minimal Corresponding Source under the terms of this - License, and the Corresponding Application Code in a form - suitable for, and under terms that permit, the user to - recombine or relink the Application with a modified version of - the Linked Version to produce a modified Combined Work, in the - manner specified by section 6 of the GNU GPL for conveying - Corresponding Source. - - 1) Use a suitable shared library mechanism for linking with the - Library. A suitable mechanism is one that (a) uses at run time - a copy of the Library already present on the user's computer - system, and (b) will operate properly with a modified version - of the Library that is interface-compatible with the Linked - Version. - - e) Provide Installation Information, but only if you would otherwise - be required to provide such information under section 6 of the - GNU GPL, and only to the extent that such information is - necessary to install and execute a modified version of the - Combined Work produced by recombining or relinking the - Application with a modified version of the Linked Version. (If - you use option 4d0, the Installation Information must accompany - the Minimal Corresponding Source and Corresponding Application - Code. If you use option 4d1, you must provide the Installation - Information in the manner specified by section 6 of the GNU GPL - for conveying Corresponding Source.) - - 5. Combined Libraries. - - You may place library facilities that are a work based on the -Library side by side in a single library together with other library -facilities that are not Applications and are not covered by this -License, and convey such a combined library under terms of your -choice, if you do both of the following: - - a) Accompany the combined library with a copy of the same work based - on the Library, uncombined with any other library facilities, - conveyed under the terms of this License. - - b) Give prominent notice with the combined library that part of it - is a work based on the Library, and explaining where to find the - accompanying uncombined form of the same work. - - 6. Revised Versions of the GNU Lesser General Public License. - - The Free Software Foundation may publish revised and/or new versions -of the GNU Lesser General Public License from time to time. Such new -versions will be similar in spirit to the present version, but may -differ in detail to address new problems or concerns. - - Each version is given a distinguishing version number. If the -Library as you received it specifies that a certain numbered version -of the GNU Lesser General Public License "or any later version" -applies to it, you have the option of following the terms and -conditions either of that published version or of any later version -published by the Free Software Foundation. If the Library as you -received it does not specify a version number of the GNU Lesser -General Public License, you may choose any version of the GNU Lesser -General Public License ever published by the Free Software Foundation. - - If the Library as you received it specifies that a proxy can decide -whether future versions of the GNU Lesser General Public License shall -apply, that proxy's public statement of acceptance of any version is -permanent authorization for you to choose that version for the -Library. diff --git a/interface/external/skeltrack/include/skeltrack-joint.h b/interface/external/skeltrack/include/skeltrack-joint.h deleted file mode 100644 index 4a9e0ba28c..0000000000 --- a/interface/external/skeltrack/include/skeltrack-joint.h +++ /dev/null @@ -1,90 +0,0 @@ -/* - * skeltrak-joint.h - * - * Skeltrack - A Free Software skeleton tracking library - * Copyright (C) 2012 Igalia S.L. - * - * Authors: - * Joaquim Rocha - * Eduardo Lima Mitev - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public License - * version 3, or (at your option) any later version as published by - * the Free Software Foundation. - * - * This library is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License at http://www.gnu.org/licenses/lgpl-3.0.txt - * for more details. - */ - -#ifndef __SKELTRACK_JOINT_H__ -#define __SKELTRACK_JOINT_H__ - -#include -#include - -G_BEGIN_DECLS - -#define SKELTRACK_TYPE_JOINT (skeltrack_joint_get_type ()) -#define SKELTRACK_JOINT_MAX_JOINTS 7 - -typedef struct _SkeltrackJoint SkeltrackJoint; -typedef SkeltrackJoint **SkeltrackJointList; - -/** - * SkeltrackJointId: - * @SKELTRACK_JOINT_ID_HEAD: The head - * @SKELTRACK_JOINT_ID_LEFT_SHOULDER: The left shoulder - * @SKELTRACK_JOINT_ID_RIGHT_SHOULDER: The right shoulder - * @SKELTRACK_JOINT_ID_LEFT_ELBOW: The left elbow - * @SKELTRACK_JOINT_ID_RIGHT_ELBOW: The right elbow - * @SKELTRACK_JOINT_ID_LEFT_HAND: The left hand - * @SKELTRACK_JOINT_ID_RIGHT_HAND: The right hand - * - * Available joint ids. - **/ -typedef enum { - SKELTRACK_JOINT_ID_HEAD, - SKELTRACK_JOINT_ID_LEFT_SHOULDER, - SKELTRACK_JOINT_ID_RIGHT_SHOULDER, - SKELTRACK_JOINT_ID_LEFT_ELBOW, - SKELTRACK_JOINT_ID_RIGHT_ELBOW, - SKELTRACK_JOINT_ID_LEFT_HAND, - SKELTRACK_JOINT_ID_RIGHT_HAND -} SkeltrackJointId; - -/** - * SkeltrackJoint: - * @id: The id of the joint - * @x: The x coordinate of the joint in the space (in mm) - * @y: The y coordinate of the joint in the space (in mm) - * @z: The z coordinate of the joint in the space (in mm) - * @screen_x: The x coordinate of the joint in the screen (in pixels) - * @screen_y: The y coordinate of the joint in the screen (in pixels) - **/ -struct _SkeltrackJoint -{ - SkeltrackJointId id; - - gint x; - gint y; - gint z; - - gint screen_x; - gint screen_y; -}; - -GType skeltrack_joint_get_type (void); -gpointer skeltrack_joint_copy (SkeltrackJoint *joint); -void skeltrack_joint_free (SkeltrackJoint *joint); -void skeltrack_joint_list_free (SkeltrackJointList list); -SkeltrackJointList skeltrack_joint_list_new (void); -SkeltrackJoint * skeltrack_joint_list_get_joint (SkeltrackJointList list, - SkeltrackJointId id); - -G_END_DECLS - -#endif /* __SKELTRACK_JOINT_H__ */ diff --git a/interface/external/skeltrack/include/skeltrack-skeleton.h b/interface/external/skeltrack/include/skeltrack-skeleton.h deleted file mode 100644 index 11e4344025..0000000000 --- a/interface/external/skeltrack/include/skeltrack-skeleton.h +++ /dev/null @@ -1,95 +0,0 @@ -/* - * skeltrack.h - * - * Skeltrack - A Free Software skeleton tracking library - * Copyright (C) 2012 Igalia S.L. - * - * Authors: - * Joaquim Rocha - * Eduardo Lima Mitev - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public License - * version 3, or (at your option) any later version as published by - * the Free Software Foundation. - * - * This library is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License at http://www.gnu.org/licenses/lgpl-3.0.txt - * for more details. - */ - -#ifndef __SKELTRACK_SKELETON_H__ -#define __SKELTRACK_SKELETON_H__ - -#include -#include -#include -#include - -G_BEGIN_DECLS - -#define SKELTRACK_TYPE_SKELETON (skeltrack_skeleton_get_type ()) -#define SKELTRACK_SKELETON(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), SKELTRACK_TYPE_SKELETON, SkeltrackSkeleton)) -#define SKELTRACK_SKELETON_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), SKELTRACK_TYPE_SKELETON, SkeltrackSkeletonClass)) -#define SKELTRACK_IS_SKELETON(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), SKELTRACK_TYPE_SKELETON)) -#define SKELTRACK_IS_SKELETON_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), SKELTRACK_TYPE_SKELETON)) -#define SKELTRACK_SKELETON_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), SKELTRACK_TYPE_SKELETON, SkeltrackSkeletonClass)) - -typedef struct _SkeltrackSkeleton SkeltrackSkeleton; -typedef struct _SkeltrackSkeletonClass SkeltrackSkeletonClass; -typedef struct _SkeltrackSkeletonPrivate SkeltrackSkeletonPrivate; - -struct _SkeltrackSkeleton -{ - GObject parent; - - /*< private >*/ - SkeltrackSkeletonPrivate *priv; -}; - -/** - * SkeltrackSkeletonClass: - **/ -struct _SkeltrackSkeletonClass -{ - GObjectClass parent_class; -}; - -GType skeltrack_skeleton_get_type (void) G_GNUC_CONST; - -SkeltrackSkeleton * skeltrack_skeleton_new (void); - -void skeltrack_skeleton_track_joints (SkeltrackSkeleton *self, - guint16 *buffer, - guint width, - guint height, - GCancellable *cancellable, - GAsyncReadyCallback callback, - gpointer user_data); - -SkeltrackJointList skeltrack_skeleton_track_joints_finish (SkeltrackSkeleton *self, - GAsyncResult *result, - GError **error); - -SkeltrackJointList skeltrack_skeleton_track_joints_sync (SkeltrackSkeleton *self, - guint16 *buffer, - guint width, - guint height, - GCancellable *cancellable, - GError **error); - -void skeltrack_skeleton_get_focus_point (SkeltrackSkeleton *self, - gint *x, - gint *y, - gint *z); - -void skeltrack_skeleton_set_focus_point (SkeltrackSkeleton *self, - gint x, - gint y, - gint z); - -G_END_DECLS - -#endif /* __SKELTRACK_SKELETON_H__ */ diff --git a/interface/external/skeltrack/include/skeltrack-smooth.h b/interface/external/skeltrack/include/skeltrack-smooth.h deleted file mode 100644 index ea99bfc7ae..0000000000 --- a/interface/external/skeltrack/include/skeltrack-smooth.h +++ /dev/null @@ -1,36 +0,0 @@ -/* - * skeltrack-smooth.h - * - * Skeltrack - A Free Software skeleton tracking library - * Copyright (C) 2012 Igalia S.L. - * - * Authors: - * Joaquim Rocha - * Eduardo Lima Mitev - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License at http://www.gnu.org/licenses/lgpl-3.0.txt - * for more details. - */ - -#include "skeltrack-joint.h" - -typedef struct { - SkeltrackJointList smoothed_joints; - SkeltrackJointList trend_joints; - guint joints_persistency; - gfloat smoothing_factor; - guint joints_persistency_counter[SKELTRACK_JOINT_MAX_JOINTS]; -} SmoothData; - -void reset_joints_persistency_counter (SmoothData *smooth_data); - -void smooth_joints (SmoothData *data, - SkeltrackJointList new_joints); diff --git a/interface/external/skeltrack/include/skeltrack-util.h b/interface/external/skeltrack/include/skeltrack-util.h deleted file mode 100644 index 540aee7f33..0000000000 --- a/interface/external/skeltrack/include/skeltrack-util.h +++ /dev/null @@ -1,127 +0,0 @@ -/* - * skeltrack-util.h - * - * Skeltrack - A Free Software skeleton tracking library - * Copyright (C) 2012 Igalia S.L. - * - * Authors: - * Joaquim Rocha - * Eduardo Lima Mitev - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License at http://www.gnu.org/licenses/lgpl-3.0.txt - * for more details. - */ - -#include -#include "skeltrack-joint.h" - -typedef struct _Label Label; -typedef struct _Node Node; - -struct _Label { - gint index; - Label *parent; - GList *nodes; - Node *bridge_node; - Node *to_node; - gint lower_screen_y; - gint higher_z; - gint lower_z; - gdouble normalized_num_nodes; -}; - -struct _Node { - gint i; - gint j; - gint x; - gint y; - gint z; - GList *neighbors; - GList *linked_nodes; - Label *label; -}; - -Node * get_closest_node_to_joint (GList *extremas, - SkeltrackJoint *joint, - gint *distance); - -Node * get_closest_node (GList *node_list, Node *from); - -Node * get_closest_torso_node (GList *node_list, - Node *from, - Node *head); - -Label * get_main_component (GList *node_list, - Node *from, - gdouble min_normalized_nr_nodes); - -Label * label_find (Label *label); - -void label_union (Label *a, Label *b); - -gint get_distance (Node *a, Node *b); - -void free_label (Label *label); - -void clean_labels (GList *labels); - -void free_node (Node *node, - gboolean unlink_node_first); - -void clean_nodes (GList *nodes); - -GList * remove_nodes_with_label (GList *nodes, - Node **node_matrix, - gint width, - Label *label); - -Label * get_lowest_index_label (Label **neighbor_labels); - -Label * new_label (gint index); - -void join_components_to_main (GList *nodes, - Label *lowest_component_label, - guint horizontal_max_distance, - guint depth_max_distance, - guint graph_distance_threshold); - -void set_joint_from_node (SkeltrackJointList *joints, - Node *node, - SkeltrackJointId id, - gint dimension_reduction); - -gint * create_new_dist_matrix (gint matrix_size); - -gboolean dijkstra_to (GList *nodes, - Node *source, - Node *target, - gint width, - gint height, - gint *distances, - Node **previous); - -void convert_screen_coords_to_mm (guint width, - guint height, - guint dimension_reduction, - guint i, - guint j, - gint z, - gint *x, - gint *y); - -void convert_mm_to_screen_coords (guint width, - guint height, - guint dimension_reduction, - gint x, - gint y, - gint z, - guint *i, - guint *j); diff --git a/interface/external/skeltrack/include/skeltrack.h b/interface/external/skeltrack/include/skeltrack.h deleted file mode 100644 index 8e1c572303..0000000000 --- a/interface/external/skeltrack/include/skeltrack.h +++ /dev/null @@ -1,28 +0,0 @@ -/* - * skeltrack.h - * - * skeltrack - A GObject wrapper of the libfreenect library - * Copyright (C) 2011 Igalia S.L. - * - * Authors: - * Joaquim Manuel Pereira Rocha - * Eduardo Lima Mitev - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public License - * version 3, or (at your option) any later version as published by - * the Free Software Foundation. - * - * This library is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License at http://www.gnu.org/licenses/lgpl-3.0.txt - * for more details. - */ - -#ifndef __SKELTRACK_H__ -#define __SKELTRACK_H__ - -#include - -#endif /* __SKELTRACK_H__ */ diff --git a/interface/external/skeltrack/lib/MacOS/libskeltrack.a b/interface/external/skeltrack/lib/MacOS/libskeltrack.a deleted file mode 100644 index 5a7a393c49a17978cc1ed5a750b1e3271c883b07..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 52416 zcmdVD3wT`BbuYeT%SITRBi>Ge!XyMRw#Ud1{6IV;(18QdfB`G93CVaYjVuMdGMX_W zi4qT%z$eEdZW~(D&_wN}H%?1yrGeNXCdkA^g6k5IOB1DaTP2~5l&jtpjVccuU)ey6k54*-72Bpx*!@|asQS`wS9Z&{(J7*WLFarEh!@U zK@kysg=kd6f7Nio9Erb1!&@}0(QvbdUnZhSi>OZFl!kjX+^^xcG<;pdpKACY8lE#( z^832-yIA2XH2mWtqQ);0tydVokz%4tHC(RY?Ha~3Ol$bO^8K-fztZshB9VWUhWBgu z84bUu`EHy`6zzB@-keOt>K=-IvaP8#8Lew;e`IECLn0oZ8M{56j3ysxFMw%o>PXI# zh*3z%`ORd?_}2Kt#6)%R)?}issh*-Ov4`T(?TJ`>V=xWGk0;w&nYf{?F4YljM>%Gt z$(Pq>z*%N%!;kNXC(p__P=OrZH{e=H~Ua)TYVfrTkDQ^A{lLIi6+~k z9d(I#yfs?a)|RLbAakNY*V01Kx!-SqK$O|e&7Gizn(sas0gY8>I`8e z^h`)d-UFQg#4Nw|VnJ+08X{^`_#7hsnOQo8FT2CUV) z9tgw)WUI4JI$mVj@rsWa8JWbhPtHScbM2Gk-^pY$&PzzmiBbBT;xy!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6kaHOr5@U=t)Us^ z+pBoJSvvz?s)zcx6HhS<>&-lej;eC4D*O&%_4Q z@S7q3u;TxE7XE#hbK}5I+IdELV}t|ysD=1Xs+o5+&NU-_A0~5Wy5fWDeK0B|{bWY^ zooa?12B8b(KYAI*^GEW9@bAD*x1)A>b%+$apM(2DrF<-r$>>liNQe7FCI5`~dM2Yo zrXU^Lmi`x^)1gz44)=#flun0GK|0(Y>ifCy)1g$54tBctt36;HQU&Q?r@M4q`03Cp zNQY)|lun0OK|0v!ZdW@05_R14C< zPWO^u3Y`wwf^@LcU8!_BbPLj9$ugvLXS%-zJKc0b^3|bSkRR-HZ^pYklga3iE=UJE z-Fx2_I@rJ9UtWJ%{T{X>93EXP;j@eR9>gWTvzYIHTrzZ-#3wYo=Q4?3qv7;`=gT*v*1T;4OM?gN15lYbwmUf~hFAGA~9Ml5oOXs^PX)$zh}3h!6=4QwMIf1MJ&3Oic!i56@6 zUn|~BX~q=4SMeokcgwtz5940xd?H8hp}mFsqebMu(w|m*Nb!HAcr#`Al;Vd~KG?D0 zdzm_AfGz?5X~p9{D&Nag`Cm}^Ce;%Q{1E_ergVR&_)3)@ccFkcQ`R=cZ`AZqL!7_< zu2Ouz);F%ZaeAE+V_gXOmS}n$T66w7rM^w^FtUvw?4ts2rhL%RNI$Cb;od0lX3E^H z={q%jT+^E=-%XmnTH!7crZS7@HZRhE5!hy*ryfDB@X77UdZG;BS7jUJ_yP z12uxO^DSp%z6c+T$`$8;rIY*{&9fN+$+0=2jK#c3U0dspcp{l=WrT%jp(y)1dl&Xd za?G~y-Q!@#@FPqg$o7pHC~)#4b9)F!XFEv%McFVyRupz_vV8cj{;?6aT0f=mMt7QO! zxuT}lhq%@XC<^$u^ff{UFE4aXbH IL5LyxKLPpTk^lez diff --git a/interface/external/skeltrack/lib/UNIX/libskeltrack.a b/interface/external/skeltrack/lib/UNIX/libskeltrack.a deleted file mode 100644 index f34c83224bfaeed07d09a6a02e47e802ba075ea5..0000000000000000000000000000000000000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biu9*9O8vaA;FuNVHlS?!ePA2pf}6cHE^ip5&oYwa5En&29Et8p??F9 zYlzq6Z|dta@!Ji0Gv17WoAG)Ej$>SjSH5FLye9oJ{tg&8RPqRYn}M5rF5__!^rrsp zuNt_?|ILQpHWPoZft&iYQ#=lWzuDf88Mw(OVd!(ioK)ohsDYdG&l-B(O#GyQoAvhF zJh^~8X1Ofk@i&}r*BZD>Or1g|&rr zb>MU%4sr4g2r&G~dM12lR@O7&JF~K$3E!EOd4KrMtjzo6n+1ti=KZpO6kO*0F=PCK zpUnF)uZI(QnfHslg3J7VZ-`#z_vW~XFfxy?gy>}+Pd2)Zcx4_>fel>d@vxt1;xb>C u^}om|^Y!f^dYPAF{%i7)`M1~s7Ctinu7v1i{yiGPWu7e`S_mJRPyZjn3$%~` diff --git a/interface/external/skeltrack/src/skeltrack-joint.c b/interface/external/skeltrack/src/skeltrack-joint.c deleted file mode 100644 index 6310c6a789..0000000000 --- a/interface/external/skeltrack/src/skeltrack-joint.c +++ /dev/null @@ -1,159 +0,0 @@ -/* - * skeltrack-joint.c - * - * Skeltrack - A Free Software skeleton tracking library - * Copyright (C) 2012 Igalia S.L. - * - * Authors: - * Joaquim Rocha - * Eduardo Lima Mitev - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License at http://www.gnu.org/licenses/lgpl-3.0.txt - * for more details. - */ - -/** - * SECTION:skeltrack-joint - * @short_description: Data structure that holds information about - * a skeleton joint. - * - * A #SkeltrackJoint is built automatically by #SkeltrackSkeleton when - * it finds a skeleton joint and can be used to get information about it. - * Each #SkeltrackJoint holds an id, given by #SkeltrackJointId that indicates - * which of the human skeleton joints it represents. - * - * Spacial information about a joint is given by the @x, @y and @z coordinates. - * To represent the joint in a 2D, the variables @screen_x and - * @screen_y will indicate the joint's position in the screen and are calculated - * taking into account the #SkeltrackSkeleton:dimension-reduction (it will - * be multiplied by this value). - * - * The tracked list of joints is represented by #SkeltrackJointList and given - * by skeltrack_skeleton_track_joints_finish(). - * To get a #SkeltrackJoint from a #SkeltrackJointList object, use the - * skeltrack_joint_list_get_joint() indicating the needed #SkeltrackJointId. - * - * A #SkeltrackJointList can be freed by using skeltrack_joint_list_free(). - * A #SkeltrackJoint can be copied by skeltrack_joint_copy() and freed by - * skeltrack_joint_free(). - **/ - -#include -#include "skeltrack-joint.h" - -/** - * skeltrack_joint_get_type: - * - * Returns: The registered #GType for #SkeltrackJoint boxed type - **/ -GType -skeltrack_joint_get_type (void) -{ - static GType type = 0; - - if (G_UNLIKELY (type == 0)) - type = g_boxed_type_register_static ("SkeltrackJoint", - (GBoxedCopyFunc) skeltrack_joint_copy, - (GBoxedFreeFunc) skeltrack_joint_free); - return type; -} - -/** - * skeltrack_joint_copy: - * @joint: The #SkeltrackJoint to copy - * - * Makes an exact copy of a #SkeltrackJoint object. - * - * Returns: (transfer full): A newly created #SkeltrackJoint. Use - * skeltrack_joint_free() to free it. - **/ -gpointer -skeltrack_joint_copy (SkeltrackJoint *joint) -{ - SkeltrackJoint *new_joint; - - if (joint == NULL) - return NULL; - - new_joint = g_slice_new0 (SkeltrackJoint); - memcpy (new_joint, joint, sizeof (SkeltrackJoint)); - - return new_joint; -} - -/** - * skeltrack_joint_free: - * @joint: The #SkeltrackJoint to free - * - * Frees a #SkeltrackJoint object. - **/ -void -skeltrack_joint_free (SkeltrackJoint *joint) -{ - g_slice_free (SkeltrackJoint, joint); -} - - -/** - * skeltrack_joint_list_free: - * @list: The #SkeltrackJointList to free - * - * Frees a #SkeltrackJointList object and each #SkeltrackJoint - * in it. - **/ -void -skeltrack_joint_list_free (SkeltrackJointList list) -{ - gint i; - - if (list == NULL) - return; - - for (i = 0; i < SKELTRACK_JOINT_MAX_JOINTS; i++) - { - g_slice_free (SkeltrackJoint, list[i]); - } - g_slice_free1 (SKELTRACK_JOINT_MAX_JOINTS * sizeof (SkeltrackJoint *), list); -} - -/** - * skeltrack_joint_list_get_joint: - * @list: The #SkeltrackJointList - * @id: The #SkeltrackJointId of the joint to get - * - * Gets a joint from a list of skeleton joints. The joint - * returned needs to be freed by using skeltrack_joint_free() or, - * alternatively, the whole list and its joints can be freed by using - * skeltrack_joint_list_free(). - * - * Returns: (transfer full): The #SkeltrackJoint that corresponds to - * the given @id or %NULL if that joint wasn't found. - **/ -SkeltrackJoint * -skeltrack_joint_list_get_joint (SkeltrackJointList list, SkeltrackJointId id) -{ - return list[id]; -} - -/** - * skeltrack_joint_list_new: - * - * Created a new list of #SkeltrackJointsList with its joints as #NULL. - * When it is no longer needed, free it with skeltrack_joint_list_free(). - * - * Returns: (transfer full): A newly allocated #SkeltrackJointList - **/ -SkeltrackJointList -skeltrack_joint_list_new (void) -{ - return (SkeltrackJointList) g_slice_alloc0 (SKELTRACK_JOINT_MAX_JOINTS * - sizeof (SkeltrackJoint *)); -} diff --git a/interface/external/skeltrack/src/skeltrack-skeleton.c b/interface/external/skeltrack/src/skeltrack-skeleton.c deleted file mode 100644 index 9373af56a8..0000000000 --- a/interface/external/skeltrack/src/skeltrack-skeleton.c +++ /dev/null @@ -1,2027 +0,0 @@ -/* - * skeltrack-skeleton.c - * - * Skeltrack - A Free Software skeleton tracking library - * Copyright (C) 2012 Igalia S.L. - * - * Authors: - * Joaquim Rocha - * Eduardo Lima Mitev - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License at http://www.gnu.org/licenses/lgpl-3.0.txt - * for more details. - */ - -/** - * SECTION:skeltrack-skeleton - * @short_description: Object that tracks the joints in a human skeleton - * - * This object tries to detect joints of the human skeleton. - * - * To track the joints, first create an instance of #SkeltrackSkeleton using - * skeltrack_skeleton_new() and then set a buffer from where the joints will - * be retrieved using the asynchronous function - * skeltrack_skeleton_track_joints() and get the list of joints using - * skeltrack_skeleton_track_joints_finish(). - * - * A common use case is to use this library together with a Kinect device so - * an easy way to retrieve the needed buffer is to use the GFreenect library. - * - * It currently tracks the joints identified by #SkeltrackJointId . - * - * Tracking the skeleton joints can be computational heavy so it is advised that - * the given buffer's dimension is reduced before setting it. To do it, - * simply choose the reduction factor and loop through the original buffer - * (using this factor as a step) and set the reduced buffer's values accordingly. - * The #SkeltrackSkeleton:dimension-reduction property holds this reduction - * value and should be changed to the reduction factor used (alternatively you - * can retrieve its default value and use it in the reduction, if it fits your - * needs). - * - * The skeleton tracking uses a few heuristics that proved to work well for - * tested cases but they can be tweaked by changing the following properties: - * #SkeltrackSkeleton:graph-distance-threshold , - * #SkeltrackSkeleton:graph-minimum-number-nodes , - * #SkeltrackSkeleton:hands-minimum-distance , - * #SkeltrackSkeleton:shoulders-arc-start-point , - * #SkeltrackSkeleton:shoulders-arc-length , - * #SkeltrackSkeleton:shoulders-circumference-radius , - * #SkeltrackSkeleton:shoulders-search-step . - **/ -#include -#include -#include - -#include "skeltrack-skeleton.h" -#include "skeltrack-smooth.h" -#include "skeltrack-util.h" - -#define SKELTRACK_SKELETON_GET_PRIVATE(obj) (G_TYPE_INSTANCE_GET_PRIVATE ((obj), \ - SKELTRACK_TYPE_SKELETON, \ - SkeltrackSkeletonPrivate)) - -#define DIMENSION_REDUCTION 16 -#define GRAPH_DISTANCE_THRESHOLD 150 -#define GRAPH_MINIMUM_NUMBER_OF_NODES 5 -#define HANDS_MINIMUM_DISTANCE 550 -#define SHOULDERS_CIRCUMFERENCE_RADIUS 300 -#define SHOULDERS_ARC_START_POINT 100 -#define SHOULDERS_ARC_LENGTH 250 -#define SHOULDERS_SEARCH_STEP 0.05 -#define JOINTS_PERSISTENCY_DEFAULT 3 -#define SMOOTHING_FACTOR_DEFAULT .5 -#define ENABLE_SMOOTHING_DEFAULT TRUE -#define DEFAULT_FOCUS_POINT_Z 1000 -#define TORSO_MINIMUM_NUMBER_NODES_DEFAULT 16.0 -#define EXTREMA_SPHERE_RADIUS 300 - -/* private data */ -struct _SkeltrackSkeletonPrivate -{ - guint16 *buffer; - guint buffer_width; - guint buffer_height; - - GAsyncResult *track_joints_result; - GMutex track_joints_mutex; - - GList *graph; - GList *labels; - Node **node_matrix; - gint *distances_matrix; - GList *main_component; - - guint16 dimension_reduction; - guint16 distance_threshold; - guint16 min_nr_nodes; - - guint16 hands_minimum_distance; - - guint16 shoulders_circumference_radius; - guint16 shoulders_arc_start_point; - guint16 shoulders_arc_length; - gfloat shoulders_search_step; - - guint16 extrema_sphere_radius; - - Node *focus_node; - - gboolean enable_smoothing; - SmoothData smooth_data; - - gfloat torso_minimum_number_nodes; - - SkeltrackJoint *previous_head; -}; - -/* Currently searches for head and hands */ -static const guint NR_EXTREMAS_TO_SEARCH = 3; - -/* properties */ -enum - { - PROP_0, - PROP_DIMENSION_REDUCTION, - PROP_GRAPH_DISTANCE_THRESHOLD, - PROP_GRAPH_MIN_NR_NODES, - PROP_HANDS_MINIMUM_DISTANCE, - PROP_SHOULDERS_CIRCUMFERENCE_RADIUS, - PROP_SHOULDERS_ARC_START_POINT, - PROP_SHOULDERS_ARC_LENGTH, - PROP_SHOULDERS_SEARCH_STEP, - PROP_EXTREMA_SPHERE_RADIUS, - PROP_SMOOTHING_FACTOR, - PROP_JOINTS_PERSISTENCY, - PROP_ENABLE_SMOOTHING, - PROP_TORSO_MINIMUM_NUMBER_NODES - }; - - -static void skeltrack_skeleton_class_init (SkeltrackSkeletonClass *class); -static void skeltrack_skeleton_init (SkeltrackSkeleton *self); -static void skeltrack_skeleton_finalize (GObject *obj); -static void skeltrack_skeleton_dispose (GObject *obj); - -static void skeltrack_skeleton_set_property (GObject *obj, - guint prop_id, - const GValue *value, - GParamSpec *pspec); -static void skeltrack_skeleton_get_property (GObject *obj, - guint prop_id, - GValue *value, - GParamSpec *pspec); - - -static void clean_tracking_resources (SkeltrackSkeleton *self); - -G_DEFINE_TYPE (SkeltrackSkeleton, skeltrack_skeleton, G_TYPE_OBJECT) - -static void -skeltrack_skeleton_class_init (SkeltrackSkeletonClass *class) -{ - GObjectClass *obj_class; - - obj_class = G_OBJECT_CLASS (class); - - obj_class->dispose = skeltrack_skeleton_dispose; - obj_class->finalize = skeltrack_skeleton_finalize; - obj_class->get_property = skeltrack_skeleton_get_property; - obj_class->set_property = skeltrack_skeleton_set_property; - - /* install properties */ - - /** - * SkeltrackSkeleton:dimension-reduction - * - * The value by which the dimension of the buffer was reduced - * (in case it was). - **/ - g_object_class_install_property (obj_class, - PROP_DIMENSION_REDUCTION, - g_param_spec_uint ("dimension-reduction", - "Dimension reduction", - "The dimension reduction value", - 1, - 1024, - DIMENSION_REDUCTION, - G_PARAM_READWRITE | - G_PARAM_STATIC_STRINGS)); - - /** - * SkeltrackSkeleton:graph-distance-threshold - * - * The value (in mm) for the distance threshold between each node and its - * neighbors. This means that a node in the graph will only be connected - * to another if they aren't farther apart then this value. - **/ - g_object_class_install_property (obj_class, - PROP_GRAPH_DISTANCE_THRESHOLD, - g_param_spec_uint ("graph-distance-threshold", - "Graph's distance threshold", - "The distance threshold between " - "each node.", - 1, - G_MAXUINT16, - GRAPH_DISTANCE_THRESHOLD, - G_PARAM_READWRITE | - G_PARAM_STATIC_STRINGS)); - - /** - * SkeltrackSkeleton:graph-minimum-number-nodes - * - * The minimum number of nodes each of the graph's components - * should have (when it is not fully connected). - **/ - g_object_class_install_property (obj_class, - PROP_GRAPH_MIN_NR_NODES, - g_param_spec_uint ("graph-minimum-number-nodes", - "Graph's minimum number of nodes", - "The minimum number of nodes " - "of the graph's components ", - 1, - G_MAXUINT16, - GRAPH_MINIMUM_NUMBER_OF_NODES, - G_PARAM_READWRITE | - G_PARAM_STATIC_STRINGS)); - - /** - * SkeltrackSkeleton:hands-minimum-distance - * - * The minimum distance (in mm) that each hand should be from its - * respective shoulder. - **/ - g_object_class_install_property (obj_class, - PROP_HANDS_MINIMUM_DISTANCE, - g_param_spec_uint ("hands-minimum-distance", - "Hands' minimum distance from the " - "shoulders", - "The minimum distance (in mm) that " - "each hand should be from its " - "respective shoulder.", - 300, - G_MAXUINT, - HANDS_MINIMUM_DISTANCE, - G_PARAM_READWRITE | - G_PARAM_STATIC_STRINGS)); - - /** - * SkeltrackSkeleton:shoulders-circumference-radius - * - * The radius of the circumference (in mm) from the head with which - * to look for the shoulders. - **/ - g_object_class_install_property (obj_class, - PROP_SHOULDERS_CIRCUMFERENCE_RADIUS, - g_param_spec_uint ("shoulders-circumference-radius", - "Shoulders' circumference radius", - "The radius of the circumference " - "(in mm) from the head with which " - "to look for the shoulders.", - 1, - G_MAXUINT16, - SHOULDERS_CIRCUMFERENCE_RADIUS, - G_PARAM_READWRITE | - G_PARAM_STATIC_STRINGS)); - - /** - * SkeltrackSkeleton:shoulders-arc-start-point - * - * The starting point (in mm) of the arc (from the bottom of the - * shoulders' circumference) where the shoulders will be searched for. - * This point is used together with the - * SkeltrackSkeleton::shoulders-arc-length to determine the arc - * where the shoulders' points will be looked for. - **/ - g_object_class_install_property (obj_class, - PROP_SHOULDERS_ARC_START_POINT, - g_param_spec_uint ("shoulders-arc-start-point", - "Shoulders' arc start point", - "The starting point (in mm) of the " - "arc from the bottom of the " - "shoulders' circumference where " - "the shoulders will be searched for.", - 1, - G_MAXUINT16, - SHOULDERS_ARC_START_POINT, - G_PARAM_READWRITE | - G_PARAM_STATIC_STRINGS)); - - /** - * SkeltrackSkeleton:shoulders-arc-length - * - * The length (in mm) of the arc where the shoulders will be searched. - * This length is used together with the - * SkeltrackSkeleton::shoulders-arc-start-point to determine the arc - * where the shoulders' points will be looked for. - **/ - g_object_class_install_property (obj_class, - PROP_SHOULDERS_ARC_LENGTH, - g_param_spec_uint ("shoulders-arc-length", - "Shoulders' arc length", - "The length (in mm) of the arc " - "where the shoulders will be " - "searched.", - 1, - G_MAXUINT16, - SHOULDERS_ARC_LENGTH, - G_PARAM_READWRITE | - G_PARAM_STATIC_STRINGS)); - - - /** - * SkeltrackSkeleton:shoulders-search-step - * - * The step considered for sampling the shoulders' circumference - * when searching for the shoulders. - **/ - g_object_class_install_property (obj_class, - PROP_SHOULDERS_SEARCH_STEP, - g_param_spec_float ("shoulders-search-step", - "Shoulders' search step", - "The step considered for sampling " - "the shoulders' circumference " - "when searching for the shoulders.", - .01, - M_PI, - .01, - G_PARAM_READWRITE | - G_PARAM_STATIC_STRINGS)); - - /** - * SkeltrackSkeleton:smoothing-factor - * - * The factor by which the joints should be smoothed. This refers to - * Holt's Double Exponential Smoothing and determines how the current and - * previous data and trend will be used. A value closer to 0 will produce smoother - * results but increases latency. - **/ - g_object_class_install_property (obj_class, - PROP_SMOOTHING_FACTOR, - g_param_spec_float ("smoothing-factor", - "Smoothing factor", - "The factor by which the joints values" - "should be smoothed.", - .0, - 1.0, - .5, - G_PARAM_READWRITE | - G_PARAM_STATIC_STRINGS)); - - /** - * SkeltrackSkeleton:joints-persistency - * - * The number of times that a joint can be null until its previous - * value is discarded. For example, if this property is 3, the last value for - * a joint will keep being used until the new value for this joint is null for - * 3 consecutive times. - * - **/ - g_object_class_install_property (obj_class, - PROP_JOINTS_PERSISTENCY, - g_param_spec_uint ("joints-persistency", - "Joints persistency", - "The number of times that a joint " - "can be null until its previous " - "value is discarded", - 0, - G_MAXUINT16, - JOINTS_PERSISTENCY_DEFAULT, - G_PARAM_READWRITE | - G_PARAM_STATIC_STRINGS)); - - /** - * SkeltrackSkeleton:enable-smoothing - * - * Whether smoothing the joints should be applied or not. - * - **/ - g_object_class_install_property (obj_class, - PROP_ENABLE_SMOOTHING, - g_param_spec_boolean ("enable-smoothing", - "Enable smoothing", - "Whether smoothing should be " - "applied or not", - ENABLE_SMOOTHING_DEFAULT, - G_PARAM_READWRITE | - G_PARAM_STATIC_STRINGS)); - - /** - * SkeltrackSkeleton:torso-minimum-number-nodes - * - * Minimum number of nodes for a component to be considered torso. - * - **/ - g_object_class_install_property (obj_class, - PROP_TORSO_MINIMUM_NUMBER_NODES, - g_param_spec_float ("torso-minimum-number-nodes", - "Torso minimum number of nodes", - "Minimum number of nodes for a " - "component to be considered " - "torso", - 0, - G_MAXUINT16, - TORSO_MINIMUM_NUMBER_NODES_DEFAULT, - G_PARAM_READWRITE | - G_PARAM_STATIC_STRINGS)); - - /** - * SkeltrackSkeleton:extrema-sphere-radius - * - * The radius of the sphere around the extremas (in mm). - * - * Points inside this sphere are considered for calculating the average position - * of the extrema. If the value is 0, no averaging is done. - **/ - g_object_class_install_property (obj_class, - PROP_EXTREMA_SPHERE_RADIUS, - g_param_spec_uint ("extrema-sphere-radius", - "Extrema sphere radius", - "The radius of the sphere around " - "the extremas (in mm).", - 0, - G_MAXUINT16, - EXTREMA_SPHERE_RADIUS, - G_PARAM_READWRITE | - G_PARAM_STATIC_STRINGS)); - - - /* add private structure */ - g_type_class_add_private (obj_class, sizeof (SkeltrackSkeletonPrivate)); -} - -static void -skeltrack_skeleton_init (SkeltrackSkeleton *self) -{ - guint i; - SkeltrackSkeletonPrivate *priv; - - priv = SKELTRACK_SKELETON_GET_PRIVATE (self); - self->priv = priv; - - priv->buffer = NULL; - priv->buffer_width = 0; - priv->buffer_height = 0; - - priv->graph = NULL; - priv->labels = NULL; - priv->main_component = NULL; - priv->node_matrix = NULL; - priv->distances_matrix = NULL; - - priv->dimension_reduction = DIMENSION_REDUCTION; - priv->distance_threshold = GRAPH_DISTANCE_THRESHOLD; - - priv->min_nr_nodes = GRAPH_MINIMUM_NUMBER_OF_NODES; - - priv->hands_minimum_distance = HANDS_MINIMUM_DISTANCE; - - priv->shoulders_circumference_radius = SHOULDERS_CIRCUMFERENCE_RADIUS; - priv->shoulders_arc_start_point = SHOULDERS_ARC_START_POINT; - priv->shoulders_arc_length = SHOULDERS_ARC_LENGTH; - priv->shoulders_search_step = SHOULDERS_SEARCH_STEP; - - priv->extrema_sphere_radius = EXTREMA_SPHERE_RADIUS; - - priv->focus_node = g_slice_new0 (Node); - priv->focus_node->x = 0; - priv->focus_node->y = 0; - priv->focus_node->z = DEFAULT_FOCUS_POINT_Z; - - priv->track_joints_result = NULL; - - g_mutex_init (&priv->track_joints_mutex); - - priv->enable_smoothing = ENABLE_SMOOTHING_DEFAULT; - priv->smooth_data.smoothing_factor = SMOOTHING_FACTOR_DEFAULT; - priv->smooth_data.smoothed_joints = NULL; - priv->smooth_data.trend_joints = NULL; - priv->smooth_data.joints_persistency = JOINTS_PERSISTENCY_DEFAULT; - for (i = 0; i < SKELTRACK_JOINT_MAX_JOINTS; i++) - priv->smooth_data.joints_persistency_counter[i] = JOINTS_PERSISTENCY_DEFAULT; - - priv->torso_minimum_number_nodes = TORSO_MINIMUM_NUMBER_NODES_DEFAULT; - - priv->previous_head = NULL; -} - -static void -skeltrack_skeleton_dispose (GObject *obj) -{ - /* TODO: cancel any cancellable to interrupt joints tracking operation */ - - G_OBJECT_CLASS (skeltrack_skeleton_parent_class)->dispose (obj); -} - -static void -skeltrack_skeleton_finalize (GObject *obj) -{ - SkeltrackSkeleton *self = SKELTRACK_SKELETON (obj); - - g_mutex_clear (&self->priv->track_joints_mutex); - - skeltrack_joint_list_free (self->priv->smooth_data.smoothed_joints); - skeltrack_joint_list_free (self->priv->smooth_data.trend_joints); - - skeltrack_joint_free (self->priv->previous_head); - - clean_tracking_resources (self); - - g_slice_free (Node, self->priv->focus_node); - - G_OBJECT_CLASS (skeltrack_skeleton_parent_class)->finalize (obj); -} - -static void -skeltrack_skeleton_set_property (GObject *obj, - guint prop_id, - const GValue *value, - GParamSpec *pspec) -{ - SkeltrackSkeleton *self; - - self = SKELTRACK_SKELETON (obj); - - switch (prop_id) - { - case PROP_DIMENSION_REDUCTION: - self->priv->dimension_reduction = g_value_get_uint (value); - break; - - case PROP_GRAPH_DISTANCE_THRESHOLD: - self->priv->distance_threshold = g_value_get_uint (value); - break; - - case PROP_GRAPH_MIN_NR_NODES: - self->priv->min_nr_nodes = g_value_get_uint (value); - break; - - case PROP_HANDS_MINIMUM_DISTANCE: - self->priv->hands_minimum_distance = g_value_get_uint (value); - break; - - case PROP_SHOULDERS_CIRCUMFERENCE_RADIUS: - self->priv->shoulders_circumference_radius = g_value_get_uint (value); - break; - - case PROP_SHOULDERS_ARC_START_POINT: - self->priv->shoulders_arc_start_point = g_value_get_uint (value); - break; - - case PROP_SHOULDERS_ARC_LENGTH: - self->priv->shoulders_arc_length = g_value_get_uint (value); - break; - - case PROP_SHOULDERS_SEARCH_STEP: - self->priv->shoulders_circumference_radius = g_value_get_float (value); - break; - - case PROP_EXTREMA_SPHERE_RADIUS: - self->priv->extrema_sphere_radius = g_value_get_uint (value); - break; - - case PROP_SMOOTHING_FACTOR: - self->priv->smooth_data.smoothing_factor = g_value_get_float (value); - break; - - case PROP_JOINTS_PERSISTENCY: - self->priv->smooth_data.joints_persistency = g_value_get_uint (value); - reset_joints_persistency_counter (&self->priv->smooth_data); - break; - - case PROP_ENABLE_SMOOTHING: - self->priv->enable_smoothing = g_value_get_boolean (value); - break; - - case PROP_TORSO_MINIMUM_NUMBER_NODES: - self->priv->torso_minimum_number_nodes = g_value_get_float (value); - break; - - default: - G_OBJECT_WARN_INVALID_PROPERTY_ID (obj, prop_id, pspec); - break; - } -} - -static void -skeltrack_skeleton_get_property (GObject *obj, - guint prop_id, - GValue *value, - GParamSpec *pspec) -{ - SkeltrackSkeleton *self; - - self = SKELTRACK_SKELETON (obj); - - switch (prop_id) - { - case PROP_DIMENSION_REDUCTION: - g_value_set_uint (value, self->priv->dimension_reduction); - break; - - case PROP_GRAPH_DISTANCE_THRESHOLD: - g_value_set_uint (value, self->priv->distance_threshold); - break; - - case PROP_GRAPH_MIN_NR_NODES: - g_value_set_uint (value, self->priv->min_nr_nodes); - break; - - case PROP_HANDS_MINIMUM_DISTANCE: - g_value_set_uint (value, self->priv->hands_minimum_distance); - break; - - case PROP_SHOULDERS_CIRCUMFERENCE_RADIUS: - g_value_set_uint (value, self->priv->shoulders_circumference_radius); - break; - - case PROP_SHOULDERS_ARC_START_POINT: - g_value_set_uint (value, self->priv->shoulders_arc_start_point); - break; - - case PROP_SHOULDERS_ARC_LENGTH: - g_value_set_uint (value, self->priv->shoulders_arc_length); - break; - - case PROP_SHOULDERS_SEARCH_STEP: - g_value_set_float (value, self->priv->shoulders_search_step); - break; - - case PROP_EXTREMA_SPHERE_RADIUS: - g_value_set_uint (value, self->priv->extrema_sphere_radius); - break; - - case PROP_SMOOTHING_FACTOR: - g_value_set_float (value, self->priv->smooth_data.smoothing_factor); - break; - - case PROP_JOINTS_PERSISTENCY: - g_value_set_uint (value, self->priv->smooth_data.joints_persistency); - break; - - case PROP_ENABLE_SMOOTHING: - g_value_set_boolean (value, self->priv->enable_smoothing); - break; - - case PROP_TORSO_MINIMUM_NUMBER_NODES: - g_value_set_float (value, self->priv->torso_minimum_number_nodes); - break; - - default: - G_OBJECT_WARN_INVALID_PROPERTY_ID (obj, prop_id, pspec); - break; - } -} - -static gint -join_neighbor (SkeltrackSkeleton *self, - Node *node, - Label **neighbor_labels, - gint index, - gint i, - gint j) -{ - Node *neighbor; - if (i < 0 || i >= self->priv->buffer_width || - j < 0 || j >= self->priv->buffer_height) - { - return index; - } - - neighbor = self->priv->node_matrix[self->priv->buffer_width * j + i]; - if (neighbor != NULL) - { - gint distance; - distance = get_distance (neighbor, node); - if (distance < self->priv->distance_threshold) - { - neighbor->neighbors = g_list_append (neighbor->neighbors, - node); - node->neighbors = g_list_append (node->neighbors, - neighbor); - neighbor_labels[index] = neighbor->label; - index++; - } - } - return index; -} - -GList * -make_graph (SkeltrackSkeleton *self, GList **label_list) -{ - SkeltrackSkeletonPrivate *priv; - gint i, j, n; - Node *node; - GList *nodes = NULL; - GList *labels = NULL; - GList *current_label; - Label *main_component_label = NULL; - gint index = 0; - gint next_label = -1; - guint16 value; - guint16 *buffer; - gint width, height; - - buffer = self->priv->buffer; - width = self->priv->buffer_width; - height = self->priv->buffer_height; - - priv = self->priv; - - - if (priv->node_matrix == NULL) - { - priv->node_matrix = g_slice_alloc0 (width * height * sizeof (Node *)); - } - else - { - memset (self->priv->node_matrix, - 0, - width * height * sizeof (Node *)); - } - - for (i = 0; i < width; i++) - { - for (j = 0; j < height; j++) - { - gint south, north, west; - Label *lowest_index_label = NULL; - Label *neighbor_labels[4] = {NULL, NULL, NULL, NULL}; - - value = buffer[j * width + i]; - if (value == 0) - continue; - - node = g_slice_new0 (Node); - node->i = i; - node->j = j; - node->z = value; - convert_screen_coords_to_mm (self->priv->buffer_width, - self->priv->buffer_height, - self->priv->dimension_reduction, - i, j, - node->z, - &(node->x), - &(node->y)); - node->neighbors = NULL; - node->linked_nodes = NULL; - - index = 0; - - south = j + 1; - north = j - 1; - west = i - 1; - - /* West */ - index = join_neighbor (self, - node, - neighbor_labels, - index, - west, j); - /* South West*/ - index = join_neighbor (self, - node, - neighbor_labels, - index, - west, south); - /* North */ - index = join_neighbor (self, - node, - neighbor_labels, - index, - i, north); - - /* North West */ - index = join_neighbor (self, - node, - neighbor_labels, - index, - west, north); - - lowest_index_label = get_lowest_index_label (neighbor_labels); - - /* No neighbors */ - if (lowest_index_label == NULL) - { - Label *label; - next_label++; - label = new_label (next_label); - labels = g_list_append (labels, label); - lowest_index_label = label; - } - else - { - for (index = 0; index < 4; index++) - { - if (neighbor_labels[index] != NULL) - { - label_union (neighbor_labels[index], lowest_index_label); - } - } - } - - node->label = lowest_index_label; - nodes = g_list_append(nodes, node); - priv->node_matrix[width * node->j + node->i] = node; - } - } - - for (n = 0; n < g_list_length (nodes); n++) - { - Node *node = (Node *) g_list_nth_data (nodes, n); - node->label = label_find (node->label); - node->label->nodes = g_list_append (node->label->nodes, - node); - - /* Assign lower node so we can extract the - lower graph's component */ - if (node->label->lower_screen_y == -1 || - node->j > node->label->lower_screen_y) - { - node->label->lower_screen_y = node->j; - } - - /* Assign farther to the camera node so we - can extract the main graph component */ - if (node->label->higher_z == -1 || - node->z > node->label->higher_z) - { - node->label->higher_z = node->z; - } - - /* Assign closer to the camera node so we - can extract the main graph component */ - if (node->label->lower_z == -1 || - node->z < node->label->lower_z) - { - node->label->lower_z = node->z; - } - } - - for (current_label = g_list_first (labels); - current_label != NULL; - current_label = g_list_next (current_label)) - { - Label *label; - GList *current_nodes; - - label = (Label *) current_label->data; - current_nodes = label->nodes; - - label->normalized_num_nodes = g_list_length (current_nodes) * - ((label->higher_z - label->lower_z)/2 + - label->lower_z) * - (pow (DIMENSION_REDUCTION, 2)/2) / - 1000000; - } - - main_component_label = get_main_component (nodes, - priv->focus_node, - priv->torso_minimum_number_nodes); - - current_label = g_list_first (labels); - while (current_label != NULL) - { - Label *label; - label = (Label *) current_label->data; - - /* Remove label if number of nodes is less than - the minimum required */ - if (g_list_length (label->nodes) < priv->min_nr_nodes) - { - nodes = remove_nodes_with_label (nodes, - priv->node_matrix, - priv->buffer_width, - label); - - GList *link = current_label; - current_label = g_list_next (current_label); - labels = g_list_delete_link (labels, link); - free_label (label); - continue; - } - - current_label = g_list_next (current_label); - } - - if (main_component_label) - { - join_components_to_main (labels, - main_component_label, - priv->distance_threshold, - priv->hands_minimum_distance, - priv->distance_threshold); - - current_label = g_list_first (labels); - while (current_label != NULL) - { - Label *label; - label = (Label *) current_label->data; - if (label == main_component_label) - { - current_label = g_list_next (current_label); - continue; - } - - if (label->bridge_node == NULL) - { - nodes = remove_nodes_with_label (nodes, - priv->node_matrix, - priv->buffer_width, - label); - - GList *link = current_label; - current_label = g_list_next (current_label); - labels = g_list_delete_link (labels, link); - free_label (label); - continue; - } - - label->bridge_node->neighbors = - g_list_append (label->bridge_node->neighbors, label->to_node); - label->to_node->neighbors = g_list_append (label->to_node->neighbors, - label->bridge_node); - - current_label = g_list_next (current_label); - } - - priv->main_component = main_component_label->nodes; - } - - *label_list = labels; - - return nodes; -} - -Node * -get_centroid (SkeltrackSkeleton *self) -{ - gint avg_x = 0; - gint avg_y = 0; - gint avg_z = 0; - gint length; - GList *node_list; - Node *cent = NULL; - Node *centroid = NULL; - - if (self->priv->main_component == NULL) - return NULL; - - for (node_list = g_list_first (self->priv->main_component); - node_list != NULL; - node_list = g_list_next (node_list)) - { - Node *node; - node = (Node *) node_list->data; - avg_x += node->x; - avg_y += node->y; - avg_z += node->z; - } - - length = g_list_length (self->priv->main_component); - cent = g_slice_new0 (Node); - cent->x = avg_x / length; - cent->y = avg_y / length; - cent->z = avg_z / length; - cent->linked_nodes = NULL; - - centroid = get_closest_node (self->priv->graph, cent); - - g_slice_free (Node, cent); - - return centroid; -} - -static Node * -get_lowest (SkeltrackSkeleton *self, Node *centroid) -{ - Node *lowest = NULL; - /* @TODO: Use the node_matrix instead of the lowest - component to look for the lowest node as it's faster. */ - if (self->priv->main_component != NULL) - { - GList *node_list; - for (node_list = g_list_first (self->priv->main_component); - node_list != NULL; - node_list = g_list_next (node_list)) - { - Node *node; - node = (Node *) node_list->data; - if (node->i != centroid->i) - continue; - if (lowest == NULL || - lowest->j < node->j) - { - lowest = node; - } - } - } - return lowest; -} - -static Node * -get_longer_distance (SkeltrackSkeleton *self, gint *distances) -{ - GList *current; - Node *farthest_node; - - current = g_list_first (self->priv->graph); - farthest_node = (Node *) current->data; - current = g_list_next (current); - - while (current != NULL) - { - Node *node; - node = (Node *) current->data; - if (node != NULL && - (distances[farthest_node->j * - self->priv->buffer_width + - farthest_node->i] != -1 && - distances[farthest_node->j * - self->priv->buffer_width + - farthest_node->i] < distances[node->j * - self->priv->buffer_width + - node->i])) - { - farthest_node = node; - } - current = g_list_next (current); - } - return farthest_node; -} - -static void -set_average_extremas (SkeltrackSkeletonPrivate *priv, GList *extremas) -{ - GList *current_extrema, *averaged_extremas = NULL; - - for (current_extrema = g_list_first (extremas); - current_extrema != NULL; - current_extrema = g_list_next (current_extrema)) - { - GList *current_node; - Node *extrema, *node = NULL, *cent = NULL, *node_centroid = NULL; - gint avg_x = 0, avg_y = 0, avg_z = 0, length = 0; - - extrema = (Node *) current_extrema->data; - - for (current_node = g_list_first (priv->graph); - current_node != NULL; - current_node = g_list_next (current_node)) - { - node = (Node *) current_node->data; - - if ((get_distance (extrema, node) < - priv->extrema_sphere_radius)) - { - avg_x += node->x; - avg_y += node->y; - avg_z += node->z; - - length++; - } - } - - /* if the length is 1 then it is because no other - nodes were considered for the average */ - if (length > 1) - { - cent = g_slice_new0 (Node); - cent->x = avg_x / length; - cent->y = avg_y / length; - cent->z = avg_z / length; - cent->linked_nodes = NULL; - - node_centroid = get_closest_node (priv->graph, cent); - - /* If the new averaged extrema is not already an extrema - set it for addition */ - if (g_list_find (averaged_extremas, node_centroid) == NULL && - g_list_find (extremas, node_centroid) == NULL) - { - current_extrema->data = node_centroid; - } - - g_slice_free (Node, cent); - } - } -} - -static GList * -get_extremas (SkeltrackSkeleton *self, Node *centroid) -{ - SkeltrackSkeletonPrivate *priv; - gint i, nr_nodes, matrix_size; - Node *lowest, *source, *node; - GList *extremas = NULL; - - priv = self->priv; - lowest = get_lowest (self, centroid); - source = lowest; - - matrix_size = priv->buffer_width * priv->buffer_height; - if (priv->distances_matrix == NULL) - { - priv->distances_matrix = g_slice_alloc0 (matrix_size * sizeof (gint)); - } - - for (i = 0; i < matrix_size; i++) - { - priv->distances_matrix[i] = -1; - } - - for (nr_nodes = NR_EXTREMAS_TO_SEARCH; - source != NULL && nr_nodes > 0; - nr_nodes--) - { - dijkstra_to (priv->graph, - source, - NULL, - priv->buffer_width, - priv->buffer_height, - priv->distances_matrix, - NULL); - - node = get_longer_distance (self, priv->distances_matrix); - - if (node == NULL) - continue; - - if (node != source) - { - priv->distances_matrix[node->j * priv->buffer_width + node->i] = 0; - source->linked_nodes = g_list_append (source->linked_nodes, node); - node->linked_nodes = g_list_append (node->linked_nodes, source); - source = node; - extremas = g_list_append (extremas, node); - } - } - - if (self->priv->extrema_sphere_radius != 0) - { - set_average_extremas (priv, extremas); - } - - return extremas; -} - -static Node * -get_shoulder_node (SkeltrackSkeletonPrivate *priv, - gfloat alpha, - gfloat step, - gint x_node, - gint y_node, - gint z_centroid) -{ - guint radius, arc_start_point, arc_length, current_i, current_j; - gfloat start_angle, last_node_arc, current_arc, angle, current_x, current_y; - Node *current_node = NULL; - Node *last_node = NULL; - - radius = priv->shoulders_circumference_radius; - arc_start_point = priv->shoulders_arc_start_point; - arc_length = priv->shoulders_arc_length; - - start_angle = M_PI_2; - - angle = start_angle + alpha; - current_x = x_node + radius * cos (angle); - current_y = y_node + radius * sin (angle); - current_arc = 0; - last_node_arc = 0; - current_node = NULL; - last_node = NULL; - - while (current_arc <= (arc_start_point + arc_length)) - { - convert_mm_to_screen_coords (priv->buffer_width, - priv->buffer_height, - priv->dimension_reduction, - current_x, - current_y, - z_centroid, - ¤t_i, - ¤t_j); - - if (current_i >= priv->buffer_width || current_j >= priv->buffer_height) - break; - - current_node = priv->node_matrix[current_j * priv->buffer_width + - current_i]; - - if (current_node != NULL) - { - last_node = current_node; - last_node_arc = current_arc; - } - - angle += step; - current_x = x_node + radius * cos (angle); - current_y = y_node + radius * sin (angle); - current_arc = ABS (angle - start_angle) * radius; - } - - if (last_node_arc < arc_start_point) - return NULL; - - return last_node; -} - -static gboolean -check_if_node_can_be_head (SkeltrackSkeleton *self, - Node *node, - Node *centroid, - Node **left_shoulder, - Node **right_shoulder) -{ - gfloat alpha; - Node *found_right_shoulder = NULL, *found_left_shoulder = NULL; - - SkeltrackSkeletonPrivate *priv; - - *left_shoulder = NULL; - *right_shoulder = NULL; - - priv = self->priv; - - if (node->j > centroid->j) - return FALSE; - - if ((node->y - centroid->y) != 0) - alpha = atan( ABS (node->x - centroid->x) / ABS (node->y - centroid->y)); - else - return FALSE; - - /* too much tilt, cannot be the head */ - if (alpha >= M_PI_4) - return FALSE; - - if (node->x < centroid->x) - alpha = -alpha; - - found_right_shoulder = get_shoulder_node (priv, - alpha, - priv->shoulders_search_step, - node->x, - node->y, - centroid->z); - if (found_right_shoulder == NULL) - return FALSE; - - found_left_shoulder = get_shoulder_node (priv, - alpha, - -priv->shoulders_search_step, - node->x, - node->y, - centroid->z); - - if (found_left_shoulder == NULL) - return FALSE; - - *right_shoulder = found_right_shoulder; - *left_shoulder = found_left_shoulder; - - return TRUE; -} - -static gboolean -get_head_and_shoulders (SkeltrackSkeleton *self, - GList *extremas, - Node *centroid, - Node **head, - Node **left_shoulder, - Node **right_shoulder) -{ - Node *node; - GList *current_extrema; - - for (current_extrema = g_list_first (extremas); - current_extrema != NULL; - current_extrema = g_list_next (current_extrema)) - { - node = (Node *) current_extrema->data; - - if (check_if_node_can_be_head (self, - node, - centroid, - left_shoulder, - right_shoulder)) - { - *head = node; - return TRUE; - } - } - return FALSE; -} - -static void -identify_arm_extrema (gint *distances, - Node **previous_nodes, - gint width, - gint hand_distance, - Node *extrema, - Node **elbow_extrema, - Node **hand_extrema) -{ - gint total_dist; - - if (extrema == NULL) - return; - - total_dist = distances[width * extrema->j + extrema->i]; - if (total_dist < hand_distance) - { - *elbow_extrema = extrema; - *hand_extrema = NULL; - } - else - { - Node *previous; - gint elbow_dist; - - previous = previous_nodes[extrema->j * width + extrema->i]; - elbow_dist = total_dist / 2; - while (previous && - distances[previous->j * width + previous->i] > elbow_dist) - { - previous = previous_nodes[previous->j * width + previous->i]; - } - *elbow_extrema = previous; - *hand_extrema = extrema; - } -} - -static void -set_left_and_right_from_extremas (SkeltrackSkeleton *self, - GList *extremas, - Node *head, - Node *left_shoulder, - Node *right_shoulder, - SkeltrackJointList *joints) -{ - gint *dist_left_a = NULL; - gint *dist_left_b = NULL; - gint *dist_right_a = NULL; - gint *dist_right_b = NULL; - gint total_dist_left_a = -1; - gint total_dist_right_a = -1; - gint total_dist_left_b = -1; - gint total_dist_right_b = -1; - gint *distances_left[2] = {NULL, NULL}; - gint *distances_right[2] = {NULL, NULL}; - gint index_left = -1; - gint index_right = -1; - Node *elbow_extrema, *hand_extrema; - Node **previous_left_a = NULL; - Node **previous_left_b = NULL; - Node **previous_right_a = NULL; - Node **previous_right_b = NULL; - Node **previous_left[2] = {NULL, NULL}; - Node **previous_right[2] = {NULL, NULL}; - Node *ext_a = NULL; - Node *ext_b = NULL; - Node *left_extrema[2] = {NULL, NULL}; - Node *right_extrema[2] = {NULL, NULL}; - GList *current_extrema; - gint width, height, matrix_size; - - for (current_extrema = g_list_first (extremas); - current_extrema != NULL; - current_extrema = g_list_next (current_extrema)) - { - Node *node; - node = (Node *) current_extrema->data; - if (node != head) - { - if (ext_a == NULL) - ext_a = node; - else - ext_b = node; - } - } - - if (head == NULL) - return; - - width = self->priv->buffer_width; - height = self->priv->buffer_height; - matrix_size = width * height; - - previous_left_a = g_slice_alloc0 (matrix_size * sizeof (Node *)); - previous_left_b = g_slice_alloc0 (matrix_size * sizeof (Node *)); - previous_right_a = g_slice_alloc0 (matrix_size * sizeof (Node *)); - previous_right_b = g_slice_alloc0 (matrix_size * sizeof (Node *)); - - dist_left_a = create_new_dist_matrix(matrix_size); - dijkstra_to (self->priv->graph, - left_shoulder, - ext_a, - width, - height, - dist_left_a, - previous_left_a); - - dist_left_b = create_new_dist_matrix(matrix_size); - dijkstra_to (self->priv->graph, - left_shoulder, - ext_b, - width, - height, - dist_left_b, - previous_left_b); - - dist_right_a = create_new_dist_matrix(matrix_size); - dijkstra_to (self->priv->graph, - right_shoulder, - ext_a, - width, - height, - dist_right_a, previous_right_a); - - dist_right_b = create_new_dist_matrix(matrix_size); - dijkstra_to (self->priv->graph, - right_shoulder, - ext_b, - width, - height, - dist_right_b, - previous_right_b); - - total_dist_left_a = dist_left_a[ext_a->j * width + ext_a->i]; - total_dist_right_a = dist_right_a[ext_a->j * width + ext_a->i]; - total_dist_left_b = dist_left_b[ext_b->j * width + ext_b->i]; - total_dist_right_b = dist_right_b[ext_b->j * width + ext_b->i]; - - if (total_dist_left_a < total_dist_right_a) - { - index_left++; - left_extrema[index_left] = ext_a; - distances_left[index_left] = dist_left_a; - previous_left[index_left] = previous_left_a; - } - else - { - index_right++; - right_extrema[index_right] = ext_a; - distances_right[index_right] = dist_right_a; - previous_right[index_right] = previous_right_a; - } - - if (total_dist_left_b < total_dist_right_b) - { - index_left++; - left_extrema[index_left] = ext_b; - distances_left[index_left] = dist_left_b; - previous_left[index_left] = previous_left_b; - } - else - { - index_right++; - right_extrema[index_right] = ext_b; - distances_right[index_right] = dist_right_b; - previous_right[index_right] = previous_right_b; - } - - elbow_extrema = NULL; - hand_extrema = NULL; - identify_arm_extrema (distances_left[0], - previous_left[0], - width, - self->priv->hands_minimum_distance, - left_extrema[0], - &elbow_extrema, - &hand_extrema); - - /* Two left extremas */ - if (index_left == 1) - { - if (hand_extrema == NULL) - { - hand_extrema = left_extrema[1]; - elbow_extrema = left_extrema[0]; - } - else - { - hand_extrema = left_extrema[0]; - elbow_extrema = left_extrema[1]; - } - } - - set_joint_from_node (joints, - elbow_extrema, - SKELTRACK_JOINT_ID_LEFT_ELBOW, - self->priv->dimension_reduction); - set_joint_from_node (joints, - hand_extrema, - SKELTRACK_JOINT_ID_LEFT_HAND, - self->priv->dimension_reduction); - - - elbow_extrema = NULL; - hand_extrema = NULL; - identify_arm_extrema (distances_right[0], - previous_right[0], - width, - self->priv->hands_minimum_distance, - right_extrema[0], - &elbow_extrema, - &hand_extrema); - - /* Two right extremas */ - if (index_right == 1) - { - if (hand_extrema == NULL) - { - hand_extrema = right_extrema[1]; - elbow_extrema = right_extrema[0]; - } - else - { - hand_extrema = right_extrema[0]; - elbow_extrema = right_extrema[1]; - } - } - - set_joint_from_node (joints, - elbow_extrema, - SKELTRACK_JOINT_ID_RIGHT_ELBOW, - self->priv->dimension_reduction); - set_joint_from_node (joints, - hand_extrema, - SKELTRACK_JOINT_ID_RIGHT_HAND, - self->priv->dimension_reduction); - - g_slice_free1 (matrix_size * sizeof (Node *), previous_left_a); - g_slice_free1 (matrix_size * sizeof (Node *), previous_left_b); - g_slice_free1 (matrix_size * sizeof (Node *), previous_right_a); - g_slice_free1 (matrix_size * sizeof (Node *), previous_right_b); - - g_slice_free1 (matrix_size * sizeof (gint), dist_left_a); - g_slice_free1 (matrix_size * sizeof (gint), dist_left_b); - g_slice_free1 (matrix_size * sizeof (gint), dist_right_a); - g_slice_free1 (matrix_size * sizeof (gint), dist_right_b); -} - -static Node * -get_adjusted_shoulder (guint buffer_width, - guint buffer_height, - guint dimension_reduction, - GList *graph, - Node *centroid, - Node *head, - Node *shoulder) -{ - Node *virtual_shoulder, *adjusted_shoulder = NULL; - virtual_shoulder = g_slice_new (Node); - virtual_shoulder->x = shoulder->x; - virtual_shoulder->y = shoulder->y; - virtual_shoulder->z = centroid->z; - - convert_mm_to_screen_coords (buffer_width, - buffer_height, - dimension_reduction, - virtual_shoulder->x, - virtual_shoulder->y, - virtual_shoulder->z, - (guint *) &virtual_shoulder->i, - (guint *) &virtual_shoulder->j); - - adjusted_shoulder = get_closest_torso_node (graph, - virtual_shoulder, - head); - g_slice_free (Node, virtual_shoulder); - - return adjusted_shoulder; -} - -static SkeltrackJoint ** -track_joints (SkeltrackSkeleton *self) -{ - Node * centroid; - Node *head = NULL; - Node *right_shoulder = NULL; - Node *left_shoulder = NULL; - GList *extremas; - SkeltrackJointList joints = NULL; - SkeltrackJointList smoothed = NULL; - - self->priv->graph = make_graph (self, &self->priv->labels); - centroid = get_centroid (self); - extremas = get_extremas (self, centroid); - - if (g_list_length (extremas) > 2) - { - if (self->priv->previous_head) - { - gint distance; - gboolean can_be_head = FALSE; - head = get_closest_node_to_joint (extremas, - self->priv->previous_head, - &distance); - if (head != NULL && - distance < GRAPH_DISTANCE_THRESHOLD) - { - can_be_head = check_if_node_can_be_head (self, - head, - centroid, - &left_shoulder, - &right_shoulder); - } - - if (!can_be_head) - head = NULL; - } - - if (head == NULL) - { - get_head_and_shoulders (self, - extremas, - centroid, - &head, - &left_shoulder, - &right_shoulder); - } - - if (joints == NULL) - joints = skeltrack_joint_list_new (); - - set_joint_from_node (&joints, - head, - SKELTRACK_JOINT_ID_HEAD, - self->priv->dimension_reduction); - - if (left_shoulder && head && head->z > left_shoulder->z) - { - Node *adjusted_shoulder; - adjusted_shoulder = get_adjusted_shoulder (self->priv->buffer_width, - self->priv->buffer_height, - self->priv->dimension_reduction, - self->priv->graph, - centroid, - head, - left_shoulder); - - if (adjusted_shoulder) - left_shoulder = adjusted_shoulder; - } - - set_joint_from_node (&joints, - left_shoulder, - SKELTRACK_JOINT_ID_LEFT_SHOULDER, - self->priv->dimension_reduction); - - if (right_shoulder && head && head->z > right_shoulder->z) - { - Node *adjusted_shoulder; - adjusted_shoulder = get_adjusted_shoulder (self->priv->buffer_width, - self->priv->buffer_height, - self->priv->dimension_reduction, - self->priv->graph, - centroid, - head, - right_shoulder); - - if (adjusted_shoulder) - right_shoulder = adjusted_shoulder; - } - set_joint_from_node (&joints, - right_shoulder, - SKELTRACK_JOINT_ID_RIGHT_SHOULDER, - self->priv->dimension_reduction); - - set_left_and_right_from_extremas (self, - extremas, - head, - left_shoulder, - right_shoulder, - &joints); - } - - self->priv->buffer = NULL; - - self->priv->main_component = NULL; - - clean_nodes (self->priv->graph); - g_list_free (self->priv->graph); - self->priv->graph = NULL; - - clean_labels (self->priv->labels); - g_list_free (self->priv->labels); - self->priv->labels = NULL; - - if (self->priv->enable_smoothing) - { - smooth_joints (&self->priv->smooth_data, joints); - - if (self->priv->smooth_data.smoothed_joints != NULL) - { - guint i; - smoothed = skeltrack_joint_list_new (); - for (i = 0; i < SKELTRACK_JOINT_MAX_JOINTS; i++) - { - SkeltrackJoint *smoothed_joint, *smooth, *trend; - smoothed_joint = NULL; - smooth = self->priv->smooth_data.smoothed_joints[i]; - if (smooth != NULL) - { - if (self->priv->smooth_data.trend_joints != NULL) - { - trend = self->priv->smooth_data.trend_joints[i]; - if (trend != NULL) - { - smoothed_joint = g_slice_new0 (SkeltrackJoint); - smoothed_joint->x = smooth->x + trend->x; - smoothed_joint->y = smooth->y + trend->y; - smoothed_joint->z = smooth->z + trend->z; - smoothed_joint->screen_x = smooth->screen_x + trend->screen_x; - smoothed_joint->screen_y = smooth->screen_y + trend->screen_y; - } - else - smoothed_joint = skeltrack_joint_copy (smooth); - } - else - smoothed_joint = skeltrack_joint_copy (smooth); - } - smoothed[i] = smoothed_joint; - } - } - skeltrack_joint_list_free (joints); - - joints = smoothed; - } - - if (joints) - { - SkeltrackJoint *joint = skeltrack_joint_list_get_joint (joints, - SKELTRACK_JOINT_ID_HEAD); - if (joint != NULL) - { - skeltrack_joint_free (self->priv->previous_head); - self->priv->previous_head = skeltrack_joint_copy (joint); - } - } - - g_list_free (extremas); - - return joints; -} - -static void -clean_tracking_resources (SkeltrackSkeleton *self) -{ - g_slice_free1 (self->priv->buffer_width * - self->priv->buffer_height * sizeof (gint), - self->priv->distances_matrix); - self->priv->distances_matrix = NULL; - - g_slice_free1 (self->priv->buffer_width * - self->priv->buffer_height * sizeof (Node *), - self->priv->node_matrix); - self->priv->node_matrix = NULL; -} - -static void -track_joints_in_thread (GSimpleAsyncResult *res, - GObject *object, - GCancellable *cancellable) -{ - SkeltrackSkeleton *self = SKELTRACK_SKELETON (object); - SkeltrackJointList joints; - - joints = track_joints (self); - - g_mutex_lock (&self->priv->track_joints_mutex); - self->priv->track_joints_result = NULL; - g_mutex_unlock (&self->priv->track_joints_mutex); - - g_simple_async_result_set_op_res_gpointer (res, - joints, - NULL); - - g_object_unref (res); -} - -/* public methods */ - -/** - * skeltrack_skeleton_new: - * - * Constructs and returns a new #SkeltrackSkeleton instance. - * - * Returns: (transfer full): The newly created #SkeltrackSkeleton. - */ -SkeltrackSkeleton * -skeltrack_skeleton_new (void) -{ - return g_object_new (SKELTRACK_TYPE_SKELETON, NULL); -} - -/** - * skeltrack_skeleton_set_focus_point: - * @self: The #SkeltrackSkeleton - * @x: The x coordinate of the focus point. - * @y: The y coordinate of the focus point. - * @z: The z coordinate of the focus point. - * - * Gets the focus point which is the origin from where the tracking will - * start. The coordinates will be in mm. - * - **/ -void -skeltrack_skeleton_get_focus_point (SkeltrackSkeleton *self, - gint *x, - gint *y, - gint *z) -{ - *x = self->priv->focus_node->x; - *y = self->priv->focus_node->y; - *z = self->priv->focus_node->z; -} - -/** - * skeltrack_skeleton_set_focus_point: - * @self: The #SkeltrackSkeleton - * @x: The x coordinate of the focus point. - * @y: The y coordinate of the focus point. - * @z: The z coordinate of the focus point. - * - * Sets the focus point which is the origin from where the tracking will - * start. The coordinates should be in mm. - * - * If this method is not called the default values are @x = 0, @y = 0, - * @z = 1000, that is, in the center of the screen and at 1m from the - * camera. - * - **/ -void -skeltrack_skeleton_set_focus_point (SkeltrackSkeleton *self, - gint x, - gint y, - gint z) -{ - self->priv->focus_node->x = x; - self->priv->focus_node->y = y; - self->priv->focus_node->z = z; -} - -/** - * skeltrack_skeleton_track_joints: - * @self: The #SkeltrackSkeleton - * @buffer: The buffer containing the depth information, from which - * all the information will be retrieved. - * @width: The width of the @buffer - * @height: The height of the @buffer - * @cancellable: (allow-none): A cancellable object, or %NULL (currently - * unused) - * @callback: (scope async): The function to call when the it is finished - * tracking the joints - * @user_data: (allow-none): An arbitrary user data to pass in @callback, - * or %NULL - * - * Tracks the skeleton's joints. - * - * It uses the depth information contained in the given @buffer and tries to - * track the skeleton joints. The @buffer's depth values should be in mm. - * Use skeltrack_skeleton_track_joints_finish() to get a list of the joints - * found. - * - * If this method is called while a previous attempt of tracking the joints - * is still running, a %G_IO_ERROR_PENDING error occurs. - * - **/ -void -skeltrack_skeleton_track_joints (SkeltrackSkeleton *self, - guint16 *buffer, - guint width, - guint height, - GCancellable *cancellable, - GAsyncReadyCallback callback, - gpointer user_data) -{ - GSimpleAsyncResult *result = NULL; - - g_return_if_fail (SKELTRACK_IS_SKELETON (self) && - callback != NULL && - buffer != NULL); - - result = g_simple_async_result_new (G_OBJECT (self), - callback, - user_data, - skeltrack_skeleton_track_joints); - - if (self->priv->track_joints_result != NULL) - { - g_simple_async_result_set_error (result, - G_IO_ERROR, - G_IO_ERROR_PENDING, - "Currently tracking joints"); - g_simple_async_result_complete_in_idle (result); - g_object_unref (result); - return; - } - - g_mutex_lock (&self->priv->track_joints_mutex); - - self->priv->track_joints_result = G_ASYNC_RESULT (result); - - /* @TODO: Set the cancellable */ - - self->priv->buffer = buffer; - - if (self->priv->buffer_width != width || - self->priv->buffer_height != height) - { - clean_tracking_resources (self); - - self->priv->buffer_width = width; - self->priv->buffer_height = height; - } - - g_simple_async_result_run_in_thread (result, - track_joints_in_thread, - G_PRIORITY_DEFAULT, - cancellable); - - g_mutex_unlock (&self->priv->track_joints_mutex); -} - -/** - * skeltrack_skeleton_track_joints_finish: - * @self: The #SkeltrackSkeleton - * @result: The #GAsyncResult provided in the callback - * @error: (allow-none): A pointer to a #GError, or %NULL - * - * Gets the list of joints that were retrieved by a - * skeltrack_skeleton_track_joints() operation. - * - * Use skeltrack_joint_list_get_joint() with #SkeltrackJointId - * to get the respective joints from the list. - * Joints that could not be found will appear as %NULL in the list. - * - * The list should be freed using skeltrack_joint_list_free(). - * - * Returns: (transfer full): The #SkeltrackJointList with the joints found. - */ -SkeltrackJointList -skeltrack_skeleton_track_joints_finish (SkeltrackSkeleton *self, - GAsyncResult *result, - GError **error) -{ - GSimpleAsyncResult *res; - - g_return_val_if_fail (G_IS_SIMPLE_ASYNC_RESULT (result), NULL); - - res = G_SIMPLE_ASYNC_RESULT (result); - - if (! g_simple_async_result_propagate_error (res, error)) - { - SkeltrackJointList joints = NULL; - joints = g_simple_async_result_get_op_res_gpointer (res); - return joints; - } - else - return NULL; -} - -/** - * skeltrack_skeleton_track_joints_sync: - * @self: The #SkeltrackSkeleton - * @buffer: The buffer containing the depth information, from which - * all the information will be retrieved. - * @width: The width of the @buffer - * @height: The height of the @buffer - * @cancellable: (allow-none): A cancellable object, or %NULL (currently - * unused) - * @error: (allow-none): A pointer to a #GError, or %NULL - * - * Tracks the skeleton's joints synchronously. - * - * Does the same as skeltrack_skeleton_track_joints() but synchronously - * and returns the list of joints found. - * Ideal for off-line skeleton tracking. - * - * If this method is called while a previous attempt of asynchronously - * tracking the joints is still running, a %G_IO_ERROR_PENDING error occurs. - * - * The joints list should be freed using skeltrack_joint_list_free(). - * - * Returns: (transfer full): The #SkeltrackJointList with the joints found. - **/ -SkeltrackJointList -skeltrack_skeleton_track_joints_sync (SkeltrackSkeleton *self, - guint16 *buffer, - guint width, - guint height, - GCancellable *cancellable, - GError **error) -{ - g_return_val_if_fail (SKELTRACK_IS_SKELETON (self), NULL); - - if (self->priv->track_joints_result != NULL && error != NULL) - { - *error = g_error_new (G_IO_ERROR, - G_IO_ERROR_PENDING, - "Currently tracking joints"); - return NULL; - } - - self->priv->buffer = buffer; - - if (self->priv->buffer_width != width || - self->priv->buffer_height != height) - { - clean_tracking_resources (self); - - self->priv->buffer_width = width; - self->priv->buffer_height = height; - } - - return track_joints (self); -} diff --git a/interface/external/skeltrack/src/skeltrack-smooth.c b/interface/external/skeltrack/src/skeltrack-smooth.c deleted file mode 100644 index 1e6658f578..0000000000 --- a/interface/external/skeltrack/src/skeltrack-smooth.c +++ /dev/null @@ -1,226 +0,0 @@ -/* - * skeltrack-smooth.c - * - * Skeltrack - A Free Software skeleton tracking library - * Copyright (C) 2012 Igalia S.L. - * - * Authors: - * Joaquim Rocha - * Eduardo Lima Mitev - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License at http://www.gnu.org/licenses/lgpl-3.0.txt - * for more details. - */ - -#include - -#include "skeltrack-smooth.h" - -static gfloat -holt_double_exp_formula_st (gfloat alpha, - gfloat previous_trend, - gfloat current_value, - gfloat previous_smoothed_value) -{ - return alpha * current_value + - (1.0 - alpha) * (previous_smoothed_value + previous_trend); -} - -static gfloat -holt_double_exp_formula_bt (gfloat beta, - gfloat previous_trend, - gfloat current_smoothed_value, - gfloat previous_smoothed_value) -{ - return beta * (current_smoothed_value - previous_smoothed_value) + - (1.0 - beta) * previous_trend; -} - -static void -holt_double_exp_joint (gfloat alpha, - gfloat beta, - SkeltrackJoint *smoothed_joint, - SkeltrackJoint *current_joint, - SkeltrackJoint *trend_joint) -{ - gfloat new_x, new_y, new_z, new_screen_x, new_screen_y; - new_x = holt_double_exp_formula_st (alpha, - trend_joint->x, - current_joint->x, - smoothed_joint->x); - new_y = holt_double_exp_formula_st (alpha, - trend_joint->y, - current_joint->y, - smoothed_joint->y); - new_z = holt_double_exp_formula_st (alpha, - trend_joint->z, - current_joint->z, - smoothed_joint->z); - new_screen_x = holt_double_exp_formula_st (alpha, - trend_joint->screen_x, - current_joint->screen_x, - smoothed_joint->screen_x); - new_screen_y = holt_double_exp_formula_st (alpha, - trend_joint->screen_y, - current_joint->screen_y, - smoothed_joint->screen_y); - trend_joint->x = holt_double_exp_formula_bt (beta, - trend_joint->x, - new_x, - smoothed_joint->x); - trend_joint->y = holt_double_exp_formula_bt (beta, - trend_joint->y, - new_y, - smoothed_joint->y); - trend_joint->z = holt_double_exp_formula_bt (beta, - trend_joint->z, - new_z, - smoothed_joint->z); - trend_joint->screen_x = holt_double_exp_formula_bt (beta, - trend_joint->screen_x, - new_screen_x, - smoothed_joint->screen_x); - trend_joint->screen_y = holt_double_exp_formula_bt (beta, - trend_joint->screen_y, - new_screen_y, - smoothed_joint->screen_y); - smoothed_joint->x = new_x; - smoothed_joint->y = new_y; - smoothed_joint->z = new_z; - smoothed_joint->screen_x = new_screen_x; - smoothed_joint->screen_y = new_screen_y; -} - -void -reset_joints_persistency_counter (SmoothData *smooth_data) -{ - guint i; - for (i = 0; i < SKELTRACK_JOINT_MAX_JOINTS; i++) - { - smooth_data->joints_persistency_counter[i] = - smooth_data->joints_persistency; - } -} - -static void -decrease_joints_persistency (SmoothData *smooth_data) -{ - guint i; - for (i = 0; i < SKELTRACK_JOINT_MAX_JOINTS; i++) - { - SkeltrackJoint *smoothed_joint = NULL; - SkeltrackJoint *trend_joint = NULL; - - if (smooth_data->smoothed_joints) - smoothed_joint = smooth_data->smoothed_joints[i]; - if (smooth_data->trend_joints) - trend_joint = smooth_data->trend_joints[i]; - - if (smoothed_joint != NULL || trend_joint != NULL) - { - if (smooth_data->joints_persistency_counter[i] > 0) - smooth_data->joints_persistency_counter[i]--; - else - { - skeltrack_joint_free (smoothed_joint); - skeltrack_joint_free (trend_joint); - if (smoothed_joint) - smooth_data->smoothed_joints[i] = NULL; - if (trend_joint) - smooth_data->trend_joints[i] = NULL; - smooth_data->joints_persistency_counter[i] = smooth_data->joints_persistency; - } - } - } -} - -void -smooth_joints (SmoothData *data, - SkeltrackJointList new_joints) -{ - guint i; - - if (new_joints == NULL) - { - decrease_joints_persistency (data); - return; - } - - if (data->smoothed_joints == NULL) - { - data->smoothed_joints = skeltrack_joint_list_new (); - for (i = 0; i < SKELTRACK_JOINT_MAX_JOINTS; i++) - { - data->smoothed_joints[i] = skeltrack_joint_copy (new_joints[i]); - } - return; - } - if (data->trend_joints == NULL) - { - data->trend_joints = skeltrack_joint_list_new (); - } - - for (i = 0; i < SKELTRACK_JOINT_MAX_JOINTS; i++) - { - SkeltrackJoint *joint, *smoothed_joint, *trend_joint; - - smoothed_joint = data->smoothed_joints[i]; - trend_joint = data->trend_joints[i]; - joint = new_joints[i]; - if (joint == NULL) - { - if (smoothed_joint != NULL) - { - if (data->joints_persistency_counter[i] > 0) - data->joints_persistency_counter[i]--; - else - { - skeltrack_joint_free (smoothed_joint); - skeltrack_joint_free (trend_joint); - data->smoothed_joints[i] = NULL; - data->trend_joints[i] = NULL; - data->joints_persistency_counter[i] = data->joints_persistency; - } - } - continue; - } - data->joints_persistency_counter[i] = data->joints_persistency; - - if (smoothed_joint == NULL) - { - data->smoothed_joints[i] = skeltrack_joint_copy (joint); - continue; - } - - if (trend_joint == NULL) - { - /* First case (when there are only initial values) */ - trend_joint = g_slice_new0 (SkeltrackJoint); - trend_joint->x = joint->x - smoothed_joint->x; - trend_joint->y = joint->y - smoothed_joint->y; - trend_joint->z = joint->z - smoothed_joint->z; - trend_joint->screen_x = joint->screen_x - smoothed_joint->screen_x; - trend_joint->screen_y = joint->screen_y - smoothed_joint->screen_y; - data->trend_joints[i] = trend_joint; - } - else - { - /* @TODO: Check if we should give the control of each factor - independently (data-smoothing-factor and trend-smoothing-factor). - */ - holt_double_exp_joint (data->smoothing_factor, - data->smoothing_factor, - smoothed_joint, - joint, - trend_joint); - } - } -} diff --git a/interface/external/skeltrack/src/skeltrack-util.c b/interface/external/skeltrack/src/skeltrack-util.c deleted file mode 100644 index 482f26069a..0000000000 --- a/interface/external/skeltrack/src/skeltrack-util.c +++ /dev/null @@ -1,626 +0,0 @@ -/* - * skeltrack-util.c - * - * Skeltrack - A Free Software skeleton tracking library - * Copyright (C) 2012 Igalia S.L. - * - * Authors: - * Joaquim Rocha - * Eduardo Lima Mitev - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License at http://www.gnu.org/licenses/lgpl-3.0.txt - * for more details. - */ - -#include - -#include "skeltrack-util.h" - -/* @TODO: Expose these to the user */ -static const gfloat SCALE_FACTOR = .0021; -static const gint MIN_DISTANCE = -10.0; - -static SkeltrackJoint * -node_to_joint (Node *node, SkeltrackJointId id, gint dimension_reduction) -{ - SkeltrackJoint *joint; - - if (node == NULL) - return NULL; - - joint = g_slice_new0 (SkeltrackJoint); - joint->id = id; - joint->x = node->x; - joint->y = node->y; - joint->z = node->z; - joint->screen_x = node->i * dimension_reduction; - joint->screen_y = node->j * dimension_reduction; - - return joint; -} - -static guint -get_distance_from_joint (Node *node, SkeltrackJoint *joint) -{ - guint dx, dy, dz; - dx = ABS (node->x - joint->x); - dy = ABS (node->y - joint->y); - dz = ABS (node->z - joint->z); - return sqrt (dx * dx + dy * dy + dz * dz); -} - -static void -unlink_node (Node *node) -{ - Node *neighbor; - GList *current_neighbor; - - for (current_neighbor = g_list_first (node->neighbors); - current_neighbor != NULL; - current_neighbor = g_list_next (current_neighbor)) - { - neighbor = (Node *) current_neighbor->data; - neighbor->neighbors = g_list_remove (neighbor->neighbors, node); - } - - for (current_neighbor = g_list_first (node->linked_nodes); - current_neighbor != NULL; - current_neighbor = g_list_next (current_neighbor)) - { - neighbor = (Node *) current_neighbor->data; - neighbor->linked_nodes = g_list_remove (neighbor->linked_nodes, node); - } - - g_list_free (node->neighbors); - g_list_free (node->linked_nodes); - node->neighbors = NULL; - node->linked_nodes = NULL; -} - -static Node * -get_closest_node_with_distances (GList *node_list, - Node *from, - guint x_dist, - guint y_dist, - guint z_dist, - gint *closest_node_dist) -{ - Node *closest = NULL; - gint distance = -1; - GList *current_node; - - /* @TODO: Replace this and use closest pair of points - algorithm and ensure O(n log n) instead of brute-force */ - - for (current_node = g_list_first (node_list); - current_node != NULL; - current_node = g_list_next (current_node)) - { - guint dx, dy, dz; - Node *node; - gint current_distance; - node = (Node *) current_node->data; - - dx = ABS (from->x - node->x); - dy = ABS (from->y - node->y); - dz = ABS (from->z - node->z); - - if (dx > x_dist || dy > y_dist || dz > z_dist) - continue; - - current_distance = sqrt (dx * dx + dy * dy + dz * dz); - if (closest == NULL || distance > current_distance) - { - closest = node; - distance = current_distance; - } - } - - *closest_node_dist = distance; - return closest; -} - -Node * -get_closest_node_to_joint (GList *extremas, - SkeltrackJoint *joint, - gint *distance) -{ - GList *current_node; - gint dist = -1; - Node *closest_node = NULL; - - for (current_node = g_list_first (extremas); - current_node != NULL; - current_node = g_list_next (current_node)) - { - guint current_dist; - Node *node = (Node *) current_node->data; - if (node == NULL) - continue; - - current_dist = get_distance_from_joint (node, joint); - if (dist == -1 || current_dist < dist) - { - closest_node = node; - dist = current_dist; - } - } - *distance = dist; - return closest_node; -} - -gint -get_distance (Node *a, Node *b) -{ - guint dx, dy, dz; - dx = ABS (a->x - b->x); - dy = ABS (a->y - b->y); - dz = ABS (a->z - b->z); - return sqrt (dx * dx + dy * dy + dz * dz); -} - -Node * -get_closest_torso_node (GList *node_list, Node *from, Node *head) -{ - Node *closest = NULL; - gint distance = -1; - GList *current_node; - - /* @TODO: Replace this and use closest pair of points - algorithm and ensure O(n log n) instead of brute-force */ - - for (current_node = g_list_first (node_list); - current_node != NULL; - current_node = g_list_next (current_node)) - { - Node *node; - gint current_distance; - node = (Node *) current_node->data; - if (node->z >= head->z && - node->y >= from->y) - { - current_distance = get_distance (node, from); - if (closest == NULL || current_distance < distance) - { - closest = node; - distance = current_distance; - } - } - } - return closest; -} - -Node * -get_closest_node (GList *node_list, Node *from) -{ - Node *closest = NULL; - gint distance = -1; - GList *current_node; - - /* @TODO: Replace this and use closest pair of points - algorithm and ensure O(n log n) instead of brute-force */ - - for (current_node = g_list_first (node_list); - current_node != NULL; - current_node = g_list_next (current_node)) - { - Node *node; - gint current_distance; - node = (Node *) current_node->data; - if (closest == NULL) - { - closest = node; - distance = get_distance (node, from); - continue; - } - current_distance = get_distance (node, from); - if (current_distance < distance) - { - closest = node; - distance = current_distance; - } - } - return closest; -} - -Label * -get_main_component (GList *node_list, Node *from, gdouble min_normalized_nr_nodes) -{ - Label *main_component = NULL; - gint distance = -1; - GList *current_node; - - for (current_node = g_list_first (node_list); - current_node != NULL; - current_node = g_list_next (current_node)) - { - Node *node; - Label *label; - gint current_distance; - node = (Node *) current_node->data; - label = node->label; - - if (main_component == NULL && - label->normalized_num_nodes > min_normalized_nr_nodes) - { - main_component = label; - distance = get_distance (node, from); - continue; - } - - current_distance = get_distance (node, from); - if (current_distance < distance && - label->normalized_num_nodes > min_normalized_nr_nodes) - { - main_component = label; - distance = current_distance; - } - } - - return main_component; -} - -Label * -label_find (Label *label) -{ - Label *parent; - - g_return_val_if_fail (label != NULL, NULL); - - parent = label->parent; - if (parent == label) - return parent; - else - return label_find (parent); -} - -void -label_union (Label *a, Label *b) -{ - Label *root_a, *root_b; - root_a = label_find (a); - root_b = label_find (b); - if (root_a->index < root_b->index) - { - b->parent = root_a; - } - else - { - a->parent = root_b; - } -} - -void -free_label (Label *label) -{ - g_list_free (label->nodes); - label->nodes = NULL; - g_slice_free (Label, label); -} - -void -clean_labels (GList *labels) -{ - GList *current = g_list_first (labels); - while (current != NULL) - { - Label *label; - label = (Label *) current->data; - free_label (label); - current = g_list_next (current); - } -} - -void -free_node (Node *node, gboolean unlink_node_first) -{ - if (unlink_node_first) - { - unlink_node (node); - } - else - { - g_list_free (node->neighbors); - g_list_free (node->linked_nodes); - node->neighbors = NULL; - node->linked_nodes = NULL; - } - g_slice_free (Node, node); -} - -void -clean_nodes (GList *nodes) -{ - GList *current = g_list_first (nodes); - while (current != NULL) - { - Node *node; - node = (Node *) current->data; - free_node (node, FALSE); - current = g_list_next (current); - } -} - -GList * -remove_nodes_with_label (GList *nodes, - Node **node_matrix, - gint width, - Label *label) -{ - Node *node; - GList *link_to_delete, *current_node; - - current_node = g_list_first (nodes); - while (current_node != NULL) - { - node = (Node *) current_node->data; - if (node->label == label) - { - link_to_delete = current_node; - current_node = g_list_next (current_node); - nodes = g_list_delete_link (nodes, link_to_delete); - node_matrix[width * node->j + node->i] = NULL; - free_node (node, TRUE); - continue; - } - current_node = g_list_next (current_node); - } - return nodes; -} - -Label * -get_lowest_index_label (Label **neighbor_labels) -{ - guint index; - Label *lowest_index_label = NULL; - - lowest_index_label = neighbor_labels[0]; - for (index = 1; index < 4; index++) - { - if (neighbor_labels[index] == NULL) - continue; - - if (lowest_index_label == NULL || - lowest_index_label->index < neighbor_labels[index]->index) - { - lowest_index_label = neighbor_labels[index]; - } - } - - return lowest_index_label; -} - -Label * -new_label (gint index) -{ - Label *label = g_slice_new (Label); - label->index = index; - label->parent = label; - label->nodes = NULL; - label->bridge_node = NULL; - label->to_node = NULL; - label->lower_screen_y = -1; - label->higher_z = -1; - label->lower_z = -1; - label->normalized_num_nodes = -1; - - return label; -} - -void -join_components_to_main (GList *labels, - Label *main_component_label, - guint horizontal_max_distance, - guint depth_max_distance, - guint graph_distance_threshold) -{ - GList *current_label; - - for (current_label = g_list_first (labels); - current_label != NULL; - current_label = g_list_next (current_label)) - { - gint closer_distance = -1; - Label *label; - GList *current_node, *nodes; - - label = (Label *) current_label->data; - if (label == main_component_label) - continue; - - /* Skip nodes behind main component */ - if (label->higher_z > main_component_label->higher_z + - graph_distance_threshold) - continue; - - nodes = label->nodes; - for (current_node = g_list_first (nodes); - current_node != NULL; - current_node = g_list_next (current_node)) - { - Node *node; - gint current_distance; - node = (Node *) current_node->data; - /* Skip nodes that belong to the same component or - that a not in the edge of their component */ - if (g_list_length (node->neighbors) == 8) - continue; - - Node *closest_node = - get_closest_node_with_distances (main_component_label->nodes, - node, - horizontal_max_distance, - horizontal_max_distance, - depth_max_distance, - ¤t_distance); - if (closest_node && - (current_distance < closer_distance || - closer_distance == -1)) - { - node->label->bridge_node = node; - node->label->to_node = closest_node; - closer_distance = current_distance; - } - } - } -} - -void -set_joint_from_node (SkeltrackJointList *joints, - Node *node, - SkeltrackJointId id, - gint dimension_reduction) -{ - (*joints)[id] = node_to_joint (node, id, dimension_reduction); -} - -gint * -create_new_dist_matrix (gint matrix_size) -{ - guint i; - gint *distances; - - distances = g_slice_alloc0 (matrix_size * sizeof (gint)); - for (i = 0; i < matrix_size; i++) - { - distances[i] = -1; - } - - return distances; -} - -gboolean -dijkstra_to (GList *nodes, Node *source, Node *target, - gint width, gint height, - gint *distances, Node **previous) -{ - gint nr; - GList *unvisited_nodes, *current; - - for (current = g_list_first (nodes); - previous != NULL && current != NULL; - current = g_list_next (current)) - { - Node *node; - node = (Node *) current->data; - previous[node->j * width + node->i] = NULL; - } - distances[source->j * width + source->i] = 0; - - unvisited_nodes = g_list_copy (nodes); - nr = 0; - while (unvisited_nodes != NULL) - { - Node *node; - GList *current_neighbor, *shorter_dist_node, *cur_node; - - shorter_dist_node = g_list_first (unvisited_nodes); - cur_node = g_list_next (shorter_dist_node); - while (cur_node != NULL) - { - Node *value, *shorter_dist; - value = (Node *) cur_node->data; - shorter_dist = (Node *) shorter_dist_node->data; - if (distances[shorter_dist->j * width + shorter_dist->i] == -1 || - (distances[value->j * width + value->i] != -1 && - distances[value->j * width + - value->i] < distances[shorter_dist->j * width + - shorter_dist->i])) - { - shorter_dist_node = cur_node; - } - cur_node = g_list_next (cur_node); - } - - node = (Node *) shorter_dist_node->data; - if (distances[node->j * width + node->i] == -1) - { - break; - } - - current_neighbor = g_list_first (node->neighbors); - while (current_neighbor) - { - gint dist; - Node *neighbor; - - neighbor = (Node *) current_neighbor->data; - dist = get_distance (node, neighbor) + - distances[node->j * width + node->i]; - - if (distances[neighbor->j * width + neighbor->i] == -1 || - dist < distances[neighbor->j * width + neighbor->i]) - { - distances[neighbor->j * width + neighbor->i] = dist; - if (previous != NULL) - { - previous[neighbor->j * width + neighbor->i] = node; - } - nr++; - } - if (target != NULL && neighbor == target) - { - g_list_free (unvisited_nodes); - return TRUE; - } - - current_neighbor = g_list_next (current_neighbor); - } - unvisited_nodes = g_list_delete_link (unvisited_nodes, shorter_dist_node); - } - g_list_free (unvisited_nodes); - return FALSE; -} - -void -convert_screen_coords_to_mm (guint width, - guint height, - guint dimension_reduction, - guint i, - guint j, - gint z, - gint *x, - gint *y) -{ - gfloat width_height_relation = - width > height ? (gfloat) width / height : (gfloat) height / width; - /* Formula from http://openkinect.org/wiki/Imaging_Information */ - *x = round((i * dimension_reduction - width * dimension_reduction / 2.0) * - (z + MIN_DISTANCE) * SCALE_FACTOR * width_height_relation); - *y = round((j * dimension_reduction - height * dimension_reduction / 2.0) * - (z + MIN_DISTANCE) * SCALE_FACTOR); -} - -void -convert_mm_to_screen_coords (guint width, - guint height, - guint dimension_reduction, - gint x, - gint y, - gint z, - guint *i, - guint *j) -{ - gfloat width_height_relation = - width > height ? (gfloat) width / height : (gfloat) height / width; - - if (z + MIN_DISTANCE == 0) - { - *i = 0; - *j = 0; - return; - } - - *i = round (width / 2.0 + x / ((gfloat) (z + MIN_DISTANCE) * SCALE_FACTOR * - dimension_reduction * width_height_relation)); - *j = round (height / 2.0 + y / ((gfloat) (z + MIN_DISTANCE) * SCALE_FACTOR * - dimension_reduction)); -}