नोट: यह निश्चित रूप से एक हैक है, लेकिन यह लगातार छवि ट्रैकिंग को एआरकिट यूनिटी में जोड़ता है। मूल विचार के साथ ही वही विचार लागू किया जा सकता है।
डाउनलोड ARKit 1.5 बीटा https://bitbucket.org/Unity-Technologies/unity-arkit-plugin/branch/spring2018_update
ARSessionNative.mm में, कोड के इस ब्लॉक को जोड़ने:
extern "C" void SessionRemoveAllAnchors(void* nativeSession) {
UnityARSession* session = (__bridge UnityARSession*)nativeSession;
for (ARAnchor* a in session->_session.currentFrame.anchors)
{
[session->_session removeAnchor:a];
return;
}
}
UnityARSessionNativeInterface.cs में, SessionRemoveUserAnchor के तहत इस कोड जोड़ें:
private static extern void SessionRemoveAllAnchors (IntPtr nativeSession);
और यह RemoveUserAnchor के तहत:
public void RemoveAllAnchors() {
#if !UNITY_EDITOR
SessionRemoveAllAnchors(m_NativeARSession);
#endif
}
फिर एक अद्यतन या coroutine से इस फोन:
UnityARSessionNativeInterface.GetARSessionNativeInterface().RemoveAllAnchors();
जब लंगर निकाल दिया जाता है, छवि एक बार फिर से पहचाना जा सकता है। यह सुपर चिकनी नहीं है लेकिन यह निश्चित रूप से काम करता है।
आशा है कि आपको यह उपयोगी लगेगा! कृपया मुझे बताएं अगर आपको अधिक सहायता की जरूरत है।
स्रोत
2018-03-04 22:36:54
ताकि आप एआरकेट के साथ ऐसा कर सकें।किसी ऑब्जेक्ट का पता लगाने के लिए आपको कुछ रीयलटाइम छवि प्रसंस्करण जैसे टेंसफोर्लो या वाटसन का उपयोग करना चाहिए। –
@matloob Hasnain वर्तमान में Vuforia ठीक काम करता है ग्राहक जानना चाहता है कि हम इसके बजाय एआरकेट का उपयोग कर सकते हैं या नहीं। – Superwayne
हां मुझे वाफोरिया मार्कर स्कैनिंग के बारे में पता है। –