Motion sensor application or solution

edited July 2017 in Android Mode

Motion sensor application or solution

Good morning. nice to meet you. Request a method or example for the motion sensor. Here's an image of what I want to do. tt

What should I use? Experts are waiting for your answers.



  • @Gwak===

    can you describe with 1 word what d you want ("pinch", "double tap", "scale" "scroll"...." which probably is one of the gestures that android can detect using the GestureDetector.SimpleOnGestureListener class.

  • @Gwak -- re:

    "Request a method or example for the motion sensor."

    What motion sensor?

    1. the touch screen?
    2. the camera?
    3. something else?

    I ask because in your picture, the hand is not touching the screen.

  • Dear akenation,

    Perhaps 'GestureDetector.SimpleOnGestureListener' seems to fit. Do you have any examples or libraries from processing tool?

    Dear jeremydouglass,

    I do not know how to do it. So I asked questions. The obvious thing is not how to touch it.

    It seems to have done camera image processing anyway. I think so.

  • @Gwak=== looking more carefully to your pictures i think now that you want to get events about rotation/positionX,Y,Z axis: in this case you can use the accelerometer and gyroscope sensors with android sensorManager. more details here (see the video at the end):

  • Dear akenaton, Dear jeremydouglass,

    Please refer to the video and library. Can I process the library? (With processing tools) Is it possible?

  • Answer ✓

    @Gwak===thanks for the video: now i understand what you want; when i get some time i ll have a look to this lib; as for now what i can see && guess from the video is that it uses the front cam for detecting gestures, probably with Open Cv, adding listeners for the gestures and emulating the real "touch events", swipe, scroll a so on. How this works in details i cannot tell you for the moment but i thi nk that there are 2 kinds of parameters, first one is for motion and based on x && y starting points and end points (perhaps also speed) second one from color, because the hand is very near from the cam and we can imagine that an average pixels color is done....Now, as for your question "can i use this lib with P5" i am quite sure that you cannot do that without transforming the lib itself. Yet it is probably more easy to use Eclipse or AS for that...

  • edited July 2017 Answer ✓

    Request a method or example for the motion sensor.

    This is not right. The camera is not a "motion sensor." What you mean is:

    Request a method or example for using the camera to detect hand gestures that do not touch the screen.

    That is hard. It is going to require either:

    1. a big library (I don't know of one already out there), or
    2. you will have to write a big library, for example using OpenCV as @akenaton suggestions, or
    3. you will have to rewrite a big library Java library that already exists so that it will work with Processing, for example rewriting Handwave library to work with Processing. This could be not much work, or a lot.
  • Dear akenaton, Dear jeremydouglass,

    This solution is correct for image(camera) processing. Thank you anyway. I sincerely appreciate you.

Sign In or Register to comment.