チェンジセット 1728

差分発生行の前後
無視リスト:
コミット日時:
2008/10/28 03:24:20 (2 ヶ月前)
コミッタ:
tarotarorg
ログメッセージ:

assetsに電脳キューブ用パターンを格納
複数マーカのサンプルを作成

ファイル:

凡例:

変更無し
追加
削除
更新
コピー
移動
  • as3/FLARToolKit/trunk/samples/org/tarotaro/flash/ar/FLARSquareMarkerSample.as

    r1690 r1728  
    6767                        var param:FLARParam = new FLARParam(); 
    6868                        param.loadARParam(new CParam()as ByteArray); 
    69                         var code:FLARCode = new FLARCode(16,16); 
    7069                         
    7170                        this._capture = new Bitmap(new BitmapData(320, 240, false, 0), PixelSnapping.AUTO, true); 
  • as3/FLARToolKit/trunk/samples/org/tarotaro/flash/ar/SimpleFLARToolKitView.as

    r1636 r1728  
    5050        public class SimpleFLARToolKitView extends ARAppBase { 
    5151                 
    52                 private static const PATTERN_FILE:String = "Data/patt.hiro"; 
     52                private static const PATTERN_FILE:String = "Data/top.pat"; 
    5353                private static const CAMERA_FILE:String = "Data/camera_para.dat"; 
    5454                 
  • as3/FLARToolKit/trunk/samples/org/tarotaro/flash/ar/layers/FLARSingle3DModelLayer.as

    r1690 r1728  
    4040        import com.libspark.flartoolkit.detector.FLARSingleMarkerDetector; 
    4141        import com.libspark.flartoolkit.scene.FLARBaseNode; 
     42        import org.libspark.flartoolkit.core.FLARCode; 
     43        import org.libspark.flartoolkit.core.param.FLARParam; 
     44        import org.libspark.flartoolkit.core.raster.rgb.IFLARRgbRaster; 
     45        import org.libspark.flartoolkit.pv3d.FLARBaseNode; 
    4246         
    4347        /** 
     
    5559                 * @param       code 
    5660                 * @param       markerWidth 
     61                 * @param       confidence 
    5762                 * @param       thresh 
    5863                 */ 
    59                 public function FLARSingle3DModelLayer(src:FLARBitmapData, 
     64                public function FLARSingle3DModelLayer(src:IFLARRgbRaster,  
    6065                                                                                                param:FLARParam, 
    6166                                                                                                code:FLARCode, 
    6267                                                                                                markerWidth:Number,  
    6368                                                                                                model:FLARBaseNode, 
     69                                                                                                confidence:Number = 0.65, 
    6470                                                                                                thresh:int=100)  
    6571                { 
     
    7076                override public function update():void  
    7177                { 
    72                         if (this._detector.detectMarkerLite(this._source, this._thresh) ) { 
     78                        if (this._detector.detectMarkerLite(this._source, this._thresh) && 
     79                                this._detector.getConfidence() > this._confidence) { 
    7380                                this._detector.getTranslationMatrix(this._resultMat); 
    7481                                this._model.setTranslationMatrix(this._resultMat); 
  • as3/FLARToolKit/trunk/samples/org/tarotaro/flash/ar/layers/FLARSingleMarkerLayer.as

    r1690 r1728  
    4949                protected var _detector:FLARSingleMarkerDetector; 
    5050                protected var _resultMat:FLARTransMatResult; 
    51                  
     51                protected var _confidence:Number; 
     52 
    5253                /** 
    5354                 * 単一マーカ用レイヤ 
     
    5657                 * @param       code 
    5758                 * @param       markerWidth 
     59                 * @param       confidence 
    5860                 * @param       thresh 
    5961                 */ 
     
    6264                                                                                                code:FLARCode,  
    6365                                                                                                markerWidth:Number,  
     66                                                                                                confidence:Number = 0.65, 
    6467                                                                                                thresh:int = 100)  
    6568                { 
     
    6770                        this._detector = new FLARSingleMarkerDetector(param, code, markerWidth); 
    6871                        this._resultMat = new FLARTransMatResult(); 
     72                        this._confidence = confidence; 
    6973                } 
    7074        }