チェンジセット 3415: as3/FLARToolKit

差分発生行の前後
無視リスト:
コミット日時:
2010/02/07 12:47:04 (2 年前)
コミッタ:
rokubou
ログメッセージ:

bugfix

ファイル:

凡例:

変更無し
追加
削除
更新
コピー
移動
  • as3/FLARToolKit/trunk/libs/NyARToolKitAS3/src/jp/nyatla/nyartoolkit/as3/core/types/matrix/NyARDoubleMatrix34.as

    r3322 r3415  
    6464                        return; 
    6565                } 
     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                } 
    6682 
    6783                public function getValue(o_value:Vector.<Number>):void 
  • as3/FLARToolKit/trunk/libs/NyARToolKitAS3/src/jp/nyatla/nyartoolkit/as3/detector/NyARCustomSingleDetectMarker.as

    r3322 r3415  
    130130                } 
    131131                /** 
     132                 * 現在の矩形を返します。 
     133                 * @return 
     134                 */ 
     135                public function refSquare():NyARSquare 
     136                { 
     137                        return this._detect_cb.square; 
     138                } 
     139                /** 
    132140                 * 検出したマーカーの一致度を返します。 
    133141                 *  
  • as3/FLARToolKit/trunk/libs/NyARToolKitAS3/src/jp/nyatla/nyartoolkit/as3/processor/SingleARMarkerProcesser.as

    r3322 r3415  
    155155 
    156156                        // スクエアコードを探す 
    157                         this._detectmarker_cb.init(i_raster); 
     157                        this._detectmarker_cb.init(i_raster,this._current_arcode_index); 
    158158                        this._square_detect.detectMarkerCB(this._bin_raster,this._detectmarker_cb); 
    159159                         
     
    170170                        return; 
    171171                } 
    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                } 
    173182                private var __NyARSquare_result:NyARTransMatResult = new NyARTransMatResult(); 
    174183 
     
    207216                                        // イベント生成 
    208217                                        // 変換行列を作成 
    209                                         this._transmat.transMat(i_square, this._offset, result); 
     218                                        this._transmat.transMatContinue(i_square, this._offset, result); 
    210219                                        // OnUpdate 
    211220                                        this.onUpdateHandler(i_square, result); 
     
    255264        public var confidence:Number=0.0; 
    256265        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
    259268         
    260269        //参照 
     
    284293        } 
    285294        private var __tmp_vertex:Vector.<NyARIntPoint2d>=NyARIntPoint2d.createArray(4); 
     295        private var _target_id:int; 
     296 
    286297        /** 
    287298         * Initialize call back handler. 
    288299         */ 
    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; 
    292304                this.code_index=-1; 
    293305                this.confidence = Number.MIN_VALUE; 
     
    339351                 
    340352                //認識処理 
    341                 if (this.code_index == -1) { // マーカ未認識 
     353                if (this._target_id == -1) { // マーカ未認識 
    342354                        //現在は未認識 
    343355                        if (c1 < this.cf_threshold_new) { 
     
    353365                        //現在はマーカ認識中                              
    354366                        // 現在のマーカを認識したか? 
    355                         if (lcode_index != this.code_index) { 
     367                        if (lcode_index != this._target_id) { 
    356368                                // 認識中のマーカではないので無視 
    357369                                return; 
     
    365377                                return; 
    366378                        } 
     379                        this.code_index=this._target_id; 
    367380                } 
    368381                //新しく認識、または継続認識中に更新があったときだけ、Square情報を更新する。 
  • as3/FLARToolKit/trunk/libs/NyARToolKitAS3/src/jp/nyatla/nyartoolkit/as3/processor/SingleNyIdMarkerProcesser.as

    r3322 r3415  
    184184                                } else if(this._data_current.isEqual(i_marker_data)) { 
    185185                                        //同じidの再認識 
    186                                         this._transmat.transMat(i_square, this._offset, result); 
     186                                        this._transmat.transMatContinue(i_square, this._offset, result); 
    187187                                        // OnUpdate 
    188188                                        this.onUpdateHandler(i_square, result); 
  • as3/FLARToolKit/trunk/src/org/libspark/flartoolkit/core/analyzer/raster/FLARRasterAnalyzer_Histogram.as

    r3336 r3415  
    4747                        if (i_raster_format != NyARBufferType.OBJECT_AS3_BitmapData) { 
    4848                                return false; 
     49                        }else { 
     50                                this._vertical_skip = i_vertical_interval; 
    4951                        } 
    5052                        return true; 
     
    8284                                for (var x:int = i_size.w - 1; x >= 0; x--) { 
    8385                                        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)]++; 
    8587                                        pt++; 
    8688                                } 
  • as3/FLARToolKit/trunk/src/org/libspark/flartoolkit/processor/FLSingleARMarkerProcesser.as

    r3338 r3415  
    166166 
    167167                        // スクエアコードを探す 
    168                         this._detectmarker_cb.init(i_raster); 
     168                        this._detectmarker_cb.init(i_raster,this._current_arcode_index); 
    169169                        this._square_detect.detectMarkerCB(this._bin_raster,this._detectmarker_cb); 
    170170                         
     
    181181                        return; 
    182182                } 
    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                } 
    184193                private var __NyARSquare_result:FLARTransMatResult = new FLARTransMatResult(); 
    185194 
     
    267276        public var confidence:Number=0.0; 
    268277        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
    271280         
    272281        //参照 
     
    296305        } 
    297306        private var __tmp_vertex:Vector.<NyARIntPoint2d>=NyARIntPoint2d.createArray(4); 
     307        private var _target_id:int; 
    298308        /** 
    299309         * Initialize call back handler. 
    300310         */ 
    301         public function init(i_raster:INyARRgbRaster):void 
     311        public function init(i_raster:INyARRgbRaster,i_target_id:int):void 
    302312        { 
    303313                this._ref_raster=i_raster; 
     314                this._target_id=i_target_id; 
    304315                this.code_index=-1; 
    305316                this.confidence = Number.MIN_VALUE; 
     
    351362                 
    352363                //認識処理 
    353                 if (this.code_index == -1) { // マーカ未認識 
     364                if (this._target_id == -1) { // マーカ未認識 
    354365                        //現在は未認識 
    355366                        if (c1 < this.cf_threshold_new) { 
     
    365376                        //現在はマーカ認識中                              
    366377                        // 現在のマーカを認識したか? 
    367                         if (lcode_index != this.code_index) { 
     378                        if (lcode_index != this._target_id) { 
    368379                                // 認識中のマーカではないので無視 
    369380                                return; 
     
    377388                                return; 
    378389                        } 
     390                        this.code_index=this._target_id; 
    379391                } 
    380392                //新しく認識、または継続認識中に更新があったときだけ、Square情報を更新する。 
  • as3/FLARToolKit/trunk/src/org/libspark/flartoolkit/processor/FLSingleNyIdMarkerProcesser.as

    r3338 r3415  
    195195                                } else if(this._data_current.isEqual(i_marker_data)) { 
    196196                                        //同じidの再認識 
    197                                         this._transmat.transMat(i_square, this._offset, result); 
     197                                        this._transmat.transMatContinue(i_square, this._offset, result); 
    198198                                        // OnUpdate 
    199199                                        this.onUpdateHandler(i_square, result);