Template matching in Android Opencv - java

I a working on a project in which i need to match the two images i-e; the image captured through camera is to be matched with the one of the images in database on server. Can anyone help please. I am new with android and opencv.

This is probably too broad of a question to answer directly - but hopefully I can provide a couple resources you can dive into to learn specifically how to do the few things your asking for.
Introduction to OpenCV for Android:
https://opencv.org/platforms/android/
GitHub project implementing what I think you're asking for:
https://github.com/torcellite/imageComparator

Related

How to store recognized faces so that they can be used when the app is closed and on different devices

Not sure if this is the right spot for this but I haven't been able to find anything useful online so any advice would be appreciated. Basically I'm working on a android facial recognition app that use firebase ml to detect faces and tensorflow to recognize faces. That all works fine but when I register a user I don't know how to store it on a server so that the face can be checked while on other devices or save the face to the original device so it doesn't need to be re-registered when the app is closed.
Ive looked for a while online and surprisingly couldn't find anything related to this. I have an idea in my head about a possible solution of saving a bitmap of the picture and then storing it locally and remotely on a SQL database but ideally if people with experience or a better understanding of this area could point me in the right direction that would be great!
This is my first project in the ML world and I am working off of this repository I found on github repository - https://github.com/estebanuri/face_recognition .
Its late here so I will answer any and all questions in the morning!

Sceneform: Render WebRTC media stream in to ExternalTexture

I am trying to develop an AR app to help visual impaired people to make better their access conditions to a computer.
I am investigating on how AR can help HCI for visual disabilities, so, the application is using WebRTC to get computer Desktop to be magnified at AR environment using Sceneform.
I have successfully used the Sceneform example https://github.com/google-ar/sceneform-android-sdk/tree/master/samples/chromakeyvideo, but, I have no idea of how to render the WebRTC stream directly to a ExternalTexture. -> https://github.com/judicapo/MUITSS-ARBE/tree/master/SampleApps/ARCK
I already tried some Stackoverflow answers, but, have not found the clue.
Thank you all for your replies, hope some one has any idea.
Honestly I have not worked with this. but I could think of a way on how to approach this.
Instead of chromaKey rendering on a texture, why don't you try a 'ViewRenderable'? using this, you can place any android View to a node. You just need to place a VideoView and do your webRTC magic. let me know if this works
https://developers.google.com/ar/reference/java/sceneform/reference/com/google/ar/sceneform/rendering/ViewRenderable
https://developers.google.com/ar/develop/java/sceneform/create-renderables
AugmentedImage example - https://proandroiddev.com/arcore-sceneform-simple-video-playback-3fe2f909bfbc
ViewRenderable example - https://github.com/Hariofspades/ARExperiments/blob/master/AugmentedImages/app/src/main/java/com/hariofspades/augmentedimages/common/AugmentedImageNode.java

How can I do face recognition of two images using opencv java in android

I'm trying to create a face recognition application in android studio in java language. I spent considerable amount of time, searching for step by step guides for achieving this function. I found many tutorials for python language and i couldn't find any proper tutorial or atleast a video tutorial for java.
Can someone please provide me with a proper link with the steps to do face recognition with OpenCv in android using java language.
I'm new to OpenCv, so i have no big idea on its functions.
Your help is highly appreciated
Update 1 ::
I'm trying to capture the image of the user and then cross check the taken image with an image that is already available in the gallery.
I want to know if both are the same so that i can allow the user to use the application.
I actually made a Java program that utilised OpenCV for facial recognition earlier this year.
For me it was an utter nightmare. Guides to doing this on Java are basically nonexistent and the documentation for Java OpenCV is very poor.
What I ended up doing to get to grips with OpenCV was I used PyImageSearch to learn how OpenCV works and then just trawled through the OpenCV javadocs until I found the most similar classes to what was being used in PyImageSearch.
There are a few guides for OpenCV recognition using Java (I'll have a look through my notes when I get a chance and see if I saved any links for my own reference) but none of them were for what I needed.
If you edit your post with some more information on the recognition you're trying to do (video or jpeg or png?; frontal faces or side faces?; specific faces or faces in general?) I may be able to help a little more.
The Youtube link that #Varma posted might help you get to grips with OpenCV as a whole, but that series doesn't seem to cover facial recognition.
EDIT #1
Okay, recognising who someone is via an image is definitely doable with OpenCV, but it's not something I've done. Here's a PyImageSearch page on how to do it in Python. The methodology for doing it in Java with OpenCV will most likely be more or less the same even thought the syntax will - of course - make it look very different (should mostly be a matter of finding the equivalent Java classes and methods).
If it proves difficult, there are alternatives to OpenCV you could use, like these or Google's API. Keep in mind though that facial recognition is not very secure and does come with some controversy.

Android Camera preview with funhouse mirror effect

I created a android small app that uses the front facing camera to shoot a selfie. But what i want to accomplish is a funhouse mirror effect.
I searched the internet trying to find a solution or a way to do this but i am guessing i am searching for the wrong terms here:
Sample Image
Can someone push me in the right direction or how this is made? I searched for morphing, distortion etc.
What i have right now:
A basic camera app wich is saving a taken photo using the Camera2 API in Android SDK 23
Just only Camera2 API are not enough to develop an app which is like mentioned you. You should use computer vision libraries such as OpenCV or OpenGL.
First of all, please check it out for creating theoretical background.
Here is an example application which is using OpenCV and it is about funny effects.
This can be another reference application which is about fun house effects and it was developed by using GLSL.
Also this post can be helpful for you.
Moreover, you can check it and it out. And, you can use "image warping" term to search to find solutions for your problem on internet.

Using OpenCV for IP camera

I'm just a student who is given the project to do people counting using IP camera without buying anything. I have done research for the past 3 days and seems that OpenCV is the only free program but I'm unsure if it is able to do people counting.
Is there any links that teaches how to set up OpenCV? I found one at http://robocv.blogspot.it/2012/01/using-your-ip-camera-with-opencv.html but I'm not sure if I should configure it using the method stated in the link.
Your help is very much appreciated!
you can use opencv in java by using native opencv C code. Or you can use JavaCV.
yes people counting is possible using open cv. You have to use body detection and object tracking.

Categories