GithubHelp home page GithubHelp logo

Comments (15)

GoogleCodeExporter avatar GoogleCodeExporter commented on September 27, 2024
The code has been optimized for performance already. Are you using collision 
detection? That'll cause some slowness in rendering.

The first places to look are the SensorsActivity class and the Marker class. 
The SensorsActivity class does the heavy math of converting your 3D position 
into a 2D position. The Marker update method is used to update each Markers 
matricies based upon the matricies calculated in SensorsActivity, the draw 
method is used to update the graphical representation of the Marker based upon 
the matricies populated in the update method. Also check out the 
AugmentedReality class because it ties those two classes together.

Original comment by [email protected] on 26 Dec 2013 at 3:05

  • Changed state: WontFix

from android-augment-reality-framework.

GoogleCodeExporter avatar GoogleCodeExporter commented on September 27, 2024

Original comment by [email protected] on 26 Dec 2013 at 3:06

  • Changed state: New

from android-augment-reality-framework.

GoogleCodeExporter avatar GoogleCodeExporter commented on September 27, 2024
[deleted comment]

from android-augment-reality-framework.

GoogleCodeExporter avatar GoogleCodeExporter commented on September 27, 2024
Also.. You may think it's rendering slowly but it's the low pass filter (which 
is used to smooth out the Markers). Disable the LowPassFilter by making alpha 1 
in the class or by removing it all together in SensorsActivity by commenting 
out the lines below:

        if (evt.sensor.getType() == Sensor.TYPE_ACCELEROMETER) {
/*
            smooth = LowPassFilter.filter(0.5f, 1.0f, evt.values, grav);
            grav[0] = smooth[0];
            grav[1] = smooth[1];
            grav[2] = smooth[2];
*/
            grav[0] = evt.values[0];
            grav[1] = evt.values[1];
            grav[2] = evt.values[2];
        } else if (evt.sensor.getType() == Sensor.TYPE_MAGNETIC_FIELD) {
/*
            smooth = LowPassFilter.filter(2.0f, 4.0f, evt.values, mag);
            mag[0] = smooth[0];
            mag[1] = smooth[1];
            mag[2] = smooth[2];
*/
            mag[0] = evt.values[0];
            mag[1] = evt.values[1];
            mag[2] = evt.values[2];
        }

Original comment by [email protected] on 27 Dec 2013 at 12:07

from android-augment-reality-framework.

GoogleCodeExporter avatar GoogleCodeExporter commented on September 27, 2024
If you update your repo; I've added a boolean called useSmoothing in 
AugmentedReality which you can use to enable and disable smoothing. It's is 
enabled by default.

Original comment by [email protected] on 27 Dec 2013 at 12:41

from android-augment-reality-framework.

GoogleCodeExporter avatar GoogleCodeExporter commented on September 27, 2024
And one last thing... You'll likely "see" better performance by setting 
"SENSOR_DELAY_GAME" in SensorsActivity:

sensorMgr.registerListener(this, sensorGrav, SensorManager.SENSOR_DELAY_GAME);
sensorMgr.registerListener(this, sensorMag, SensorManager.SENSOR_DELAY_GAME);

Original comment by [email protected] on 27 Dec 2013 at 3:18

from android-augment-reality-framework.

GoogleCodeExporter avatar GoogleCodeExporter commented on September 27, 2024
Awesome phishman! you did a great work. i have downloaded the latest code 
having "useSmoothing" variable, previously it was not exists. Secondly, i 
changed "SENSOR_DELAY_GAME" to "SENSOR_DELAY_FASTEST" with "useSmoothing=true". 
After that, the result was just awesome..
Anyways, i also want to see one thing more in this opensource project, that is,
- App should work fine both in Landscape and Portrait mode auto orientation 
change. Currently, developers are bound to only support single mode at a time.

Original comment by [email protected] on 27 Dec 2013 at 7:10

from android-augment-reality-framework.

GoogleCodeExporter avatar GoogleCodeExporter commented on September 27, 2024
Yea, I haven't find a elegant way to detect and auto orient the markers. I am 
still looking into it.

Original comment by [email protected] on 30 Dec 2013 at 8:36

  • Changed state: Accepted
  • Added labels: Type-Enhancement
  • Removed labels: Type-Defect

from android-augment-reality-framework.

GoogleCodeExporter avatar GoogleCodeExporter commented on September 27, 2024

Original comment by [email protected] on 30 Dec 2013 at 8:36

  • Changed state: Started

from android-augment-reality-framework.

GoogleCodeExporter avatar GoogleCodeExporter commented on September 27, 2024
Mixare has implemented such a functionality (auto-rotate the marker on 
orientation change).  I am not an AR Expert, so i cant modify your code for 
such a complex feature but can refer you to see the mixare code, so that you 
will be definitely able to develop this feature in no time.

Original comment by [email protected] on 1 Jan 2014 at 7:15

from android-augment-reality-framework.

GoogleCodeExporter avatar GoogleCodeExporter commented on September 27, 2024
I actually have most of what I need already implementation. I am still working 
on the "touch" and "collision" detection. Once that is complete I'll merge into 
master. If you don't need those features, you can use the rotation_branch of 
the AR code.

https://code.google.com/p/android-augment-reality-framework/source/browse/?name=
rotation_branch

Original comment by [email protected] on 2 Jan 2014 at 2:22

from android-augment-reality-framework.

GoogleCodeExporter avatar GoogleCodeExporter commented on September 27, 2024
that's nice. thanks a lot. that's what i need.

Original comment by [email protected] on 3 Jan 2014 at 7:03

from android-augment-reality-framework.

GoogleCodeExporter avatar GoogleCodeExporter commented on September 27, 2024
OK, great. Let me know if you run into any problems.

Original comment by [email protected] on 3 Jan 2014 at 12:34

from android-augment-reality-framework.

GoogleCodeExporter avatar GoogleCodeExporter commented on September 27, 2024
I don't think you need the features but I found a solution to "touch" and 
"collision detection". I believe the rotation_branch is 100% in working 
condition with auto-rotation of Markers. Once I am done testing, I'll likely 
merge into master.

Original comment by [email protected] on 3 Jan 2014 at 9:35

  • Changed state: Done

from android-augment-reality-framework.

GoogleCodeExporter avatar GoogleCodeExporter commented on September 27, 2024
sure

Original comment by [email protected] on 4 Jan 2014 at 10:11

from android-augment-reality-framework.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.