I am developing an application where I drew a point on the camera preview using canvas. Now I want to fix the point on the screen though camera is moved up/down, left/right.
My question is,
Is it possible to fix the point on the preview screen?
Related
I have some issue in device orientation. What i did is that, i have to open camera for screen capture. The camera view is customized by using overlay. Overlay contains a button view, when click on it it will capture image.
I implement device orientation in it. When custom camera opens it looks fine. But when we rotate(that is, rotate to 180 degree) the over lay looks fine, but the camera view inverted the screen. That is for example, if we wish to capture a tree by rotating device, it'll see like upside down and when after capture, the image also inverted. Does anybody have any idea about how to remove this camera invert while rotating.
This issue is headache for many devs.
How do you rotate the camera? You have to rotate your overlay and pretend user that user is rotating the camera.
To get More info see this
Explanation is good.
Currently I'm developing an Android App for blind people that uses the device's camera.
The app shows in a SurfaceView the preview of the camera's captured frames. When the screen is touched, the app gets the coordinates from the screen, with event.getX() and event.getY(). However, what I really want to do is to obtain the coordinates of the touched point but taking as a reference the coordinates of the frame.
With view.getLocationonScreen() or view.getLocationInWindow() I can get the location of referred to the top left position where SurfaceView begins, but the frame don't occupies all the surface of the SurfaceView.
How can I transform the coordinates of the screen to relative coordinates to the frame? Or how can I know the coordinates where the frame is located inside the Surface View? When I use getMarginLeft() or similar I obtain the value 0.
I want overlay an image in live camera preview using surface view. There are lot of tutorial in this case and my program run perfectly. Now i want add ability to move overlay image in live camera preview with touch event. I can't find any code or tutorial that explain that. Can somebody help me please?
if you do not use OpenGL and just float your overlay with opacity over surfaceView, you can set your own onDragListener() that handles android DragEvent( http://developer.android.com/reference/android/view/DragEvent.html) that can move the overlay detecting user's finger
Here is an interesting problem I am trying to solve.
In my app I have extended SurfaceView to create a custom cameraview. And now I want to implement ZOOM and PAN functionality in it. Following are the steps;
With my Android device properly mounted(still in a position)
1) I will zoom in on the camera view
2)Now I can pan with my finger on the camera view. As the device is NOT MOVING and I am trying to pan on cameraview(which is "zoomed in"), I want camera view to start showing preview of areas which were outside the scope of "current view" after zoom in(but were visible before I zoomed in).
Do you think this functionality is possible in Andorid today?
I am trying to explain the problem in this picture
For an opengl(es) game, the 'camera' moves about the xyz axes in response to user input via gllookat. Works so far. However I need to implement a heads up display that is in a static position at the corner of the screen. Knowing the current location of the camera, I draw the HUD. When the camera moves, the HUD jostles for a frame or two before returning to its proper location. Is there some good way of drawing a HUD in opengl that is not affected by the camera?
Why not just reset the MVT matrix to use a fixed camera position before you draw the hud - and given that the camera and view for the hud is fixed you only need to calculate it once. I've done this on gles2.0, but it should work in earlier versions as well.
When you start drawing a frame remember your last position (save it in a variable) and use this data. This should remove all problems.