• <ins id="pjuwb"></ins>
    <blockquote id="pjuwb"><pre id="pjuwb"></pre></blockquote>
    <noscript id="pjuwb"></noscript>
          <sup id="pjuwb"><pre id="pjuwb"></pre></sup>
            <dd id="pjuwb"></dd>
            <abbr id="pjuwb"></abbr>

            Gesture recognition

            LINK: http://wiki.nuigroup.com/Gesture_recognition

            Contents

            [hide]

            Background

            Touchlib does a fine job of picking out contacts within the input surface. At the moment, there is no formal way of defining how those blob contacts are translated into intended user actions. Some of this requires application assistance to provide context, but some of it is down to pattern matching the appearance, movement and loss of individual blobs or combined blobs.

            What I'm attempting to describe here, and for others to contribute to, is a way of


            1. Describing a standard library of gestures suitable for the majority of applications
            2. A library of code that supports the defined gestures, and generates events to the application layer


            By using an XML dialect to describe gestures, it means that individual applications can specify their range of supported gestures to the Gesture Engine. Custom gestures can be supported.

            By loosely coupling gesture recognition to the application, we can allow people to build different types of input device and plug them all into the same applications where appropriate.

            In the early stages of development, we are all doing our own thing with minimal overlap. Over time we will realise the benefits of various approaches, and by using some standardised interfaces, we can mix and match to take advantage of the tools that work best for our applications. Hard coded interfaces or internal gesture recognition will tie you down and potentially make your application obsolete as things move on.

            I'd really appreciate some feedback on this - this is just my take on how to move this forward a little at this stage.

            Gesture Definition Markup Langauge

            GDML is a proposed XML dialect that describes how events on the input surface are built up to create distinct gestures.

            Tap Gesture

            <gdml>
            <gesture name="tap">
            <comment>
            A 'tap' is considered to be equivalent to the single click event in a
            normal windows/mouse environment.
            </comment>
            <sequence>
            <acquisition type="blob"/>
            <update>
            <range max="10" />
            <size maxDiameter="10" />
            <duration max="250" />
            </update>
            <loss>
            <event name="tap">
            <var name="x" />
            <var name="y" />
            <var name="size" />
            </event>
            </loss>
            </sequence>
            </gesture>
            </gdml>

            The gesture element defines the start of a gesture, and in this case gives it the name 'tap'.

            The sequence element defines the start of a sequence of events that will be tracked. This gesture is considered valid whilst the events sequence remains valid.

            The acquisition element defines that an acquisition event should be seen (fingerDown in Touchlib). This tag is designed to be extensible to input events other than blob, such as fiduciary markers, real world objects or perhaps facial recognition for input systems that are able to distinguish such features.

            The update element defines the allowed parameters for the object once acquired. If the defined parameters become invalid during tracking of the gesture, the gesture is no longer valid.

            The range element validates that the current X and Y coordinates of the object are within the specified distance of the original X and Y coordinates. range should ultimately support other validations, such as 'min'.

            The size element validates that the object diameter is within the specified range. Again, min and other validations of size could be defined. Size allows you to distinguish between finger and palm sized touch events for example.

            The duration element defines that the object should only exist for the specified time period (milliseconds). If the touch remains longer than this period, its not a 'tap', but perhaps a 'move' or 'hold' gesture.

            The loss element defines what should occur when the object is lost from the input device.

            The event element defines that the gesture library should generate a 'tap' event to the application layer, providing the x, y, and size variables.

            Double Tap Gesture

            <gesture name="doubleTap">
            <comment>
            A 'doubleTap' gesture is equivalent to the double click event in a normal
            windows/mouse environment.
            </comment>
            <sequence>
            <gestureRef id="A" name="tap" />
            <duration max="250" />
            <gestureRef id="B" name="tap">
            <onEvent name="acquisition">
            <range objects="A,B" max="10" />
            </onEvent>
            <onEvent name="tap">
            <range objects="A,B" max="10" />
            <event name="doubleTap">
            <var name="x" />
            <var name="y" />
            <var name="size" />
            </event>
            </onEvent>
            </gestureRef>
            </sequence>
            </gesture>

            This example shows how more complex gestures can be built from simple gestures. A double tap gesture is in effect, two single taps with a short space between. The taps should be within a defined range of each other, so that they are not confused with taps in different regions of the display.

            Note that the gesture is not considered invalid if a tap is generated in another area of the display. GestureLib will discard it and another tap within the permitted range will complete the sequence.

            In the case of double tap, an initial tap gesture is captured. A timer is then evaluated, such that the gesture is no longer valid if the specified duration expires. However, if a second tap is initiated, it is checked to make sure that it is within range of the first. range is provided with references to the objects that need comparing (allowing for other more complex gestures to validate subcomponents of the gesture). This is done at the point of acquisition of the second object.

            Once the second tap is complete and the event raised, range is again validated, and an event generated to inform the application of the gesture.

            Move Gesture

            <gesture name="move">
            <comment>
            A 'move' is considered to be a sustained finger down incorporating
            movement away from the point of origin (with potential return during
            the transition).
            </comment>
            <sequence>
            <aquisition type="blob" />
            <update>
            <range min="5" />
            <event name="move">
            <var name="x" />
            <var name="y" />
            <var name="size" />
            </event>
            </update>
            <loss>
            <event name="moveComplete">
            <var name="x" />
            <var name="y" />
            <var name="size" />
            </event>
            </loss>
            </sequence>
            </gesture>

            Zoom Gesture

            <gesture name="zoom">
            <comment>
            A 'zoom' is considered to be two objects that move towards or away from
            each other in the same plane.
            </comment>
            <sequence>
            <compound>
            <gestureRef id="A" name="move">
            <gestureRef id="B" name="move">
            </compound>
            <onEvent name="move">
            <plane objects="A,B" maxVariance="5" />
            <event name="zoom">
            <var name="plane.distance" />
            <var name="plane.centre" />
            </event>
            </onEvent>
            <onEvent name="moveComplete">
            <plane objects="A,B" maxVariance="5" />
            <event name="zoomComplete">
            <var name="plane.distance" />
            <var name="plane.centre" />
            </event>
            </onEvent>
            </sequence>
            </gesture>

            A zoom gesture is a compound of two move gestures.

            The compound element defines that the events occur in parallel rather than series.

            The plane element calculates the line between the two objects, and checks the maximum variance in the angle from its initial (so you can distinguish between a zoom and a rotate, for example).

            'move' events from either object are translated into zoom events to the application.

            Rotate Gesture

            <gesture name="rotate">
            <comment>
            A 'rotate' is considered to be two objects moving around a central axis
            </comment>
            <sequence>
            <compound>
            <gestureRef id="A" name="move">
            <gestureRef id="B" name="move">
            </compound>
            <onEvent name="move">
            <axis objects="A,B" range="5" />
            <event name="rotate">
            <var name="axis.avgX" />
            <var name="axis.avgY" />
            <var name="axis.angleMax" />
            </event>
            </onEvent>
            <onEvent name="moveComplete">
            <axis objects="A,B" range="5" />
            <event name="rotateComplete">
            <var name="axis.avgX" />
            <var name="axis.avgY" />
            <var name="axis.angleMax" />
            </event>
            </onEvent>
            </sequence>
            </gesture>

            The axis element calculates the midpoint between two objects and compares current position against the initial.

            GestureLib - A Gesture Recognition Engine

            GestureLib does not currently exist!

            The purpose of GestureLib is to provide an interface between Touchlib (or any other blob/object tracking software), and the application layer. GestureLib analyses object events generated by Touchlib, and creates Gesture related events to the application for processing.

            GestureLib reads gesture definitions defined in GDML, and the operates a pattern matching principle to those gestures to determine which gestures are in progress.

            Why GestureLib?

            My feeling is that this functionality should be separated from Touchlib, a) for the sake of clarity, and b) because its quite likely that working solutions for a high performance multi-touch environment will require distributed processing. i.e. one system doing blob tracking, another doing gesture recognition, and a further system for the application. If you can get all of your components within the same machine, then excellent, but modularity gives a great deal of flexibility and scalability.

            Proposed Processing

            When a object is acquired, GestureLib sends an event to the application layer providing the basic details of the acquired object, such as coordinates and size. The application can then provide context to GestureLib about the gestures that are allowed in this context.

            For example, take a photo light table type application. This will have a background canvas (which might support zoom and pan/move gestures), and image objects arranged on the canvas. When the user touches a single photo, the application can inform GestureLib that the applicable gestures for this object are 'tap', 'move' and 'zoom'.

            GestureLib now starts tracking further incoming events knowing that for this particular object, only three gestures are possible. Based on the allowable parameters for the defined gestures, GestureLib is then able to determine over time which unique gesture is valid. For example if a finger appears, it could be a tap, move or potentially a zoom if another finger appears. If the finger is quickly released, only a tap gesture is possible (assuming that a move must contain a minimum time or distance parameter). If the finger moves outside the permitted range for a tap, tap can be excluded, and matching continues with only move or zoom. Zoom is invalid until another finger appears, but would have an internal timeout that means the introduction of another finger later in the sequence can be treated as a separate gesture (perhaps another user, or the same user interacting with another part of the application).

            Again, the application can be continually advised of touch events so that it can continue to provide context, without needing to do the math to figure out the exact gesture.

            posted on 2009-05-12 14:41 zmj 閱讀(1419) 評(píng)論(0)  編輯 收藏 引用


            只有注冊(cè)用戶登錄后才能發(fā)表評(píng)論。
            網(wǎng)站導(dǎo)航: 博客園   IT新聞   BlogJava   博問   Chat2DB   管理


            国内精品人妻无码久久久影院| 精品久久人人爽天天玩人人妻| 久久发布国产伦子伦精品| 国内精品伊人久久久久AV影院| 久久99精品综合国产首页| 亚洲国产香蕉人人爽成AV片久久 | 久久久WWW成人免费毛片| 四虎影视久久久免费观看| 久久精品国产秦先生| 亚洲国产婷婷香蕉久久久久久| 国产精品无码久久久久久| 日本精品久久久久影院日本| 精品国产乱码久久久久久1区2区| 久久国产精品国语对白| 91性高湖久久久久| 久久久噜噜噜www成人网| 狠狠人妻久久久久久综合| 亚洲中文字幕久久精品无码喷水| 久久久精品久久久久久| 72种姿势欧美久久久久大黄蕉| 亚洲综合精品香蕉久久网| 日本精品一区二区久久久 | 久久夜色精品国产| 精品国产综合区久久久久久 | 久久精品成人影院| 精品久久久久久国产| 久久婷婷五月综合国产尤物app| 亚洲国产欧美国产综合久久| 99久久无色码中文字幕人妻| 久久影院亚洲一区| 亚洲伊人久久综合中文成人网| 精品久久久久一区二区三区| 亚洲国产精品久久久久婷婷老年| 97久久精品午夜一区二区| 国产精品福利一区二区久久| 久久青青草原精品国产| 久久久久国产精品熟女影院| 国内精品久久久人妻中文字幕| 国产精品久久久久无码av| 伊人久久大香线焦综合四虎| 精品久久久久久久中文字幕|