대상 생성
이 섹션에서는 이전에 만든 모델 .pvz 파일을 사용하여 대상을 생성합니다. 이러한 대상은 여러 경험에서 재사용할 수 있습니다. 이 예에서는 사용 사례를 더 빠르게 이동할 수 있는 표준 모델 대상을 사용하지만 원하는 경우 더 강력한 고급 또는 온프레미스 고급 모델 대상을 사용할 수 있습니다.
대부분의 경우 요청 구조는 Vuforia Engine SDK API 정의에 의존합니다. Studio에 대한 구체적인 지침은 API 설명서Experience Service를 참조하십시오.
1. 구성된 보기가 모델 대상의 크기 및 방향을 고려하도록 합니다. 감지 및 추적 성능을 최적화하려면 뚜렷하고 쉽게 인식할 수 있는 각도에서 모델이 완전히 보이는 보기를 하나 이상 만드십시오. 다음 방법 중 하나를 사용하여 API에 대상을 생성합니다.
방법
지침
Postman에서
POST /ExperienceService/products/v1/target
{
"name": "Quadcopter Base",
"targetType": "standard",
"targetSdk": "10.9",
"models": [
{
"name": "Quadcopter Base SMT",
"modelId": <Model-Id>, //take the UUID that the Post Model API returned in the last step
"optimizeTrackingFor": "LOW_FEATURE_OBJECTS",
"automaticColoring": "auto",
"upVector": [0.0, 1.0, 0.0],
"views": [
{
"name": "viewpoint_0000",
"layout": "landscape",
"guideViewPosition": {
"translation": [0.19104722142219543,
0.19300971925258636,
0.2014508694410324],
"rotation": [-0.23911770032491195,
0.36964383294987413,
0.09904579601423466,
0.892399065690545]
}
}
]
}
]
}
Curl 명령 사용
curl --location 'https://<yourESURL>/ExperienceService/products/v1/target' \
--header 'X-Requested-With: any' \
--header 'Content-Type: application/json' \
--header 'Authorization: ••••••' \
--data '{
"name": "quadcopter base",
"targetType": "standard",
"targetSdk": "10.9",
"models": [
{
"name": "Quadcopter Base SMT",
"modelId": "yourModelUUID",
"optimizeTrackingFor": "LOW_FEATURE_OBJECTS",
"automaticColoring": "auto",
"upVector": [0.0,1.0,0.0],
"views": [
{
"name": "viewpoint_0000",
"layout": "landscape",
"guideViewPosition": {
"translation": [0.19104722142219543,
0.19300971925258636,
0.2014508694410324],
"rotation": [-0.23911770032491195,
0.36964383294987413,
0.09904579601423466,
0.892399065690545]
}
}
]
}
]
}
'
2. 응답은 다음과 유사합니다.
{
"targetId": "<targetId>", // Optional. Only sent in case when job to create Target is accepted.
}
3. 다음 방법 중 하나를 사용하여 모델 대상 생성 상태를 가져옵니다.
방법
지침
Postman에서
GET /ExperienceService/products/v1/target/status/<targetId>
Curl 명령 사용
curl --location 'http://<yourESURL>/ExperienceService/products/v1/target/status/<yourTargetUUID>' \
--header 'Authorization: ••••••'
4. 응답은 다음과 유사합니다.
{
"simplifiedStatus": "queued|inProgress|completed|failed|deleted|toBeCancelled|toBeDeleted", // Dataset's current status

}
5. 단계 1-4를 반복하여 ‘업데이트된 쿼드콥터’ 모델에 대한 표준 모델 대상을 생성합니다. 요청에서 modelId를 업데이트해야 합니다.
6. 필요한 자산이 작성되었으므로, 이제 다음 섹션으로 계속 진행하여 경험에 데이터 로직을 빌드하기 시작하겠습니다.
도움이 되셨나요?