Coder Social home page Coder Social logo

wangqiang1588 / android-camera-api Goto Github PK

View Code? Open in Web Editor NEW

This project forked from mega-arbuz/android-camera-api

0.0 3.0 0.0 613 KB

Collection of Activities with sample code for different Camera API, preview methods and processing with RenderScript.

License: Apache License 2.0

Java 100.00%

android-camera-api's Introduction

Camera API Example

This is a collection of Activities with sample code for different Camera API, preview methods and processing with RenderScript.

About

Code

All relevant code, to the example, is inside the Activity class, so it's easier to copy and try it in your project.

API

Right now all examples are for old Camera and not Camera2.

Features

  • Display on SurfaceView - simple camera stream drawn on SurfaceView.
  • Display on TextureView - simple camera stream drawn on TextureView.
  • Preview on Texture (YuvImage) - camera stream on SurfaceView with a small TextureView preview window. The window shows the stream from PreviewCallback converted from YUV to RGB, using YuvImage. YuvImage is pretty slow and should be used for signle images and not real time preview.
  • Preview on Texture (RenderScript) - camera stream on SurfaceView with a small TextureView preview window. The window shows the stream from PreviewCallback converted from YUV to RGB, using RenderScript, which is much faster than YuvImage.
  • Preview on Texture (2 RenderScript group) - same as the previous RenderScript example, only now there is a group of RenderScripts. Using groups allows increasing perforamnce in case you need multiple effects. This example converts YUV to RGB and applies blur effec to the image.
  • Preview on Texture (3 RenderScript group) - more complicated example with a group of 3 RenderScripts. In this case, there are 2 script connections. This example converts YUV to RGB, applies blur effect and a color matrix with color inversion.

https://github.com/mega-arbuz/android-camera-api/blob/master/media/screenshot_display.png https://github.com/mega-arbuz/android-camera-api/blob/master/media/screenshot_preview.png https://github.com/mega-arbuz/android-camera-api/blob/master/media/screenshot_script.png https://github.com/mega-arbuz/android-camera-api/blob/master/media/screenshot_script2.png

android-camera-api's People

Contributors

mega-arbuz avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.