简体   繁体   中英

Java/Android image processing

I'm thinking of developing an app for android that must be recognized if two images are similar.

  • I explain a bit 'better:

    The user will insert a picture into the application and if the image is similar to a DB contained in the application then takes out the image name.

A bit ago as the search engine google images:

Google Image

There is a java object to do this?

Do you have any advice for implementation?

do you know any example of something similar ?

Thanks.

I would try to load the bitmap and convert it to base64

ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();
bitmap.compress(Bitmap.CompressFormat.PNG, 100, byteArrayOutputStream);
byte[] byteArray = byteArrayOutputStream.toByteArray();
String encoded = Base64.encodeToString(byteArray, Base64.DEFAULT);

After that is a matter of looking up a normal string in a database. To handle the database I would personally use ormlite.

EDIT

For similar images instead of identical, unless the whole point of this exercise it to write the comparison algorithm yourself, you can use opencv. Here you can find a good stackoverflow answer on the subject.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM