Description

Discussions related to: Image Cloud Recognition, Vuforia Web Serivces, etc.

E-mail notification when cloud recognition reach a certain number of recos (ex 9000)

Hi, I have the basic plan and Cloud-Add On for $99 per month. This includes 100k images database and 10k recos/month.

I would like to get an alert (e-mail notification from Vuforia) when my cloud recos are reaching a certain number of recos. For exemple at 5000 then 7000 and 9000. I would like to avoid extra cost based on usage. And I cannot forecast the usage expected.

I would say that is should be an existing vuforia based feature but I can not see it anywhere. Is it possible ? If not, how could I get this kind of notification (Vuforia API ?) without touching my AR app ?

 

Thank you in advance,

Best regards

Hey there,

 

Sadly there's no way to receive an automated update email on your reco count, but I will forward this internally as a feedback request. 

 

Kind regards,

Patrick Scheper

Vuforia Engine Product Manager

Thanks so is it possible to get an API from you or another way to build myself such a solution ? It would needs to connect Vuforia I suppose.

Hey there,

 

I asked around and it seems we have (undocumented) fields from the GET database summary API that you can use! https://library.vuforia.com/web-api/cloud-targets-web-services-api#get-a-database-summary-report

Change in database and license key associations

We have been running an application using Cloud Recognition for about 7 years.

We need to change to the latest license and have issued a new license from License Manager. We already have several thousand target images registered in the Cloud Database,and we want to use them as they are, but we cannot change the license key from the Target Manager screen.

Is there any way to change the connection between the Database and the license key?

Sample Code Python Cloud Recognition

hey,

Using the sample code slightly modified I get an identification error I have replaced the client key and secret key fields.  But, I get an authentication error.  Can you help me please ? I hide access for confidentiality reasons.

Here is the code : 

import httplib2 import http.client as httpmodule import hashlib import mimetypes import hmac import base64 from email.utils import formatdate import sys import requests

# The hostname of the Cloud Recognition Web API CLOUD_RECO_API_ENDPOINT = 'cloudreco.vuforia.com'

def compute_md5_hex(data):     """Return the hex MD5 of the data"""     h = hashlib.md5()     h.update(data)     return h.hexdigest()

def compute_hmac_base64(key, data):     """Return the Base64 encoded HMAC-SHA1 using the provide key"""     h = hmac.new(key, None, hashlib.sha1)     h.update(data)     return base64.b64encode(h.digest())

def authorization_header_for_request(access_key, secret_key, method, content, content_type, date, request_path):     """Return the value of the Authorization header for the request parameters"""     components_to_sign = list()     components_to_sign.append(method)     components_to_sign.append(str(compute_md5_hex(bytes(content,'UTF-8'))))     components_to_sign.append(str(content_type))     components_to_sign.append(str(date))     components_to_sign.append(str(request_path))     string_to_sign = "\n".join(components_to_sign)     signature = compute_hmac_base64(bytes(secret_key,'UTF-8'), bytes(string_to_sign,'UTF-8'))     auth_header = "VWS %s:%s" % (access_key, signature)     return auth_header

def encode_multipart_formdata(fields, files):     """     fields is a sequence of (name, value) elements for regular form fields.     files is a sequence of (name, filename, value) elements for data to be uploaded as files     Return (content_type, body) ready for httplib.HTTP instance     """

    BOUNDARY = '----------ThIs_Is_tHe_bouNdaRY_$'     CRLF = '\r\n'     lines = []     for (key, value) in fields:         lines.append('--' + BOUNDARY)         lines.append('Content-Disposition: form-data; name="%s"' % key)         lines.append('')         lines.append(value)     for (key, filename, value) in files:         lines.append('--' + BOUNDARY)         lines.append('Content-Disposition: form-data; name="%s"; filename="%s"' % (key, filename))         lines.append('Content-Type: %s' % get_content_type(filename))         lines.append('')         lines.append(value)     lines.append('--' + BOUNDARY + '--')     lines.append('')     body = CRLF.join(str(lines))     content_type = 'multipart/form-data; boundary=%s' % BOUNDARY     return content_type, body

def get_content_type(filename):     return mimetypes.guess_type(filename)[0] or 'application/octet-stream'

def send_query(access_key, secret_key, max_num_results, include_target_data, image):     http_method = 'POST'     date = formatdate(None, localtime=False, usegmt=True)

    path = "/v1/query"

    # The body of the request is JSON and contains one attribute, the instance ID of the VuMark     with open(image, 'rb') as f:         imagedata = f.read()

    content_type, request_body = encode_multipart_formdata([('include_target_data', include_target_data),                                                             ('max_num_results', max_num_results)],                                                            [('image', image, imagedata)])     content_type_bare = 'multipart/form-data'

    # Sign the request and get the Authorization header     auth_header = authorization_header_for_request(access_key, secret_key, http_method, request_body, content_type_bare,                                                    date, path)

    request_headers = {         'Accept': 'application/json',         'Authorization': auth_header,         'Content-Type': content_type,         'Date': date     }

    # Make the request over HTTPS on port 443     http = httpmodule.HTTPSConnection(CLOUD_RECO_API_ENDPOINT, 443)     http.request(http_method, path, request_body, request_headers)

    response = http.getresponse()     response_body = response.read()     return response.status, response_body

