Android native camera ane packaged with opencv2.4.9 NDK
It's not very useful now.
Ability to run in Nexus7-i (4.4.4)
But not at the Sony lt18i yet.
Private Function Opencam (): void{
if (! camera.issupported)
Return
var cameranam:array = camera.names;
var cameraid:uint = 0;
if (cameranam.length = = 2) {
Cameraid = 1099;////for back or 1098 for front
}
_cam = nativecamera.instance;
_cam.addeventlistener (nativecamera.native_camera_created, oncreated);
_cam.addeventlistener (Nativecamera.native_camera_error, onError);
_cam.initcamwith (Cameraid);
}
......
oncreated
var bestr:nativecamerasupportedresolution = _cam.getmaxcamparam ();
if (bestr = = null) Bestr = new Nativecamerasupportedresolution (_width, _height);
_cam.setcameraparam (bestr.camwidth,bestr.camheight,1, 0);
This.addeventlistener (Event.enter_frame, onshow);
Get BitmapData Data
_bitmapdata = _cam.grabdata ();
Set White balance index = 0-7;
_cam.setcamwhitebalance (index);
Release
_cam.releasecam ();
_cam = null;
Click to download
Currently supported devices