Application of JNI layer camera in Android 2.1

Source: Internet
Author: User

As a reference for the realization of image recognition in the Java layer. It is best to find a hole in the JNI layer to extract the data.

--leon

Http://blog.csdn.net/chenji001/archive/2010/08/25/5836685.aspx

In Android, if you want to process preivew data (such as face tracking), the callback function directly on the Java layer can cause frequent memory requests and copy, even with the latest Setpreviewcallbackwithbuffer functions, Memory copy across the JNI layer is still not going to escape. In addition, our algorithm is often C, so we have to cross a layer of JNI, it is even more troublesome.

So a good way to do this is to use the camera object and the Cameralistener (inheriting class) directly under JNI. Write your own Java-layer camera to be invoked by the last application.

Not very difficult, casually recorded:

Related Article

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.