How to check if image exists in Gallery or not? - android

In my application when a user captures the image before saving into the gallery.
I want to check is there any image matches with the current image (at least 50%). If any image found get the image from gallery and display to the user.
I am very new to android development. Can anyone help me out to do above task.

You'll have to use a Java library for this. I suggest taking a look at this thread.
If you'd like to develop something on your own, the basic idea is this. To compare two images, represent each of them as a matrix of pixels and compute similarity between those two matrices. If you do choose to implement it yourself, take a look at matrix similarity, cosine similarity in particular. A very simple example is here.
Good luck!

Related

how to autocrop business card images taken from camera using opencv in android

I am developing an app that captures a business card using custom android camera and then i need to autocrop the unwanted space in android and then store the image . I am using opencv for this. All examples i am seeing are in python . I need it in android native.
You can probably try something like this:
1) Get an edge map of the image (perform edge detection)
2) Find contours on the edge map. The outermost contour should correspond to the boundaries of your business card. (under assumption that the business card image is against a solid background) This will help you extract the business card from the image.
3) Once extracted you can store the image separately without the unwanted space.
OpenCV will help you with points 1,2 and 3. Use something like a cannyedge detection for point 1. The findContours function will come in handy for point 2. Point 3 is basic image manipulation which I guess you don't need help with.
This might not be the most precise answer out there - but neither is the question is very precise - so, i guess it is alright.

Is it possible to verify the content of an image?

In what language(s) is it (if at all possible) to check the content of an image?
Ideally, I am looking for web / mobile languages, but whatever is possible.
As a comparative example, I wish to make the first image of a castle 'valid' and the second image of the wall 'invalid', due to there been no substantial content in the second image. Meaning, the second image, which is the wall, has too much similarity across the image and therefore doesn't contain valid content.
Please do not provide a 'how to do it', as I am a student and will be working out solutions for myself as much as possible, I just need to know that what I want to achieve is possible in the first place and a starting point for language(s).
**EDIT2: What Javier has suggested about computer vision is on the right track to what I mean. Image analysis to break it down a little more. I wish to visually analyse an image and determine how the range of varied the colours across an image are to determine if there is actually a proper image present on not just a picture of a wall

Compare two images using OpenCV in Android

I need to develop an app that captures the picture using Camera API and compare that picture with all other pictures in the database. For comparing the images i'm going to use OpenCV. But i'm new to openCV. I have set up the openCV in Eclipse. But i don't know what functions can be used to compare two images. i'm stuck here.
Comparison here is, lets say i take a picture of a plant, and i have a picture of the same plant in my database but in some other height, width and position. Here i should compare the pictures and say that they are similar. How can i achieve this kind of comparison? Help me!

Android: Saving constucted image on screen

My users are going to construct and image out of other images in the game, what I then need to take is capture the image they have created and save it.
Im really not sure how to capture the final image, I am using OpenGL ES so the Canvas option is viable
Thanks
I think glReadPixels is probably what you're looking for. Khronos has better documentation of this function.

Library to identifying the similarity between 2 image in android

Suggestions on the best (preferably easiest way) to compare two images in android.
The first image is in my SD Card.
The second image was taken using Camera in android.
How to measure percentage similarity between those 2 images??
Thanks a lot.
Android does not provide any picture comparison algorithms for you.
Therefore, you will need to write one yourself - one that fits your needs, since not all image comparison algorithms/techniques are the same, and some work better in some cases than others.
You might want to start by looking at the SIFT technique, and find an image matching algorithm that suits your requirements.

Categories

Resources