Example #1
0
    // Update is called once per frame
    void Update()
    {
        UDetectMarkersData _markerData = Aruco.UDetectMarkers(_webCamTexture.GetPixels32(), _webCamTexture.width, _webCamTexture.height);

        if (_markerData.markerIds.Length > 0)
        {
            int[] markersIds = _markerData.markerIds;
            List <List <Vector2> > markers            = _markerData.markers;
            List <List <Vector2> > rejectedCandidates = _markerData.rejectedCandidates;

            DrawQuad(markersIds, markers, rejectedCandidates);
        }
    }
    // Update is called once per frame
    void Update()
    {
        // detect markers in the frame with specified board parameters
        UDetectMarkersData _markerData = Aruco.UDetectMarkers(_webCamTexture.GetPixels32(), _webCamTexture.width, _webCamTexture.height);

        if (_markerData.markerIds.Length > 0)
        {
            int[] markersIds = _markerData.markerIds;
            List <List <Vector2> > markers            = _markerData.markers;
            List <List <Vector2> > rejectedCandidates = _markerData.rejectedCandidates;

            DrawMarkers(markersIds, markers, rejectedCandidates);
        }
    }