Package | org.libspark.flartoolkit.detector |
Class | public class FLARMultiMarkerDetector |
Inheritance | FLARMultiMarkerDetector ![]() |
Property | Defined By | ||
---|---|---|---|
thresholdedBitmapData : BitmapData [read-only]
2値化した画像を返却します。
| FLARMultiMarkerDetector |
Property | Defined By | ||
---|---|---|---|
_transmat : INyARTransMat | FLARMultiMarkerDetector |
Method | Defined By | ||
---|---|---|---|
FLARMultiMarkerDetector(i_param:FLARParam, i_code:Vector.<FLARCode>, i_marker_width:Vector.<Number>, i_number_of_code:int)
複数のマーカーを検出し、最も一致するARCodeをi_codeから検索するオブジェクトを作ります。
| FLARMultiMarkerDetector | ||
detectMarkerLite(i_raster:FLARRgbRaster_BitmapData, i_threshold:int):int
i_imageにマーカー検出処理を実行し、結果を記録します。
| FLARMultiMarkerDetector | ||
getARCodeIndex(i_index:int):int
i_indexのマーカーのARCodeインデックスを返します。
| FLARMultiMarkerDetector | ||
getConfidence(i_index:int):Number
i_indexのマーカーの一致度を返します。
| FLARMultiMarkerDetector | ||
getDirection(i_index:int):int
検出したマーカーの方位を返します。
0,1,2,3の何れかを返します。
| FLARMultiMarkerDetector | ||
getSquare(i_index:int):NyARSquare
検出した FLARSquare 1 個返す。検出できなかったら null。
| FLARMultiMarkerDetector | ||
getTransformMatrix(i_index:int, o_result:FLARTransMatResult):void
i_indexのマーカーに対する変換行列を計算し、結果値をo_resultへ格納します。 直前に実行したdetectMarkerLiteが成功していないと使えません。
| FLARMultiMarkerDetector | ||
setAreaRange(i_max:int = 100000, i_min:int = 70):void
白領域の検査対象サイズ
最大サイズは 一辺約320px、最小サイズは 一辺約 8px まで解析対象としている
解析画像中で上記範囲内であれば解析対象となるが、最小サイズは小さすぎて意味をなさない。
マーカー内部の判別には一辺30px~230pxとするのが妥当。
640x480で取り込む場合は、i_maxを縦サイズの二乗を設定する。
なお、0 を指定した場合は FLARLabeling.AR_AREA_MAX、FLARLabeling.AR_AREA_MINが適応されます。
| FLARMultiMarkerDetector | ||
setContinueMode(i_is_continue:Boolean):void
getTransmationMatrixの計算モードを設定します。
| FLARMultiMarkerDetector |
Method | Defined By | ||
---|---|---|---|
initInstance(i_ref_param:FLARParam, i_ref_code:Vector.<FLARCode>, i_marker_width:Vector.<Number>, i_number_of_code:int):void | FLARMultiMarkerDetector |
Constant | Defined By | ||
---|---|---|---|
AR_SQUARE_MAX : int = 300 [static] | FLARMultiMarkerDetector |
_transmat | property |
protected var _transmat:INyARTransMat
thresholdedBitmapData | property |
thresholdedBitmapData:BitmapData
[read-only] 2値化した画像を返却します。
public function get thresholdedBitmapData():BitmapData
FLARMultiMarkerDetector | () | Constructor |
public function FLARMultiMarkerDetector(i_param:FLARParam, i_code:Vector.<FLARCode>, i_marker_width:Vector.<Number>, i_number_of_code:int)
複数のマーカーを検出し、最も一致するARCodeをi_codeから検索するオブジェクトを作ります。
Parametersi_param:FLARParam — カメラパラメータを指定します。
| |
i_code:Vector.<FLARCode> — 検出するマーカーのARCode配列を指定します。
配列要素のインデックス番号が、そのままgetARCodeIndex関数で得られるARCodeインデックスになります。
例えば、要素[1]のARCodeに一致したマーカーである場合は、getARCodeIndexは1を返します。
| |
i_marker_width:Vector.<Number> — i_codeのマーカーサイズをミリメートルで指定した配列を指定します。 先頭からi_number_of_code個の要素には、有効な値を指定する必要があります。
| |
i_number_of_code:int — i_codeに含まれる、ARCodeの数を指定します。
|
NyARException
|
detectMarkerLite | () | method |
public function detectMarkerLite(i_raster:FLARRgbRaster_BitmapData, i_threshold:int):int
i_imageにマーカー検出処理を実行し、結果を記録します。
Parameters
i_raster:FLARRgbRaster_BitmapData — マーカーを検出するイメージを指定します。
| |
i_threshold:int — 検出閾値を指定します。0~255の範囲で指定してください。 通常は100~130くらいを指定します。
|
int — 見つかったマーカーの数を返します。 マーカーが見つからない場合は0を返します。
|
NyARException
|
getARCodeIndex | () | method |
public function getARCodeIndex(i_index:int):int
i_indexのマーカーのARCodeインデックスを返します。
Parameters
i_index:int — マーカーのインデックス番号を指定します。 直前に実行したdetectMarkerLiteの戻り値未満かつ0以上である必要があります。
|
int —
|
getConfidence | () | method |
public function getConfidence(i_index:int):Number
i_indexのマーカーの一致度を返します。
Parameters
i_index:int — マーカーのインデックス番号を指定します。 直前に実行したdetectMarkerLiteの戻り値未満かつ0以上である必要があります。
|
Number — マーカーの一致度を返します。0~1までの値をとります。 一致度が低い場合には、誤認識の可能性が高くなります。
|
NyARException
|
getDirection | () | method |
public function getDirection(i_index:int):int
検出したマーカーの方位を返します。 0,1,2,3の何れかを返します。
Parameters
i_index:int |
int — Returns whether any of 0,1,2,3.
|
getSquare | () | method |
public function getSquare(i_index:int):NyARSquare
検出した FLARSquare 1 個返す。検出できなかったら null。
Parameters
i_index:int |
NyARSquare — Total return detected FLARSquare 1. Detection Dekinakattara null.
|
getTransformMatrix | () | method |
public function getTransformMatrix(i_index:int, o_result:FLARTransMatResult):void
i_indexのマーカーに対する変換行列を計算し、結果値をo_resultへ格納します。 直前に実行したdetectMarkerLiteが成功していないと使えません。
Parameters
i_index:int — マーカーのインデックス番号を指定します。 直前に実行したdetectMarkerLiteの戻り値未満かつ0以上である必要があります。
| |
o_result:FLARTransMatResult — 結果値を受け取るオブジェクトを指定してください。
|
NyARException
|
initInstance | () | method |
protected function initInstance(i_ref_param:FLARParam, i_ref_code:Vector.<FLARCode>, i_marker_width:Vector.<Number>, i_number_of_code:int):void
Parameters
i_ref_param:FLARParam | |
i_ref_code:Vector.<FLARCode> | |
i_marker_width:Vector.<Number> | |
i_number_of_code:int |
setAreaRange | () | method |
public function setAreaRange(i_max:int = 100000, i_min:int = 70):void
白領域の検査対象サイズ 最大サイズは 一辺約320px、最小サイズは 一辺約 8px まで解析対象としている 解析画像中で上記範囲内であれば解析対象となるが、最小サイズは小さすぎて意味をなさない。 マーカー内部の判別には一辺30px~230pxとするのが妥当。 640x480で取り込む場合は、i_maxを縦サイズの二乗を設定する。 なお、0 を指定した場合は FLARLabeling.AR_AREA_MAX、FLARLabeling.AR_AREA_MINが適応されます。
Parameters
i_max:int (default = 100000 ) — 解析対象とする白領域の最大pixel数(一辺の二乗) default: 100000
| |
i_min:int (default = 70 ) — 解析対象とする白領域の最小pixel数(一辺の二乗) default: 70
|
setContinueMode | () | method |
public function setContinueMode(i_is_continue:Boolean):void
getTransmationMatrixの計算モードを設定します。
Parameters
i_is_continue:Boolean — TRUEなら、transMatContinueを使用します。 FALSEなら、transMatを使用します。
|
AR_SQUARE_MAX | Constant |
public static const AR_SQUARE_MAX:int = 300