Overlaying images over camera. Augmented reality - android

So, I'm trying to create a Augmented reality app on android (client/server).
My question is if i can overlay images and text boxes over the camera in real time or only if i have the capture to display it on the screen and add the extra information
If the first version can be implemented can someone help me with some starting code or links with suggestions

I did something similar for one of my apps,
And the way i did it is by placing an empty View on top of camera surfaceView using FrameLayout, then used onDraw method in the View class, to play with canvas and put anything i wanted on top of the camera view, you can practically do everything with Canvas, and since literally your view is overlaying the camera surfaceView, will do exactly the trick you are trying to accomplish here...
Regards!

Related

Hide camera preview in OpenCV android

I am building this application where I need to get video with the camera and process it with openCV as well as show a view with 3D graphics being renderered in it.I am using two fragments. One for previewing the camera. And one for the 3D graphics.The problem is the 3d graphics view has to be fullscreen. I don't want the camera preview at all. I can show them side by side using linear layout. But I cannot totally hide the preview and make the 3d scene take up the whole screen. Even using relative layout causes the camera preview to tear through the 3d graphics view.
Simply put it, if the camera preview is not being shown, the CvCameraViewListener2.onCameraFrame() method is not called. And without that I don't receive any new frames to process.
The problem got solved. I really don't know how it got solved though. I woke up the next day and tried running the project and it ran perfectly without requiring to change anything.

How to get Custom Camera view with out using SurfaceView

I want to develop customize camera application like Snap chat!, with out using Surface view.
First i used surface view to develop the app,but i am unable get quality image and also i am unable to get all features what default camera app is providing, like Zoom, focus,face reorganization etc. Please provide me any solution to achieve this
sorry for my english
github/xplodwild/android_packages_apps_Focal
github/almalence/OpenCamera
github/troop/FreeDCam
github/rexstjohn/UltimateAndroidCameraGuide
maybe one those might help

is it possible to create a moving object in front of the camera background?

what I wanna make is just a simple app that there will be some drawable image that moving with a camera as the background. at first I thought I can use framelayout with 2 surface view and after try and search I find it useless. So I though to combine the camera view with the moving drawable but I can't find how to combine and I don't know if it is possible or not. so I just wanna know that is there is a way to make it?

How to draw on top of camera preview?

I want to draw some thing on the view which we get when our camera is on in android mobile.
I do not want to take picture nor record video just that view from camera and then draw some thing on screen.
Drawing on screen will not be and issue but when we turn on camera which view we get and how can we use that view in our application?
You'll want to check androids camera-API.
You can get the preview to display in a SurfaceView or your own View-subclass, which can then be used to draw on. Some more knowledge might be found here.
You can use a RelativeLayout to put other views aligned with the surfaceView used for camera preview

How to paste stuff over a camera preview on Android?

I am making the classic AR app for Android.
I am using a SurfaceView to show the camera.
I want to know, how I put things over it... Currently I am using widgets, but they have two issues:
First, they are slow.
Second, you cannot rotate them in 1.5 without using view animation, and noone I asked so far (here, forums, google, irc...) knows how view animation work, so I am failing to make the view animation work in sync with the custom view that put widgets over the camera (resulting in flickering).
Thus I decided to change the method of putting things on the screen, so what other ways exist? (note I am bound to Android 1.5)
Seemly it cannot be done easily, but I could put a image and rotate it easily using Matrix.
I basically placed on layout over the preview a ImageView, then I used setMatrix to a rotation matrix, and voilá, I got a rotated image that works in 1.5
You must use OpenGL for drawing Objects over your SurfaceView.

Categories

Resources