Comments (6)
first try to read the pixels after creating the scene, so after all the objects
are traversed. so just put it at the end of the draw method. and the difficult
part will be to merge the opengl bitmap with the camera image;)
maybe you should move your code to a seperate class otherwise you might get
problems when the renderer class is changed.
Original comment by simon.heinen
on 22 Sep 2011 at 3:19
- Added labels: ****
- Removed labels: ****
from droidar.
Hi Simon,
Thank you for your answer. Actually my first attempt was putting the code at
the end of the onDrawFrame method --> same result.
Do you mean that the the opengl bitmap is an overlay above the camera view? I
thought you were merging all those elements... (it explains my black image).
Original comment by [email protected]
on 22 Sep 2011 at 3:38
- Added labels: ****
- Removed labels: ****
from droidar.
jep they are two separate overlays (the camerapreview and the opengl surface
view) so currently you are only getting the information from the opengl view.
im using glReadPixel in a similar way in the ObjectPicker (
http://code.google.com/p/droidar/source/browse/trunk/droidar/DroidAR/src/gl/Obje
ctPicker.java ) class:
ByteBuffer pixelBuffer = ByteBuffer.allocateDirect(4);
pixelBuffer.order(ByteOrder.nativeOrder());
gl.glReadPixels(x, y, 1, 1, GL10.GL_RGBA, GL10.GL_UNSIGNED_BYTE,
pixelBuffer);
byte b[] = new byte[4];
pixelBuffer.get(b);
so it should be possible to read all pixels on the screen this way (im not sure
if its the best way, sounds a little inefficient;). just make sure that you do
this after rendering all the objects in the elementsToRender list
the merging with the camera preview should be possible to if you write some
little helper methods to manage the transparency in the opengl view. i'm
currently busy learning for 2 exams but i should have some time in about one
week, you can post your progress here till then.
Original comment by simon.heinen
on 22 Sep 2011 at 6:21
- Changed state: Accepted
- Added labels: ****
- Removed labels: ****
from droidar.
Thanks simon! Actually I also quite busy right now, but I'll try to have a look
at it later. I'll keep you posted!
Original comment by [email protected]
on 23 Sep 2011 at 7:57
- Added labels: ****
- Removed labels: ****
from droidar.
have this been successful? thank you I also want to capture an image with the
openGL bitmaps
Original comment by [email protected]
on 3 Oct 2012 at 2:56
- Added labels: ****
- Removed labels: ****
from droidar.
this framework is so nice,but i can't use it taking pictures.who can help me?
Original comment by [email protected]
on 6 Nov 2014 at 1:58
- Added labels: ****
- Removed labels: ****
from droidar.
Related Issues (20)
- AccuracyTestSetup and droidAR framework
- Storing Open GL diamonds
- Changing the circle open gl in accuracytests setup
- GPS position
- Error in camera : Failed to connect to camera device HOT 1
- Disable the "Loading..." dialog
- How do I put undo and clear all in gps map.
- Not working on Note2 HOT 8
- Clearing overlays and waypoints in ARNavigation
- Displaying place in AR provided I have its latitude and longitude HOT 2
- 3d object missing HOT 2
- Scaling rendered components.
- z-Value -- GeoObject hight? HOT 1
- Degrees, minutes and seconds to meters HOT 3
- Why don't we use gyroscope? HOT 1
- Loading any android project activity on world component click event HOT 1
- ModelLoaderAdapters assets HOT 1
- exemple application HOT 1
- How to run the marker based application?
- android.content.ActivityNotFoundException: Unable to find explicit activity class
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 droidar.