2 * PROJECT: NyARToolkit
\r
3 * --------------------------------------------------------------------------------
\r
4 * This work is based on the original ARToolKit developed by
\r
7 * HITLab, University of Washington, Seattle
\r
8 * http://www.hitl.washington.edu/artoolkit/
\r
10 * The NyARToolkit is Java version ARToolkit class library.
\r
11 * Copyright (C)2008 R.Iizuka
\r
13 * This program is free software; you can redistribute it and/or
\r
14 * modify it under the terms of the GNU General Public License
\r
15 * as published by the Free Software Foundation; either version 2
\r
16 * of the License, or (at your option) any later version.
\r
18 * This program is distributed in the hope that it will be useful,
\r
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
\r
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
\r
21 * GNU General Public License for more details.
\r
23 * You should have received a copy of the GNU General Public License
\r
24 * along with this framework; if not, write to the Free Software
\r
25 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
\r
27 * For further information please contact.
\r
28 * http://nyatla.jp/nyatoolkit/
\r
29 * <airmail(at)ebony.plala.or.jp>
\r
32 package jp.nyatla.nyartoolkit.detector;
\r
34 import jp.nyatla.nyartoolkit.NyARException;
\r
35 import jp.nyatla.nyartoolkit.core.*;
\r
36 import jp.nyatla.nyartoolkit.core.param.NyARParam;
\r
37 import jp.nyatla.nyartoolkit.core.raster.rgb.*;
\r
38 import jp.nyatla.nyartoolkit.core.rasterfilter.rgb2bin.NyARRasterFilter_ARToolkitThreshold;
\r
41 * 画像からARCodeに最も一致するマーカーを1個検出し、その変換行列を計算するクラスです。
\r
44 public class NyARSingleDetectMarker extends NyARCustomSingleDetectMarker
\r
47 * 検出するARCodeとカメラパラメータから、1個のARCodeを検出するNyARSingleDetectMarkerインスタンスを作ります。
\r
53 * @param i_marker_width
\r
54 * ARコードの物理サイズを、ミリメートルで指定します。
\r
55 * @throws NyARException
\r
57 public NyARSingleDetectMarker(NyARParam i_param, NyARCode i_code, double i_marker_width) throws NyARException
\r
59 super(i_param,i_code,i_marker_width,new NyARRasterFilter_ARToolkitThreshold(100));
\r
64 * i_imageにマーカー検出処理を実行し、結果を記録します。
\r
67 * マーカーを検出するイメージを指定します。イメージサイズは、カメラパラメータ
\r
69 * @return マーカーが検出できたかを真偽値で返します。
\r
70 * @throws NyARException
\r
72 public boolean detectMarkerLite(INyARRgbRaster i_raster,int i_threshold) throws NyARException
\r
74 ((NyARRasterFilter_ARToolkitThreshold)this._tobin_filter).setThreshold(i_threshold);
\r
75 return super.detectMarkerLite(i_raster);
\r