Packagecom.transmote.flar.source
Classpublic class FLARCameraSource
InheritanceFLARCameraSource Inheritance flash.display.Sprite
ImplementsIFLARSource

use the contents of a Camera feed as a source image for FLARToolkit marker detection.



Public Properties
 PropertyDefined by
  downsampleRatio : Number
[read-only] amount by which the BitmapData source is downsampled before being sent to FLARToolkit.
FLARCameraSource
  mirrored : Boolean
set to true to flip the camera image horizontally.
FLARCameraSource
  source : BitmapData
[read-only] retrieve the BitmapData source used for analysis.
FLARCameraSource
  sourceSize : Rectangle
[read-only] size of BitmapData source used for analysis.
FLARCameraSource
Public Methods
 MethodDefined by
  
FLARCameraSource(captureWidth:int = 640, captureHeight:int = 480, fps:Number = 30, mirrored:Boolean = true, displayWidth:int = -1, displayHeight:int = -1, downsampleRatio:Number = 0.5)
constructor.
FLARCameraSource
  
update():void
update the BitmapData source.
FLARCameraSource
Property detail
downsampleRatioproperty
downsampleRatio:Number  [read-only]

amount by which the BitmapData source is downsampled before being sent to FLARToolkit.

Implementation
    public function get downsampleRatio():Number
mirroredproperty 
mirrored:Boolean  [read-write]

set to true to flip the camera image horizontally.

Implementation
    public function get mirrored():Boolean
    public function set mirrored(value:Boolean):void
sourceproperty 
source:BitmapData  [read-only]

retrieve the BitmapData source used for analysis. NOTE: returns the actual BitmapData object, not a clone.

Implementation
    public function get source():BitmapData
sourceSizeproperty 
sourceSize:Rectangle  [read-only]

size of BitmapData source used for analysis.

Implementation
    public function get sourceSize():Rectangle
Constructor detail
FLARCameraSource()constructor
public function FLARCameraSource(captureWidth:int = 640, captureHeight:int = 480, fps:Number = 30, mirrored:Boolean = true, displayWidth:int = -1, displayHeight:int = -1, downsampleRatio:Number = 0.5)

constructor.

Parameters
captureWidth:int (default = 640) — width at which to capture video.
 
captureHeight:int (default = 480) — height at which to capture video.
 
fps:Number (default = 30) — framerate of camera capture.
 
mirrored:Boolean (default = true) — if true, video is flipped horizontally.
 
displayWidth:int (default = -1) — width at which to display video.
 
displayHeight:int (default = -1) — height at which to display video.
 
downsampleRatio:Number (default = 0.5) — amount to downsample camera input. FLARToolkit runs faster with more downsampling, but also has more difficulty recognizing marker patterns. a value of 1.0 results in no downsampling; a value of 0.5 (the default) downsamples the camera input by half.

Throws
— if no camera is found. (thrown by this.init, called from this method.)
Method detail
update()method
public function update():void

update the BitmapData source.