How to draw on a video view in android? - android

I am trying to create and android application that allows the user to draw a circle or other shape on a video feed to highlight a region of interest. Is it possible to draw directly on the video view or even overlay a canvas on top of the video view? I am using Eclipse.

Maybe you could start from creating some bitmap (transparent background) over the video and draw on it? Another idea is to create transparent fragment, it will be probably easier to do and you will have more control over it.
Please search here:
How do you create a transparent demo screen for an Android app?

Related

How to draw a mask (circle) over an Android webview?

I have three weeks into Android development (newbie). Is it possible to draw a mask over a webview so that the webview looks like its a circle? My webview is showing google map (dragable). I want that map in the app to look like its a circle, instead of a rectangle that is filling the entire Layout.
In general, yes. But your webview will be unaware of the mask, so you might run into problems with the mask covering parts of the UI. I don't know about the Google Maps web API, but the Android API lets you set padding to move the controls and Google logo away from the edges.
You can create a custom View in which onDraw(Canvas) instructs some other View to draw into a bitmap, then applies a mask to the bitmap and draws it on the output Canvas. To make your webview appear circular, you'd place the custom view on top of the webview, and configure the custom view to use the view below the webview for drawing. This would create the appearance of a hole through the webview.
Shameless plug: I published a MaskView that does exactly this.

Create draggable edge point on imageView

I want to create a resize feature of my application but I cannot find a sample implementation of it. Many tutorials offers pinch to zoom.
My problem now is how to implement draggable edges to resize the image just like in ordinary image editor. Do you have any idea how to do this? Just like putting circles/points on the 4 corners of the ImageView like the sample image below.
Is it possible to use the crop library of android to have draggable image?
You can draw the control point, and handle all festure in this point
last month i develop a Android handwritting note app. In this app, i inherit View, and control View.onDraw directly. I draw the image and all control indicator in onDraw, and handle screen touch within the scope of the screen.
This app isn't accomplished, it become a opensource project, you can see the source at https://bitbucket.org/gd920129/white-board/

Android : adding transformed overlay on top of camera view

In my android project I want to add an overlay (which is simple image with text on it) on top of the camera view.
The overlay is not simple rectangle but it is transformed at each camera frame.
What I'm looking for is kind of like image below:
I'm getting camera frame with OpenCV library (CvCameraViewListener and CameraBridgeViewBase).
My question is what is the best and fastest way to do this?
How can I transformed the overlay at each frame in the way as figure above shows.
Any help and suggestion is appreciated.

Overlaying images over camera. Augmented reality

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!

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?

Categories

Resources