I'm developing an app that uses device sensors to determine user x-axis rotations and y-axis pitch (essentially the user spins in a circle and looks up at the sky or down at the ground). I've developed this app for a phone using the android Sensor.getRotationMatrix and Sensor.getOrientation functions and then using the first two resulting orientation values. I've now moved my app to a Project Tango tablet and these values no longer seem to be valid. I've looked into PT a bit and it seems that this measures things in Quarternions. Does this mean that Project Tango is not meant to implement the Android SDK?
The Project Tango APIs (which are for Android only) and the Android SDK are both required to build Project Tango apps. The Tango APIs offer higher level interfaces to Android device sensors than the Android SDK's direct access to sensors state - Tango APIs combine sensors states to deliver more complete "pose" (6 degrees of freedom position and orientation) state, as well as 3D (X, Y, depth) scene points and even feature recognition in scenes, etc. The crucial benefit of the Tango APIs is syncing several different sensors very precisely in realtime so the pose state is very accurate; indeed, the latest Tango devices support that sync inside the CPU circuitry itself. An app collecting that data from sensors using the (non-Tango) Android SDK APIs will not be fast enough to correlate the sensors as through the Tango APIs. So perhaps you're getting sensor data that's not synced, which sows as offsets.
Also, a known bug in the Tango APIs is that the device's compass sensor is returning garbage values. I don't know if that bug affects the quality of data returned by the Android SDK's calls directly to the compass. But the Android SDK's calls to the compass are going to return state at least somewhat out of sync with the state returned by the Tango API calls.
In theory, the Android SDK should still be working, so your app should work without any change, but it won't get advantage of the improvements given by the Project Tango.
To get the advantages of Tango (fisheye camera for improved motion tracking...), you need to use the Tango API to activate the Tango Service and then yes, use the pose in quaternions.
Related
Is there any cross-platform framework for mobile apps (Xamarin, Flutter, React-Native, etc.) that allows accessing frames from the camera's feed live?
In other words, is there any way to perform manipulations on live video (frame-by-frame) in cross-platform environments? (Similarly to this tutorial for iOS).
From what it seems, in Flutter for example, it's possible to display a live preview of the camera, but not to access the frames; and beside some ghost-town questions I couldn't find much online about it.
Xamarin allows you to access and use each and every feature of all platforms.
The code will be platform specific but C#. I have one project in my repo where I'm using Xamarin.iOS to overlay rectangle detection onto the camera live feed. You can implement something similar using Xamarin.Android (using Android specific APIs).
You can then create an abstraction which will be consumed from a Xamarin.Forms app or you go with two separate C# based native apps.
Tango is developed by google which has api that used for motion tracking on mobile devices. I was wondering if it could be applied to stand alone java application without android (for java-SE). If not then I was wondering are there any api out there are similar to tango where it tracks motion and depth perceptions.
I am trying to capture the motion data from a video, not camera/web cam. If this was possible at all.
Googles Tango API is only compatible with Tango enabled devices only. So it does not work on all mobile devices only devices that are Tango enabled. If you try to use the API with a device that is not Tango Enabled it wont work.
I think you should research a bit into OpenCV its an Open Source Computer Vision Library that is compatible with Java and many other languages. It lets you analyze videos without the need for that many sensors (like Raw Depth Sensors which are primarily used on Tango enabled Devices).
The Tango API is only available on Tango-enabled devices, which there aren't that many of. That being said, it is possible to create your own motion-tracking and depth-sensitive app with standard Java.
For motion-tracking all you need is a accelerometer and gyroscope, which most phones come equipped with nowadays as standard. All you basically then do is integrate those readings over time and you should have an idea of the device's position and orientation. Note that the accuracy will depend on your hardware and implementation, but be ready for it to be fairly inaccurate thanks to sensor drift and integration errors (see the answer here).
Depth-perception is more complex and would depend on your hardware setup. I'd recommend you look into the excellent OpenCV library which has Java bindings for you already and make sure you have a good grasp on the basics of computer vision (calibration, camera matrix, pinhole model, etc.). The first two answers in this SO question should get you started on how to go about determining depth using a single camera.
https://store.google.com/product/project_tango_tablet_development_kit
Does anyone who has the development happen to know if it supports Sensor.TYPE_PRESSURE?
(I do not see it listed as one of the features, but have an application that needs pressure).
Tango device does include the pressure sensor.
You can check the pressure sensor reading by using any android sensor test app on the Play Store.
My guess is that it should be good for normal sensor type in android.
But I have never seen any app using this feature before. You should have a try.
Would the camera tracking functionality would of Google Tango Unity SDK become compatible to IOS?
Project Tango SDK are developed based on Android. I don't think it is compatible to ios.
also The SDK right now only works for Project Tango Device only.
other Android device also won't work
IOS is not going to happen, since this is native to Android. But to expand on your question, google is trying to make this into a mass market consumer product, but it's a really slow process. This is on of the most recent and helpful news stories I found on the topic
http://www.engadget.com/2015/05/29/google-qualcomm-project-tango-phone/
I am new to WP7 development and working on a project (wp7 app) where I need to get ONLY gravity force using accleration API (I think I can do some thing using Motion Api) but It requires window phone to support Compass and Gyroscope as well.So Is there any way to separate gravity from accleration or only get gravity forces on X, Y and Z axis using only accelration (as I want my app to run on wp devices where there is no Compass and Gyroscope).
Also in android there are some methods likes
Linear Acceleration
Low pass / high pass filters etc
Do we have such kind of support in Wp7?
Thanks
The phone itself doesn't know what force is caused by acceleration and what by gravity. You would need information from other sensors to be able to do the math to separate the values. That's what Motion API is for.
So, your only chance is to use Motion API. It will fall gracefully if the device doesn't have the necessary sensors, but will work if there are:
The Motion API used by this sample requires all of the supported
Windows Phone sensors, and therefore these sample applications will
fail gracefully but will not work properly on devices without the
necessary sensors or on the device emulator.
There was a post on the Windows Phone Team blog about implementing a High pass / low pass filter on the accelerometer data. I've used this with fairly good results.