Package | com.transmote.flar.source |
Class | public class FLARCameraSource |
Inheritance | FLARCameraSource flash.display.Sprite |
Implements | IFLARSource |
See also
Property | Defined by | ||
---|---|---|---|
inited : Boolean [read-only]
returns true if initialization is complete.
| FLARCameraSource | ||
mirrored : Boolean
set to true to flip the camera image horizontally.
| FLARCameraSource | ||
resultsToDisplayRatio : Number [read-only]
ratio of area of reported results to display size.
| 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 |
Method | Defined by | ||
---|---|---|---|
constructor.
| FLARCameraSource | ||
init(captureWidth:int = 320, captureHeight:int = 240, fps:Number = 30, mirrored:Boolean = true, displayWidth:int = -1, displayHeight:int = -1, downsampleRatio:Number = 0.5):void
Initialize this FLARCameraSource.
| FLARCameraSource | ||
update():void
update the BitmapData source.
| FLARCameraSource |
inited | property |
inited:Boolean
[read-only]returns true if initialization is complete.
Implementation public function get inited():Boolean
mirrored | property |
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
resultsToDisplayRatio | property |
resultsToDisplayRatio:Number
[read-only]ratio of area of reported results to display size. use to scale (multiply) results of FLARToolkit analysis to correctly fit display area.
Implementation public function get resultsToDisplayRatio():Number
source | property |
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
sourceSize | property |
sourceSize:Rectangle
[read-only]size of BitmapData source used for analysis.
Implementation public function get sourceSize():Rectangle
FLARCameraSource | () | constructor |
public function FLARCameraSource()
constructor.
init | () | method |
public function init(captureWidth:int = 320, captureHeight:int = 240, fps:Number = 30, mirrored:Boolean = true, displayWidth:int = -1, displayHeight:int = -1, downsampleRatio:Number = 0.5):void
Initialize this FLARCameraSource.
ParameterscaptureWidth:int (default = 320 ) — width at which to capture video.
|
|
captureHeight:int (default = 240 ) — 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.
The captured video is scaled down by this value
before being sent to FLARToolkit for analysis.
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.
|
— if no camera is found.
(thrown by this.initCamera, called from this method.)
|
update | () | method |
public function update():void
update the BitmapData source.