1

I developed an app that can reverse search by image. I wish user can use image and keyword at the same time to reverse search.

The method getImgurContent() works. It returns image's URL on the internet. But I don't know how to reverse search image with keyword at the same time.

uri = Uri.parse("https://images.google.com/searchbyimage?image_url=" + getImgurContent());
Intent intent = new Intent(Intent.ACTION_VIEW, uri);
startActivity(intent);
Dirk
  • 21
  • 2
  • https://stackoverflow.com/questions/4531396/get-value-of-a-edit-text-field – OneCricketeer Feb 06 '18 at 08:52
  • I know how to get text. Thank you. But My question is how to "reverse search by image" with keyword.I'm so sorry what I wrote caused your misunderstanding. – Dirk Feb 07 '18 at 02:21
  • You already are searching by an image, no? Except it's only Imgur images? "Image by keyword" doesn't make sense to me, because that's two separate things. 1) Find images by a keyword, e.g. find images from getting text 2) Reverse search on a particular one – OneCricketeer Feb 07 '18 at 06:39
  • Because Google's reverse image search doesn't work well everytime. Like sometime you use leaves image to reverse search but the result is all flower just because the leaves are too colorful. I wish my app can accurately show the result that user actually want. User can key in the keyword before Google search guessing what kind of the thing's image is.Thank you for your comment. – Dirk Feb 08 '18 at 02:06
  • Google themselves use Tensorflow for image detection, as far as I know. https://www.tensorflow.org/tutorials/image_recognition – OneCricketeer Feb 08 '18 at 03:06

1 Answers1

0

You can try code below:

uri = Uri.parse("https://www.google.com/search?tbm=isch&q=findSomeImage");
Intent intent = new Intent(Intent.ACTION_VIEW, uri);
startActivity(intent);

Or:

uri = Uri.parse("https://www.google.com/search?tbm=isch&q="+ getImgurContent());
Intent intent = new Intent(Intent.ACTION_VIEW, uri);
startActivity(intent);
quangminhs
  • 151
  • 5
  • 1
    I want to "reverse" search image. Not just search image by keyword. And the second code can't work. The method `getImgurContent()` is return image's URL on the internet not keyword.But thank you for your answer ^^. – Dirk Feb 07 '18 at 01:46