チェンジセット 3415: as3/FLARToolKit
- コミット日時:
- 2010/02/07 12:47:04 (2 年前)
- ファイル:
-
- as3/FLARToolKit/trunk/libs/NyARToolKitAS3/src/jp/nyatla/nyartoolkit/as3/core/types/matrix/NyARDoubleMatrix34.as (更新) (1 diff)
- as3/FLARToolKit/trunk/libs/NyARToolKitAS3/src/jp/nyatla/nyartoolkit/as3/detector/NyARCustomSingleDetectMarker.as (更新) (1 diff)
- as3/FLARToolKit/trunk/libs/NyARToolKitAS3/src/jp/nyatla/nyartoolkit/as3/processor/SingleARMarkerProcesser.as (更新) (8 diffs)
- as3/FLARToolKit/trunk/libs/NyARToolKitAS3/src/jp/nyatla/nyartoolkit/as3/processor/SingleNyIdMarkerProcesser.as (更新) (1 diff)
- as3/FLARToolKit/trunk/src/org/libspark/flartoolkit/core/analyzer/raster/FLARRasterAnalyzer_Histogram.as (更新) (2 diffs)
- as3/FLARToolKit/trunk/src/org/libspark/flartoolkit/processor/FLSingleARMarkerProcesser.as (更新) (7 diffs)
- as3/FLARToolKit/trunk/src/org/libspark/flartoolkit/processor/FLSingleNyIdMarkerProcesser.as (更新) (1 diff)
凡例:
- 変更無し
- 追加
- 削除
- 更新
- コピー
- 移動
as3/FLARToolKit/trunk/libs/NyARToolKitAS3/src/jp/nyatla/nyartoolkit/as3/core/types/matrix/NyARDoubleMatrix34.as
r3322 r3415 64 64 return; 65 65 } 66 public function setValue_NyARDoubleMatrix34(i_value:NyARDoubleMatrix34):void 67 { 68 this.m00=i_value.m00; 69 this.m01=i_value.m01; 70 this.m02=i_value.m02; 71 this.m03=i_value.m03; 72 this.m10=i_value.m10; 73 this.m11=i_value.m11; 74 this.m12=i_value.m12; 75 this.m13=i_value.m13; 76 this.m20=i_value.m20; 77 this.m21=i_value.m21; 78 this.m22=i_value.m22; 79 this.m23=i_value.m23; 80 return; 81 } 66 82 67 83 public function getValue(o_value:Vector.<Number>):void as3/FLARToolKit/trunk/libs/NyARToolKitAS3/src/jp/nyatla/nyartoolkit/as3/detector/NyARCustomSingleDetectMarker.as
r3322 r3415 130 130 } 131 131 /** 132 * 現在の矩形を返します。 133 * @return 134 */ 135 public function refSquare():NyARSquare 136 { 137 return this._detect_cb.square; 138 } 139 /** 132 140 * 検出したマーカーの一致度を返します。 133 141 * as3/FLARToolKit/trunk/libs/NyARToolKitAS3/src/jp/nyatla/nyartoolkit/as3/processor/SingleARMarkerProcesser.as
r3322 r3415 155 155 156 156 // スクエアコードを探す 157 this._detectmarker_cb.init(i_raster );157 this._detectmarker_cb.init(i_raster,this._current_arcode_index); 158 158 this._square_detect.detectMarkerCB(this._bin_raster,this._detectmarker_cb); 159 159 … … 170 170 return; 171 171 } 172 172 /** 173 * 174 * @param i_new_detect_cf 175 * @param i_exist_detect_cf 176 */ 177 public function setConfidenceThreshold(i_new_cf:Number,i_exist_cf:Number):void 178 { 179 this._detectmarker_cb.cf_threshold_exist=i_exist_cf; 180 this._detectmarker_cb.cf_threshold_new=i_new_cf; 181 } 173 182 private var __NyARSquare_result:NyARTransMatResult = new NyARTransMatResult(); 174 183 … … 207 216 // イベント生成 208 217 // 変換行列を作成 209 this._transmat.transMat (i_square, this._offset, result);218 this._transmat.transMatContinue(i_square, this._offset, result); 210 219 // OnUpdate 211 220 this.onUpdateHandler(i_square, result); … … 255 264 public var confidence:Number=0.0; 256 265 public var code_index:int=-1; 257 public var cf_threshold_new:Number = 0. 30;258 public var cf_threshold_exist:Number = 0. 15;266 public var cf_threshold_new:Number = 0.50; 267 public var cf_threshold_exist:Number = 0.30; 259 268 260 269 //参照 … … 284 293 } 285 294 private var __tmp_vertex:Vector.<NyARIntPoint2d>=NyARIntPoint2d.createArray(4); 295 private var _target_id:int; 296 286 297 /** 287 298 * Initialize call back handler. 288 299 */ 289 public function init(i_raster:INyARRgbRaster):void 290 { 291 this._ref_raster=i_raster; 300 public function init(i_raster:INyARRgbRaster,i_target_id:int):void 301 { 302 this._ref_raster = i_raster; 303 this._target_id=i_target_id; 292 304 this.code_index=-1; 293 305 this.confidence = Number.MIN_VALUE; … … 339 351 340 352 //認識処理 341 if (this. code_index== -1) { // マーカ未認識353 if (this._target_id == -1) { // マーカ未認識 342 354 //現在は未認識 343 355 if (c1 < this.cf_threshold_new) { … … 353 365 //現在はマーカ認識中 354 366 // 現在のマーカを認識したか? 355 if (lcode_index != this. code_index) {367 if (lcode_index != this._target_id) { 356 368 // 認識中のマーカではないので無視 357 369 return; … … 365 377 return; 366 378 } 379 this.code_index=this._target_id; 367 380 } 368 381 //新しく認識、または継続認識中に更新があったときだけ、Square情報を更新する。 as3/FLARToolKit/trunk/libs/NyARToolKitAS3/src/jp/nyatla/nyartoolkit/as3/processor/SingleNyIdMarkerProcesser.as
r3322 r3415 184 184 } else if(this._data_current.isEqual(i_marker_data)) { 185 185 //同じidの再認識 186 this._transmat.transMat (i_square, this._offset, result);186 this._transmat.transMatContinue(i_square, this._offset, result); 187 187 // OnUpdate 188 188 this.onUpdateHandler(i_square, result); as3/FLARToolKit/trunk/src/org/libspark/flartoolkit/core/analyzer/raster/FLARRasterAnalyzer_Histogram.as
r3336 r3415 47 47 if (i_raster_format != NyARBufferType.OBJECT_AS3_BitmapData) { 48 48 return false; 49 }else { 50 this._vertical_skip = i_vertical_interval; 49 51 } 50 52 return true; … … 82 84 for (var x:int = i_size.w - 1; x >= 0; x--) { 83 85 var p:int=input.getPixel(x,y); 84 o_histgram[( ((p>>8)&0xff)+((p>>16)&0xff)+(p&0xff))/3]++;86 o_histgram[(int)((((p>>8)&0xff)+((p>>16)&0xff)+(p&0xff))/3)]++; 85 87 pt++; 86 88 } as3/FLARToolKit/trunk/src/org/libspark/flartoolkit/processor/FLSingleARMarkerProcesser.as
r3338 r3415 166 166 167 167 // スクエアコードを探す 168 this._detectmarker_cb.init(i_raster );168 this._detectmarker_cb.init(i_raster,this._current_arcode_index); 169 169 this._square_detect.detectMarkerCB(this._bin_raster,this._detectmarker_cb); 170 170 … … 181 181 return; 182 182 } 183 183 /** 184 * 185 * @param i_new_detect_cf 186 * @param i_exist_detect_cf 187 */ 188 public function setConfidenceThreshold(i_new_cf:Number,i_exist_cf:Number):void 189 { 190 this._detectmarker_cb.cf_threshold_exist=i_exist_cf; 191 this._detectmarker_cb.cf_threshold_new=i_new_cf; 192 } 184 193 private var __NyARSquare_result:FLARTransMatResult = new FLARTransMatResult(); 185 194 … … 267 276 public var confidence:Number=0.0; 268 277 public var code_index:int=-1; 269 public var cf_threshold_new:Number = 0. 30;270 public var cf_threshold_exist:Number = 0. 15;278 public var cf_threshold_new:Number = 0.50; 279 public var cf_threshold_exist:Number = 0.30; 271 280 272 281 //参照 … … 296 305 } 297 306 private var __tmp_vertex:Vector.<NyARIntPoint2d>=NyARIntPoint2d.createArray(4); 307 private var _target_id:int; 298 308 /** 299 309 * Initialize call back handler. 300 310 */ 301 public function init(i_raster:INyARRgbRaster ):void311 public function init(i_raster:INyARRgbRaster,i_target_id:int):void 302 312 { 303 313 this._ref_raster=i_raster; 314 this._target_id=i_target_id; 304 315 this.code_index=-1; 305 316 this.confidence = Number.MIN_VALUE; … … 351 362 352 363 //認識処理 353 if (this. code_index== -1) { // マーカ未認識364 if (this._target_id == -1) { // マーカ未認識 354 365 //現在は未認識 355 366 if (c1 < this.cf_threshold_new) { … … 365 376 //現在はマーカ認識中 366 377 // 現在のマーカを認識したか? 367 if (lcode_index != this. code_index) {378 if (lcode_index != this._target_id) { 368 379 // 認識中のマーカではないので無視 369 380 return; … … 377 388 return; 378 389 } 390 this.code_index=this._target_id; 379 391 } 380 392 //新しく認識、または継続認識中に更新があったときだけ、Square情報を更新する。 as3/FLARToolKit/trunk/src/org/libspark/flartoolkit/processor/FLSingleNyIdMarkerProcesser.as
r3338 r3415 195 195 } else if(this._data_current.isEqual(i_marker_data)) { 196 196 //同じidの再認識 197 this._transmat.transMat (i_square, this._offset, result);197 this._transmat.transMatContinue(i_square, this._offset, result); 198 198 // OnUpdate 199 199 this.onUpdateHandler(i_square, result);

