Google Glass opens a new window for developers to build creative apps, and we believe computer vision technology would be much needed to best leverage the nature of Glass and its wearable camera. That's why we are so excited to launch our ReKognition SDKs for Google Glass, which we believe will equip developers with advanced computer vision technologies to build Glass apps that would even go beyond their own imagination!
ReKoGlass SDK(PHP) is an open-source project which enables developers to write new applications that can integrate computer vision technologies into their Google Glass apps. Though Google temporally banned facial recognition technology on Google Glass due to privacy concerns, our ReKoGlass SDK v1.0 offers APIs for Face Detection, Face Reading, and Scene Understanding without revealing any personal identity information. By adding on these capabilities, there are countless creative and artful things you can do with your Google Glass. And, integration is very easy! For the people using latest XAMPP, or sqlite3, we provide a new util.php to substitute the original one in MirrorAPI SDK (it only supports sqlite2).
$rekognition_api_key = 'YOUR_API_KEY'; $rekognition_api_secret = 'YOUR_SECRET';
$rekognition_jobs = 'face_part_gender_emotion_age_glass_mouth,scene'; $rekognition_name_space = ''; $rekognition_user_id = '';
Note that API classes are separated by ',', and subclasses are separated by '_'.
Since Google Glass does not support face recognition apps at this point, $rekognition_name_space and $rekognition_user_id are not used.
a.Analyze image and draw detected faces:
b.Parse image analysis results (JSON) from ReKognition serverprint out face, e.g, age, smile or not, male or female, with glass or not, etc,and scene information, e.g. indoor, beach, etc.
If your webpage prints out all the information successfully, congratulations! You could use ReKognition API in ANY of your PHP code now.
a.Put /rekognition under the root of your Google Glass project, and edit config.php (Path/to/Google/Glass/Project/config.php) by adding one line on the tail:
$GLOBALS['REKOGNITION_ROOT'] = "rekognition/";
b.When a glass owner shares a photo to your app, Path/to/Google/Glass/Project/notify.php receives the message and sends a notification back. To visualize processed results, you need to customize notify.php, take ours sample notify.php for example:
To visualize processed results, you need to customize notify.php, take ours sample notify.php for example:
require_once 'rekognition/Rekognition_Google_Glass.php'; // Include Rekognition Google Glass class ... $request = json_decode(file_get_contents("php://input"), true); // Get requests from Glass users $image_parser->Reset($request['userToken']); // Set user token $image_parser->SendFaceNumTimelineItem($request['itemId']); // Get photo by the id of the shared image, analyze it and post a timeline item to the Glass
We only provide a visualization example as implemented in SendFaceNumTimelineItem(), which detects the number of faces in the photo and post a message to glass (see details in Path/to/Google/Glass/Project/Rekognition/Rekognition_Google_Glass.php). You could customize the function to get callbacks with different layout/information.
For any questions, please contact email@example.com