Flash ANE Camera for Android

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.