Can opencv be used for Image recognition? - java

I need to access images from phone's gallery and then perform image recognition like what all elements are there in the images(watch,food etc etc). Can this be done using opencv library's on device sdk for android. I am not getting any clue about this.

Related

Glide for Android: How to include GIFs from Google Drive?

I am trying to include GIFs in my android application. My GIFs are shared as a document on Google Drive with public access enabled. Currently, I'm trying to use Glide to include the GIFs.
Glide.with(parent.getContext())
.asGif()
.load("https://drive.google.com/uc?id=1-QKgZ76K3EZQlbXyY3wI57FA8k31JmrA")
.into(imageView);
However, although there is no error, the GIF does not display on my phone, even after a long time(internet issues shouldn't be the problem).
It appears that this is only a problem for GIFs on google drive. Trying to show an internet GIF such as this one works on my Android phone.
How can I show GIF files on Google Drive with Glide on my Android device?
It should work. Because Glide trying to fetch image which type you specified. I just tried it and its work. it loads too late. If you wait a bit, you will see that it can be loaded. You can test it more easily if you upload a lower resolution gif file to Drive.

Real time emotion detection with OpenCV and Tensorflow in Android Studio

I am trying to build an Android app with Android Studio(Java), that based on a tensorflow model(pretrained in python) is able to classify the emotion of the person standing in front of the device's camera. My app needs to take the frame, apply some opencv operations like facedetection, grayscale, resize, crop, and histogram equlisation, and after that, giving the result to the model, it will predict the emotion. I have an activity that is showing the camera, but i dont know how to do all this frame manipulation and prediction in the background, when on the phone's screen the preview of the camera and the tags of the predictions, are the only things showing.
I managed to do this on PC very easly, running on the max FPS of the webcam, so i think it should be possible on the phone too.
Is there any similar project that i can get inspiration from? or does anyone know a bit of documentation or a way to do something like this ?
I would suggest checking out the Google ML Vision API's, they can easily be integrated into an Android App and are very accurate. There are many API's like the image labeller and facial labeller. Just check them out here:
https://developers.google.com/ml-kit/vision/face-detection/android
Hope I could help!

Send OpenCV video to another android device

I'm trying to stream a video generated with OpenCV (using the webcam and doing some image processing) and audio to another android device over Internet. This will be similar to a video call with custom video frame.
I looked at WebRTC and could not find a way to send a custom image (OpenCV Mat object).
Could you suggest me any other way, any SDK or an approach to overcome this step (Client-server model) ?
Thanks in advance

Capture Android screenshot without having the View

I have found a lot of examples like this:
how to Capture screen in android and covert it to image
I need to capture an screenshot of screen activity, but I'm developing an external library, so I can't get current activity of the application to get the View and then flush the bitmap into canvas. Is there another way to capture a screenshot?
If you are trying to save the image from Snapchat, you need to save the Bitmap in another way.
With a rooted phone you can access the apps storage and copy the image while the app shows it.
That way the app wont notice you took a "Screenshot" :)

Read Text from Image with Android

How to read text from image in android app.
Edited:
I want to detect text from image which i have captured from camera in android.
Is it possible or is there any library to read text from taken image.
This is not related to android. If you like to get text contained in image you will need
detect text position in image
perform OCR on found text
This task is not trivial and requires some computing resources. There are some OCR libraries around - like opencv, tesseract etc. I and others also develop pure java opensource solution:
http://sourceforge.net/projects/javaocr/

Categories

Resources