├── .gitignore ├── Makefile.am ├── README ├── autogen.sh ├── configure.ac ├── examples ├── Makefile.am └── videoControl.c └── src ├── Makefile.am ├── gsthanddetect.c ├── gsthanddetect.h ├── gstopencvutils.c ├── gstopencvutils.h ├── gstopencvvideofilter.c ├── gstopencvvideofilter.h └── xml ├── fist.xml └── palm.xml /.gitignore: -------------------------------------------------------------------------------- 1 | gsthanddetect_so/Debug/ 2 | gsthanddetect_app/Debug/ 3 | opencv_handdetect/Debug/ 4 | *.tmp 5 | *.la 6 | *.d 7 | *.h~ 8 | *.c~ 9 | *~ 10 | *.bak* 11 | *.cproject 12 | *.project 13 | *.libs 14 | *.deps 15 | 16 | 17 | ## 18 | *.7z 19 | *.dmg 20 | *.gz 21 | *.iso 22 | *.jar 23 | *.rar 24 | *.tar 25 | *.zip 26 | 27 | ## 28 | *.log 29 | *.sql 30 | *.sqlite 31 | 32 | ## 33 | .DS_Store 34 | .DS_Store? 35 | ._* 36 | .Spotlight-V100 37 | .Trashes 38 | Icon? 39 | ehthumbs.db 40 | Thumbs.db 41 | 42 | ## 43 | *.com 44 | *.class 45 | *.dll 46 | *.exe 47 | *.o 48 | *.so 49 | -------------------------------------------------------------------------------- /Makefile.am: -------------------------------------------------------------------------------- 1 | SUBDIRS = src examples 2 | 3 | -------------------------------------------------------------------------------- /README: -------------------------------------------------------------------------------- 1 | Thsi is the documentation for the gstreamer plugin gst-handdetect. 2 | 3 | The plugin works with OpenCV to detect natural hand gestures, its hand gesture detection is achieved through HAAR classifier training which results in classifier files in xml formats. 4 | 5 | ====== 6 | ====== 7 | 8 | The structure of this plugin is organised as following: 9 | 10 | /GstHanddetect 11 | /src 12 | gsthanddetect.c 13 | gsthanddetect.h 14 | /xml 15 | fist.xml 16 | palm.xml (to be added) 17 | /examples 18 | Makefile.am 19 | main.c (an app example to demonstrate using hand gestures (fist) 20 | to manipulate the media playbacks and volumes) 21 | configure.ac 22 | Makefile.am 23 | README 24 | 25 | ====== 26 | ====== 27 | 28 | The manipulation of media playbacks and volumes are designed as following: 29 | 1. the frame will draw a red circle over the hand gestures (fist) 30 | 2. given the positions and movements the gestures make, the manipulations are defined as: 31 | * the horizontal positions of fist (known as x coordinate) in the frame 32 | chanage the media's playback position 33 | [ current media position = x / frame width * media duration ] 34 | * the vertical positions of fist (know as y coordinates) in the frame 35 | change the media playback's volumes 36 | [ current volume = y / frame height * 10 ] 37 | * if palms detected, the playback stops, showing fist gesture to resume playing 38 | 39 | ====== 40 | ====== 41 | 42 | PLUGIN INSTALL 43 | following regular gstreamer plugin installation procedures to make and install the gst-handdetect plugin. 44 | 45 | -------------------------------------------------------------------------------- /autogen.sh: -------------------------------------------------------------------------------- 1 | #! /bin/sh 2 | 3 | test -n "$srcdir" || srcdir=`dirname "$0"` 4 | test -n "$srcdir" || srcdir=. 5 | ( 6 | cd "$srcdir" && 7 | autoreconf --force -v --install 8 | ) || exit 9 | test -n "$NOCONFIGURE" || "$srcdir/configure" "$@" 10 | -------------------------------------------------------------------------------- /configure.ac: -------------------------------------------------------------------------------- 1 | AC_PREREQ([2.64]) 2 | AC_INIT([gst-handdetect], 3 | [0.1], 4 | [andol@andol.info], 5 | [gst-handdetect], 6 | []) 7 | 8 | AG_GST_INIT 9 | 10 | AC_CONFIG_HEADERS([config.h]) 11 | AC_CONFIG_MACRO_DIR([m4]) 12 | 13 | AM_INIT_AUTOMAKE([1.11 foreign dist-bzip2]) 14 | 15 | AM_SILENT_RULES([yes]) 16 | 17 | # Check for programs 18 | AC_PROG_CC 19 | 20 | # Initialize libtool 21 | LT_PREREQ([2.2]) 22 | LT_INIT 23 | 24 | PKG_PROG_PKG_CONFIG() 25 | PKG_CHECK_MODULES(GST, [gstreamer-0.10 gstreamer-video-0.10 opencv]) 26 | AC_CHECK_LIB([gstinterfaces-0.10], [gst_navigation_get_type]) 27 | AC_CONFIG_FILES([Makefile src/Makefile examples/Makefile]) 28 | AC_OUTPUT 29 | -------------------------------------------------------------------------------- /examples/Makefile.am: -------------------------------------------------------------------------------- 1 | noinst_PROGRAMS = videoControl 2 | 3 | videoControl_SOURCES = videoControl.c 4 | 5 | videoControl_CFLAGS = $(GST_CFLAGS) $(GST_BASE_CFLAGS) $(GST_PLUGINS_BASE_CFLAGS) 6 | videoControl_LDFLAGS = $(GST_LIBS) $(GST_BASE_LIBS) $(GST_PLUGINS_BASE_LIBS) $(GSTPB_BASE_LIBS) 7 | -------------------------------------------------------------------------------- /examples/videoControl.c: -------------------------------------------------------------------------------- 1 | /* 2 | *============================================================================ 3 | *Name : gsthanddetect_app.c 4 | *Author : Andol Li, andol@andol.info 5 | *Version : 0.1 6 | *Copyright : @2012, gstreamer 7 | *Description : gsteramer handdetect plugin demo application in C, part work of GSoc 2012 project 8 | *============================================================================ 9 | */ 10 | 11 | #include 12 | #include 13 | #include 14 | #include 15 | #include 16 | #include 17 | 18 | #define PROFILE_FIST "/usr/local/share/opencv/haarcascades/fist.xml" 19 | #define PROFILE_PALM "/usr/local/share/opencv/haarcascades/palm.xml" 20 | 21 | GstElement *playbin, 22 | *pipeline, 23 | *v4l2src, *videoscale, *ffmpegcolorspace_in, *handdetect, *ffmpegcolorspace_out, *xvimagesink; 24 | 25 | static GstBusSyncHandler 26 | bus_sync_handler(GstBus *bus, GstMessage *message, GstPipeline *pipeline) 27 | { 28 | /* select msg */ 29 | if(GST_MESSAGE_TYPE (message) != GST_MESSAGE_ELEMENT || 30 | !gst_structure_has_name(message->structure, "hand-gesture") ) 31 | return GST_BUS_PASS; 32 | 33 | /* parse msg structure */ 34 | const GstStructure *structure = message->structure; 35 | 36 | /* if PALM gesture detected */ 37 | if (structure && 38 | strcmp (gst_structure_get_name (structure), "hand-gesture") == 0 && 39 | strcmp (gst_structure_get_string (structure, "gesture"), "palm") == 0) { 40 | /* media operation - closed palm to stop media play*/ 41 | gst_element_set_state (playbin, GST_STATE_PAUSED); 42 | } 43 | 44 | /* if FIST gesture detected */ 45 | if (structure && 46 | strcmp (gst_structure_get_name (structure), "hand-gesture") == 0 && 47 | strcmp (gst_structure_get_string (structure, "gesture"), "fist") == 0){ 48 | /* print message type and structure name */ 49 | g_print("%s{{%s}}\n", gst_message_type_get_name(message->type), gst_structure_get_name(structure)); 50 | /* print msg structure names&values */ 51 | int i; 52 | for(i = 0; i < gst_structure_n_fields(structure); i++){ 53 | const gchar *name = gst_structure_nth_field_name(structure, i); 54 | GType type = gst_structure_get_field_type(structure, name); 55 | const GValue *value = gst_structure_get_value(structure, name); 56 | type == G_TYPE_STRING ? 57 | g_print("-%s[%s]{%s}\n", name, g_type_name(type), g_value_get_string(value)) : 58 | g_print("-%s[%s]{%d}\n", name, g_type_name(type), g_value_get_uint(value)); 59 | } 60 | g_print("\n"); 61 | 62 | /* get X,Y positions in frame */ 63 | const GValue *x_value = gst_structure_get_value(structure, "x"); 64 | gint x = g_value_get_uint(x_value); 65 | const GValue *y_value = gst_structure_get_value(structure, "y"); 66 | gint y = g_value_get_uint(y_value); 67 | 68 | /* set object volumes [0-10] based on Y */ 69 | g_object_set(G_OBJECT(playbin), "volume", (gdouble)(10 - y/24 ), NULL); 70 | 71 | /* seek playback positions */ 72 | gint64 position, length; 73 | GstFormat format = GST_FORMAT_TIME; 74 | gst_element_query_duration(playbin, &format, &length); 75 | /* Width = 320 is specified in caps */ 76 | position = (gint64) length * x / 320; 77 | gst_element_set_state(playbin, GST_STATE_PAUSED); 78 | gst_element_seek(GST_ELEMENT(playbin), 79 | 1.0, 80 | format, 81 | GST_SEEK_FLAG_FLUSH, 82 | GST_SEEK_TYPE_SET, 83 | position, 84 | GST_SEEK_TYPE_NONE, 85 | GST_CLOCK_TIME_NONE ); 86 | gst_element_set_state(GST_ELEMENT(playbin), GST_STATE_PLAYING); 87 | } 88 | 89 | gst_message_unref(message); 90 | return GST_BUS_DROP; 91 | } 92 | 93 | int main(gint argc, gchar **argv) { 94 | static GMainLoop *loop; 95 | loop = g_main_loop_new(NULL, FALSE); 96 | /* video source */ 97 | gchar *video_device = "/dev/video0"; 98 | gchar *video_file = "file:///home/javauser/workspace/gitfiles/gsthanddetect_app/video.avi"; 99 | /* bus */ 100 | GstBus *bus; 101 | /* caps */ 102 | GstCaps *caps; 103 | 104 | /* init gst */ 105 | gst_init(&argc, &argv); 106 | 107 | /* init elements */ 108 | playbin = gst_element_factory_make("playbin2", "app_playbin"); 109 | pipeline = gst_pipeline_new("app_pipeline"); 110 | v4l2src = gst_element_factory_make("v4l2src", "app_v4l2src"); 111 | videoscale = gst_element_factory_make("videoscale", "app_videoscale"); 112 | ffmpegcolorspace_in = gst_element_factory_make("ffmpegcolorspace", "app_ffmpegcolorspace_in"); 113 | handdetect = gst_element_factory_make("handdetect", "app_handdetect"); 114 | ffmpegcolorspace_out = gst_element_factory_make("ffmpegcolorspace", "app_ffmpegcolorspace_out"); 115 | xvimagesink = gst_element_factory_make("xvimagesink", "app_xvimagesink"); 116 | 117 | /* check init results */ 118 | if(!playbin || !pipeline || !v4l2src || !videoscale || !ffmpegcolorspace_in 119 | || !handdetect || !ffmpegcolorspace_out || !xvimagesink) 120 | g_error("ERROR: element init failed.\n"); 121 | 122 | /* set values */ 123 | g_object_set (G_OBJECT(playbin), "uri", video_file, NULL); 124 | g_object_set (G_OBJECT(v4l2src), "device", video_device, NULL); 125 | g_object_set (G_OBJECT (handdetect), "profile_fist", PROFILE_FIST, NULL); 126 | g_object_set (G_OBJECT (handdetect), "profile_palm", PROFILE_PALM, NULL); 127 | 128 | /* set caps */ 129 | caps = gst_caps_from_string("video/x-raw-rgb, width=320, height=240, framerate=(fraction)30/1"); 130 | 131 | /* set bus */ 132 | bus = gst_pipeline_get_bus(GST_PIPELINE(pipeline)); 133 | gst_bus_set_sync_handler(bus, (GstBusSyncHandler) bus_sync_handler, pipeline); 134 | gst_object_unref(bus); 135 | 136 | /* add elements to pipeline */ 137 | gst_bin_add_many(GST_BIN(pipeline), 138 | v4l2src, 139 | videoscale, 140 | ffmpegcolorspace_in, 141 | handdetect, 142 | ffmpegcolorspace_out, 143 | xvimagesink, 144 | NULL); 145 | 146 | /* negotiate caps */ 147 | if(!gst_element_link_filtered( v4l2src, videoscale, caps)){ 148 | g_printerr("ERROR:v4l2src -> videoscale caps\n"); 149 | return 0; } 150 | gst_caps_unref(caps); 151 | 152 | /* link elements */ 153 | gst_element_link_many( 154 | videoscale, 155 | ffmpegcolorspace_in, 156 | handdetect, 157 | ffmpegcolorspace_out, 158 | xvimagesink, 159 | NULL); 160 | 161 | /* change states */ 162 | gst_element_set_state(pipeline, GST_STATE_PLAYING); 163 | 164 | /* start main loop */ 165 | g_main_loop_run(loop); 166 | 167 | /* clean all */ 168 | gst_element_set_state(pipeline, GST_STATE_NULL); 169 | gst_object_unref(GST_OBJECT(pipeline)); 170 | gst_element_set_state(playbin, GST_STATE_NULL); 171 | gst_object_unref(GST_OBJECT(playbin)); 172 | 173 | return 0; 174 | } 175 | 176 | 177 | -------------------------------------------------------------------------------- /src/Makefile.am: -------------------------------------------------------------------------------- 1 | lib_LTLIBRARIES = libgsthanddetect.la 2 | 3 | libgsthanddetect_la_CFLAGS = $(GST_CFLAGS) 4 | libgsthanddetect_la_LIBADD = $(GST_LIBS) 5 | libgsthanddetect_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS) 6 | libgsthanddetect_la_SOURCES = \ 7 | gsthanddetect.c \ 8 | gsthanddetect.h \ 9 | gstopencvvideofilter.c \ 10 | gstopencvvideofilter.h \ 11 | gstopencvutils.c \ 12 | gstopencvutils.h 13 | 14 | AM_CPPFLAGS = $(GST_CFLAGS) 15 | 16 | libdir=${exec_prefix}/lib/gstreamer-0.10 17 | 18 | xmlfiledir = $(exec_prefix)/share/opencv/haarcascades 19 | dist_xmlfile_SCRIPTS = xml/fist.xml xml/palm.xml 20 | -------------------------------------------------------------------------------- /src/gsthanddetect.c: -------------------------------------------------------------------------------- 1 | /* 2 | * GStreamer hand gesture detection plugins 3 | * Copyright (C) 2012 Andol Li <> 4 | * 5 | * Permission is hereby granted, free of charge, to any person obtaining a 6 | * copy of this software and associated documentation files (the "Software"), 7 | * to deal in the Software without restriction, including without limitation 8 | * the rights to use, copy, modify, merge, publish, distribute, sublicense, 9 | * and/or sell copies of the Software, and to permit persons to whom the 10 | * Software is furnished to do so, subject to the following conditions: 11 | * 12 | * The above copyright notice and this permission notice shall be included in 13 | * all copies or substantial portions of the Software. 14 | * 15 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 20 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 21 | * DEALINGS IN THE SOFTWARE. 22 | * 23 | * Alternatively, the contents of this file may be used under the 24 | * GNU Lesser General Public License Version 2.1 (the "LGPL"), in 25 | * which case the following provisions apply instead of the ones 26 | * mentioned above: 27 | * 28 | * This library is free software; you can redistribute it and/or 29 | * modify it under the terms of the GNU Library General Public 30 | * License as published by the Free Software Foundation; either 31 | * version 2 of the License, or (at your option) any later version. 32 | * 33 | * This library is distributed in the hope that it will be useful, 34 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 35 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 36 | * Library General Public License for more details. 37 | * 38 | * You should have received a copy of the GNU Library General Public 39 | * License along with this library; if not, write to the 40 | * Free Software Foundation, Inc., 59 Temple Place - Suite 330, 41 | * Boston, MA 02111-1307, USA. 42 | */ 43 | /** 44 | * SECTION:video-filter-handdetect 45 | * 46 | * FIXME:operates hand gesture detection in video streams and images, 47 | * and enable media operation e.g. play/stop/fast forward/back rewind. 48 | * 49 | * 50 | * Example launch line 51 | * |[ 52 | * gst-launch autovideosrc ! ffmpegcolorspace ! "video/x-raw-rgb, width=320, height=240" ! \ 53 | videoscale ! handdetect ! ffmpegcolorspace ! xvimagesink 54 | * ]| 55 | * 56 | */ 57 | 58 | #ifdef HAVE_CONFIG_H 59 | #include 60 | #endif 61 | /* interfaces */ 62 | #include 63 | /* element header */ 64 | #include "gsthanddetect.h" 65 | /* gst */ 66 | #include 67 | #include 68 | #include "gstopencvutils.h" 69 | /* debugging */ 70 | #include 71 | 72 | GST_DEBUG_CATEGORY_STATIC (gst_handdetect_debug); 73 | #define GST_CAT_DEFAULT gst_handdetect_debug 74 | 75 | /* define HAAR files */ 76 | #define HAAR_FILE_FIST "/usr/local/share/opencv/haarcascades/fist.xml" 77 | #define HAAR_FILE_PALM "/usr/local/share/opencv/haarcascades/palm.xml" 78 | 79 | /* Filter signals and args */ 80 | enum 81 | { 82 | /* FILL ME */ 83 | LAST_SIGNAL 84 | }; 85 | 86 | enum 87 | { 88 | PROP_0, 89 | PROP_DISPLAY, 90 | PROP_PROFILE_FIST, 91 | PROP_PROFILE_PALM, 92 | PROP_ROI_X, 93 | PROP_ROI_Y, 94 | PROP_ROI_WIDTH, 95 | PROP_ROI_HEIGHT 96 | }; 97 | 98 | /* the capabilities of the inputs and outputs */ 99 | static GstStaticPadTemplate sink_factory = GST_STATIC_PAD_TEMPLATE ("sink", 100 | GST_PAD_SINK, 101 | GST_PAD_ALWAYS, 102 | GST_STATIC_CAPS (GST_VIDEO_CAPS_RGB) 103 | ); 104 | static GstStaticPadTemplate src_factory = GST_STATIC_PAD_TEMPLATE ("src", 105 | GST_PAD_SRC, 106 | GST_PAD_ALWAYS, 107 | GST_STATIC_CAPS (GST_VIDEO_CAPS_RGB) 108 | ); 109 | 110 | static void gst_handdetect_set_property (GObject * object, guint prop_id, 111 | const GValue * value, GParamSpec * pspec); 112 | static void gst_handdetect_get_property (GObject * object, guint prop_id, 113 | GValue * value, GParamSpec * pspec); 114 | static gboolean gst_handdetect_set_caps (GstOpencvVideoFilter * transform, 115 | gint in_width, gint in_height, gint in_depth, gint in_channels, 116 | gint out_width, gint out_height, gint out_depth, gint out_channels); 117 | static GstFlowReturn gst_handdetect_transform_ip (GstOpencvVideoFilter * 118 | transform, GstBuffer * buffer, IplImage * img); 119 | 120 | static void gst_handdetect_load_profile (GstHanddetect * filter); 121 | 122 | static void gst_handdetect_init_interfaces (GType type); 123 | static void 124 | gst_handdetect_implements_interface_init (GstImplementsInterfaceClass * klass); 125 | static void gst_handdetect_navigation_interface_init (gpointer g_iface, 126 | gpointer iface_data); 127 | static gboolean gst_handdetect_interface_supported (GstImplementsInterface * 128 | iface, GType type); 129 | static void gst_handdetect_navigation_send_event (GstNavigation * navigation, 130 | GstStructure * structure); 131 | static gboolean gst_handdetect_handle_pad_event (GstPad * pad, 132 | GstEvent * event); 133 | 134 | GST_BOILERPLATE_FULL (GstHanddetect, gst_handdetect, GstOpencvVideoFilter, 135 | GST_TYPE_OPENCV_VIDEO_FILTER, gst_handdetect_init_interfaces); 136 | 137 | static void 138 | gst_handdetect_init_interfaces (GType type) 139 | { 140 | static const GInterfaceInfo iface_info = { 141 | (GInterfaceInitFunc) gst_handdetect_implements_interface_init, 142 | NULL, 143 | NULL, 144 | }; 145 | g_type_add_interface_static (type, GST_TYPE_IMPLEMENTS_INTERFACE, 146 | &iface_info); 147 | static const GInterfaceInfo navigation_info = { 148 | (GInterfaceInitFunc) gst_handdetect_navigation_interface_init, 149 | NULL, 150 | NULL, 151 | }; 152 | g_type_add_interface_static (type, GST_TYPE_NAVIGATION, &navigation_info); 153 | } 154 | 155 | static void 156 | gst_handdetect_navigation_interface_init (gpointer g_iface, gpointer iface_data) 157 | { 158 | GstNavigationInterface *iface = (GstNavigationInterface *) g_iface; 159 | iface->send_event = gst_handdetect_navigation_send_event; 160 | } 161 | 162 | static gboolean 163 | gst_handdetect_interface_supported (GstImplementsInterface * iface, GType type) 164 | { 165 | if (type == GST_TYPE_NAVIGATION) 166 | return TRUE; 167 | return FALSE; 168 | } 169 | 170 | static void 171 | gst_handdetect_implements_interface_init (GstImplementsInterfaceClass * klass) 172 | { 173 | klass->supported = gst_handdetect_interface_supported; 174 | } 175 | 176 | /* FIXME: this function used to parse the region of interests coordinates 177 | * sending from applications when the hand gestures reach the defined regions of interests, 178 | * at this moment this function is not doing anything significantly 179 | * but will be CHANGED when the gstreamer is patched with new hand gesture events 180 | */ 181 | static void 182 | gst_handdetect_navigation_send_event (GstNavigation * navigation, 183 | GstStructure * structure) 184 | { 185 | GstHanddetect *filter = GST_HANDDETECT (navigation); 186 | GstPad *peer; 187 | 188 | if ((peer = gst_pad_get_peer (GST_BASE_TRANSFORM_CAST (filter)->sinkpad))) { 189 | GstEvent *event; 190 | event = gst_event_new_navigation (structure); 191 | gst_pad_send_event (peer, event); 192 | gst_object_unref (peer); 193 | } 194 | } 195 | 196 | /* handle element pad event */ 197 | /* no PRACTICAL USE at the moment 198 | * this function is used to debug the fist-move/palm-move event 199 | * will CHANGE in the future 200 | */ 201 | static gboolean 202 | gst_handdetect_handle_pad_event (GstPad * pad, GstEvent * event) 203 | { 204 | const GstStructure *s = gst_event_get_structure (event); 205 | const gchar *name = gst_structure_get_string (s, "event"); 206 | 207 | switch (GST_EVENT_TYPE (event)) { 208 | case GST_EVENT_EOS: 209 | break; 210 | case GST_EVENT_NAVIGATION:{ 211 | if (g_str_equal (name, "fist-move")) { 212 | GST_DEBUG_OBJECT (GST_HANDDETECT (gst_pad_get_parent (pad)), 213 | "Fist-move event\n "); 214 | uint x, y; 215 | gst_structure_get_uint (s, "x", &x); 216 | gst_structure_get_uint (s, "y", &y); 217 | GST_DEBUG_OBJECT (GST_HANDDETECT (gst_pad_get_parent (pad)), 218 | "Fist Pos:[%d, %d]\n", x, y); 219 | } else if (g_str_equal (name, "palm-move")) { 220 | GST_DEBUG_OBJECT (GST_HANDDETECT (gst_pad_get_parent (pad)), 221 | "Palm-move event\n "); 222 | uint x, y; 223 | gst_structure_get_uint (s, "x", &x); 224 | gst_structure_get_uint (s, "y", &y); 225 | GST_DEBUG_OBJECT (GST_HANDDETECT (gst_pad_get_parent (pad)), 226 | "Palm Pos:[%d, %d]\n", x, y); 227 | } else if (g_str_equal (name, "mouse-move")) { 228 | gdouble x, y; 229 | gst_structure_get_double (s, "pointer_x", &x); 230 | gst_structure_get_double (s, "pointer_y", &y); 231 | GST_DEBUG_OBJECT (GST_HANDDETECT (gst_pad_get_parent (pad)), 232 | "Mouse-move [%f, %f]\n", x, y); 233 | } else if (g_str_equal (name, "mouse-button-press")) { 234 | GST_DEBUG ("Mouse botton press\n"); 235 | } else if (g_str_equal (name, "mouse-button-release")) { 236 | GST_DEBUG_OBJECT (GST_HANDDETECT (gst_pad_get_parent (pad)), 237 | "Mouse button release\n"); 238 | } 239 | break; 240 | } 241 | default: 242 | break; 243 | } 244 | return gst_pad_event_default (pad, event); 245 | } 246 | 247 | /* clean opencv images and parameters */ 248 | static void 249 | gst_handdetect_finalise (GObject * obj) 250 | { 251 | GstHanddetect *filter = GST_HANDDETECT (obj); 252 | 253 | if (filter->cvImage) 254 | cvReleaseImage (&filter->cvImage); 255 | if (filter->cvGray) 256 | cvReleaseImage (&filter->cvGray); 257 | g_free (filter->profile_fist); 258 | g_free (filter->profile_palm); 259 | 260 | G_OBJECT_CLASS (parent_class)->finalize (obj); 261 | } 262 | 263 | /* GObject vmethod implementations */ 264 | static void 265 | gst_handdetect_base_init (gpointer gclass) 266 | { 267 | GstElementClass *element_class = GST_ELEMENT_CLASS (gclass); 268 | 269 | gst_element_class_set_details_simple (element_class, 270 | "hand detect", 271 | "Filter/Effect/Video", 272 | "Performs hand gesture detection on videos, providing detected hand positions via bus message and navigation event, and deals with hand gesture events", 273 | "Andol Li <>"); 274 | 275 | gst_element_class_add_static_pad_template (element_class, &src_factory); 276 | gst_element_class_add_static_pad_template (element_class, &sink_factory); 277 | } 278 | 279 | /* initialise the HANDDETECT class */ 280 | static void 281 | gst_handdetect_class_init (GstHanddetectClass * klass) 282 | { 283 | GObjectClass *gobject_class; 284 | GstOpencvVideoFilterClass *gstopencvbasefilter_class; 285 | 286 | gobject_class = (GObjectClass *) klass; 287 | gstopencvbasefilter_class = (GstOpencvVideoFilterClass *) klass; 288 | 289 | gstopencvbasefilter_class->cv_trans_ip_func = gst_handdetect_transform_ip; 290 | gstopencvbasefilter_class->cv_set_caps = gst_handdetect_set_caps; 291 | 292 | gobject_class->finalize = GST_DEBUG_FUNCPTR (gst_handdetect_finalise); 293 | gobject_class->set_property = gst_handdetect_set_property; 294 | gobject_class->get_property = gst_handdetect_get_property; 295 | 296 | g_object_class_install_property (gobject_class, 297 | PROP_DISPLAY, 298 | g_param_spec_boolean ("display", 299 | "Display", 300 | "Whether the detected hands are highlighted in output frame", 301 | TRUE, G_PARAM_READWRITE) 302 | ); 303 | g_object_class_install_property (gobject_class, 304 | PROP_PROFILE_FIST, 305 | g_param_spec_string ("profile_fist", 306 | "Profile_fist", 307 | "Location of HAAR cascade file (fist gesture)", 308 | HAAR_FILE_FIST, G_PARAM_READWRITE) 309 | ); 310 | g_object_class_install_property (gobject_class, 311 | PROP_PROFILE_PALM, 312 | g_param_spec_string ("profile_palm", 313 | "Profile_palm", 314 | "Location of HAAR cascade file (palm gesture)", 315 | HAAR_FILE_PALM, G_PARAM_READWRITE) 316 | ); 317 | g_object_class_install_property (gobject_class, 318 | PROP_ROI_X, 319 | g_param_spec_uint ("ROI_X", 320 | "ROI_X", 321 | "X of left-top pointer in region of interest \nGestures in the defined region of interest will emit messages", 322 | 0, UINT_MAX, 0, G_PARAM_READWRITE) 323 | ); 324 | g_object_class_install_property (gobject_class, 325 | PROP_ROI_Y, 326 | g_param_spec_uint ("ROI_Y", 327 | "ROI_Y", 328 | "Y of left-top pointer in region of interest \nGestures in the defined region of interest will emit messages", 329 | 0, UINT_MAX, 0, G_PARAM_READWRITE) 330 | ); 331 | g_object_class_install_property (gobject_class, 332 | PROP_ROI_WIDTH, 333 | g_param_spec_uint ("ROI_WIDTH", 334 | "ROI_WIDTH", 335 | "WIDTH of left-top pointer in region of interest \nGestures in the defined region of interest will emit messages", 336 | 0, UINT_MAX, 0, G_PARAM_READWRITE) 337 | ); 338 | g_object_class_install_property (gobject_class, 339 | PROP_ROI_HEIGHT, 340 | g_param_spec_uint ("ROI_HEIGHT", 341 | "ROI_HEIGHT", 342 | "HEIGHT of left-top pointer in region of interest \nGestures in the defined region of interest will emit messages", 343 | 0, UINT_MAX, 0, G_PARAM_READWRITE) 344 | ); 345 | } 346 | 347 | /* initialise the new element 348 | * instantiate pads and add them to element 349 | * set pad call-back functions 350 | * initialise instance structure 351 | */ 352 | static void 353 | gst_handdetect_init (GstHanddetect * filter, GstHanddetectClass * gclass) 354 | { 355 | GstBaseTransform *trans = GST_BASE_TRANSFORM_CAST (filter); 356 | 357 | gst_pad_set_event_function (trans->srcpad, 358 | GST_DEBUG_FUNCPTR (gst_handdetect_handle_pad_event)); 359 | 360 | filter->profile_fist = g_strdup (HAAR_FILE_FIST); 361 | filter->profile_palm = g_strdup (HAAR_FILE_PALM); 362 | filter->roi_x = 0; 363 | filter->roi_y = 0; 364 | filter->roi_width = 0; 365 | filter->roi_height = 0; 366 | filter->display = TRUE; 367 | 368 | gst_handdetect_load_profile (filter); 369 | 370 | gst_opencv_video_filter_set_in_place (GST_OPENCV_VIDEO_FILTER_CAST (filter), 371 | TRUE); 372 | } 373 | 374 | static void 375 | gst_handdetect_set_property (GObject * object, guint prop_id, 376 | const GValue * value, GParamSpec * pspec) 377 | { 378 | GstHanddetect *filter = GST_HANDDETECT (object); 379 | 380 | switch (prop_id) { 381 | case PROP_PROFILE_FIST: 382 | g_free (filter->profile_fist); 383 | filter->profile_fist = g_value_dup_string (value); 384 | gst_handdetect_load_profile (filter); 385 | break; 386 | case PROP_PROFILE_PALM: 387 | g_free (filter->profile_palm); 388 | filter->profile_palm = g_value_dup_string (value); 389 | gst_handdetect_load_profile (filter); 390 | break; 391 | case PROP_DISPLAY: 392 | filter->display = g_value_get_boolean (value); 393 | break; 394 | case PROP_ROI_X: 395 | filter->roi_x = g_value_get_uint (value); 396 | break; 397 | case PROP_ROI_Y: 398 | filter->roi_y = g_value_get_uint (value); 399 | break; 400 | case PROP_ROI_WIDTH: 401 | filter->roi_width = g_value_get_uint (value); 402 | break; 403 | case PROP_ROI_HEIGHT: 404 | filter->roi_height = g_value_get_uint (value); 405 | break; 406 | default: 407 | G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); 408 | break; 409 | } 410 | } 411 | 412 | static void 413 | gst_handdetect_get_property (GObject * object, guint prop_id, GValue * value, 414 | GParamSpec * pspec) 415 | { 416 | GstHanddetect *filter = GST_HANDDETECT (object); 417 | 418 | switch (prop_id) { 419 | case PROP_DISPLAY: 420 | g_value_set_boolean (value, filter->display); 421 | break; 422 | case PROP_PROFILE_FIST: 423 | g_value_set_string (value, filter->profile_fist); 424 | break; 425 | case PROP_PROFILE_PALM: 426 | g_value_set_string (value, filter->profile_palm); 427 | break; 428 | case PROP_ROI_X: 429 | g_value_set_uint (value, filter->roi_x); 430 | break; 431 | case PROP_ROI_Y: 432 | g_value_set_uint (value, filter->roi_y); 433 | break; 434 | case PROP_ROI_WIDTH: 435 | g_value_set_uint (value, filter->roi_width); 436 | break; 437 | case PROP_ROI_HEIGHT: 438 | g_value_set_uint (value, filter->roi_height); 439 | break; 440 | default: 441 | G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); 442 | break; 443 | } 444 | } 445 | 446 | /* GstElement vmethod implementations */ 447 | /* this function handles the link with other elements */ 448 | static gboolean 449 | gst_handdetect_set_caps (GstOpencvVideoFilter * transform, 450 | gint in_width, gint in_height, gint in_depth, gint in_channels, 451 | gint out_width, gint out_height, gint out_depth, gint out_channels) 452 | { 453 | GstHanddetect *filter; 454 | filter = GST_HANDDETECT (transform); 455 | 456 | if (filter->cvGray) 457 | cvReleaseImage (&filter->cvGray); 458 | filter->cvGray = 459 | cvCreateImage (cvSize (in_width, in_height), IPL_DEPTH_8U, 1); 460 | if (filter->cvImage) 461 | cvReleaseImage (&filter->cvImage); 462 | filter->cvImage = 463 | cvCreateImage (cvSize (in_width, in_height), IPL_DEPTH_8U, 3); 464 | 465 | if (!filter->cvStorage) 466 | filter->cvStorage = cvCreateMemStorage (0); 467 | else 468 | cvClearMemStorage (filter->cvStorage); 469 | if (!filter->cvStorage_palm) 470 | filter->cvStorage_palm = cvCreateMemStorage (0); 471 | else 472 | cvClearMemStorage (filter->cvStorage_palm); 473 | return TRUE; 474 | } 475 | 476 | /* Hand detection function 477 | * This function does the actual processing 'of hand detect and display' 478 | */ 479 | static GstFlowReturn 480 | gst_handdetect_transform_ip (GstOpencvVideoFilter * transform, 481 | GstBuffer * buffer, IplImage * img) 482 | { 483 | GstHanddetect *filter = GST_HANDDETECT (transform); 484 | CvSeq *hands; 485 | CvRect *r; 486 | GstStructure *s; 487 | GstMessage *m; 488 | int i; 489 | 490 | filter->cvImage->imageData = (char *) GST_BUFFER_DATA (buffer); 491 | /* 320 x 240 is with the best detect accuracy, if not, give info */ 492 | if (filter->cvImage->width != 320 || filter->cvImage->height != 240) 493 | GST_INFO_OBJECT (filter, 494 | "WARNING: resize to 320 x 240 to have best detect accuracy.\n"); 495 | /* cvt to gray colour space for hand detect */ 496 | cvCvtColor (filter->cvImage, filter->cvGray, CV_RGB2GRAY); 497 | cvClearMemStorage (filter->cvStorage); 498 | 499 | /* check detection cascades */ 500 | if (!filter->cvCascade_fist || !filter->cvCascade_palm) 501 | return GST_FLOW_OK; 502 | 503 | /* detect FIST gesture fist */ 504 | hands = 505 | cvHaarDetectObjects (filter->cvGray, filter->cvCascade_fist, 506 | filter->cvStorage, 1.1, 2, CV_HAAR_DO_CANNY_PRUNING, cvSize (24, 24) 507 | #if (CV_MAJOR_VERSION >= 2) && (CV_MINOR_VERSION >= 2) 508 | , cvSize (0, 0) 509 | #endif 510 | ); 511 | 512 | /* if FIST gesture detected */ 513 | if (hands && hands->total > 0) { 514 | /* set frame buffer writable */ 515 | if (filter->display) { 516 | buffer = gst_buffer_make_writable (buffer); 517 | GST_DEBUG_OBJECT (filter, "%d FIST gestures detected\n", 518 | (int) hands->total); 519 | } 520 | /* Go through all detected FIST gestures to get the best one 521 | * prev_r => previous hand 522 | * best_r => best hand in this frame 523 | */ 524 | /* set min_distance for init comparison */ 525 | int min_distance = filter->cvImage->width + filter->cvImage->height; 526 | /* Init filter->prev_r */ 527 | CvRect temp_r = cvRect (0, 0, 0, 0); 528 | if (filter->prev_r == NULL) 529 | filter->prev_r = &temp_r; 530 | /* Get the best FIST gesture */ 531 | for (i = 0; i < (hands ? hands->total : 0); i++) { 532 | r = (CvRect *) cvGetSeqElem (hands, i); 533 | int distance = (int) sqrt (pow ((r->x - filter->prev_r->x), 534 | 2) + pow ((r->y - filter->prev_r->y), 2)); 535 | if (distance <= min_distance) { 536 | min_distance = distance; 537 | filter->best_r = r; 538 | } 539 | } 540 | /* Save best_r as prev_r for next frame comparison */ 541 | filter->prev_r = (CvRect *) filter->best_r; 542 | /* send msg to app/bus if the detected gesture falls in the region of interest */ 543 | /* get center point of gesture */ 544 | CvPoint c = 545 | cvPoint (filter->best_r->x + filter->best_r->width / 2, 546 | filter->best_r->y + filter->best_r->height / 2); 547 | /* send message: 548 | * if the center point is in the region of interest, OR, 549 | * if the region of interest remains default as (0,0,0,0)*/ 550 | if ((c.x >= filter->roi_x && c.x <= (filter->roi_x + filter->roi_width) 551 | && c.y >= filter->roi_y 552 | && c.y <= (filter->roi_y + filter->roi_height)) 553 | || (filter->roi_x == 0 554 | && filter->roi_y == 0 555 | && filter->roi_width == 0 && filter->roi_height == 0)) { 556 | /* Define structure for message post */ 557 | s = gst_structure_new ("hand-gesture", 558 | "gesture", G_TYPE_STRING, "fist", 559 | "x", G_TYPE_UINT, 560 | (uint) (filter->best_r->x + filter->best_r->width * 0.5), "y", 561 | G_TYPE_UINT, 562 | (uint) (filter->best_r->y + filter->best_r->height * 0.5), "width", 563 | G_TYPE_UINT, (uint) filter->best_r->width, "height", G_TYPE_UINT, 564 | (uint) filter->best_r->height, NULL); 565 | /* Init message element */ 566 | m = gst_message_new_element (GST_OBJECT (filter), s); 567 | /* Send message */ 568 | gst_element_post_message (GST_ELEMENT (filter), m); 569 | 570 | #if 0 571 | /* send event 572 | * here we use mouse-move event instead of fist-move or palm-move event 573 | * !!! this will CHANGE in the future !!! 574 | * !!! by adding gst_navigation_send_hand_detect_event() in navigation.c !!! 575 | */ 576 | gst_navigation_send_mouse_event (GST_NAVIGATION (filter), 577 | "mouse-move", 578 | 0, 579 | (double) (filter->best_r->x + filter->best_r->width * 0.5), 580 | (double) (filter->best_r->y + filter->best_r->height * 0.5)); 581 | #endif 582 | } 583 | /* Check filter->display, 584 | * If TRUE, displaying red circle marker in the out frame */ 585 | if (filter->display) { 586 | CvPoint center; 587 | int radius; 588 | center.x = cvRound ((filter->best_r->x + filter->best_r->width * 0.5)); 589 | center.y = cvRound ((filter->best_r->y + filter->best_r->height * 0.5)); 590 | radius = 591 | cvRound ((filter->best_r->width + filter->best_r->height) * 0.25); 592 | cvCircle (filter->cvImage, center, radius, CV_RGB (0, 0, 200), 1, 8, 0); 593 | } 594 | } else { 595 | /* if NO FIST gesture, detecting PALM gesture */ 596 | hands = 597 | cvHaarDetectObjects (filter->cvGray, filter->cvCascade_palm, 598 | filter->cvStorage, 1.1, 3, CV_HAAR_DO_CANNY_PRUNING, cvSize (24, 24) 599 | #if (CV_MAJOR_VERSION >= 2) && (CV_MINOR_VERSION >= 2) 600 | , cvSize (0, 0) 601 | #endif 602 | ); 603 | /* if PALM detected */ 604 | if (hands && hands->total > 0) { 605 | /* set frame buffer writable */ 606 | if (filter->display) { 607 | buffer = gst_buffer_make_writable (buffer); 608 | GST_DEBUG_OBJECT (filter, "%d PALM gestures detected\n", 609 | (int) hands->total); 610 | } 611 | /* Go through all detected PALM gestures to get the best one 612 | * prev_r => previous hand 613 | * best_r => best hand in this frame 614 | */ 615 | /* suppose a min_distance for init comparison */ 616 | int min_distance = filter->cvImage->width + filter->cvImage->height; 617 | /* Init filter->prev_r */ 618 | CvRect temp_r = cvRect (0, 0, 0, 0); 619 | if (filter->prev_r == NULL) 620 | filter->prev_r = &temp_r; 621 | /* Get the best PALM gesture */ 622 | for (i = 0; i < (hands ? hands->total : 0); i++) { 623 | r = (CvRect *) cvGetSeqElem (hands, i); 624 | int distance = (int) sqrt (pow ((r->x - filter->prev_r->x), 625 | 2) + pow ((r->y - filter->prev_r->y), 2)); 626 | if (distance <= min_distance) { 627 | min_distance = distance; 628 | filter->best_r = r; 629 | } 630 | } 631 | /* Save best_r as prev_r for next frame comparison */ 632 | filter->prev_r = (CvRect *) filter->best_r; 633 | 634 | /* send msg to app/bus if the detected gesture falls in the region of interest */ 635 | /* get center point of gesture */ 636 | CvPoint c = 637 | cvPoint (filter->best_r->x + filter->best_r->width / 2, 638 | filter->best_r->y + filter->best_r->height / 2); 639 | /* send message: 640 | * if the center point is in the region of interest, OR, 641 | * if the region of interest remains default as (0,0,0,0)*/ 642 | if ((c.x >= filter->roi_x && c.x <= (filter->roi_x + filter->roi_width) 643 | && c.y >= filter->roi_y 644 | && c.y <= (filter->roi_y + filter->roi_height)) 645 | || (filter->roi_x == 0 646 | && filter->roi_y == 0 647 | && filter->roi_width == 0 && filter->roi_height == 0)) { 648 | /* Define structure for message post */ 649 | s = gst_structure_new ("hand-gesture", 650 | "gesture", G_TYPE_STRING, "palm", 651 | "x", G_TYPE_UINT, 652 | (uint) (filter->best_r->x + filter->best_r->width * 0.5), "y", 653 | G_TYPE_UINT, 654 | (uint) (filter->best_r->y + filter->best_r->height * 0.5), "width", 655 | G_TYPE_UINT, (uint) filter->best_r->width, "height", G_TYPE_UINT, 656 | (uint) filter->best_r->height, NULL); 657 | /* Init message element */ 658 | m = gst_message_new_element (GST_OBJECT (filter), s); 659 | /* Send message */ 660 | gst_element_post_message (GST_ELEMENT (filter), m); 661 | 662 | #if 0 663 | /* send event 664 | * here we use mouse-move event instead of fist-move or palm-move event 665 | * !!! this will CHANGE in the future !!! 666 | * !!! by adding gst_navigation_send_hand_detect_event() in navigation.c !!! 667 | */ 668 | gst_navigation_send_mouse_event (GST_NAVIGATION (filter), 669 | "mouse-move", 670 | 0, 671 | (double) (filter->best_r->x + filter->best_r->width * 0.5), 672 | (double) (filter->best_r->y + filter->best_r->height * 0.5)); 673 | 674 | /* or use another way to send upstream navigation event for debug 675 | * 676 | * GstEvent *event = 677 | * gst_event_new_navigation (gst_structure_new 678 | * ("application/x-gst-navigation", "event", G_TYPE_STRING, 679 | * "mouse-move", 680 | * "button", G_TYPE_INT, 0, 681 | * "pointer_x", G_TYPE_DOUBLE, 682 | * (double) (filter->best_r->x + filter->best_r->width * 0.5), 683 | * "pointer_y", G_TYPE_DOUBLE, 684 | * (double) (filter->best_r->y + filter->best_r->height * 0.5), 685 | * NULL)); 686 | * gst_pad_send_event (GST_BASE_TRANSFORM_CAST (filter)->srcpad, event); 687 | */ 688 | #endif 689 | } 690 | /* Check filter->display, 691 | * If TRUE, displaying red circle marker in the out frame */ 692 | if (filter->display) { 693 | CvPoint center; 694 | int radius; 695 | center.x = cvRound ((filter->best_r->x + filter->best_r->width * 0.5)); 696 | center.y = cvRound ((filter->best_r->y + filter->best_r->height * 0.5)); 697 | radius = 698 | cvRound ((filter->best_r->width + filter->best_r->height) * 0.25); 699 | cvCircle (filter->cvImage, center, radius, CV_RGB (0, 0, 200), 1, 8, 0); 700 | } 701 | } 702 | } 703 | 704 | /* Push out the incoming buffer */ 705 | return GST_FLOW_OK; 706 | } 707 | 708 | static void 709 | gst_handdetect_load_profile (GstHanddetect * filter) 710 | { 711 | GST_DEBUG_OBJECT (filter, "Loading profiles...\n"); 712 | filter->cvCascade_fist = 713 | (CvHaarClassifierCascade *) cvLoad (filter->profile_fist, 0, 0, 0); 714 | filter->cvCascade_palm = 715 | (CvHaarClassifierCascade *) cvLoad (filter->profile_palm, 0, 0, 0); 716 | if (!filter->cvCascade_fist || !filter->cvCascade_palm) 717 | GST_WARNING_OBJECT (filter, 718 | "WARNING: Could not load HAAR classifier cascade: %s.\n", 719 | filter->profile_fist); 720 | else 721 | GST_DEBUG_OBJECT (filter, "Loaded profile %s\n", filter->profile_fist); 722 | if (!filter->cvCascade_palm) 723 | GST_WARNING_OBJECT (filter, 724 | "WARNING: Could not load HAAR classifier cascade: %s.\n", 725 | filter->profile_palm); 726 | else 727 | GST_DEBUG_OBJECT (filter, "Loaded profile %s\n", filter->profile_palm); 728 | } 729 | 730 | /* Entry point to initialize the plug-in 731 | * Initialize the plug-in itself 732 | * Register the element factories and other features 733 | */ 734 | static gboolean 735 | gst_handdetect_plugin_init (GstPlugin * plugin) 736 | { 737 | GST_DEBUG_CATEGORY_INIT (gst_handdetect_debug, 738 | "handdetect", 739 | 0, 740 | "Performs hand gesture detection (fist and palm), providing detected hand positions via bus messages/navigation events, and dealing with hand events"); 741 | return gst_element_register (plugin, "handdetect", GST_RANK_NONE, 742 | GST_TYPE_HANDDETECT); 743 | } 744 | 745 | /* PACKAGE: this is usually set by autotools depending on some _INIT macro 746 | * in configure.ac and then written into and defined in config.h, but we can 747 | * just set it ourselves here in case someone doesn't use autotools to 748 | * compile this code. GST_PLUGIN_DEFINE needs PACKAGE to be defined. 749 | */ 750 | #ifndef PACKAGE 751 | #define PACKAGE "gst_handdetect" 752 | #endif 753 | 754 | /* 755 | * Gstreamer looks for this structure to register handdetect 756 | */ 757 | GST_PLUGIN_DEFINE (GST_VERSION_MAJOR, 758 | GST_VERSION_MINOR, 759 | "handdetect", 760 | "Detect hand gestures for media operations", 761 | gst_handdetect_plugin_init, VERSION, "LGPL", "GStreamer", 762 | "http://gstreamer.net/") 763 | -------------------------------------------------------------------------------- /src/gsthanddetect.h: -------------------------------------------------------------------------------- 1 | /* 2 | * GStreamer 3 | * Copyright (C) 2005 Thomas Vander Stichele 4 | * Copyright (C) 2005 Ronald S. Bultje 5 | * Copyright (C) 2012 andol li <> 6 | * 7 | * Permission is hereby granted, free of charge, to any person obtaining a 8 | * copy of this software and associated documentation files (the "Software"), 9 | * to deal in the Software without restriction, including without limitation 10 | * the rights to use, copy, modify, merge, publish, distribute, sublicense, 11 | * and/or sell copies of the Software, and to permit persons to whom the 12 | * Software is furnished to do so, subject to the following conditions: 13 | * 14 | * The above copyright notice and this permission notice shall be included in 15 | * all copies or substantial portions of the Software. 16 | * 17 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 22 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 23 | * DEALINGS IN THE SOFTWARE. 24 | * 25 | * Alternatively, the contents of this file may be used under the 26 | * GNU Lesser General Public License Version 2.1 (the "LGPL"), in 27 | * which case the following provisions apply instead of the ones 28 | * mentioned above: 29 | * 30 | * This library is free software; you can redistribute it and/or 31 | * modify it under the terms of the GNU Library General Public 32 | * License as published by the Free Software Foundation; either 33 | * version 2 of the License, or (at your option) any later version. 34 | * 35 | * This library is distributed in the hope that it will be useful, 36 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 37 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 38 | * Library General Public License for more details. 39 | * 40 | * You should have received a copy of the GNU Library General Public 41 | * License along with this library; if not, write to the 42 | * Free Software Foundation, Inc., 59 Temple Place - Suite 330, 43 | * Boston, MA 02111-1307, USA. 44 | */ 45 | 46 | #ifndef __GST_HANDDETECT_H__ 47 | #define __GST_HANDDETECT_H__ 48 | 49 | #ifndef VERSION 50 | #define VERSION "0.10.36" /* for GST_PLUGIN_DEFINE use */ 51 | #endif 52 | 53 | #include 54 | #include 55 | #include 56 | #include 57 | #include 58 | #include "gstopencvvideofilter.h" 59 | /* opencv */ 60 | #include 61 | #include 62 | #include 63 | #if (CV_MAJOR_VERSION >= 2) && (CV_MINOR_VERSION >= 2) 64 | #include 65 | #endif 66 | 67 | G_BEGIN_DECLS 68 | /* #defines don't like whitespacey bits */ 69 | #define GST_TYPE_HANDDETECT \ 70 | (gst_handdetect_get_type()) 71 | #define GST_HANDDETECT(obj) \ 72 | (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_HANDDETECT,GstHanddetect)) 73 | #define GST_HANDDETECT_CLASS(klass) \ 74 | (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_HANDDETECT,GstHanddetectClass)) 75 | #define GST_IS_HANDDETECT(obj) \ 76 | (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_HANDDETECT)) 77 | #define GST_IS_HANDDETECT_CLASS(klass) \ 78 | (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_HANDDETECT)) 79 | typedef struct _GstHanddetect GstHanddetect; 80 | typedef struct _GstHanddetectClass GstHanddetectClass; 81 | 82 | struct _GstHanddetect 83 | { 84 | GstOpencvVideoFilter element; 85 | 86 | gboolean display; 87 | gchar *profile_fist; 88 | gchar *profile_palm; 89 | /* region of interest */ 90 | uint roi_x; 91 | uint roi_y; 92 | uint roi_width; 93 | uint roi_height; 94 | 95 | /* opencv 96 | * cvImage - image from video cam, 97 | * cvGray - cvt cvImage to gray colour 98 | */ 99 | IplImage *cvImage; 100 | IplImage *cvGray; 101 | CvHaarClassifierCascade *cvCascade_fist; 102 | CvHaarClassifierCascade *cvCascade_palm; 103 | CvMemStorage *cvStorage; 104 | CvMemStorage *cvStorage_palm; 105 | CvRect *prev_r; 106 | CvRect *best_r; 107 | }; 108 | 109 | struct _GstHanddetectClass 110 | { 111 | GstOpencvVideoFilterClass parent_class; 112 | }; 113 | 114 | GType gst_handdetect_get_type (void); 115 | 116 | G_END_DECLS 117 | #endif /* __GST_HANDDETECT_H__ */ 118 | -------------------------------------------------------------------------------- /src/gstopencvutils.c: -------------------------------------------------------------------------------- 1 | /* GStreamer 2 | * Copyright (C) <2010> Thiago Santos 3 | * 4 | * gstopencvutils.c: miscellaneous utility functions 5 | * 6 | * This library is free software; you can redistribute it and/or 7 | * modify it under the terms of the GNU Library General Public 8 | * License as published by the Free Software Foundation; either 9 | * version 2 of the License, or (at your option) any later version. 10 | * 11 | * This library is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 | * Library General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU Library General Public 17 | * License along with this library; if not, write to the 18 | * Free Software Foundation, Inc., 59 Temple Place - Suite 330, 19 | * Boston, MA 02111-1307, USA. 20 | */ 21 | 22 | #include "gstopencvutils.h" 23 | 24 | static gboolean 25 | gst_opencv_get_ipl_depth_and_channels (GstStructure * structure, 26 | gint * ipldepth, gint * channels, GError ** err) 27 | { 28 | gint depth, bpp; 29 | 30 | if (!gst_structure_get_int (structure, "depth", &depth) || 31 | !gst_structure_get_int (structure, "bpp", &bpp)) { 32 | g_set_error (err, GST_CORE_ERROR, GST_CORE_ERROR_NEGOTIATION, 33 | "No depth/bpp in caps"); 34 | return FALSE; 35 | } 36 | 37 | if (depth != bpp) { 38 | g_set_error (err, GST_CORE_ERROR, GST_CORE_ERROR_NEGOTIATION, 39 | "Depth and bpp should be equal"); 40 | return FALSE; 41 | } 42 | 43 | if (gst_structure_has_name (structure, "video/x-raw-rgb")) { 44 | *channels = 3; 45 | } else if (gst_structure_has_name (structure, "video/x-raw-gray")) { 46 | *channels = 1; 47 | } else { 48 | g_set_error (err, GST_CORE_ERROR, GST_CORE_ERROR_NEGOTIATION, 49 | "Unsupported caps %s", gst_structure_get_name (structure)); 50 | return FALSE; 51 | } 52 | 53 | if (depth / *channels == 8) { 54 | /* TODO signdness? */ 55 | *ipldepth = IPL_DEPTH_8U; 56 | } else if (depth / *channels == 16) { 57 | *ipldepth = IPL_DEPTH_16U; 58 | } else { 59 | g_set_error (err, GST_CORE_ERROR, GST_CORE_ERROR_NEGOTIATION, 60 | "Unsupported depth/channels %d/%d", depth, *channels); 61 | return FALSE; 62 | } 63 | 64 | return TRUE; 65 | } 66 | 67 | gboolean 68 | gst_opencv_parse_iplimage_params_from_structure (GstStructure * structure, 69 | gint * width, gint * height, gint * ipldepth, gint * channels, 70 | GError ** err) 71 | { 72 | if (!gst_opencv_get_ipl_depth_and_channels (structure, ipldepth, channels, 73 | err)) { 74 | return FALSE; 75 | } 76 | 77 | if (!gst_structure_get_int (structure, "width", width) || 78 | !gst_structure_get_int (structure, "height", height)) { 79 | g_set_error (err, GST_CORE_ERROR, GST_CORE_ERROR_NEGOTIATION, 80 | "No width/height in caps"); 81 | return FALSE; 82 | } 83 | 84 | return TRUE; 85 | } 86 | 87 | gboolean 88 | gst_opencv_parse_iplimage_params_from_caps (GstCaps * caps, gint * width, 89 | gint * height, gint * ipldepth, gint * channels, GError ** err) 90 | { 91 | return 92 | gst_opencv_parse_iplimage_params_from_structure (gst_caps_get_structure 93 | (caps, 0), width, height, ipldepth, channels, err); 94 | } 95 | 96 | GstCaps * 97 | gst_opencv_caps_from_cv_image_type (int cv_type) 98 | { 99 | GstCaps *caps = gst_caps_new_empty (); 100 | switch (cv_type) { 101 | case CV_8UC1: 102 | gst_caps_append (caps, gst_caps_from_string (GST_VIDEO_CAPS_GRAY8)); 103 | break; 104 | case CV_8UC3: 105 | gst_caps_append (caps, gst_caps_from_string (GST_VIDEO_CAPS_RGB)); 106 | gst_caps_append (caps, gst_caps_from_string (GST_VIDEO_CAPS_BGR)); 107 | break; 108 | case CV_8UC4: 109 | gst_caps_append (caps, gst_caps_from_string (GST_VIDEO_CAPS_RGBx)); 110 | gst_caps_append (caps, gst_caps_from_string (GST_VIDEO_CAPS_xRGB)); 111 | gst_caps_append (caps, gst_caps_from_string (GST_VIDEO_CAPS_BGRx)); 112 | gst_caps_append (caps, gst_caps_from_string (GST_VIDEO_CAPS_xBGR)); 113 | gst_caps_append (caps, gst_caps_from_string (GST_VIDEO_CAPS_RGBA)); 114 | gst_caps_append (caps, gst_caps_from_string (GST_VIDEO_CAPS_ARGB)); 115 | gst_caps_append (caps, gst_caps_from_string (GST_VIDEO_CAPS_BGRA)); 116 | gst_caps_append (caps, gst_caps_from_string (GST_VIDEO_CAPS_ABGR)); 117 | break; 118 | case CV_16UC1: 119 | gst_caps_append (caps, 120 | gst_caps_from_string (GST_VIDEO_CAPS_GRAY16 ("1234"))); 121 | gst_caps_append (caps, 122 | gst_caps_from_string (GST_VIDEO_CAPS_GRAY16 ("4321"))); 123 | break; 124 | } 125 | return caps; 126 | } 127 | -------------------------------------------------------------------------------- /src/gstopencvutils.h: -------------------------------------------------------------------------------- 1 | /* GStreamer 2 | * Copyright (C) <2010> Thiago Santos 3 | * 4 | * gstopencvutils.h: miscellaneous utility functions 5 | * 6 | * This library is free software; you can redistribute it and/or 7 | * modify it under the terms of the GNU Library General Public 8 | * License as published by the Free Software Foundation; either 9 | * version 2 of the License, or (at your option) any later version. 10 | * 11 | * This library is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 | * Library General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU Library General Public 17 | * License along with this library; if not, write to the 18 | * Free Software Foundation, Inc., 59 Temple Place - Suite 330, 19 | * Boston, MA 02111-1307, USA. 20 | */ 21 | 22 | #ifndef __GST_OPENCV_UTILS__ 23 | #define __GST_OPENCV_UTILS__ 24 | 25 | #ifdef HAVE_CONFIG_H 26 | #include "config.h" 27 | #endif 28 | 29 | #include 30 | #include 31 | 32 | #include 33 | 34 | gboolean 35 | gst_opencv_get_ipldepth (gint depth, gint bpp, gint * ipldepth); 36 | 37 | gboolean gst_opencv_parse_iplimage_params_from_caps 38 | (GstCaps * caps, gint * width, gint * height, gint * depth, 39 | gint * channels, GError ** err); 40 | gboolean gst_opencv_parse_iplimage_params_from_structure 41 | (GstStructure * structure, gint * width, gint * height, gint * depth, 42 | gint * channels, GError ** err); 43 | 44 | GstCaps * gst_opencv_caps_from_cv_image_type (int cv_type); 45 | 46 | #endif /* __GST_OPENCV_UTILS__ */ 47 | -------------------------------------------------------------------------------- /src/gstopencvvideofilter.c: -------------------------------------------------------------------------------- 1 | /* 2 | * GStreamer 3 | * Copyright (C) 2010 Thiago Santos 4 | * 5 | * Permission is hereby granted, free of charge, to any person obtaining a 6 | * copy of this software and associated documentation files (the "Software"), 7 | * to deal in the Software without restriction, including without limitation 8 | * the rights to use, copy, modify, merge, publish, distribute, sublicense, 9 | * and/or sell copies of the Software, and to permit persons to whom the 10 | * Software is furnished to do so, subject to the following conditions: 11 | * 12 | * The above copyright notice and this permission notice shall be included in 13 | * all copies or substantial portions of the Software. 14 | * 15 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 20 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 21 | * DEALINGS IN THE SOFTWARE. 22 | * 23 | * Alternatively, the contents of this file may be used under the 24 | * GNU Lesser General Public License Version 2.1 (the "LGPL"), in 25 | * which case the following provisions apply instead of the ones 26 | * mentioned above: 27 | * 28 | * This library is free software; you can redistribute it and/or 29 | * modify it under the terms of the GNU Library General Public 30 | * License as published by the Free Software Foundation; either 31 | * version 2 of the License, or (at your option) any later version. 32 | * 33 | * This library is distributed in the hope that it will be useful, 34 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 35 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 36 | * Library General Public License for more details. 37 | * 38 | * You should have received a copy of the GNU Library General Public 39 | * License along with this library; if not, write to the 40 | * Free Software Foundation, Inc., 59 Temple Place - Suite 330, 41 | * Boston, MA 02111-1307, USA. 42 | */ 43 | 44 | /* TODO opencv can do scaling for some cases */ 45 | 46 | #ifdef HAVE_CONFIG_H 47 | # include 48 | #endif 49 | 50 | #include 51 | 52 | #include "gstopencvvideofilter.h" 53 | #include "gstopencvutils.h" 54 | 55 | GST_DEBUG_CATEGORY_STATIC (gst_opencv_video_filter_debug); 56 | #define GST_CAT_DEFAULT gst_opencv_video_filter_debug 57 | 58 | /* Filter signals and args */ 59 | enum 60 | { 61 | /* FILL ME */ 62 | LAST_SIGNAL 63 | }; 64 | 65 | enum 66 | { 67 | PROP_0 68 | }; 69 | 70 | static GstElementClass *parent_class = NULL; 71 | 72 | static void gst_opencv_video_filter_class_init (GstOpencvVideoFilterClass * 73 | klass); 74 | static void gst_opencv_video_filter_init (GstOpencvVideoFilter * trans, 75 | GstOpencvVideoFilterClass * klass); 76 | static void gst_opencv_video_filter_base_init (gpointer gclass); 77 | 78 | static gboolean gst_opencv_video_filter_set_caps (GstBaseTransform * trans, 79 | GstCaps * incaps, GstCaps * outcaps); 80 | static GstFlowReturn gst_opencv_video_filter_transform_ip (GstBaseTransform * 81 | trans, GstBuffer * buf); 82 | static GstFlowReturn gst_opencv_video_filter_transform (GstBaseTransform * 83 | trans, GstBuffer * inbuf, GstBuffer * outbuf); 84 | 85 | static void gst_opencv_video_filter_set_property (GObject * object, 86 | guint prop_id, const GValue * value, GParamSpec * pspec); 87 | static void gst_opencv_video_filter_get_property (GObject * object, 88 | guint prop_id, GValue * value, GParamSpec * pspec); 89 | 90 | GType 91 | gst_opencv_video_filter_get_type (void) 92 | { 93 | static volatile gsize opencv_base_transform_type = 0; 94 | 95 | if (g_once_init_enter (&opencv_base_transform_type)) { 96 | GType _type; 97 | static const GTypeInfo opencv_base_transform_info = { 98 | sizeof (GstOpencvVideoFilterClass), 99 | (GBaseInitFunc) gst_opencv_video_filter_base_init, 100 | NULL, 101 | (GClassInitFunc) gst_opencv_video_filter_class_init, 102 | NULL, 103 | NULL, 104 | sizeof (GstOpencvVideoFilter), 105 | 0, 106 | (GInstanceInitFunc) gst_opencv_video_filter_init, 107 | }; 108 | 109 | _type = g_type_register_static (GST_TYPE_VIDEO_FILTER, 110 | "GstOpencvVideoFilter", &opencv_base_transform_info, 111 | G_TYPE_FLAG_ABSTRACT); 112 | g_once_init_leave (&opencv_base_transform_type, _type); 113 | } 114 | return opencv_base_transform_type; 115 | } 116 | 117 | /* Clean up */ 118 | static void 119 | gst_opencv_video_filter_finalize (GObject * obj) 120 | { 121 | GstOpencvVideoFilter *transform = GST_OPENCV_VIDEO_FILTER (obj); 122 | 123 | if (transform->cvImage) 124 | cvReleaseImage (&transform->cvImage); 125 | 126 | G_OBJECT_CLASS (parent_class)->finalize (obj); 127 | } 128 | 129 | /* GObject vmethod implementations */ 130 | static void 131 | gst_opencv_video_filter_base_init (gpointer gclass) 132 | { 133 | } 134 | 135 | static void 136 | gst_opencv_video_filter_class_init (GstOpencvVideoFilterClass * klass) 137 | { 138 | GObjectClass *gobject_class; 139 | GstBaseTransformClass *basetrans_class; 140 | 141 | gobject_class = (GObjectClass *) klass; 142 | basetrans_class = (GstBaseTransformClass *) klass; 143 | parent_class = g_type_class_peek_parent (klass); 144 | 145 | GST_DEBUG_CATEGORY_INIT (gst_opencv_video_filter_debug, 146 | "opencvbasetransform", 0, "opencvbasetransform element"); 147 | 148 | gobject_class->finalize = 149 | GST_DEBUG_FUNCPTR (gst_opencv_video_filter_finalize); 150 | gobject_class->set_property = gst_opencv_video_filter_set_property; 151 | gobject_class->get_property = gst_opencv_video_filter_get_property; 152 | 153 | basetrans_class->transform = gst_opencv_video_filter_transform; 154 | basetrans_class->transform_ip = gst_opencv_video_filter_transform_ip; 155 | basetrans_class->set_caps = gst_opencv_video_filter_set_caps; 156 | } 157 | 158 | static void 159 | gst_opencv_video_filter_init (GstOpencvVideoFilter * transform, 160 | GstOpencvVideoFilterClass * bclass) 161 | { 162 | } 163 | 164 | static GstFlowReturn 165 | gst_opencv_video_filter_transform (GstBaseTransform * trans, 166 | GstBuffer * inbuf, GstBuffer * outbuf) 167 | { 168 | GstOpencvVideoFilter *transform; 169 | GstOpencvVideoFilterClass *fclass; 170 | 171 | transform = GST_OPENCV_VIDEO_FILTER (trans); 172 | fclass = GST_OPENCV_VIDEO_FILTER_GET_CLASS (transform); 173 | 174 | g_return_val_if_fail (fclass->cv_trans_func != NULL, GST_FLOW_ERROR); 175 | g_return_val_if_fail (transform->cvImage != NULL, GST_FLOW_ERROR); 176 | g_return_val_if_fail (transform->out_cvImage != NULL, GST_FLOW_ERROR); 177 | 178 | transform->cvImage->imageData = (char *) GST_BUFFER_DATA (inbuf); 179 | transform->out_cvImage->imageData = (char *) GST_BUFFER_DATA (outbuf); 180 | return fclass->cv_trans_func (transform, inbuf, transform->cvImage, outbuf, 181 | transform->out_cvImage); 182 | } 183 | 184 | static GstFlowReturn 185 | gst_opencv_video_filter_transform_ip (GstBaseTransform * trans, 186 | GstBuffer * buffer) 187 | { 188 | GstOpencvVideoFilter *transform; 189 | GstOpencvVideoFilterClass *fclass; 190 | 191 | transform = GST_OPENCV_VIDEO_FILTER (trans); 192 | fclass = GST_OPENCV_VIDEO_FILTER_GET_CLASS (transform); 193 | 194 | g_return_val_if_fail (fclass->cv_trans_ip_func != NULL, GST_FLOW_ERROR); 195 | g_return_val_if_fail (transform->cvImage != NULL, GST_FLOW_ERROR); 196 | 197 | /* TODO this is not always needed and should be solved at BaseTransform 198 | * level */ 199 | buffer = gst_buffer_make_writable (buffer); 200 | 201 | transform->cvImage->imageData = (char *) GST_BUFFER_DATA (buffer); 202 | 203 | /* FIXME how to release buffer? */ 204 | return fclass->cv_trans_ip_func (transform, buffer, transform->cvImage); 205 | } 206 | 207 | static gboolean 208 | gst_opencv_video_filter_set_caps (GstBaseTransform * trans, GstCaps * incaps, 209 | GstCaps * outcaps) 210 | { 211 | GstOpencvVideoFilter *transform = GST_OPENCV_VIDEO_FILTER (trans); 212 | GstOpencvVideoFilterClass *klass = 213 | GST_OPENCV_VIDEO_FILTER_GET_CLASS (transform); 214 | gint in_width, in_height; 215 | gint in_depth, in_channels; 216 | gint out_width, out_height; 217 | gint out_depth, out_channels; 218 | GError *in_err = NULL; 219 | GError *out_err = NULL; 220 | 221 | if (!gst_opencv_parse_iplimage_params_from_caps (incaps, &in_width, 222 | &in_height, &in_depth, &in_channels, &in_err)) { 223 | GST_WARNING_OBJECT (transform, "Failed to parse input caps: %s", 224 | in_err->message); 225 | g_error_free (in_err); 226 | return FALSE; 227 | } 228 | 229 | if (!gst_opencv_parse_iplimage_params_from_caps (outcaps, &out_width, 230 | &out_height, &out_depth, &out_channels, &out_err)) { 231 | GST_WARNING_OBJECT (transform, "Failed to parse output caps: %s", 232 | out_err->message); 233 | g_error_free (out_err); 234 | return FALSE; 235 | } 236 | 237 | if (klass->cv_set_caps) { 238 | if (!klass->cv_set_caps (transform, in_width, in_height, in_depth, 239 | in_channels, out_width, out_height, out_depth, out_channels)) 240 | return FALSE; 241 | } 242 | 243 | if (transform->cvImage) { 244 | cvReleaseImage (&transform->cvImage); 245 | } 246 | if (transform->out_cvImage) { 247 | cvReleaseImage (&transform->out_cvImage); 248 | } 249 | 250 | transform->cvImage = 251 | cvCreateImageHeader (cvSize (in_width, in_height), in_depth, in_channels); 252 | transform->out_cvImage = 253 | cvCreateImageHeader (cvSize (out_width, out_height), out_depth, 254 | out_channels); 255 | 256 | gst_base_transform_set_in_place (GST_BASE_TRANSFORM (transform), 257 | transform->in_place); 258 | return TRUE; 259 | } 260 | 261 | static void 262 | gst_opencv_video_filter_set_property (GObject * object, guint prop_id, 263 | const GValue * value, GParamSpec * pspec) 264 | { 265 | switch (prop_id) { 266 | default: 267 | G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); 268 | break; 269 | } 270 | } 271 | 272 | static void 273 | gst_opencv_video_filter_get_property (GObject * object, guint prop_id, 274 | GValue * value, GParamSpec * pspec) 275 | { 276 | switch (prop_id) { 277 | default: 278 | G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); 279 | break; 280 | } 281 | } 282 | 283 | void 284 | gst_opencv_video_filter_set_in_place (GstOpencvVideoFilter * transform, 285 | gboolean ip) 286 | { 287 | transform->in_place = ip; 288 | gst_base_transform_set_in_place (GST_BASE_TRANSFORM (transform), ip); 289 | } 290 | -------------------------------------------------------------------------------- /src/gstopencvvideofilter.h: -------------------------------------------------------------------------------- 1 | /* 2 | * GStreamer 3 | * Copyright (C) 2010 Thiago Santos 4 | * 5 | * Permission is hereby granted, free of charge, to any person obtaining a 6 | * copy of this software and associated documentation files (the "Software"), 7 | * to deal in the Software without restriction, including without limitation 8 | * the rights to use, copy, modify, merge, publish, distribute, sublicense, 9 | * and/or sell copies of the Software, and to permit persons to whom the 10 | * Software is furnished to do so, subject to the following conditions: 11 | * 12 | * The above copyright notice and this permission notice shall be included in 13 | * all copies or substantial portions of the Software. 14 | * 15 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 20 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 21 | * DEALINGS IN THE SOFTWARE. 22 | * 23 | * Alternatively, the contents of this file may be used under the 24 | * GNU Lesser General Public License Version 2.1 (the "LGPL"), in 25 | * which case the following provisions apply instead of the ones 26 | * mentioned above: 27 | * 28 | * This library is free software; you can redistribute it and/or 29 | * modify it under the terms of the GNU Library General Public 30 | * License as published by the Free Software Foundation; either 31 | * version 2 of the License, or (at your option) any later version. 32 | * 33 | * This library is distributed in the hope that it will be useful, 34 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 35 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 36 | * Library General Public License for more details. 37 | * 38 | * You should have received a copy of the GNU Library General Public 39 | * License along with this library; if not, write to the 40 | * Free Software Foundation, Inc., 59 Temple Place - Suite 330, 41 | * Boston, MA 02111-1307, USA. 42 | */ 43 | 44 | #ifndef __GST_OPENCV_VIDEO_FILTER_H__ 45 | #define __GST_OPENCV_VIDEO_FILTER_H__ 46 | 47 | #include 48 | #include 49 | #include 50 | 51 | G_BEGIN_DECLS 52 | /* #defines don't like whitespacey bits */ 53 | #define GST_TYPE_OPENCV_VIDEO_FILTER \ 54 | (gst_opencv_video_filter_get_type()) 55 | #define GST_OPENCV_VIDEO_FILTER(obj) \ 56 | (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_OPENCV_VIDEO_FILTER,GstOpencvVideoFilter)) 57 | #define GST_OPENCV_VIDEO_FILTER_CLASS(klass) \ 58 | (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_OPENCV_VIDEO_FILTER,GstOpencvVideoFilterClass)) 59 | #define GST_IS_OPENCV_VIDEO_FILTER(obj) \ 60 | (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_OPENCV_VIDEO_FILTER)) 61 | #define GST_IS_OPENCV_VIDEO_FILTER_CLASS(klass) \ 62 | (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_OPENCV_VIDEO_FILTER)) 63 | #define GST_OPENCV_VIDEO_FILTER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj),GST_TYPE_OPENCV_VIDEO_FILTER,GstOpencvVideoFilterClass)) 64 | #define GST_OPENCV_VIDEO_FILTER_CAST(obj) ((GstOpencvVideoFilter *) (obj)) 65 | 66 | typedef struct _GstOpencvVideoFilter GstOpencvVideoFilter; 67 | typedef struct _GstOpencvVideoFilterClass GstOpencvVideoFilterClass; 68 | 69 | typedef GstFlowReturn (*GstOpencvVideoFilterTransformIPFunc) 70 | (GstOpencvVideoFilter * transform, GstBuffer * buffer, IplImage * img); 71 | typedef GstFlowReturn (*GstOpencvVideoFilterTransformFunc) 72 | (GstOpencvVideoFilter * transform, GstBuffer * buffer, IplImage * img, 73 | GstBuffer * outbuf, IplImage * outimg); 74 | 75 | typedef gboolean (*GstOpencvVideoFilterSetCaps) 76 | (GstOpencvVideoFilter * transform, gint in_width, gint in_height, 77 | gint in_depth, gint in_channels, gint out_width, gint out_height, 78 | gint out_depth, gint out_channels); 79 | 80 | struct _GstOpencvVideoFilter 81 | { 82 | GstVideoFilter trans; 83 | 84 | gboolean in_place; 85 | 86 | IplImage *cvImage; 87 | IplImage *out_cvImage; 88 | }; 89 | 90 | struct _GstOpencvVideoFilterClass 91 | { 92 | GstVideoFilterClass parent_class; 93 | 94 | GstOpencvVideoFilterTransformFunc cv_trans_func; 95 | GstOpencvVideoFilterTransformIPFunc cv_trans_ip_func; 96 | 97 | GstOpencvVideoFilterSetCaps cv_set_caps; 98 | }; 99 | 100 | GType gst_opencv_video_filter_get_type (void); 101 | 102 | void gst_opencv_video_filter_set_in_place (GstOpencvVideoFilter * transform, 103 | gboolean ip); 104 | 105 | G_END_DECLS 106 | #endif /* __GST_OPENCV_VIDEO_FILTER_H__ */ 107 | -------------------------------------------------------------------------------- /src/xml/fist.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 24 24 6 | 7 | <_> 8 | 9 | 10 | <_> 11 | 12 | <_> 13 | 14 | 15 | 16 | <_> 17 | 3 3 9 16 -1. 18 | <_> 19 | 3 7 9 8 2. 20 | 0 21 | -0.0223442204296589 22 | 0.7737345099449158 23 | -0.9436557292938232 24 | <_> 25 | 26 | <_> 27 | 28 | 29 | 30 | <_> 31 | 0 9 12 5 -1. 32 | <_> 33 | 6 9 6 5 2. 34 | 0 35 | -9.3714958056807518e-003 36 | 0.5525149106979370 37 | -0.9004204869270325 38 | -0.3911409080028534 39 | -1 40 | -1 41 | <_> 42 | 43 | 44 | <_> 45 | 46 | <_> 47 | 48 | 49 | 50 | <_> 51 | 12 14 12 10 -1. 52 | <_> 53 | 12 14 6 5 2. 54 | <_> 55 | 18 19 6 5 2. 56 | 0 57 | 0.0127444602549076 58 | -0.7241874933242798 59 | 0.5557708144187927 60 | <_> 61 | 62 | <_> 63 | 64 | 65 | 66 | <_> 67 | 2 4 16 8 -1. 68 | <_> 69 | 2 8 16 4 2. 70 | 0 71 | -0.0203973893076181 72 | 0.3255875110626221 73 | -0.9134256243705750 74 | <_> 75 | 76 | <_> 77 | 78 | 79 | 80 | <_> 81 | 9 6 15 14 -1. 82 | <_> 83 | 9 13 15 7 2. 84 | 0 85 | 1.5015050303190947e-003 86 | -0.8422530293464661 87 | 0.2950277030467987 88 | <_> 89 | 90 | <_> 91 | 92 | 93 | 94 | <_> 95 | 0 10 10 5 -1. 96 | <_> 97 | 5 10 5 5 2. 98 | 0 99 | -9.5540005713701248e-003 100 | 0.2949278056621552 101 | -0.8186870813369751 102 | <_> 103 | 104 | <_> 105 | 106 | 107 | 108 | <_> 109 | 8 0 16 6 -1. 110 | <_> 111 | 8 0 16 3 2. 112 | 1 113 | -9.0454015880823135e-003 114 | -0.9253956079483032 115 | 0.2449316978454590 116 | -0.8027257919311523 117 | 0 118 | -1 119 | <_> 120 | 121 | 122 | <_> 123 | 124 | <_> 125 | 126 | 127 | 128 | <_> 129 | 11 9 9 6 -1. 130 | <_> 131 | 14 12 3 6 3. 132 | 1 133 | 0.0339135192334652 134 | -0.6010565757751465 135 | 0.5952491760253906 136 | <_> 137 | 138 | <_> 139 | 140 | 141 | 142 | <_> 143 | 15 1 8 10 -1. 144 | <_> 145 | 15 6 8 5 2. 146 | 0 147 | -6.3976310193538666e-003 148 | 0.2902083992958069 149 | -0.9008722901344299 150 | <_> 151 | 152 | <_> 153 | 154 | 155 | 156 | <_> 157 | 12 23 12 1 -1. 158 | <_> 159 | 18 23 6 1 2. 160 | 0 161 | 3.5964029375463724e-003 162 | -0.6108912825584412 163 | 0.3585815131664276 164 | <_> 165 | 166 | <_> 167 | 168 | 169 | 170 | <_> 171 | 0 8 16 11 -1. 172 | <_> 173 | 8 8 8 11 2. 174 | 0 175 | 3.1002631294541061e-004 176 | 0.2521544992923737 177 | -0.9231098890304565 178 | -0.6695849895477295 179 | 1 180 | -1 181 | <_> 182 | 183 | 184 | <_> 185 | 186 | <_> 187 | 188 | 189 | 190 | <_> 191 | 12 22 12 2 -1. 192 | <_> 193 | 18 22 6 2 2. 194 | 0 195 | 8.9982077479362488e-003 196 | -0.6216139197349548 197 | 0.5311666131019592 198 | <_> 199 | 200 | <_> 201 | 202 | 203 | 204 | <_> 205 | 6 7 10 5 -1. 206 | <_> 207 | 6 7 5 5 2. 208 | 1 209 | 5.8961678296327591e-003 210 | 0.3589088022708893 211 | -0.8741096854209900 212 | <_> 213 | 214 | <_> 215 | 216 | 217 | 218 | <_> 219 | 10 8 3 2 -1. 220 | <_> 221 | 10 9 3 1 2. 222 | 0 223 | -7.3489747592248023e-005 224 | 0.2021690011024475 225 | -0.8340616226196289 226 | <_> 227 | 228 | <_> 229 | 230 | 231 | 232 | <_> 233 | 15 15 3 4 -1. 234 | <_> 235 | 15 15 3 2 2. 236 | 1 237 | -1.3183970004320145e-003 238 | -0.8218436241149902 239 | 0.2309758067131043 240 | -0.9460288882255554 241 | 2 242 | -1 243 | <_> 244 | 245 | 246 | <_> 247 | 248 | <_> 249 | 250 | 251 | 252 | <_> 253 | 4 18 20 6 -1. 254 | <_> 255 | 4 18 10 3 2. 256 | <_> 257 | 14 21 10 3 2. 258 | 0 259 | 5.8955969288945198e-003 260 | -0.7554979920387268 261 | 0.3239434063434601 262 | <_> 263 | 264 | <_> 265 | 266 | 267 | 268 | <_> 269 | 3 1 20 14 -1. 270 | <_> 271 | 3 1 10 7 2. 272 | <_> 273 | 13 8 10 7 2. 274 | 0 275 | 8.6170788854360580e-003 276 | -0.7028874754905701 277 | 0.2782224118709564 278 | <_> 279 | 280 | <_> 281 | 282 | 283 | 284 | <_> 285 | 2 11 3 9 -1. 286 | <_> 287 | 3 14 1 3 9. 288 | 0 289 | -1.5837070532143116e-003 290 | -0.7751926779747009 291 | 0.2773326933383942 292 | <_> 293 | 294 | <_> 295 | 296 | 297 | 298 | <_> 299 | 0 4 12 20 -1. 300 | <_> 301 | 0 4 6 10 2. 302 | <_> 303 | 6 14 6 10 2. 304 | 0 305 | 7.9292394220829010e-003 306 | -0.7723438143730164 307 | 0.2167312055826187 308 | <_> 309 | 310 | <_> 311 | 312 | 313 | 314 | <_> 315 | 16 15 6 2 -1. 316 | <_> 317 | 16 15 6 1 2. 318 | 1 319 | -1.4443190302699804e-003 320 | -0.8843228220939636 321 | 0.2078661024570465 322 | <_> 323 | 324 | <_> 325 | 326 | 327 | 328 | <_> 329 | 11 8 7 2 -1. 330 | <_> 331 | 11 9 7 1 2. 332 | 0 333 | -4.8251380212605000e-004 334 | 0.2337501049041748 335 | -0.6776664853096008 336 | <_> 337 | 338 | <_> 339 | 340 | 341 | 342 | <_> 343 | 20 15 4 6 -1. 344 | <_> 345 | 22 15 2 6 2. 346 | 0 347 | 8.0077340826392174e-003 348 | -0.3731102049350739 349 | 0.5163818001747131 350 | -1.0588489770889282 351 | 3 352 | -1 353 | <_> 354 | 355 | 356 | <_> 357 | 358 | <_> 359 | 360 | 361 | 362 | <_> 363 | 14 19 1 2 -1. 364 | <_> 365 | 14 20 1 1 2. 366 | 0 367 | -5.8145709772361442e-005 368 | 0.3404448032379150 369 | -0.6792302131652832 370 | <_> 371 | 372 | <_> 373 | 374 | 375 | 376 | <_> 377 | 0 6 2 7 -1. 378 | <_> 379 | 1 6 1 7 2. 380 | 0 381 | -1.1419489746913314e-003 382 | 0.3598371148109436 383 | -0.5890597105026245 384 | <_> 385 | 386 | <_> 387 | 388 | 389 | 390 | <_> 391 | 8 0 10 2 -1. 392 | <_> 393 | 8 0 5 2 2. 394 | 1 395 | 5.8654937893152237e-003 396 | -0.9622359871864319 397 | 0.1721540987491608 398 | <_> 399 | 400 | <_> 401 | 402 | 403 | 404 | <_> 405 | 5 8 16 7 -1. 406 | <_> 407 | 13 8 8 7 2. 408 | 0 409 | 1.1028599692508578e-004 410 | -0.7706093192100525 411 | 0.2389315962791443 412 | <_> 413 | 414 | <_> 415 | 416 | 417 | 418 | <_> 419 | 2 9 14 12 -1. 420 | <_> 421 | 9 9 7 12 2. 422 | 0 423 | 0.0145609602332115 424 | 0.1552716046571732 425 | -0.8984915018081665 426 | -0.7966647148132324 427 | 4 428 | -1 429 | <_> 430 | 431 | 432 | <_> 433 | 434 | <_> 435 | 436 | 437 | 438 | <_> 439 | 2 11 6 10 -1. 440 | <_> 441 | 2 11 3 5 2. 442 | <_> 443 | 5 16 3 5 2. 444 | 0 445 | 3.9159432053565979e-003 446 | -0.7370954751968384 447 | 0.2886646091938019 448 | <_> 449 | 450 | <_> 451 | 452 | 453 | 454 | <_> 455 | 0 3 4 9 -1. 456 | <_> 457 | 2 3 2 9 2. 458 | 0 459 | -4.6402178704738617e-003 460 | 0.3129867017269135 461 | -0.5601897239685059 462 | <_> 463 | 464 | <_> 465 | 466 | 467 | 468 | <_> 469 | 7 10 10 8 -1. 470 | <_> 471 | 12 10 5 8 2. 472 | 0 473 | -4.2656981386244297e-003 474 | -0.8286197781562805 475 | 0.2132489979267120 476 | <_> 477 | 478 | <_> 479 | 480 | 481 | 482 | <_> 483 | 8 16 16 8 -1. 484 | <_> 485 | 8 16 8 4 2. 486 | <_> 487 | 16 20 8 4 2. 488 | 0 489 | 7.9925684258341789e-003 490 | -0.6752548217773438 491 | 0.2340082973241806 492 | <_> 493 | 494 | <_> 495 | 496 | 497 | 498 | <_> 499 | 4 13 6 3 -1. 500 | <_> 501 | 6 15 2 3 3. 502 | 1 503 | -6.2725958414375782e-003 504 | -0.7839264273643494 505 | 0.2019792944192886 506 | <_> 507 | 508 | <_> 509 | 510 | 511 | 512 | <_> 513 | 13 3 11 18 -1. 514 | <_> 515 | 13 12 11 9 2. 516 | 0 517 | -0.0288890209048986 518 | -0.7889788150787354 519 | 0.1651563942432404 520 | <_> 521 | 522 | <_> 523 | 524 | 525 | 526 | <_> 527 | 10 7 5 4 -1. 528 | <_> 529 | 10 9 5 2 2. 530 | 0 531 | -1.5122259501367807e-003 532 | 0.1971655040979385 533 | -0.7596625089645386 534 | <_> 535 | 536 | <_> 537 | 538 | 539 | 540 | <_> 541 | 11 17 6 3 -1. 542 | <_> 543 | 13 18 2 1 9. 544 | 0 545 | 4.3620187789201736e-003 546 | 0.1344974040985107 547 | -0.9309347271919251 548 | <_> 549 | 550 | <_> 551 | 552 | 553 | 554 | <_> 555 | 12 7 12 17 -1. 556 | <_> 557 | 15 7 6 17 2. 558 | 0 559 | -3.2192119397222996e-003 560 | 0.2437663972377777 561 | -0.6044244170188904 562 | -1.0856239795684814 563 | 5 564 | -1 565 | <_> 566 | 567 | 568 | <_> 569 | 570 | <_> 571 | 572 | 573 | 574 | <_> 575 | 14 18 1 2 -1. 576 | <_> 577 | 14 19 1 1 2. 578 | 0 579 | -4.3883759644813836e-005 580 | 0.3130159080028534 581 | -0.6793813705444336 582 | <_> 583 | 584 | <_> 585 | 586 | 587 | 588 | <_> 589 | 3 11 6 12 -1. 590 | <_> 591 | 3 11 3 6 2. 592 | <_> 593 | 6 17 3 6 2. 594 | 0 595 | 6.2022951897233725e-004 596 | -0.8423554897308350 597 | 0.1801322996616364 598 | <_> 599 | 600 | <_> 601 | 602 | 603 | 604 | <_> 605 | 22 13 2 7 -1. 606 | <_> 607 | 23 13 1 7 2. 608 | 0 609 | 1.0972339659929276e-003 610 | -0.4771775007247925 611 | 0.3450973927974701 612 | <_> 613 | 614 | <_> 615 | 616 | 617 | 618 | <_> 619 | 16 15 1 2 -1. 620 | <_> 621 | 16 15 1 1 2. 622 | 1 623 | -2.6349889230914414e-004 624 | -0.7629253864288330 625 | 0.2153723984956741 626 | <_> 627 | 628 | <_> 629 | 630 | 631 | 632 | <_> 633 | 0 5 22 18 -1. 634 | <_> 635 | 0 14 22 9 2. 636 | 0 637 | -0.0542980991303921 638 | -0.8849576711654663 639 | 0.1730009019374847 640 | <_> 641 | 642 | <_> 643 | 644 | 645 | 646 | <_> 647 | 13 19 3 3 -1. 648 | <_> 649 | 14 20 1 1 9. 650 | 0 651 | -2.1721520461142063e-003 652 | -0.8367894887924194 653 | 0.1638997048139572 654 | <_> 655 | 656 | <_> 657 | 658 | 659 | 660 | <_> 661 | 15 0 5 2 -1. 662 | <_> 663 | 15 1 5 1 2. 664 | 0 665 | -1.6347350319847465e-003 666 | 0.3731253147125244 667 | -0.4079189002513886 668 | <_> 669 | 670 | <_> 671 | 672 | 673 | 674 | <_> 675 | 5 15 4 5 -1. 676 | <_> 677 | 5 15 2 5 2. 678 | 1 679 | -2.9642079025506973e-003 680 | -0.7973154187202454 681 | 0.1886135041713715 682 | -0.8849025964736939 683 | 6 684 | -1 685 | <_> 686 | 687 | 688 | <_> 689 | 690 | <_> 691 | 692 | 693 | 694 | <_> 695 | 12 16 2 8 -1. 696 | <_> 697 | 12 20 2 4 2. 698 | 0 699 | -2.6686030905693769e-003 700 | 0.2950133979320526 701 | -0.6534382104873657 702 | <_> 703 | 704 | <_> 705 | 706 | 707 | 708 | <_> 709 | 0 18 2 4 -1. 710 | <_> 711 | 1 18 1 4 2. 712 | 0 713 | -7.9764809925109148e-004 714 | 0.3938421010971069 715 | -0.4435322880744934 716 | <_> 717 | 718 | <_> 719 | 720 | 721 | 722 | <_> 723 | 8 3 12 4 -1. 724 | <_> 725 | 8 3 12 2 2. 726 | 1 727 | -5.1704752258956432e-003 728 | -0.7686781883239746 729 | 0.2110860049724579 730 | <_> 731 | 732 | <_> 733 | 734 | 735 | 736 | <_> 737 | 6 17 3 2 -1. 738 | <_> 739 | 7 18 1 2 3. 740 | 1 741 | -1.5294969780370593e-003 742 | -0.8944628238677979 743 | 0.1583137959241867 744 | <_> 745 | 746 | <_> 747 | 748 | 749 | 750 | <_> 751 | 1 0 10 6 -1. 752 | <_> 753 | 6 0 5 6 2. 754 | 0 755 | -6.3780639320611954e-003 756 | 0.3393965959548950 757 | -0.4529472887516022 758 | <_> 759 | 760 | <_> 761 | 762 | 763 | 764 | <_> 765 | 12 9 3 2 -1. 766 | <_> 767 | 12 10 3 1 2. 768 | 0 769 | -2.6243639877066016e-004 770 | 0.2850841879844666 771 | -0.4983885884284973 772 | <_> 773 | 774 | <_> 775 | 776 | 777 | 778 | <_> 779 | 11 1 12 11 -1. 780 | <_> 781 | 11 1 6 11 2. 782 | 1 783 | 0.0361888185143471 784 | 0.2132015973329544 785 | -0.7394319772720337 786 | <_> 787 | 788 | <_> 789 | 790 | 791 | 792 | <_> 793 | 21 13 2 10 -1. 794 | <_> 795 | 21 18 2 5 2. 796 | 0 797 | 7.7682351693511009e-003 798 | -0.4052247107028961 799 | 0.4112299978733063 800 | <_> 801 | 802 | <_> 803 | 804 | 805 | 806 | <_> 807 | 15 16 1 2 -1. 808 | <_> 809 | 15 16 1 1 2. 810 | 1 811 | -2.3738530580885708e-004 812 | -0.7753518819808960 813 | 0.1911296993494034 814 | <_> 815 | 816 | <_> 817 | 818 | 819 | 820 | <_> 821 | 0 11 8 8 -1. 822 | <_> 823 | 0 11 4 4 2. 824 | <_> 825 | 4 15 4 4 2. 826 | 0 827 | 4.2231627739965916e-003 828 | -0.7229338884353638 829 | 0.1739158928394318 830 | -1.0250910520553589 831 | 7 832 | -1 833 | <_> 834 | 835 | 836 | <_> 837 | 838 | <_> 839 | 840 | 841 | 842 | <_> 843 | 11 11 7 6 -1. 844 | <_> 845 | 11 13 7 2 3. 846 | 0 847 | 2.9137390665709972e-003 848 | -0.5349493026733398 849 | 0.3337337076663971 850 | <_> 851 | 852 | <_> 853 | 854 | 855 | 856 | <_> 857 | 12 17 3 3 -1. 858 | <_> 859 | 13 18 1 1 9. 860 | 0 861 | -1.6270120395347476e-003 862 | -0.8804692029953003 863 | 0.1722342073917389 864 | <_> 865 | 866 | <_> 867 | 868 | 869 | 870 | <_> 871 | 0 9 2 2 -1. 872 | <_> 873 | 1 9 1 2 2. 874 | 0 875 | -2.9037619242444634e-004 876 | 0.2734786868095398 877 | -0.5733091235160828 878 | <_> 879 | 880 | <_> 881 | 882 | 883 | 884 | <_> 885 | 13 17 1 2 -1. 886 | <_> 887 | 13 18 1 1 2. 888 | 0 889 | -1.4552129869116470e-005 890 | 0.2491019070148468 891 | -0.5995762944221497 892 | <_> 893 | 894 | <_> 895 | 896 | 897 | 898 | <_> 899 | 7 0 17 18 -1. 900 | <_> 901 | 7 9 17 9 2. 902 | 0 903 | 0.0141834802925587 904 | 0.1507173925638199 905 | -0.8961830139160156 906 | <_> 907 | 908 | <_> 909 | 910 | 911 | 912 | <_> 913 | 8 11 8 2 -1. 914 | <_> 915 | 8 11 8 1 2. 916 | 1 917 | -5.8600129705155268e-005 918 | 0.1771630048751831 919 | -0.7106314897537231 920 | <_> 921 | 922 | <_> 923 | 924 | 925 | 926 | <_> 927 | 18 17 6 7 -1. 928 | <_> 929 | 21 17 3 7 2. 930 | 0 931 | 7.3492531664669514e-003 932 | -0.5106546878814697 933 | 0.2574213147163391 934 | <_> 935 | 936 | <_> 937 | 938 | 939 | 940 | <_> 941 | 2 19 8 1 -1. 942 | <_> 943 | 6 19 4 1 2. 944 | 0 945 | -1.7738100141286850e-003 946 | -0.8705360293388367 947 | 0.1460683941841126 948 | -0.9740471243858337 949 | 8 950 | -1 951 | <_> 952 | 953 | 954 | <_> 955 | 956 | <_> 957 | 958 | 959 | 960 | <_> 961 | 12 10 10 6 -1. 962 | <_> 963 | 12 10 5 3 2. 964 | <_> 965 | 17 13 5 3 2. 966 | 0 967 | -8.5521116852760315e-003 968 | 0.3413020968437195 969 | -0.4556924998760223 970 | <_> 971 | 972 | <_> 973 | 974 | 975 | 976 | <_> 977 | 5 20 18 4 -1. 978 | <_> 979 | 5 20 9 2 2. 980 | <_> 981 | 14 22 9 2 2. 982 | 0 983 | 2.9570560436695814e-003 984 | -0.5616099834442139 985 | 0.2246744036674500 986 | <_> 987 | 988 | <_> 989 | 990 | 991 | 992 | <_> 993 | 1 10 22 5 -1. 994 | <_> 995 | 12 10 11 5 2. 996 | 0 997 | -0.0195402801036835 998 | -0.8423789739608765 999 | 0.1363316029310226 1000 | <_> 1001 | 1002 | <_> 1003 | 1004 | 1005 | 1006 | <_> 1007 | 1 11 12 1 -1. 1008 | <_> 1009 | 1 11 6 1 2. 1010 | 1 1011 | -3.2073149923235178e-003 1012 | -0.7569847702980042 1013 | 0.1883326023817062 1014 | <_> 1015 | 1016 | <_> 1017 | 1018 | 1019 | 1020 | <_> 1021 | 12 0 12 24 -1. 1022 | <_> 1023 | 12 6 12 12 2. 1024 | 0 1025 | -8.4488727152347565e-003 1026 | 0.1382011026144028 1027 | -0.8026102185249329 1028 | <_> 1029 | 1030 | <_> 1031 | 1032 | 1033 | 1034 | <_> 1035 | 4 15 5 6 -1. 1036 | <_> 1037 | 4 17 5 2 3. 1038 | 0 1039 | 1.1350389831932262e-004 1040 | -0.7027189135551453 1041 | 0.1435786038637161 1042 | <_> 1043 | 1044 | <_> 1045 | 1046 | 1047 | 1048 | <_> 1049 | 12 2 6 4 -1. 1050 | <_> 1051 | 14 4 2 4 3. 1052 | 1 1053 | -5.8187649119645357e-004 1054 | -0.4507982134819031 1055 | 0.2510882019996643 1056 | <_> 1057 | 1058 | <_> 1059 | 1060 | 1061 | 1062 | <_> 1063 | 0 7 2 17 -1. 1064 | <_> 1065 | 1 7 1 17 2. 1066 | 0 1067 | -0.0161978900432587 1068 | 0.6447368860244751 1069 | -0.2079977989196777 1070 | <_> 1071 | 1072 | <_> 1073 | 1074 | 1075 | 1076 | <_> 1077 | 13 15 3 9 -1. 1078 | <_> 1079 | 14 15 1 9 3. 1080 | 0 1081 | 6.6894508199766278e-004 1082 | 0.1998561024665833 1083 | -0.7483944892883301 1084 | <_> 1085 | 1086 | <_> 1087 | 1088 | 1089 | 1090 | <_> 1091 | 13 18 3 3 -1. 1092 | <_> 1093 | 14 19 1 1 9. 1094 | 0 1095 | -1.8372290069237351e-003 1096 | -0.8788912892341614 1097 | 0.1146014034748077 1098 | <_> 1099 | 1100 | <_> 1101 | 1102 | 1103 | 1104 | <_> 1105 | 17 17 1 2 -1. 1106 | <_> 1107 | 17 18 1 1 2. 1108 | 0 1109 | -4.3397278204793110e-005 1110 | 0.2129840999841690 1111 | -0.5028128027915955 1112 | -1.4024209976196289 1113 | 9 1114 | -1 1115 | <_> 1116 | 1117 | 1118 | <_> 1119 | 1120 | <_> 1121 | 1122 | 1123 | 1124 | <_> 1125 | 10 11 4 12 -1. 1126 | <_> 1127 | 10 11 2 6 2. 1128 | <_> 1129 | 12 17 2 6 2. 1130 | 0 1131 | -2.0713880658149719e-003 1132 | 0.2486661970615387 1133 | -0.5756726861000061 1134 | <_> 1135 | 1136 | <_> 1137 | 1138 | 1139 | 1140 | <_> 1141 | 12 23 12 1 -1. 1142 | <_> 1143 | 18 23 6 1 2. 1144 | 0 1145 | 3.6768750287592411e-003 1146 | -0.5755078196525574 1147 | 0.2280506044626236 1148 | <_> 1149 | 1150 | <_> 1151 | 1152 | 1153 | 1154 | <_> 1155 | 13 10 3 4 -1. 1156 | <_> 1157 | 13 10 3 2 2. 1158 | 1 1159 | -3.0887479078955948e-004 1160 | 0.2362288981676102 1161 | -0.6454687118530273 1162 | <_> 1163 | 1164 | <_> 1165 | 1166 | 1167 | 1168 | <_> 1169 | 0 0 24 24 -1. 1170 | <_> 1171 | 0 0 12 12 2. 1172 | <_> 1173 | 12 12 12 12 2. 1174 | 0 1175 | -0.0257820300757885 1176 | -0.7496209144592285 1177 | 0.1617882996797562 1178 | <_> 1179 | 1180 | <_> 1181 | 1182 | 1183 | 1184 | <_> 1185 | 2 10 2 6 -1. 1186 | <_> 1187 | 2 13 2 3 2. 1188 | 0 1189 | -1.2850989587605000e-003 1190 | -0.7813286781311035 1191 | 0.1440877020359039 1192 | <_> 1193 | 1194 | <_> 1195 | 1196 | 1197 | 1198 | <_> 1199 | 0 11 2 6 -1. 1200 | <_> 1201 | 0 14 2 3 2. 1202 | 0 1203 | 3.3493789378553629e-003 1204 | 0.1375873982906342 1205 | -0.7505543231964111 1206 | <_> 1207 | 1208 | <_> 1209 | 1210 | 1211 | 1212 | <_> 1213 | 0 1 24 1 -1. 1214 | <_> 1215 | 8 1 8 1 3. 1216 | 0 1217 | -2.6788329705595970e-003 1218 | 0.2596372067928314 1219 | -0.4255296885967255 1220 | <_> 1221 | 1222 | <_> 1223 | 1224 | 1225 | 1226 | <_> 1227 | 13 7 4 2 -1. 1228 | <_> 1229 | 13 8 4 1 2. 1230 | 0 1231 | -2.8834199838456698e-005 1232 | 0.1635348945856094 1233 | -0.7050843238830566 1234 | <_> 1235 | 1236 | <_> 1237 | 1238 | 1239 | 1240 | <_> 1241 | 0 13 3 10 -1. 1242 | <_> 1243 | 1 13 1 10 3. 1244 | 0 1245 | -1.6196980141103268e-003 1246 | 0.3419960141181946 1247 | -0.3415850102901459 1248 | <_> 1249 | 1250 | <_> 1251 | 1252 | 1253 | 1254 | <_> 1255 | 1 10 10 10 -1. 1256 | <_> 1257 | 6 10 5 10 2. 1258 | 0 1259 | 1.0517919436097145e-003 1260 | 0.1479195058345795 1261 | -0.7929052114486694 1262 | <_> 1263 | 1264 | <_> 1265 | 1266 | 1267 | 1268 | <_> 1269 | 9 0 4 6 -1. 1270 | <_> 1271 | 9 0 4 3 2. 1272 | 1 1273 | -2.4886541068553925e-003 1274 | -0.8937227129936218 1275 | 0.1043419018387795 1276 | -1.1141099929809570 1277 | 10 1278 | -1 1279 | <_> 1280 | 1281 | 1282 | <_> 1283 | 1284 | <_> 1285 | 1286 | 1287 | 1288 | <_> 1289 | 16 18 1 2 -1. 1290 | <_> 1291 | 16 19 1 1 2. 1292 | 0 1293 | -5.7590808864915743e-005 1294 | 0.2734906971454620 1295 | -0.6426038742065430 1296 | <_> 1297 | 1298 | <_> 1299 | 1300 | 1301 | 1302 | <_> 1303 | 21 14 2 8 -1. 1304 | <_> 1305 | 22 14 1 8 2. 1306 | 0 1307 | 7.1206100983545184e-004 1308 | -0.5435984134674072 1309 | 0.2552855014801025 1310 | <_> 1311 | 1312 | <_> 1313 | 1314 | 1315 | 1316 | <_> 1317 | 0 7 21 9 -1. 1318 | <_> 1319 | 7 10 7 3 9. 1320 | 0 1321 | -0.3888005912303925 1322 | 0.6930956840515137 1323 | -0.1862079948186874 1324 | <_> 1325 | 1326 | <_> 1327 | 1328 | 1329 | 1330 | <_> 1331 | 16 16 1 4 -1. 1332 | <_> 1333 | 16 17 1 2 2. 1334 | 0 1335 | 2.5288251345045865e-004 1336 | 0.2914173901081085 1337 | -0.5620415806770325 1338 | <_> 1339 | 1340 | <_> 1341 | 1342 | 1343 | 1344 | <_> 1345 | 19 15 2 6 -1. 1346 | <_> 1347 | 17 17 2 2 3. 1348 | 1 1349 | -2.1006830502301455e-003 1350 | -0.6822040081024170 1351 | 0.1185996010899544 1352 | <_> 1353 | 1354 | <_> 1355 | 1356 | 1357 | 1358 | <_> 1359 | 6 0 15 4 -1. 1360 | <_> 1361 | 6 1 15 2 2. 1362 | 0 1363 | -3.2310429960489273e-003 1364 | 0.3972072899341583 1365 | -0.2774995863437653 1366 | <_> 1367 | 1368 | <_> 1369 | 1370 | 1371 | 1372 | <_> 1373 | 9 16 1 4 -1. 1374 | <_> 1375 | 9 17 1 2 2. 1376 | 0 1377 | 1.4478569937637076e-005 1378 | -0.5476933717727661 1379 | 0.2119608968496323 1380 | <_> 1381 | 1382 | <_> 1383 | 1384 | 1385 | 1386 | <_> 1387 | 8 20 8 2 -1. 1388 | <_> 1389 | 8 20 4 1 2. 1390 | <_> 1391 | 12 21 4 1 2. 1392 | 0 1393 | -9.0244162129238248e-004 1394 | -0.8646997213363648 1395 | 0.1194489970803261 1396 | <_> 1397 | 1398 | <_> 1399 | 1400 | 1401 | 1402 | <_> 1403 | 0 9 3 14 -1. 1404 | <_> 1405 | 1 9 1 14 3. 1406 | 0 1407 | -1.5906910412013531e-003 1408 | 0.2919914126396179 1409 | -0.3928124904632568 1410 | <_> 1411 | 1412 | <_> 1413 | 1414 | 1415 | 1416 | <_> 1417 | 11 1 11 4 -1. 1418 | <_> 1419 | 11 1 11 2 2. 1420 | 1 1421 | 7.4913240969181061e-003 1422 | 0.2679530084133148 1423 | -0.4020768105983734 1424 | -1.0776710510253906 1425 | 11 1426 | -1 1427 | <_> 1428 | 1429 | 1430 | <_> 1431 | 1432 | <_> 1433 | 1434 | 1435 | 1436 | <_> 1437 | 15 20 1 2 -1. 1438 | <_> 1439 | 15 21 1 1 2. 1440 | 0 1441 | -7.1240079705603421e-005 1442 | 0.2823083102703095 1443 | -0.4779424071311951 1444 | <_> 1445 | 1446 | <_> 1447 | 1448 | 1449 | 1450 | <_> 1451 | 2 18 1 2 -1. 1452 | <_> 1453 | 2 18 1 1 2. 1454 | 1 1455 | -2.6417701155878603e-004 1456 | 0.3084900975227356 1457 | -0.4036655128002167 1458 | <_> 1459 | 1460 | <_> 1461 | 1462 | 1463 | 1464 | <_> 1465 | 0 14 12 6 -1. 1466 | <_> 1467 | 0 16 12 2 3. 1468 | 0 1469 | 5.2890321239829063e-004 1470 | -0.7423822879791260 1471 | 0.1605536937713623 1472 | <_> 1473 | 1474 | <_> 1475 | 1476 | 1477 | 1478 | <_> 1479 | 4 10 2 14 -1. 1480 | <_> 1481 | 4 10 1 7 2. 1482 | <_> 1483 | 5 17 1 7 2. 1484 | 0 1485 | 3.8283021422103047e-004 1486 | -0.6108828783035278 1487 | 0.1794416010379791 1488 | <_> 1489 | 1490 | <_> 1491 | 1492 | 1493 | 1494 | <_> 1495 | 22 3 2 15 -1. 1496 | <_> 1497 | 23 3 1 15 2. 1498 | 0 1499 | 5.4077422246336937e-003 1500 | -0.2767061889171600 1501 | 0.4017147123813629 1502 | <_> 1503 | 1504 | <_> 1505 | 1506 | 1507 | 1508 | <_> 1509 | 4 17 3 1 -1. 1510 | <_> 1511 | 5 18 1 1 3. 1512 | 1 1513 | -8.2620367174968123e-004 1514 | -0.8456827998161316 1515 | 0.1641048043966293 1516 | <_> 1517 | 1518 | <_> 1519 | 1520 | 1521 | 1522 | <_> 1523 | 21 6 3 9 -1. 1524 | <_> 1525 | 21 9 3 3 3. 1526 | 0 1527 | -8.9606801047921181e-003 1528 | -0.6698572039604187 1529 | 0.1270485967397690 1530 | <_> 1531 | 1532 | <_> 1533 | 1534 | 1535 | 1536 | <_> 1537 | 1 7 23 4 -1. 1538 | <_> 1539 | 1 9 23 2 2. 1540 | 0 1541 | -3.0286349356174469e-003 1542 | 0.1227105036377907 1543 | -0.7880274057388306 1544 | <_> 1545 | 1546 | <_> 1547 | 1548 | 1549 | 1550 | <_> 1551 | 4 3 20 20 -1. 1552 | <_> 1553 | 4 13 20 10 2. 1554 | 0 1555 | -0.0262723900377750 1556 | -0.7226560711860657 1557 | 0.1347829997539520 1558 | <_> 1559 | 1560 | <_> 1561 | 1562 | 1563 | 1564 | <_> 1565 | 14 13 7 4 -1. 1566 | <_> 1567 | 14 15 7 2 2. 1568 | 0 1569 | -5.0153239862993360e-004 1570 | 0.2890014052391052 1571 | -0.3537223935127258 1572 | <_> 1573 | 1574 | <_> 1575 | 1576 | 1577 | 1578 | <_> 1579 | 2 6 2 2 -1. 1580 | <_> 1581 | 2 6 2 1 2. 1582 | 1 1583 | -1.9847620569635183e-004 1584 | 0.2491115033626556 1585 | -0.4667024016380310 1586 | -1.1201709508895874 1587 | 12 1588 | -1 1589 | <_> 1590 | 1591 | 1592 | <_> 1593 | 1594 | <_> 1595 | 1596 | 1597 | 1598 | <_> 1599 | 13 15 6 4 -1. 1600 | <_> 1601 | 13 17 6 2 2. 1602 | 0 1603 | -1.6098109772428870e-003 1604 | 0.2436411976814270 1605 | -0.5425583124160767 1606 | <_> 1607 | 1608 | <_> 1609 | 1610 | 1611 | 1612 | <_> 1613 | 17 0 7 24 -1. 1614 | <_> 1615 | 17 8 7 8 3. 1616 | 0 1617 | 3.0391800682991743e-003 1618 | 0.1427879035472870 1619 | -0.7677937150001526 1620 | <_> 1621 | 1622 | <_> 1623 | 1624 | 1625 | 1626 | <_> 1627 | 3 7 20 8 -1. 1628 | <_> 1629 | 13 7 10 8 2. 1630 | 0 1631 | -0.0111625995486975 1632 | -0.7964649796485901 1633 | 0.1309580951929092 1634 | <_> 1635 | 1636 | <_> 1637 | 1638 | 1639 | 1640 | <_> 1641 | 0 7 22 1 -1. 1642 | <_> 1643 | 11 7 11 1 2. 1644 | 0 1645 | -1.6689340118318796e-003 1646 | 0.2306797951459885 1647 | -0.4947401881217957 1648 | <_> 1649 | 1650 | <_> 1651 | 1652 | 1653 | 1654 | <_> 1655 | 7 9 8 2 -1. 1656 | <_> 1657 | 7 10 8 1 2. 1658 | 0 1659 | -8.8481552666053176e-004 1660 | 0.2005017995834351 1661 | -0.5158239006996155 1662 | <_> 1663 | 1664 | <_> 1665 | 1666 | 1667 | 1668 | <_> 1669 | 2 0 3 18 -1. 1670 | <_> 1671 | 2 6 3 6 3. 1672 | 0 1673 | -2.6040559168905020e-003 1674 | 0.1298092007637024 1675 | -0.7818121910095215 1676 | <_> 1677 | 1678 | <_> 1679 | 1680 | 1681 | 1682 | <_> 1683 | 2 13 3 5 -1. 1684 | <_> 1685 | 3 13 1 5 3. 1686 | 0 1687 | -2.3444599355570972e-004 1688 | -0.5695487260818481 1689 | 0.1478334069252014 1690 | <_> 1691 | 1692 | <_> 1693 | 1694 | 1695 | 1696 | <_> 1697 | 14 16 3 4 -1. 1698 | <_> 1699 | 15 16 1 4 3. 1700 | 0 1701 | 8.4604357834905386e-004 1702 | 0.1037243008613586 1703 | -0.8308842182159424 1704 | <_> 1705 | 1706 | <_> 1707 | 1708 | 1709 | 1710 | <_> 1711 | 10 0 12 3 -1. 1712 | <_> 1713 | 10 1 12 1 3. 1714 | 0 1715 | -2.4807569570839405e-003 1716 | 0.3425926864147186 1717 | -0.2719523906707764 1718 | <_> 1719 | 1720 | <_> 1721 | 1722 | 1723 | 1724 | <_> 1725 | 15 16 3 1 -1. 1726 | <_> 1727 | 16 17 1 1 3. 1728 | 1 1729 | -1.1127090547233820e-003 1730 | -0.8275328278541565 1731 | 0.1176175028085709 1732 | <_> 1733 | 1734 | <_> 1735 | 1736 | 1737 | 1738 | <_> 1739 | 22 13 2 5 -1. 1740 | <_> 1741 | 23 13 1 5 2. 1742 | 0 1743 | 1.4298419700935483e-003 1744 | -0.3477616012096405 1745 | 0.2652699053287506 1746 | <_> 1747 | 1748 | <_> 1749 | 1750 | 1751 | 1752 | <_> 1753 | 11 14 4 6 -1. 1754 | <_> 1755 | 11 16 4 2 3. 1756 | 0 1757 | -1.4572150539606810e-003 1758 | -0.8802363276481628 1759 | 0.1092033982276917 1760 | -1.0063530206680298 1761 | 13 1762 | -1 1763 | <_> 1764 | 1765 | 1766 | <_> 1767 | 1768 | <_> 1769 | 1770 | 1771 | 1772 | <_> 1773 | 14 15 1 2 -1. 1774 | <_> 1775 | 14 16 1 1 2. 1776 | 0 1777 | -1.4507149899145588e-005 1778 | 0.2605004012584686 1779 | -0.4580149054527283 1780 | <_> 1781 | 1782 | <_> 1783 | 1784 | 1785 | 1786 | <_> 1787 | 6 3 6 5 -1. 1788 | <_> 1789 | 6 3 3 5 2. 1790 | 1 1791 | 0.0136784398928285 1792 | -0.7149971723556519 1793 | 0.1477705985307694 1794 | <_> 1795 | 1796 | <_> 1797 | 1798 | 1799 | 1800 | <_> 1801 | 2 8 1 2 -1. 1802 | <_> 1803 | 2 8 1 1 2. 1804 | 1 1805 | -7.3151881224475801e-005 1806 | 0.2058611065149307 1807 | -0.4995836019515991 1808 | <_> 1809 | 1810 | <_> 1811 | 1812 | 1813 | 1814 | <_> 1815 | 9 17 4 4 -1. 1816 | <_> 1817 | 9 18 4 2 2. 1818 | 0 1819 | -6.7043182207271457e-004 1820 | -0.7319483757019043 1821 | 0.1358278989791870 1822 | <_> 1823 | 1824 | <_> 1825 | 1826 | 1827 | 1828 | <_> 1829 | 10 6 4 5 -1. 1830 | <_> 1831 | 11 6 2 5 2. 1832 | 0 1833 | -1.1992789804935455e-003 1834 | 0.4456472992897034 1835 | -0.2521241009235382 1836 | <_> 1837 | 1838 | <_> 1839 | 1840 | 1841 | 1842 | <_> 1843 | 2 21 12 2 -1. 1844 | <_> 1845 | 8 21 6 2 2. 1846 | 0 1847 | -0.0117351496592164 1848 | -0.7972438931465149 1849 | 0.1424607038497925 1850 | <_> 1851 | 1852 | <_> 1853 | 1854 | 1855 | 1856 | <_> 1857 | 12 8 12 15 -1. 1858 | <_> 1859 | 16 8 4 15 3. 1860 | 0 1861 | -4.7361929900944233e-003 1862 | 0.1624221056699753 1863 | -0.5223402976989746 1864 | <_> 1865 | 1866 | <_> 1867 | 1868 | 1869 | 1870 | <_> 1871 | 0 3 20 20 -1. 1872 | <_> 1873 | 0 13 20 10 2. 1874 | 0 1875 | -0.1084595024585724 1876 | -0.7962973713874817 1877 | 0.1265926957130432 1878 | <_> 1879 | 1880 | <_> 1881 | 1882 | 1883 | 1884 | <_> 1885 | 16 17 4 2 -1. 1886 | <_> 1887 | 16 17 4 1 2. 1888 | 1 1889 | -3.2293208641931415e-004 1890 | -0.7129234075546265 1891 | 0.0899520069360733 1892 | <_> 1893 | 1894 | <_> 1895 | 1896 | 1897 | 1898 | <_> 1899 | 21 14 2 5 -1. 1900 | <_> 1901 | 21 14 1 5 2. 1902 | 1 1903 | 2.5980910286307335e-003 1904 | -0.2800100147724152 1905 | 0.3197942078113556 1906 | <_> 1907 | 1908 | <_> 1909 | 1910 | 1911 | 1912 | <_> 1913 | 12 0 12 8 -1. 1914 | <_> 1915 | 12 0 12 4 2. 1916 | 1 1917 | -7.5798099860548973e-003 1918 | -0.7153301239013672 1919 | 0.1406804025173187 1920 | <_> 1921 | 1922 | <_> 1923 | 1924 | 1925 | 1926 | <_> 1927 | 17 0 7 24 -1. 1928 | <_> 1929 | 17 6 7 12 2. 1930 | 0 1931 | -8.4003582596778870e-003 1932 | 0.1168404966592789 1933 | -0.6506950259208679 1934 | <_> 1935 | 1936 | <_> 1937 | 1938 | 1939 | 1940 | <_> 1941 | 13 10 3 6 -1. 1942 | <_> 1943 | 13 12 3 2 3. 1944 | 0 1945 | 3.6820198874920607e-003 1946 | -0.2631436884403229 1947 | 0.3865979909896851 1948 | -1.0373339653015137 1949 | 14 1950 | -1 1951 | <_> 1952 | 1953 | 1954 | <_> 1955 | 1956 | <_> 1957 | 1958 | 1959 | 1960 | <_> 1961 | 8 11 9 9 -1. 1962 | <_> 1963 | 11 14 3 3 9. 1964 | 0 1965 | 0.0240733902901411 1966 | -0.4794333875179291 1967 | 0.2617827057838440 1968 | <_> 1969 | 1970 | <_> 1971 | 1972 | 1973 | 1974 | <_> 1975 | 17 18 7 6 -1. 1976 | <_> 1977 | 17 21 7 3 2. 1978 | 0 1979 | 1.9582170061767101e-003 1980 | -0.4434475898742676 1981 | 0.2301298975944519 1982 | <_> 1983 | 1984 | <_> 1985 | 1986 | 1987 | 1988 | <_> 1989 | 9 8 4 2 -1. 1990 | <_> 1991 | 9 9 4 1 2. 1992 | 0 1993 | -2.0559200493153185e-004 1994 | 0.1224080994725227 1995 | -0.7277694940567017 1996 | <_> 1997 | 1998 | <_> 1999 | 2000 | 2001 | 2002 | <_> 2003 | 7 7 7 6 -1. 2004 | <_> 2005 | 7 9 7 2 3. 2006 | 0 2007 | 1.0637210216373205e-003 2008 | -0.1582341045141220 2009 | 0.6447200775146484 2010 | <_> 2011 | 2012 | <_> 2013 | 2014 | 2015 | 2016 | <_> 2017 | 2 9 1 9 -1. 2018 | <_> 2019 | 2 12 1 3 3. 2020 | 0 2021 | -3.5040560760535300e-004 2022 | -0.5160586237907410 2023 | 0.2033808976411820 2024 | <_> 2025 | 2026 | <_> 2027 | 2028 | 2029 | 2030 | <_> 2031 | 1 0 1 20 -1. 2032 | <_> 2033 | 1 10 1 10 2. 2034 | 0 2035 | -1.5382179990410805e-003 2036 | 0.2029495984315872 2037 | -0.5412080287933350 2038 | <_> 2039 | 2040 | <_> 2041 | 2042 | 2043 | 2044 | <_> 2045 | 5 11 4 3 -1. 2046 | <_> 2047 | 5 11 2 3 2. 2048 | 1 2049 | 4.2215911671519279e-003 2050 | 0.1420246958732605 2051 | -0.6884710788726807 2052 | <_> 2053 | 2054 | <_> 2055 | 2056 | 2057 | 2058 | <_> 2059 | 1 6 14 13 -1. 2060 | <_> 2061 | 8 6 7 13 2. 2062 | 0 2063 | 4.0536639280617237e-003 2064 | 0.0946411192417145 2065 | -0.8890265226364136 2066 | <_> 2067 | 2068 | <_> 2069 | 2070 | 2071 | 2072 | <_> 2073 | 11 6 6 4 -1. 2074 | <_> 2075 | 13 6 2 4 3. 2076 | 0 2077 | 3.9104130119085312e-003 2078 | -0.2211245000362396 2079 | 0.4553441107273102 2080 | <_> 2081 | 2082 | <_> 2083 | 2084 | 2085 | 2086 | <_> 2087 | 15 20 2 2 -1. 2088 | <_> 2089 | 15 20 2 1 2. 2090 | 1 2091 | -5.8839347911998630e-004 2092 | -0.7423400878906250 2093 | 0.1466006040573120 2094 | <_> 2095 | 2096 | <_> 2097 | 2098 | 2099 | 2100 | <_> 2101 | 11 7 11 2 -1. 2102 | <_> 2103 | 11 8 11 1 2. 2104 | 0 2105 | 4.7331111272796988e-004 2106 | 0.0803736001253128 2107 | -0.8416292071342468 2108 | <_> 2109 | 2110 | <_> 2111 | 2112 | 2113 | 2114 | <_> 2115 | 14 0 7 4 -1. 2116 | <_> 2117 | 14 1 7 2 2. 2118 | 0 2119 | -1.4589539496228099e-003 2120 | 0.2730404138565064 2121 | -0.2989330887794495 2122 | -0.9257612824440002 2123 | 15 2124 | -1 2125 | 2126 | -------------------------------------------------------------------------------- /src/xml/palm.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 20 20 7 | 8 | <_> 9 | 10 | 11 | <_> 12 | 13 | <_> 14 | 15 | 16 | 17 | <_> 18 | 14 0 6 16 -1. 19 | <_> 20 | 17 0 3 16 2. 21 | 0 22 | 3.8681671023368835e-002 23 | -9.8028910160064697e-001 24 | 1 25 | <_> 26 | 27 | 28 | 29 | <_> 30 | 6 4 7 8 -1. 31 | <_> 32 | 6 8 7 4 2. 33 | 0 34 | -2.6647120714187622e-002 35 | -1. 36 | 9.4076812267303467e-001 37 | <_> 38 | 39 | <_> 40 | 41 | 42 | 43 | <_> 44 | 12 0 8 17 -1. 45 | <_> 46 | 16 0 4 17 2. 47 | 0 48 | 6.1131078749895096e-002 49 | -9.0244722366333008e-001 50 | 1 51 | <_> 52 | 53 | 54 | 55 | <_> 56 | 7 6 9 5 -1. 57 | <_> 58 | 10 9 3 5 3. 59 | 1 60 | -3.3309649676084518e-002 61 | -5.8893251419067383e-001 62 | 9.1832017898559570e-001 63 | <_> 64 | 65 | <_> 66 | 67 | 68 | 69 | <_> 70 | 1 0 18 4 -1. 71 | <_> 72 | 7 0 6 4 3. 73 | 0 74 | -5.0153050571680069e-002 75 | 7.9939717054367065e-001 76 | 1 77 | <_> 78 | 79 | 80 | 81 | <_> 82 | 6 6 6 3 -1. 83 | <_> 84 | 8 6 2 3 3. 85 | 0 86 | -1.8358040601015091e-002 87 | 8.4302067756652832e-001 88 | -9.3710541725158691e-001 89 | <_> 90 | 91 | <_> 92 | 93 | 94 | 95 | <_> 96 | 0 3 6 8 -1. 97 | <_> 98 | 3 3 3 8 2. 99 | 0 100 | -3.6677200347185135e-002 101 | 8.2961827516555786e-001 102 | 1 103 | <_> 104 | 105 | 106 | 107 | <_> 108 | 11 3 6 14 -1. 109 | <_> 110 | 11 3 3 7 2. 111 | <_> 112 | 14 10 3 7 2. 113 | 0 114 | -4.3658491224050522e-002 115 | 8.0457127094268799e-001 116 | -8.9302337169647217e-001 117 | <_> 118 | 119 | <_> 120 | 121 | 122 | 123 | <_> 124 | 16 3 4 16 -1. 125 | <_> 126 | 18 3 2 16 2. 127 | 0 128 | 2.5138080120086670e-002 129 | 1 130 | 7.4585878849029541e-001 131 | <_> 132 | 133 | 134 | 135 | <_> 136 | 0 1 9 6 -1. 137 | <_> 138 | 3 3 3 2 9. 139 | 0 140 | -6.6900141537189484e-002 141 | 8.4059208631515503e-001 142 | -8.8331997394561768e-001 143 | <_> 144 | 145 | <_> 146 | 147 | 148 | 149 | <_> 150 | 10 9 3 3 -1. 151 | <_> 152 | 11 9 1 3 3. 153 | 0 154 | 1.7255060374736786e-003 155 | 1 156 | 7.7119922637939453e-001 157 | <_> 158 | 159 | 160 | 161 | <_> 162 | 12 1 4 4 -1. 163 | <_> 164 | 14 1 2 4 2. 165 | 0 166 | 8.4419725462794304e-003 167 | -8.4468692541122437e-001 168 | 7.2725939750671387e-001 169 | <_> 170 | 171 | <_> 172 | 173 | 174 | 175 | <_> 176 | 13 7 6 6 -1. 177 | <_> 178 | 16 7 3 6 2. 179 | 0 180 | 3.2117430120706558e-002 181 | 1 182 | 6.4971947669982910e-001 183 | <_> 184 | 185 | 186 | 187 | <_> 188 | 13 5 4 14 -1. 189 | <_> 190 | 13 5 2 7 2. 191 | <_> 192 | 15 12 2 7 2. 193 | 0 194 | 2.6627309620380402e-002 195 | -8.6625558137893677e-001 196 | 8.9164018630981445e-001 197 | 4.6676799654960632e-001 198 | -1 199 | -1 200 | <_> 201 | 202 | 203 | <_> 204 | 205 | <_> 206 | 207 | 208 | 209 | <_> 210 | 1 2 4 11 -1. 211 | <_> 212 | 3 2 2 11 2. 213 | 0 214 | -2.6734400540590286e-002 215 | 1 216 | -6.5627342462539673e-001 217 | <_> 218 | 219 | 220 | 221 | <_> 222 | 14 0 6 19 -1. 223 | <_> 224 | 17 0 3 19 2. 225 | 0 226 | 7.8886173665523529e-002 227 | -6.7220860719680786e-001 228 | 8.6547261476516724e-001 229 | <_> 230 | 231 | <_> 232 | 233 | 234 | 235 | <_> 236 | 0 3 2 12 -1. 237 | <_> 238 | 1 3 1 12 2. 239 | 0 240 | -2.2544919047504663e-003 241 | 1 242 | -5.3239947557449341e-001 243 | <_> 244 | 245 | 246 | 247 | <_> 248 | 2 9 10 10 -1. 249 | <_> 250 | 7 9 5 10 2. 251 | 0 252 | -4.5755971223115921e-002 253 | -9.6904259920120239e-001 254 | 7.0433187484741211e-001 255 | <_> 256 | 257 | <_> 258 | 259 | 260 | 261 | <_> 262 | 7 6 3 5 -1. 263 | <_> 264 | 8 6 1 5 3. 265 | 0 266 | 5.2909408695995808e-003 267 | 1 268 | 6.8145847320556641e-001 269 | <_> 270 | 271 | 272 | 273 | <_> 274 | 7 0 4 12 -1. 275 | <_> 276 | 8 0 2 12 2. 277 | 0 278 | -1.3724939897656441e-002 279 | 6.2345337867736816e-001 280 | -6.6262710094451904e-001 281 | <_> 282 | 283 | <_> 284 | 285 | 286 | 287 | <_> 288 | 12 4 8 10 -1. 289 | <_> 290 | 16 4 4 10 2. 291 | 0 292 | 1.1801239848136902e-001 293 | 1 294 | 5.4585951566696167e-001 295 | <_> 296 | 297 | 298 | 299 | <_> 300 | 10 6 4 12 -1. 301 | <_> 302 | 10 6 2 6 2. 303 | <_> 304 | 12 12 2 6 2. 305 | 0 306 | -3.9759848266839981e-002 307 | 7.7439647912979126e-001 308 | -6.9461721181869507e-001 309 | <_> 310 | 311 | <_> 312 | 313 | 314 | 315 | <_> 316 | 5 6 5 14 -1. 317 | <_> 318 | 5 13 5 7 2. 319 | 0 320 | 1.7409030115231872e-003 321 | -8.0978208780288696e-001 322 | 1 323 | <_> 324 | 325 | 326 | 327 | <_> 328 | 6 6 12 14 -1. 329 | <_> 330 | 6 13 12 7 2. 331 | 0 332 | 1.6339950263500214e-001 333 | 4.9990290403366089e-001 334 | -9.4595247507095337e-001 335 | <_> 336 | 337 | <_> 338 | 339 | 340 | 341 | <_> 342 | 6 0 4 1 -1. 343 | <_> 344 | 6 0 2 1 2. 345 | 1 346 | 7.5461310334503651e-003 347 | 1 348 | 6.3170629739761353e-001 349 | <_> 350 | 351 | 352 | 353 | <_> 354 | 5 3 4 10 -1. 355 | <_> 356 | 5 3 2 5 2. 357 | <_> 358 | 7 8 2 5 2. 359 | 0 360 | -2.2127110511064529e-002 361 | 6.1635309457778931e-001 362 | -6.7650932073593140e-001 363 | <_> 364 | 365 | <_> 366 | 367 | 368 | 369 | <_> 370 | 10 8 4 4 -1. 371 | <_> 372 | 11 8 2 4 2. 373 | 0 374 | 7.2129550389945507e-003 375 | 1 376 | 6.0694038867950439e-001 377 | <_> 378 | 379 | 380 | 381 | <_> 382 | 9 7 3 4 -1. 383 | <_> 384 | 10 7 1 4 3. 385 | 0 386 | 5.9658549726009369e-003 387 | -7.1250128746032715e-001 388 | 5.0982707738876343e-001 389 | <_> 390 | 391 | <_> 392 | 393 | 394 | 395 | <_> 396 | 13 1 4 10 -1. 397 | <_> 398 | 13 1 2 10 2. 399 | 1 400 | -1.3171000173315406e-003 401 | 1 402 | -7.0088720321655273e-001 403 | <_> 404 | 405 | 406 | 407 | <_> 408 | 12 7 2 10 -1. 409 | <_> 410 | 12 7 2 5 2. 411 | 1 412 | 1.0129069909453392e-002 413 | 6.0936927795410156e-001 414 | -9.5784842967987061e-001 415 | <_> 416 | 417 | <_> 418 | 419 | 420 | 421 | <_> 422 | 1 6 2 11 -1. 423 | <_> 424 | 2 6 1 11 2. 425 | 0 426 | -2.3017649073153734e-003 427 | 4.1956830024719238e-001 428 | 1 429 | <_> 430 | 431 | 432 | 433 | <_> 434 | 2 5 3 6 -1. 435 | <_> 436 | 3 5 1 6 3. 437 | 0 438 | 4.4859871268272400e-003 439 | -8.9829748868942261e-001 440 | 5.8359438180923462e-001 441 | <_> 442 | 443 | <_> 444 | 445 | 446 | 447 | <_> 448 | 18 4 2 1 -1. 449 | <_> 450 | 19 4 1 1 2. 451 | 0 452 | 9.6589370514266193e-005 453 | 1 454 | 3.0583730340003967e-001 455 | <_> 456 | 457 | 458 | 459 | <_> 460 | 16 12 4 2 -1. 461 | <_> 462 | 17 12 2 2 2. 463 | 0 464 | -7.5696231797337532e-003 465 | 8.4811502695083618e-001 466 | -8.0426692962646484e-001 467 | <_> 468 | 469 | <_> 470 | 471 | 472 | 473 | <_> 474 | 8 5 3 4 -1. 475 | <_> 476 | 9 5 1 4 3. 477 | 0 478 | 5.9972028248012066e-003 479 | 1 480 | 6.7728942632675171e-001 481 | <_> 482 | 483 | 484 | 485 | <_> 486 | 6 1 3 15 -1. 487 | <_> 488 | 7 6 1 5 9. 489 | 0 490 | 2.7960389852523804e-002 491 | -6.5531158447265625e-001 492 | 5.2915072441101074e-001 493 | <_> 494 | 495 | <_> 496 | 497 | 498 | 499 | <_> 500 | 12 0 8 19 -1. 501 | <_> 502 | 16 0 4 19 2. 503 | 0 504 | 1.0068819671869278e-001 505 | -9.0510547161102295e-001 506 | 1 507 | <_> 508 | 509 | 510 | 511 | <_> 512 | 0 0 9 18 -1. 513 | <_> 514 | 0 6 9 6 3. 515 | 0 516 | -1.3593779876828194e-002 517 | 4.7082710266113281e-001 518 | -8.6754322052001953e-001 519 | <_> 520 | 521 | <_> 522 | 523 | 524 | 525 | <_> 526 | 7 2 5 16 -1. 527 | <_> 528 | 7 10 5 8 2. 529 | 0 530 | 4.1386592201888561e-003 531 | 1 532 | 3.7525629997253418e-001 533 | <_> 534 | 535 | 536 | 537 | <_> 538 | 6 1 8 4 -1. 539 | <_> 540 | 6 1 4 2 2. 541 | <_> 542 | 10 3 4 2 2. 543 | 0 544 | 4.4159390963613987e-003 545 | -8.9145201444625854e-001 546 | 3.3699101209640503e-001 547 | <_> 548 | 549 | <_> 550 | 551 | 552 | 553 | <_> 554 | 15 3 3 4 -1. 555 | <_> 556 | 16 3 1 4 3. 557 | 0 558 | 1.1704630014719442e-004 559 | 1 560 | 3.1077799201011658e-001 561 | <_> 562 | 563 | 564 | 565 | <_> 566 | 13 5 3 4 -1. 567 | <_> 568 | 14 5 1 4 3. 569 | 0 570 | 5.5624791420996189e-003 571 | -8.1615281105041504e-001 572 | 5.3901451826095581e-001 573 | <_> 574 | 575 | <_> 576 | 577 | 578 | 579 | <_> 580 | 14 9 6 5 -1. 581 | <_> 582 | 17 9 3 5 2. 583 | 0 584 | 3.4512840211391449e-002 585 | 1 586 | 2.6539298892021179e-001 587 | <_> 588 | 589 | 590 | 591 | <_> 592 | 8 5 4 3 -1. 593 | <_> 594 | 9 5 2 3 2. 595 | 0 596 | 9.8612513393163681e-003 597 | -7.9879987239837646e-001 598 | 7.1010297536849976e-001 599 | <_> 600 | 601 | <_> 602 | 603 | 604 | 605 | <_> 606 | 7 2 6 3 -1. 607 | <_> 608 | 9 2 2 3 3. 609 | 0 610 | -1.7420940101146698e-002 611 | 7.8878182172775269e-001 612 | 1 613 | <_> 614 | 615 | 616 | 617 | <_> 618 | 8 1 4 6 -1. 619 | <_> 620 | 9 1 2 6 2. 621 | 0 622 | 9.4648143276572227e-003 623 | -8.6975818872451782e-001 624 | 6.4330947399139404e-001 625 | <_> 626 | 627 | <_> 628 | 629 | 630 | 631 | <_> 632 | 4 3 16 9 -1. 633 | <_> 634 | 12 3 8 9 2. 635 | 0 636 | 1.5069990418851376e-002 637 | 1 638 | 3.4470221400260925e-001 639 | <_> 640 | 641 | 642 | 643 | <_> 644 | 6 3 4 8 -1. 645 | <_> 646 | 6 3 2 4 2. 647 | <_> 648 | 8 7 2 4 2. 649 | 0 650 | 2.7276139706373215e-002 651 | -8.8079357147216797e-001 652 | 7.6766937971115112e-001 653 | <_> 654 | 655 | <_> 656 | 657 | 658 | 659 | <_> 660 | 1 1 4 19 -1. 661 | <_> 662 | 3 1 2 19 2. 663 | 0 664 | -1.2894829735159874e-002 665 | 3.7631559371948242e-001 666 | 1 667 | <_> 668 | 669 | 670 | 671 | <_> 672 | 1 11 4 2 -1. 673 | <_> 674 | 2 11 2 2 2. 675 | 0 676 | -5.7455319911241531e-003 677 | 8.3922427892684937e-001 678 | -9.8424279689788818e-001 679 | 1.5381850004196167e+000 680 | 0 681 | -1 682 | <_> 683 | 684 | 685 | <_> 686 | 687 | <_> 688 | 689 | 690 | 691 | <_> 692 | 0 0 11 15 -1. 693 | <_> 694 | 0 5 11 5 3. 695 | 0 696 | -2.5208670645952225e-002 697 | 1 698 | -7.3783451318740845e-001 699 | <_> 700 | 701 | 702 | 703 | <_> 704 | 0 1 1 18 -1. 705 | <_> 706 | 0 10 1 9 2. 707 | 0 708 | -3.5002389922738075e-003 709 | 6.0456407070159912e-001 710 | -5.2267402410507202e-001 711 | <_> 712 | 713 | <_> 714 | 715 | 716 | 717 | <_> 718 | 4 5 8 15 -1. 719 | <_> 720 | 8 5 4 15 2. 721 | 0 722 | 3.2608121633529663e-002 723 | 1 724 | -8.9341151714324951e-001 725 | <_> 726 | 727 | 728 | 729 | <_> 730 | 2 9 10 11 -1. 731 | <_> 732 | 7 9 5 11 2. 733 | 0 734 | -5.2253220230340958e-002 735 | -9.2110282182693481e-001 736 | 5.5714380741119385e-001 737 | <_> 738 | 739 | <_> 740 | 741 | 742 | 743 | <_> 744 | 7 17 3 2 -1. 745 | <_> 746 | 8 17 1 2 3. 747 | 0 748 | 2.2503470536321402e-003 749 | 1 750 | -8.8232368230819702e-001 751 | <_> 752 | 753 | 754 | 755 | <_> 756 | 4 16 10 3 -1. 757 | <_> 758 | 9 16 5 3 2. 759 | 0 760 | 1.1138039641082287e-002 761 | 4.5365229249000549e-001 762 | -8.7354677915573120e-001 763 | <_> 764 | 765 | <_> 766 | 767 | 768 | 769 | <_> 770 | 5 16 6 2 -1. 771 | <_> 772 | 8 16 3 2 2. 773 | 0 774 | -5.7771787978708744e-003 775 | -8.0953860282897949e-001 776 | 1 777 | <_> 778 | 779 | 780 | 781 | <_> 782 | 2 16 9 3 -1. 783 | <_> 784 | 5 17 3 1 9. 785 | 0 786 | -1.3786350376904011e-002 787 | -6.6583162546157837e-001 788 | 4.9925059080123901e-001 789 | <_> 790 | 791 | <_> 792 | 793 | 794 | 795 | <_> 796 | 19 0 1 4 -1. 797 | <_> 798 | 19 2 1 2 2. 799 | 0 800 | 8.4821821656078100e-004 801 | 1 802 | -7.2904092073440552e-001 803 | <_> 804 | 805 | 806 | 807 | <_> 808 | 6 4 8 13 -1. 809 | <_> 810 | 10 4 4 13 2. 811 | 0 812 | -6.0129031538963318e-002 813 | -9.4193089008331299e-001 814 | 4.8614209890365601e-001 815 | <_> 816 | 817 | <_> 818 | 819 | 820 | 821 | <_> 822 | 11 4 4 4 -1. 823 | <_> 824 | 12 4 2 4 2. 825 | 0 826 | 6.3089472241699696e-003 827 | 1 828 | 5.6043982505798340e-001 829 | <_> 830 | 831 | 832 | 833 | <_> 834 | 5 6 3 3 -1. 835 | <_> 836 | 6 6 1 3 3. 837 | 0 838 | 4.8291720449924469e-003 839 | -6.1950987577438354e-001 840 | 3.2476270198822021e-001 841 | <_> 842 | 843 | <_> 844 | 845 | 846 | 847 | <_> 848 | 9 2 7 9 -1. 849 | <_> 850 | 6 5 7 3 3. 851 | 1 852 | -7.1375720202922821e-002 853 | -9.0404188632965088e-001 854 | 1 855 | <_> 856 | 857 | 858 | 859 | <_> 860 | 3 19 6 1 -1. 861 | <_> 862 | 6 19 3 1 2. 863 | 0 864 | 3.4400189761072397e-003 865 | 3.8457119464874268e-001 866 | -8.8946622610092163e-001 867 | <_> 868 | 869 | <_> 870 | 871 | 872 | 873 | <_> 874 | 3 19 9 1 -1. 875 | <_> 876 | 6 19 3 1 3. 877 | 0 878 | -4.9882400780916214e-003 879 | -8.6565148830413818e-001 880 | 1 881 | <_> 882 | 883 | 884 | 885 | <_> 886 | 5 11 5 4 -1. 887 | <_> 888 | 5 11 5 2 2. 889 | 1 890 | 1.0913630016148090e-002 891 | 4.5251420140266418e-001 892 | -6.9369602203369141e-001 893 | <_> 894 | 895 | <_> 896 | 897 | 898 | 899 | <_> 900 | 7 5 3 2 -1. 901 | <_> 902 | 8 5 1 2 3. 903 | 0 904 | 2.4461629800498486e-003 905 | 1 906 | 5.2243071794509888e-001 907 | <_> 908 | 909 | 910 | 911 | <_> 912 | 14 0 1 12 -1. 913 | <_> 914 | 14 6 1 6 2. 915 | 0 916 | -3.0945599079132080e-002 917 | 8.5188317298889160e-001 918 | -5.3872317075729370e-001 919 | <_> 920 | 921 | <_> 922 | 923 | 924 | 925 | <_> 926 | 2 13 8 4 -1. 927 | <_> 928 | 6 13 4 4 2. 929 | 0 930 | -1.4446619898080826e-002 931 | -8.6957198381423950e-001 932 | 1 933 | <_> 934 | 935 | 936 | 937 | <_> 938 | 3 13 8 5 -1. 939 | <_> 940 | 7 13 4 5 2. 941 | 0 942 | 1.5233219601213932e-002 943 | 4.5263200998306274e-001 944 | -8.1135600805282593e-001 945 | <_> 946 | 947 | <_> 948 | 949 | 950 | 951 | <_> 952 | 4 19 12 1 -1. 953 | <_> 954 | 8 19 4 1 3. 955 | 0 956 | -2.5891559198498726e-003 957 | -5.7905787229537964e-001 958 | 1 959 | <_> 960 | 961 | 962 | 963 | <_> 964 | 7 19 2 1 -1. 965 | <_> 966 | 8 19 1 1 2. 967 | 0 968 | 1.0837919544428587e-003 969 | 5.3870928287506104e-001 970 | -9.7009569406509399e-001 971 | <_> 972 | 973 | <_> 974 | 975 | 976 | 977 | <_> 978 | 4 5 8 6 -1. 979 | <_> 980 | 8 5 4 6 2. 981 | 0 982 | 1.7036350443959236e-002 983 | 1 984 | -8.4595912694931030e-001 985 | <_> 986 | 987 | 988 | 989 | <_> 990 | 6 4 10 5 -1. 991 | <_> 992 | 11 4 5 5 2. 993 | 0 994 | -2.2440670058131218e-002 995 | -9.3406337499618530e-001 996 | 4.2693048715591431e-001 997 | -1.3793849945068359e-001 998 | 1 999 | -1 1000 | <_> 1001 | 1002 | 1003 | <_> 1004 | 1005 | <_> 1006 | 1007 | 1008 | 1009 | <_> 1010 | 4 4 12 16 -1. 1011 | <_> 1012 | 8 4 4 16 3. 1013 | 0 1014 | -6.7628182470798492e-002 1015 | -7.4111908674240112e-001 1016 | 1 1017 | <_> 1018 | 1019 | 1020 | 1021 | <_> 1022 | 7 17 3 3 -1. 1023 | <_> 1024 | 8 18 1 1 9. 1025 | 0 1026 | -6.5513071604073048e-003 1027 | -8.7756520509719849e-001 1028 | 5.7063782215118408e-001 1029 | <_> 1030 | 1031 | <_> 1032 | 1033 | 1034 | 1035 | <_> 1036 | 4 5 4 4 -1. 1037 | <_> 1038 | 5 5 2 4 2. 1039 | 0 1040 | -1.0421309620141983e-002 1041 | 7.8666269779205322e-001 1042 | 1 1043 | <_> 1044 | 1045 | 1046 | 1047 | <_> 1048 | 8 2 3 15 -1. 1049 | <_> 1050 | 9 7 1 5 9. 1051 | 0 1052 | 3.5120330750942230e-002 1053 | -5.1232081651687622e-001 1054 | 5.7854127883911133e-001 1055 | <_> 1056 | 1057 | <_> 1058 | 1059 | 1060 | 1061 | <_> 1062 | 3 19 6 1 -1. 1063 | <_> 1064 | 6 19 3 1 2. 1065 | 0 1066 | 2.3085731081664562e-003 1067 | 1 1068 | -7.6840782165527344e-001 1069 | <_> 1070 | 1071 | 1072 | 1073 | <_> 1074 | 10 5 6 6 -1. 1075 | <_> 1076 | 10 5 3 6 2. 1077 | 1 1078 | -3.6485549062490463e-002 1079 | -5.9415107965469360e-001 1080 | 4.8120400309562683e-001 1081 | <_> 1082 | 1083 | <_> 1084 | 1085 | 1086 | 1087 | <_> 1088 | 10 7 4 4 -1. 1089 | <_> 1090 | 11 7 2 4 2. 1091 | 0 1092 | 3.8993770722299814e-003 1093 | 1 1094 | 4.4938841462135315e-001 1095 | <_> 1096 | 1097 | 1098 | 1099 | <_> 1100 | 12 12 4 6 -1. 1101 | <_> 1102 | 14 12 2 6 2. 1103 | 0 1104 | -1.7095550894737244e-002 1105 | 5.8982378244400024e-001 1106 | -6.3544249534606934e-001 1107 | <_> 1108 | 1109 | <_> 1110 | 1111 | 1112 | 1113 | <_> 1114 | 8 16 2 2 -1. 1115 | <_> 1116 | 8 16 2 1 2. 1117 | 1 1118 | -2.6509580202400684e-003 1119 | -7.4674302339553833e-001 1120 | 1 1121 | <_> 1122 | 1123 | 1124 | 1125 | <_> 1126 | 16 0 4 1 -1. 1127 | <_> 1128 | 18 0 2 1 2. 1129 | 0 1130 | -1.0701370192691684e-003 1131 | -7.6775008440017700e-001 1132 | 4.3917599320411682e-001 1133 | <_> 1134 | 1135 | <_> 1136 | 1137 | 1138 | 1139 | <_> 1140 | 9 8 4 2 -1. 1141 | <_> 1142 | 10 8 2 2 2. 1143 | 0 1144 | 4.8490660265088081e-003 1145 | 1 1146 | 6.1948227882385254e-001 1147 | <_> 1148 | 1149 | 1150 | 1151 | <_> 1152 | 3 8 6 3 -1. 1153 | <_> 1154 | 5 8 2 3 3. 1155 | 0 1156 | -2.1174849942326546e-002 1157 | 6.9238477945327759e-001 1158 | -5.7607620954513550e-001 1159 | <_> 1160 | 1161 | <_> 1162 | 1163 | 1164 | 1165 | <_> 1166 | 12 2 6 18 -1. 1167 | <_> 1168 | 12 2 3 9 2. 1169 | <_> 1170 | 15 11 3 9 2. 1171 | 0 1172 | -9.1728113591670990e-002 1173 | 7.8373330831527710e-001 1174 | 1 1175 | <_> 1176 | 1177 | 1178 | 1179 | <_> 1180 | 8 4 12 14 -1. 1181 | <_> 1182 | 8 4 6 7 2. 1183 | <_> 1184 | 14 11 6 7 2. 1185 | 0 1186 | 6.3391521573066711e-002 1187 | -4.9195569753646851e-001 1188 | 6.5842992067337036e-001 1189 | <_> 1190 | 1191 | <_> 1192 | 1193 | 1194 | 1195 | <_> 1196 | 0 0 11 12 -1. 1197 | <_> 1198 | 0 4 11 4 3. 1199 | 0 1200 | -2.4108730256557465e-002 1201 | 1 1202 | -6.2276291847229004e-001 1203 | <_> 1204 | 1205 | 1206 | 1207 | <_> 1208 | 0 5 14 10 -1. 1209 | <_> 1210 | 0 10 14 5 2. 1211 | 0 1212 | 5.2185848355293274e-002 1213 | 5.4080730676651001e-001 1214 | -6.3984328508377075e-001 1215 | <_> 1216 | 1217 | <_> 1218 | 1219 | 1220 | 1221 | <_> 1222 | 8 5 3 2 -1. 1223 | <_> 1224 | 9 5 1 2 3. 1225 | 0 1226 | 3.9632301777601242e-003 1227 | 1 1228 | 6.6911828517913818e-001 1229 | <_> 1230 | 1231 | 1232 | 1233 | <_> 1234 | 7 4 3 3 -1. 1235 | <_> 1236 | 8 5 1 1 9. 1237 | 0 1238 | 3.7253440823405981e-003 1239 | -6.4084410667419434e-001 1240 | 4.2938518524169922e-001 1241 | <_> 1242 | 1243 | <_> 1244 | 1245 | 1246 | 1247 | <_> 1248 | 19 0 1 4 -1. 1249 | <_> 1250 | 19 1 1 2 2. 1251 | 0 1252 | 4.5805040281265974e-004 1253 | 1 1254 | -7.0981818437576294e-001 1255 | <_> 1256 | 1257 | 1258 | 1259 | <_> 1260 | 19 0 1 4 -1. 1261 | <_> 1262 | 19 1 1 2 2. 1263 | 0 1264 | -4.3362649739719927e-004 1265 | -4.2568281292915344e-001 1266 | 6.4837968349456787e-001 1267 | <_> 1268 | 1269 | <_> 1270 | 1271 | 1272 | 1273 | <_> 1274 | 3 5 2 7 -1. 1275 | <_> 1276 | 4 5 1 7 2. 1277 | 0 1278 | -8.8344682008028030e-003 1279 | 5.6010240316390991e-001 1280 | 1 1281 | <_> 1282 | 1283 | 1284 | 1285 | <_> 1286 | 7 0 6 7 -1. 1287 | <_> 1288 | 7 0 3 7 2. 1289 | 1 1290 | 1.0024249553680420e-002 1291 | 4.0823331475257874e-001 1292 | -6.0941112041473389e-001 1293 | <_> 1294 | 1295 | <_> 1296 | 1297 | 1298 | 1299 | <_> 1300 | 0 18 4 2 -1. 1301 | <_> 1302 | 2 18 2 2 2. 1303 | 0 1304 | -2.7991709066554904e-004 1305 | -4.4562909007072449e-001 1306 | 1 1307 | <_> 1308 | 1309 | 1310 | 1311 | <_> 1312 | 8 8 12 8 -1. 1313 | <_> 1314 | 12 8 4 8 3. 1315 | 0 1316 | -4.0251381695270538e-002 1317 | 6.8400329351425171e-001 1318 | -5.5093038082122803e-001 1319 | <_> 1320 | 1321 | <_> 1322 | 1323 | 1324 | 1325 | <_> 1326 | 0 14 1 3 -1. 1327 | <_> 1328 | 0 15 1 1 3. 1329 | 0 1330 | 1.1060229735448956e-003 1331 | 1 1332 | -8.7556070089340210e-001 1333 | <_> 1334 | 1335 | 1336 | 1337 | <_> 1338 | 5 18 6 1 -1. 1339 | <_> 1340 | 8 18 3 1 2. 1341 | 0 1342 | -2.9391210991889238e-003 1343 | -6.4071631431579590e-001 1344 | 4.2237558960914612e-001 1345 | <_> 1346 | 1347 | <_> 1348 | 1349 | 1350 | 1351 | <_> 1352 | 14 11 2 2 -1. 1353 | <_> 1354 | 14 11 1 2 2. 1355 | 1 1356 | 5.3266989998519421e-003 1357 | 1 1358 | 6.7434668540954590e-001 1359 | <_> 1360 | 1361 | 1362 | 1363 | <_> 1364 | 13 11 3 4 -1. 1365 | <_> 1366 | 14 11 1 4 3. 1367 | 0 1368 | 1.9711100321728736e-004 1369 | -7.0805662870407104e-001 1370 | 2.7415850758552551e-001 1371 | -1.4657120406627655e-001 1372 | 2 1373 | -1 1374 | <_> 1375 | 1376 | 1377 | <_> 1378 | 1379 | <_> 1380 | 1381 | 1382 | 1383 | <_> 1384 | 10 4 7 10 -1. 1385 | <_> 1386 | 10 9 7 5 2. 1387 | 0 1388 | 6.1874971725046635e-003 1389 | 1 1390 | 1.0000289678573608e+000 1391 | <_> 1392 | 1393 | 1394 | 1395 | <_> 1396 | 8 5 12 12 -1. 1397 | <_> 1398 | 8 5 6 6 2. 1399 | <_> 1400 | 14 11 6 6 2. 1401 | 0 1402 | -1.6684630513191223e-001 1403 | 1. 1404 | -6.4018201828002930e-001 1405 | <_> 1406 | 1407 | <_> 1408 | 1409 | 1410 | 1411 | <_> 1412 | 10 3 4 12 -1. 1413 | <_> 1414 | 10 9 4 6 2. 1415 | 0 1416 | -4.3528191745281219e-003 1417 | -4.7489950060844421e-001 1418 | 1 1419 | <_> 1420 | 1421 | 1422 | 1423 | <_> 1424 | 11 17 1 2 -1. 1425 | <_> 1426 | 11 17 1 1 2. 1427 | 1 1428 | 2.4391049519181252e-003 1429 | 9.2672532796859741e-001 1430 | -9.3789821863174438e-001 1431 | <_> 1432 | 1433 | <_> 1434 | 1435 | 1436 | 1437 | <_> 1438 | 3 5 2 3 -1. 1439 | <_> 1440 | 2 6 2 1 3. 1441 | 1 1442 | -6.1387829482555389e-003 1443 | -7.3620361089706421e-001 1444 | 1 1445 | <_> 1446 | 1447 | 1448 | 1449 | <_> 1450 | 14 3 2 3 -1. 1451 | <_> 1452 | 14 4 2 1 3. 1453 | 0 1454 | 2.7482500299811363e-003 1455 | 8.0812031030654907e-001 1456 | -7.5801301002502441e-001 1457 | <_> 1458 | 1459 | <_> 1460 | 1461 | 1462 | 1463 | <_> 1464 | 2 6 3 3 -1. 1465 | <_> 1466 | 2 7 3 1 3. 1467 | 0 1468 | -6.8063312210142612e-004 1469 | -4.8606950044631958e-001 1470 | 1 1471 | <_> 1472 | 1473 | 1474 | 1475 | <_> 1476 | 7 18 3 2 -1. 1477 | <_> 1478 | 8 18 1 2 3. 1479 | 0 1480 | -3.4882400650531054e-003 1481 | -9.6335417032241821e-001 1482 | 9.3141609430313110e-001 1483 | <_> 1484 | 1485 | <_> 1486 | 1487 | 1488 | 1489 | <_> 1490 | 6 9 3 1 -1. 1491 | <_> 1492 | 7 10 1 1 3. 1493 | 1 1494 | 3.7412709207274020e-004 1495 | 1 1496 | 7.7949160337448120e-001 1497 | <_> 1498 | 1499 | 1500 | 1501 | <_> 1502 | 1 12 6 2 -1. 1503 | <_> 1504 | 3 12 2 2 3. 1505 | 0 1506 | -2.1708080021198839e-004 1507 | -7.3272567987442017e-001 1508 | 7.3104548454284668e-001 1509 | -6.0141628980636597e-001 1510 | 3 1511 | -1 1512 | 1513 | --------------------------------------------------------------------------------