WVR_StopTrackableMarkerTracking¶
-
WVR_EXPORT WVR_Result WVR_StopTrackableMarkerTracking(WVR_Uuid uuid)
Function is used to stop tracking the trackable marker.
Developers use this API to stop tracking the trackable marker with input uuid WVR_Uuid.
- Version
- API Level 13
- Parameters
uuid
: the trackable marker with input uuid WVR_Uuid that developers would like to stop tracking
- Return Value
WVR_Success
: stop tracking the trackable marker successfully.others
: WVR_Result mean failure.
How to use¶
Sample function:
#include <wvr/wvr_marker.h>
if (WVR_StartMarker() == WVR_Success) {
//
// start marker observer
if (WVR_StartMarkerObserver(WVR_MarkerObserverTarget_Aruco) == WVR_Success) {
// Start Aruco marker observer related resources success
uint32_t count = 0;
int result = WVR_GetArucoMarkers(0, &count, WVR_PoseOriginModel_OriginOnGround, nullptr);
if (result==0 & count!=0) {
std::vector<WVR_ArucoMarker> markers(count);
int ret = WVR_GetArucoMarkers(count, &count, WVR_PoseOriginModel_OriginOnGround, markers.data());
if (ret != WVR_Success) {
LOGE("%s(%d) WVR_GetArucoMarkers failed ret=(%d)", __FUNCTION__, __LINE__, ret);
return;
}
for (int i = 0 ; i < count ; i ++) {
// get the Aruco markers
// collect createInfo and create trackable marker
WVR_TrackableMarkerCreateInfo info = {markers[i].uuid, "test name"};
WVR_CreateTrackableMarker(&info);
// Start trackable marker tracking
WVR_StartTrackableMarkerTracking(markers[i]);
// Stop trackable marker tracking
WVR_StartTrackableMarkerTracking(markers[i]);
// destroy trackable marker with its uuid
WVR_DestroyTrackableMarker(markers[i]);
}
}
// release Aruco marker observer related resources success
if (WVR_StopMarkerObserver(WVR_MarkerObserverTarget_Aruco) == WVR_Success) {
}
}
WVR_StopMarker();
} else {
// start marker failed!
}