Comments (15)
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.
Original comment by [email protected]
on 26 Dec 2013 at 3:06
- Changed state: New
from android-augment-reality-framework.
[deleted comment]
from android-augment-reality-framework.
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.
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.
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.
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.
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.
Original comment by [email protected]
on 30 Dec 2013 at 8:36
- Changed state: Started
from android-augment-reality-framework.
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.
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.
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.
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.
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.
sure
Original comment by [email protected]
on 4 Jan 2014 at 10:11
from android-augment-reality-framework.
Related Issues (20)
- Markers not updated properly HOT 2
- markers position HOT 2
- ARData azimuth HOT 2
- Program fail in AVD 4.2 HOT 3
- Live marker rotation HOT 3
- Rotation refresh rate is really slow HOT 1
- Latest code working for both orientations. What if want to work on one only? HOT 4
- Does not show multiple POIs close enough to share the screen space HOT 4
- Reference Table overflow HOT 2
- AFatal signal 11 (SIGSEGV) HOT 9
- apps auto close when too much marker on certain angle HOT 2
- Problem with icon movement in the screen HOT 2
- activity force close when added too many markers HOT 5
- License change HOT 1
- Local Datasorce not showing POI HOT 2
- Canvas getMatrix method dprecated HOT 5
- Show map view summary when device is horizontal to ground
- Marker on screen move with device movement
- Wrong marker position when marker is behind us
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from android-augment-reality-framework.