我为我自己的代码修改了示例CloudRecog代码。我创建了云数据库并获得了AccessKeys,然后将这个密钥复制到CloudReco.cpp文件中。元数据应该使用什么。我不明白这点。然后,当我阅读示例代码时,我看到了这一行:私有静态最后字符串mServerURL = "https://ar.qualcomm.at/samples/cloudreco/json/“。如何得到我的metaData网址?
发布于 2013-12-10 12:18:05
编辑:这是针对您问题的第一部分:“我应该使用什么作为元数据”(而不是关于如何找到URL的第二部分)。
基于它们的文档(https://developer.vuforia.com/resources/dev-guide/cloud-targets):
每当识别Cloud目标时,元数据就会传递给应用程序。这取决于开发人员确定这个元数据的内容- Vuforia将其视为一个blob,并将其传递给应用程序。可上载元数据的最大大小为150 maximum。
我在他们的CloudRecognition应用程序中添加了一些调试,并看到它们在“识别”图像时返回的有效载荷(想必是元数据)是:
{
"thumburl": "https://developer.vuforia.com/samples/cloudreco/thumbs/01_thumbnail.png",
"author": "Karina Borland",
"your price": "43.15",
"title": "Cloud Recognition in Vuforia",
"average rating": "4",
"# of ratings": "41",
"targetid": "a47d2ea6b762459bb0aed1ae9dbbe405",
"bookurl": "https://developer.vuforia.com/samples/cloudreco/book1.php",
"list price": "43.99"
}发布于 2016-09-17 07:24:52
Vuforia云识别服务支持零售和出版领域的新型应用程序。使用云识别的应用程序将能够使用相机图像(实际识别发生在云中)查询云数据库,然后处理从云返回的匹配结果以执行本地检测和跟踪。
而且,每个都可以有一个相关的元数据;目标元数据本质上就是一个用户定义的数据块,它可以关联到目标并填充自定义信息,只要数据大小没有超出允许的限制(每个目标最多1MB )。
因此,您可以使用元数据作为存储与特定目标相关的附加内容的方法,应用程序将能够使用某些自定义逻辑进行处理。
例如,应用程序可以使用元数据存储:
a simple text message that you want your app to display on the screen of your device when the target is detected, for example:
“Hello, I am your cloud image target XYZ, you have detected me :-) !”
a simple URL string (for instance “http://my_server/my_3d_models/my_model_01.obj”) pointing to a custom network location where you have stored some other content, like a 3D model, a video, an image, or any other custom data, so that for each different image target, your application may use such URL to download the specific content;
more in general, some custom string that your application is able to process and use to perform specific actions
a full 3D model (not just the URL pointing to a model on a server, but the model itself), for example the metadata itself could embed an .OBJ 3D model, provided that the size does not exceed the allowed limits (up to 1MB)
and more ...如何为云目标创建/存储元数据?
在云数据库中创建目标本身时,可以将元数据与图像目标一起上载;也可以稍后更新现有目标的元数据;在这两种情况下,您都可以使用在线TargetManager,如下文所述:
或者您可以使用VWS进行编程,如下所示:
当云目标被识别时,我如何获得它的元数据?
Vuforia SDK提供了一个专用的API来检索移动应用程序中目标的元数据。当检测到(识别)云目标时,将向应用程序报告一个新的TargetSearchResult,并且可以使用以下方法之一获得元数据:
Vuforia Native SDK - C++ API: TargetSearchResult::getMetaData() - const char*
Vuforia Native SDK - Java API: TargetSearchResult.getMetaData() - String
Vuforia Unity Extension - C# API: TargetSearchResult.Metadata - string还请参阅API参考页:
样本代码:
For a reference sample code in native Android, see the code in the Books.java in the "Books-2-x-y" sample project.
For a reference sample code in native iOS, see the code in the BooksEAGLView.mm file in the "Books-2-x-y" sample project.
For a reference sample code in Unity, see the CloudRecoEventHandler.cs script (attached to theCloudRecognition prefab) in the Books sample; in particular, the OnNewSearchResult method shows how to get a targetSearchResult object (from which you can then get the metadata, as shown in the example code).发布于 2014-01-21 13:07:40
MetaData与您在CloudReco数据库中的图像目标一起上传,是一个..txt文件,包含您想要的任何内容。
作为样例应用程序的有效负载,pherris链接的实际上是给定图像目标的元数据链接到的..json文件的内容。
在示例应用程序中,结构如下:
https://stackoverflow.com/questions/20185386
复制相似问题