- コミット日時:
- 2010/02/07 12:47:04 (2 年前)
- ファイル:
-
- 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/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);

