We are about to switch to a new forum software. Until then we have removed the registration on this forum.
Hi all,
For school we need to make an android app with processing while making use of an API. I would like to use Kairos API (kairos.com) to make an app in which you could take a picture of a face, add a name to that face and then let it search your image library for pictures with the same face. What would be the best way to make that work?
Answers
start here:
https://www.processing.org/tutorials/data/
also look at reference. When it is a JSON API:
https://www.processing.org/reference/JSONObject.html
or for xml the other commands:
https://www.processing.org/reference/
(section Files)
Hint
show us your attempt and tell us where you are stuck.
But we can't do it for you.
Best, Chrisir ;-)
Okay, thank you for that.
There is still one part that I don't know how to do (and isn't explained in the link). For the Kairos API you need a picture from a publicly accessible url. How can I upload a picture through the app? I have a domain to upload the picture to.
Look at second last post
https://forum.processing.org/two/discussion/18383/upload-image-to-webserver
I've come accross that example as well but then I get a 21 errors revolving around:
The import javax.imageio cannot be resolved
The import java.awt.image cannot be resolved
@GlivMo=== are you sure that this example is for android??? (NOT for java???)
Okay, this is where i'm at now:
I've found a way to take a picture. I've found a way to upload the picture (via html and php). Now I need to HTTP Post the data to "https://api.kairos.com/verify" with the following JSONObject:
(the image parameter is http://glennmossel.nl/Kairos/ford7.jpg, the forum changed it to html)
and the following headers:
The given JavaScript from Kairos is: