チェンジセット 1632
- コミット日時:
- 2008/10/17 03:04:08 (3 ヶ月前)
- ファイル:
凡例:
- 変更無し
- 追加
- 削除
- 更新
- コピー
- 移動
as3/FLARToolKit/trunk/samples/net/saqoosha/flartoolkit/example/PV3DARApp.as
r1631 r1632 59 59 this._renderer = new LazyRenderEngine(this._scene, this._camera3d, this._viewport); 60 60 61 //this.stage.addChild(new StatsView(this._renderer));61 this.stage.addChild(new StatsView(this._renderer)); 62 62 63 63 this.addEventListener(Event.ENTER_FRAME, this._onEnterFrame); … … 66 66 private function _onEnterFrame(e:Event = null):void { 67 67 this._capture.bitmapData.draw(this._video); 68 if (this._detector.detectMarkerLite(this._raster, 80) && this._detector.getConfidence() > 0.5) {68 if (this._detector.detectMarkerLite(this._raster, 80)) {// && this._detector.getConfidence() > 0.5) { 69 69 this._detector.getTransformMatrix(this._resultMat); 70 70 this._baseNode.setTransformMatrix(this._resultMat); as3/FLARToolKit/trunk/src/org/libspark/flartoolkit/core/rasterfilter/rgb2bin/FLARRasterFilter_BitmapDataThreshold.as
r1630 r1632 53 53 54 54 private var _threshold:int; 55 private var _tmp:BitmapData; 55 56 56 57 public function FLARRasterFilter_BitmapDataThreshold(i_threshold:int) { … … 64 65 public function doFilter(i_input:IFLARRgbRaster, i_output:IFLARRaster):void { 65 66 var inbmp:BitmapData = FLARRgbRaster_BitmapData(i_input).bitmapData; 66 inbmp.applyFilter(inbmp, inbmp.rect, ZERO_POINT, MONO_FILTER); 67 if (!this._tmp) { 68 this._tmp = new BitmapData(inbmp.width, inbmp.height, false, 0x0); 69 } else if (inbmp.width != this._tmp.width || inbmp.height != this._tmp.height) { 70 this._tmp.dispose(); 71 this._tmp = new BitmapData(inbmp.width, inbmp.height, false, 0x0); 72 } 73 this._tmp.applyFilter(inbmp, inbmp.rect, ZERO_POINT, MONO_FILTER); 67 74 var outbmp:BitmapData = FLARRaster_BitmapData(i_output).bitmapData; 68 75 outbmp.fillRect(outbmp.rect, 0x0); 69 76 var rect:Rectangle = outbmp.rect; 70 77 rect.inflate(-1, -1); 71 outbmp.threshold( inbmp, rect, ONE_POINT, '<=', this._threshold, 0xffffffff, 0xff);78 outbmp.threshold(this._tmp, rect, ONE_POINT, '<=', this._threshold, 0xffffffff, 0xff); 72 79 } 73 80 }
