Android, Augmented Reality: Adding a flower image with Picture frame on camera - android

I am new.
I've been playing around with Augmented Reality for awhile and would like some help in doing something simple. I searched around and weren't able to get a complete picture-answer on what I need.
I have a picture of a flower that I want "augment" to a photo or camera taking photo.
I want to provide a frame on the picture.
So thats what I want to do. Is there a suggestion or tutorial in doing this using OpenCV or anything that can get it done quickly?
Thanks.

Surely, OpenCV has tutorials like this. With OpenCV you can intercept a frame from Camera, modify it and display it then. Of course, they don't have the flower thing but check a similar sample where they are applying effects it's called image-manipulation http://docs.opencv.org/doc/tutorials/introduction/android_binary_package/O4A_SDK.html#import-opencv-library-and-samples-to-the-eclipse

Related

Add background blur or use image for background with ARCore to video

Is it possible to start a camera and add person segmentation to it to blur or replace the background of the screen with an image? (Talking video, not image) I know this is possible with ARKit for iOS so I am surprised that I am not seeing anything for this using ARCore. Does anyone have any idea how to solve this problem for Android? Does ARCore have this functionality? Are there any resources and or examples on this topic I could look at

Is it possible to run ARCamera in the background without previewing it on Android?

I am fairly new to Android and especially to the various camera systems in this platform. I'm building an app where I need to integrate ARCore only to track the camera pose (among other things like objects in the scene, planes etc). I don't want to augment anything in the "real world" , so I am not looking to preview the frames being fed to the camera. I've looked through all of the examples in the arcore-sdk and sample code in google's documentation. None of them cover my use case where I want to be able to fetch camera's pose without previewing the camera images onto a surface view or something. I also don't want to 'fake' it by creating a view and hiding it. I would like to know if anyone has experience with such a thing or any ideas how we can achieve it or if we can achieve this at all? Does ARCore even support this?
UPDATE: I found this https://github.com/google-ar/arcore-android-sdk/issues/259 where they mention that it's possible with just an OpenGL context. But I have no clue how to get started. Any samples or pointers would be appreciated!
You can run an ArSession for tracking. ArSession doesn't depend on View.

Android auto crop camera captured images

I am looking for some kind of auto trim/crop functionality in android.
Which detects a object in captured image and creates a square box around object for
cropping. I have found face detection apis in android, but my problem is captured images are documents/pages not human faces so how can I detected documents or any other object from captured picture.
I am thinking of any algorithms for object detection or some color detection. Is there any apis or libraries available for it.
I have tried following link but not found any desired output.
Find and Crop relevant image area automatically (Java / Android)
https://github.com/biokys/cropimage
Any small hint would also help me alot. Please help. Thanks in advance
That depends on what you intend to capture and crop, but there are many ways to achieve this. Like littleimp suggested, you should use OpenCv for the effect.
I suggest you use edge-detection algorithms, such as Sobel, and perform image transformation on it with, for example, a Threshold function that will turn the image into a binary one (only black and white). Afterwards, you can search the image for the geometric shape you want, using what's suggested here. Filter the object you want by calculating the detected geometric figure's area and ratio.
It would help a lot to know what you're trying to detect in an image. Those methods I described were the ones I used for my specific case, which was developing an algorithm to detect and crop the license plate from a given vehicle image. It works close to perfect and it was all done by using OpenCV.
If you have anything else you'd like to know, don't hesitate to ask. I'm watching this post :)
Use OpenCV for android.
You can use the Watershed (Imgproc.watershed) function to segment the image into foreground and background. Then you can crop around the foreground (which will be the document).
The watershed algorithm needs some markers pre-defining the regions. You can for example assume the document to be in the middle of the image, so create a marked region in the middle of the image to get the watershed algorithm started.

which java library to use to modify a camera picture?

I'm currently looking into creating an app that takes a picture using the phone's camera. The app will be used for clients that are pre-op for breast augmentation. The user will be able to take a picture of themselves then place two shperes over the picture, then with a slidebar manipulate the size of the spheres. This will give the user an idea which cup size they would like. I understand that there is something in photoshop that has the desired effect and this is what i'm trying to replicate but on the bitmap image.
Are there any suitable libraries out there that i can use. I'm looking into OpenGL as that is for 3D graphics.
Any ideas and input would be appreciated.
thanks Mat.
Java does have it's own 2D and 3D APIs. Hopefully you can these to achieve your goal?

Get picture on android

I want to create a simple game for android which is supposed to use a camera. The thing is that I don't really care about the resolution of the picture, what meters to me is speed. I need the picture to be taken the moment a key is pressed. Ideal solution would be to use a frame from camera preview. I need this picture as a table of data for analysis, I don't need a file.
Is this possible to get a single frame form camera/video camera preview?
Or maybe it's easier to get a low resolution picture?
Can you tell me which function would be useful here, and maybe give a short example?
How can I get access to picture data using such a function?
Thanks in advance!
Bye
You may find the ZXing barcode scanner's source code helpful.

Categories

Resources