if __name__ == '__main__':     import argparse     parser = argparse.ArgumentParser(description='Query image')    # parser.add_argument('image', nargs=1, type=str, help='Image path')     args = parser.parse_args()

    status, query_response = send_query(access_key = "xxxxxxxxxx",                              secret_key ="xxxxxxxxxx",                              max_num_results = "2",                              include_target_data = "top",                              image = r"C:\Users\33767\Desktop\Vuforia\31nNlEFb7PL._SY450_.jpg")     if status == 200:         print(query_response)         sys.exit(0)     else:         print(status)         print(query_response)         sys.exit(status)

Here is the error :

PS C: \Users\33767\Desktop \Vuforia> python test.py 401 b' {"transaction_id": " d686db82b5cc4932b1b446802a0246b1", "result_code": "AuthenticationFailure"}' PS C: \Users\33767\Desktop\Vuforia>

Hey there,

 

I would suggest to run the script a few times and note the following information:

Clode Recognition keys

Where do I find the GameObject-VuforiaEngine-3Dscan path in Unity? In my version Clode Recognition appears but an Access key and Secret key is required which I don't know where to find. Thank you

Missing Get Targets API

The Get Target List for a Cloud Database Documentation is missing. When I try to click the link below, it doesn't redirect me to the api section:

In https://library.vuforia.com/web-api/cloud-targets-web-services-api article. when I click the "Get a Target List for a Cloud Database" which has a link of "https://library.vuforia.com/web-api/cloud-targets-web-services-api#details-list", nothing happens.

Hey there,

 

The link will be fixed. Thank you for reaching out.

 

Kind regards,

Patrick Scheper

Vuforia Engine Product Manager

Can I create a device database from a cloud DB?

Hope to express myself correctly:

I want to create a web backend where users can upload only a specific type of image targets.

The image recognition is then supposed to happen within the iOS/Android app.

So far I read I can achieve the first with the cloud database.

And the second with the device database.

If someone could point me to how to combine this, it would be greatly appreciated.

Thank you!

Hey there,

 

Yes, this would mean you need to store the images yourself and create Image Targets during runtime. This is done through Instant Image Targets: https://developer.vuforia.com/forum/unity/how-create-instant-image-targets-runtime-file-or-texture2d-objects

Cloud Image Targets Web API AuthenticationFailure

Hi, I'm getting AuthenticationFailure with the JSON code from the documentation, any help please?

POST /targets HTTP/1.1 Host: vws.vuforia.com Date: Mon, 07 Nov 2022 12:45:19 GMT Authorization: VWS Access Key::Secret Key Content-Type: application/json {   "name":"tarmac",   "width":32.0,   "image":"0912ba39x...",   "application_metadata":"496fbb6532b3863460a984de1d980bed5ebcd507" }

Reponse:

{

    "result_code": "AuthenticationFailure",     "transaction_id": "0e636469a78741a28e5f2183a479cb47" }

Get Video URL from Metadata

Hello, I'm still quite a newbie.

I want to create a video playback with the cloud integration. It all works fine so far, the image is recognized, if I manually insert an video as source it will also play, however I want the video to play, from the URL in the Metadata.

How can I solve this?

Kind regards, Daniel

Hey there,

 

Once the target is detected you can query the metadata and use the URL within the metadata to load the specific video. How to load the video from a URL is out of the scope of Vuforia Engine.

 

Kind regards,

Patrick Scheper

Assistance with Cloud Image Targets Web AP

Hi,

Is there any beginner friendly/someone with no web experiance guide/tutorial on how to use Vuforia Web Services API and Cloud Targets Web API ?

We have an app with more than 1000 images, any assistance would be appreciated.

Thanks.

429 Error

Hi,

 

Sometime in similar target api I get error code 429 => Too many request.

Can you tell if there is any rate limit for API ?

Hello,

Rate limits are in place for select Cloud Reco management APIs. Can you please share the types of operations you're attempting where you've received a HTTP 429?

Kind regards,

Dave Downing

Vuforia Engine Technical Support

rmmaitrey2021

Tue, 08/02/2022 - 04:35

In reply to by medabit

Hi,

 

We get this error when we try to hit getsimilartargets api at that time we get 429 error.

Also if we can know the rate limit we can restrict the calls from our side.

pscheper

Tue, 08/02/2022 - 13:14

In reply to by rmmaitrey2021

Hey there,

 

Sadly we don't have additional information at this point and require more time to investigate. Thank you. 

 

Kind regards,

Patrick Scheper

Technical Community Manager

Hi,

 

We are still waiting for the solution. Did you got any information on it ?