Giter Site home page Giter Site logo

xintao222 / androidfastimageprocessing Goto Github PK

View Code? Open in Web Editor NEW

This project forked from chrisbatt/androidfastimageprocessing

0.0 2.0 0.0 30.15 MB

A framework for speeding up image processing on android devices by taking advantage of shaders on the GPU.

androidfastimageprocessing's Introduction

Overview

Image processing on the android is often a difficult task. Camera and video input editing are complex to set up and often require 3rd party libraries written in C++. The goal of this project is help with this problem by providing a framework similar to Brad Larson's GPUImage but on android. Unlike Brad Larson's GPUImage, this framework does not use multiple opengl contexts, and the image processing multi-threaded; however, it does take advantage of opengl shaders to provide a speed up in image processing.

Requirements

The whole library is written targeted to android 2.2 (API 8) and no 3rd party libraries with the exception the video input and output and Camera input. The video and camera input require android 4+ (API 14+) because it uses SurfaceTexture. The video output takes advantage of JavaCV to record the video. From my tests, the video recording is not working on android 4+ devices but is working on android 2.2.

Documentation

The java documents for this project can be found in the doc folder in the project. Also, in the examples folder, examples of each of the filters as well as each of the inputs and outputs are shown.

Setup (Eclipse)

  1. Checkout or download the framework
  2. Import the framework into current eclipse workspace
  3. Added the framework to project as an android library dependance

i) Right click project -> Build Path -> Configure Build Path Alt text ii) In the list on the left, select "android" -> under library, click "add" -> in the popup, select "FastImageProcessing" Alt text

Basic setup for a simple filter pipeline. More examples can be found in "/examples".

public class ImageProcessingActivity extends Activity {
  private FastImageProcessingView view;
	private FastImageProcessingPipeline pipeline;
	private ImageResourceInput imageIn;
	private GenericFilter generic;
	private ScreenEndpoint screen;
	
	
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		view = new FastImageProcessingView(this);
		pipeline = new FastImageProcessingPipeline();
		view.setPipeline(pipeline);
		setContentView(view);
		imageIn = new ImageResourceInput(view, this, R.drawable.wakeboard);
		generic = new GenericFilter();
		screen = new ScreenEndpoint(pipeline);
		imageIn.addTarget(generic);
		generic.addTarget(screen);
		pipeline.addRootRenderer(imageIn);
		pipeline.startRendering();
	}
}

androidfastimageprocessing's People

Contributors

chrisbatt avatar

Watchers

James Cloos 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.