Что такое метаданные? Как создать метаданные и как связать их с облачной целью с помощью Vuforia?

Я изменил пример кода CloudRecog для своего собственного кода. Я создал облачную базу данных и получил AccessKeys, а затем скопировал эти ключи в файл CloudReco.cpp. Что я должен использовать для метаданных. Я не понял этого. Затем, когда я читал пример кода, я увидел эту строку: private static final String mServerURL = "https://ar.qualcomm.at/samples/cloudreco/json/". Как получить мой URL метаданных?


person Ravindhiran    schedule 25.11.2013    source источник


Ответы (3)


РЕДАКТИРОВАТЬ: это ответ на первую часть вашего вопроса: «Что мне использовать для метаданных» (а не вторая часть о том, как найти URL-адрес)

На основании их документации (https://developer.vuforia.com/resources/dev-guide/cloud-targets):

Метаданные передаются приложению всякий раз, когда распознается цель Cloud Reco. Разработчик должен определить содержимое этих метаданных — Vuforia обрабатывает их как большие двоичные объекты и просто передает их приложению. Максимальный размер загружаемых метаданных составляет 150 КБ.

Я добавил некоторую отладку в их приложение 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"
}
person pherris    schedule 10.12.2013

Служба Vuforia Cloud Recognition Service позволяет использовать новые типы приложений в розничной торговле и издательском деле. Приложение, использующее облачное распознавание, сможет запрашивать облачную базу данных с изображениями с камер (фактическое распознавание происходит в облаке), а затем обрабатывать результаты сопоставления, возвращенные из облака, для локального обнаружения и отслеживания.

Кроме того, каждая цель Cloud Image может дополнительно иметь связанные метаданные; целевые метаданные — это, по сути, не что иное, как настраиваемый пользовательский блок данных, который может быть связан с целью и заполнен пользовательской информацией, если размер данных не превышает допустимых пределов (до 1 МБ на цель).

Следовательно, вы можете использовать метаданные как способ хранения дополнительного контента, относящегося к конкретной цели, который ваше приложение сможет обрабатывать с помощью некоторой пользовательской логики.

Например, ваше приложение может использовать метаданные для хранения:

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, как описано здесь:

https://developer.vuforia.com/resources/dev-guide/managing-targets-cloud-database-using-target-manager

или вы можете продолжить программно, используя VWS API, как описано здесь:

https://developer.vuforia.com/resources/dev-guide/managing-targets-cloud-database-using-developer-api

Как я могу получить метаданные облачной цели, когда она распознана?

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:

https://developer.vuforia.com/resources/api/classcom

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 ...
1qualcomm
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 ...
1vuforia
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 ...
1_target_search_result

https://developer.vuforia.com/resources/api/unity/struct_target_finder

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 ...
1_target_search_result

Образец кода:

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).
person Kalpesh Panchasara    schedule 17.09.2016

Метаданные, загруженные вместе с вашим целевым изображением в базу данных CloudReco, представляют собой .txt-файл, содержащий все, что вы хотите.

То, на что Феррис ссылается в качестве полезной нагрузки из примера приложения, на самом деле является содержимым файла .json, на который ссылаются метаданные данного целевого изображения.

В примере приложения структура выглядит следующим образом:

  • Приложение активирует камеру и распознает цель изображения
  • Затем приложение запрашивает метаданные этого конкретного целевого изображения.
  • В этом случае рассматриваемые метаданные представляют собой .txt-файл следующего содержания: http://www.link-to-a-specific-json-file.com/randomname.json
  • Затем приложение запрашивает содержимое этого конкретного файла .json.
  • Конкретный файл .json выглядит как скопированные текстовые данные, на которые ссылается Феррис.
  • Приложение использует текстовые данные из файла .json для заполнения фактического содержимого примера приложения.
person Thomas    schedule 21.01.2014