【问题标题】:Wikitude Image recognized resetWikiitude 图像识别重置
【发布时间】:2018-07-11 11:54:16
【问题描述】:

所以我有一个使用 Wikitude 来识别图像的应用程序。当图像被识别时,我会显示一个弹出窗口,它会返回图像的名称。当用户在弹出窗口中单击完成时,图像应该可以再次跟踪。但是现在一切正常,除了图像可以再次跟踪(除非我关闭图像并重新打开图像)

来自 js 文件:

imageRcognized: function(name) {
        AR.platform.sendJSONObject(name);
    },

来自 C# 委托

public class PopUpdel : WTArchitectViewDelegate
{
    VC _presentingVC;

    public PopUpdel(VC presentingVC)
    {
        _presentingVC = presentingVC;
    }

    public override void ReceivedJSONObject(WTArchitectView architectView, NSDictionary jsonObject)
    {
        WikitudeScanResult result = new WikitudeScanResult()
        {
            name = jsonObject.ValueForKey(new NSString("name")).ToString()
        };
        _presentingVC.Tracked(result);
    }

    public void Tracked(WikitudeScanResult result)
    {
        //show popup 
    }

现在剩下的就是重置图像,以便再次扫描

【问题讨论】:

  • 请贴出相关代码
  • @Jason 添加了一些代码
  • 您可以将 ImageTracker.enabled 在识别时设置为 false,在您想再次识别时设置为 true。
  • @Alex 把它作为一个普通评论然后我可以接受它,它解决了我的问题(在 android 上我用破坏和重新创建修复它,但 iOS 不允许这样做)所以根据你的建议我改变了它并且您的解决方案对双方都有效

标签: xamarin xamarin.ios wikitude


【解决方案1】:

您可以将 ImageTracker.enabled 在识别时设置为 false,在您想再次识别时设置为 true。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2010-09-13
    • 2016-09-26
    • 2014-11-30
    • 2013-10-28
    • 2019-07-06
    • 2017-04-18
    • 1970-01-01
    相关资源
    最近更新 更多