|
||||||
| 前のクラス 次のクラス | フレームあり フレームなし | |||||
| 概要: 入れ子 | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド | |||||
java.lang.Objectjp.nyatla.nyar4psg.NyARPsgBaseClass
jp.nyatla.nyar4psg.SingleMarkerBaseClass
jp.nyatla.nyar4psg.NyARBoard
public class NyARBoard
このクラスは、マーカを1枚の板に見立てて、そこを中心にした座標系を計算します。 PImageから1個のARマーカを検出します。 * 同時検出可能なマーカは1種類、1個です。
NyARBoardは、2つの外部設定ファイル"マーカファイル"と"カメラパラメータ"ファイルを必要とします。 これらはARToolKitのものと互換性があります。 これらはスケッチのdataディレクトリ以下に配置をして下さい。(exampleを見てください。)
| フィールドの概要 | |
|---|---|
double |
cfThreshold
マーカの座標変換を行う閾値です。 |
double |
confidence
[read only]検出したマーカの一致度です。 |
int |
gsThreshold
マーカ検出時のグレースケール閾値を指定します。 |
int |
lostCount
[read only]連続でマーカを見失った回数。 |
int |
lostDelay
この値は、マーカ消失時の遅延数を設定します。 |
| クラス jp.nyatla.nyar4psg.SingleMarkerBaseClass から継承されたフィールド |
|---|
_ar_param, _config, _frustum, _ps_projection, _src_raster, angle, pos2d, projection, trans, transmat |
| クラス jp.nyatla.nyar4psg.NyARPsgBaseClass から継承されたフィールド |
|---|
_ps_background_mv, _ref_papplet, FRUSTUM_DEFAULT_FAR_CLIP, FRUSTUM_DEFAULT_NEAR_CLIP, VERSION |
| コンストラクタの概要 | |
|---|---|
NyARBoard(PApplet parent,
int i_width,
int i_height,
String i_cparam,
String i_patt,
int i_patt_width)
この関数はコンストラクタです。 |
|
NyARBoard(PApplet parent,
int i_width,
int i_height,
String i_cparam,
String i_patt,
int i_patt_width,
NyAR4PsgConfig i_config)
この関数はコンストラクタです。 |
|
| メソッドの概要 | |
|---|---|
boolean |
detect(PImage i_image)
i_imageから最も一致度の高いマーカを検出し、cfThreshold以上の一致度であれば、 pos2d,angle,trans,confidence,transmatのプロパティを更新します。 |
boolean |
detectWithoutLoadPixels(PImage i_image)
PImage.loadPixels()を伴わないdetect()です。 |
| クラス jp.nyatla.nyar4psg.NyARPsgBaseClass から継承されたメソッド |
|---|
drawBackground, initInstance, matResult2GLArray, matResult2PMatrix3D, nyarMat2PsMat, PMatrix2GLProjection, PMatrix2GLProjection, setARPerspective, setBackgroundOrtho, setPerspective |
| クラス java.lang.Object から継承されたメソッド |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| フィールドの詳細 |
|---|
public int lostDelay
public int lostCount
public double cfThreshold
public double confidence
public int gsThreshold
| コンストラクタの詳細 |
|---|
public NyARBoard(PApplet parent,
int i_width,
int i_height,
String i_cparam,
String i_patt,
int i_patt_width,
NyAR4PsgConfig i_config)
parent - processingのPAppletインスタンスをしていします。i_width - detect()に渡す入力画像の幅を指定します。i_htight - detectに渡す入力画像の高さを指定します。i_cparam - ARToolKitのパラメータファイル名を指定します。パラメータファイルはdataディレクトリにおいて下さい。i_patt - マーカのパターンファイル名を指定します。パターンファイルは、dataディレクトリにおいて下さい。
マーカの解像度は、16x16である必要があります。i_patt_width - マーカのサイズを指定します。単位はmmです。i_config - コンフィギュレーションオブジェクトを指定します。
public NyARBoard(PApplet parent,
int i_width,
int i_height,
String i_cparam,
String i_patt,
int i_patt_width)
NyAR4PsgConfig.CONFIG_DEFAULTを設定するコンストラクタと同一です。
parent - NyARBoard#NyARBoard(PApplet, int, int, String, String, NyAR4PsgConfig)を参照してください。i_width - NyARBoard#NyARBoard(PApplet, int, int, String, String, NyAR4PsgConfig)を参照してください。i_height - NyARBoard#NyARBoard(PApplet, int, int, String, String, NyAR4PsgConfig)を参照してください。i_cparam - NyARBoard#NyARBoard(PApplet, int, int, String, String, NyAR4PsgConfig)を参照してください。i_patt - NyARBoard#NyARBoard(PApplet, int, int, String, String, NyAR4PsgConfig)を参照してください。i_patt_width - NyARBoard#NyARBoard(PApplet, int, int, String, String, NyAR4PsgConfig)を参照してください。| メソッドの詳細 |
|---|
public boolean detect(PImage i_image)
i_image - 検出する画像を指定します。この画像は、入力画像に設定した値と同じでなければなりません。
関数を実行する前に、i_imageのPImage.loadPixels()を実行してください。
PImage.loadPixels()のタイミングをコントロールしたい場合は、detectWithoutLoadPixels(processing.core.PImage)を使用してください。
public boolean detectWithoutLoadPixels(PImage i_image)
PImage.loadPixels()を伴わないdetect()です。
引数と戻り値の詳細は、detect(PImage)を参照してください。
i_image -
detect(PImage)
|
||||||
| 前のクラス 次のクラス | フレームあり フレームなし | |||||
| 概要: 入れ子 | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド | |||||