免费视频淫片aa毛片_日韩高清在线亚洲专区vr_日韩大片免费观看视频播放_亚洲欧美国产精品完整版

打開APP
userphoto
未登錄

開通VIP,暢享免費(fèi)電子書等14項(xiàng)超值服

開通VIP
【新提醒】【unity進(jìn)行文字圖像識(shí)別
using System.Collections;
using System.Collections.Generic;
using System.IO;
using UnityEngine;
using LitJson;
using UnityEngine.UI;
public class FaceTest1 : MonoBehaviour
{
    public string ImageURL = "";
    //按鈕上的文本
    public Text Btn_ShibieText;
    //顯示結(jié)果
    public GameObject ShowResult;
    // Use this for initialization
    void Start()
    {
    }
    // Update is called once per frame
    void Update()
    {
    }
    public void TestHttpSend()
    {
        //識(shí)別文字
        WWWForm form = new WWWForm();
        form.AddField("api_key", "q8QTfr-xS5hm-i25JuWRLmWQQSHRRtzy");
        form.AddField("api_secret", "3JAabNdllrl-Dm_-iYSG43B0ewypFlWt");
        form.AddField("image_url", ImageURL);
        StartCoroutine(SendPost("https://api-cn.faceplusplus.com/imagepp/v1/recognizetext", form));
    }
    //提交數(shù)據(jù)進(jìn)行識(shí)別
    IEnumerator SendPost(string _url, WWWForm _wForm)
    {
        WWW postData = new WWW(_url, _wForm);
        yield return postData;
        if (postData.error != "")
        {
            Debug.Log(postData.error);
            ShowResult.SetActive(true);
            Btn_ShibieText.text = "識(shí)別";
            ShowResult.transform.Find("Text").GetComponent<Text>().text = "識(shí)別失敗!";
            GameObject.Find("DebugText").GetComponent<Text>().text = postData.error;
            //myTimer = 2.0f;
        }
        else
        {
            Btn_ShibieText.text = "識(shí)別";
            Debug.Log(postData.text);
            GameObject.Find("DebugText").GetComponent<Text>().text = postData.text;
            JsonJieXi(postData.text);
        }
    }
    void JsonJieXi(string str)
    {
        JsonData jd = JsonMapper.ToObject(str);
        Debug.Log(jd["result"].Count);
        for (int i = 0; i < jd["result"].Count; i++)
        {
            for (int j = 0; j < jd["result"]["child-objects"].Count; j++)
            {
                Debug.Log(jd["result"]["child-objects"][j]["type"].ToString());
                Debug.Log(jd["result"]["child-objects"][j]["value"].ToString());
            }
        }
    }
     
}
本站僅提供存儲(chǔ)服務(wù),所有內(nèi)容均由用戶發(fā)布,如發(fā)現(xiàn)有害或侵權(quán)內(nèi)容,請(qǐng)點(diǎn)擊舉報(bào)
打開APP,閱讀全文并永久保存 查看更多類似文章
猜你喜歡
類似文章
關(guān)于Unity 獲得和使用GetComponent<MeshFilter>().mesh時(shí)的心得
讓你的游戲支持熱更新 - 在Unity3D中使用lua
Unity API 解析(3)GameObject 類
【【原創(chuàng)】如何不綁定腳本且不繼承MonoBehaviour做U3D的開發(fā)】
UGUI基礎(chǔ)
Unity3D
更多類似文章 >>
生活服務(wù)
分享 收藏 導(dǎo)長圖 關(guān)注 下載文章
綁定賬號(hào)成功
后續(xù)可登錄賬號(hào)暢享VIP特權(quán)!
如果VIP功能使用有故障,
可點(diǎn)擊這里聯(lián)系客服!

聯(lián)系客服