Exemplo n.º 1
0
 public void finish()
 {
     //一致率の最も高いアイテムを得る。
     ARMarkerSortList.Item top_item = this._mkmap.getTopItem();
     //アイテムを検出できなくなるまで、一致率が高い順にアイテムを得る。
     while (top_item != null)
     {
         //検出したアイテムのARmarkerIndexのデータをセット
         ARMarkerList.Item target = top_item.marker;
         if (target.lost_count > 0)
         {
             //未割当のマーカのみ検出操作を実行。
             target.cf         = top_item.cf;
             target.lost_count = 0; //消失カウンタをリセット
             target.life++;         //ライフ値を加算
             target.sq = top_item.ref_sq;
             target.sq.rotateVertexL(4 - top_item.dir);
             NyARIntPoint2d.shiftCopy(top_item.ref_sq.ob_vertex, target.tl_vertex, 4 - top_item.dir);
             target.tl_center.setValue(top_item.ref_sq.center2d);
             target.tl_rect_area = top_item.ref_sq.rect_area;
         }
         //基準アイテムと重複するアイテムを削除する。
         this._mkmap.disableMatchItem(top_item);
         top_item = this._mkmap.getTopItem();
     }
     //消失カウンタが敷居値を越えたら、lifeを0にする。
 }
 public void finish()
 {
     //一致率の最も高いアイテムを得る。
     VertexSortTable.Item top_item = this._tracking_list.getTopItem();
     //アイテムを検出できなくなるまで、一致率が高い順にアイテムを得る。
     while (top_item != null)
     {
         //検出したアイテムのARmarkerIndexのデータをセット
         TMarkerData target = top_item.marker;
         //検出カウンタが1以上(未検出の場合のみ検出)
         if (target.lost_count > 0)
         {
             target.lost_count = 0;
             target.life++;
             target.sq = top_item.ref_sq;
             target.sq.rotateVertexL(4 - top_item.shift);
             NyARIntPoint2d.shiftCopy(top_item.ref_sq.ob_vertex, target.tl_vertex, 4 - top_item.shift);
             target.tl_center.setValue(top_item.ref_sq.center2d);
             target.tl_rect_area = top_item.ref_sq.rect_area;
         }
         //基準アイテムと重複するアイテムを削除する。
         this._tracking_list.disableMatchItem(top_item);
         top_item = this._tracking_list.getTopItem();
     }
 }
Exemplo n.º 3
0
 public void finish()
 {
     for (int i = this.Count - 1; i >= 0; i--)
     {
         Item target = this[i];
         if (target.sq == null)
         {
             continue;
         }
         if (target.lost_count > 0)
         {
             //参照はそのままで、dirだけ調整する。
             target.lost_count = 0;
             target.life++;
             target.sq.rotateVertexL(4 - target.dir);
             NyARIntPoint2d.shiftCopy(target.sq.ob_vertex, target.tl_vertex, 4 - target.dir);
             target.tl_center.setValue(target.sq.center2d);
             target.tl_rect_area = target.sq.rect_area;
         }
     }
 }