All Projects → cats-oss → Android Gpuimage

cats-oss / Android Gpuimage

Android filters based on OpenGL (idea from GPUImage for iOS)

Programming Languages

java
68154 projects - #9 most used programming language
c
50402 projects - #5 most used programming language

Projects that are alternatives of or similar to Android Gpuimage

React Native Gpuimage
GPUImage Component in React Native
Stars: ✭ 45 (-99.45%)
Mutual labels:  opengl, gpuimage
Android Opengl Canvas
An Android library that provides views using openGL canvas to draw things on SurfaceView or TextureView.
Stars: ✭ 815 (-90.07%)
Mutual labels:  opengl, gpuimage
Ios Gpuimage Plus
GPU accelerated image filters for iOS, based on OpenGL.
Stars: ✭ 217 (-97.36%)
Mutual labels:  opengl, gpuimage
Hinterland
2D top-down shooter game
Stars: ✭ 34 (-99.59%)
Mutual labels:  opengl
Pixelflow
A Processing/Java library for high performance GPU-Computing (GLSL). Fluid Simulation + SoftBody Dynamics + Optical Flow + Rendering + Image Processing + Particle Systems + Physics +...
Stars: ✭ 978 (-88.09%)
Mutual labels:  opengl
Game Dogfight
Air to air combat game, created in Python 3 using HARFANG 3D.
Stars: ✭ 41 (-99.5%)
Mutual labels:  opengl
Gameoverlay
🎮 GameOverlay using CEF with support for common rendering backends
Stars: ✭ 32 (-99.61%)
Mutual labels:  opengl
Shaderworkshop
Interactive GLSL fragment shaders editor made with Qt
Stars: ✭ 43 (-99.48%)
Mutual labels:  opengl
Botcraft
Botcraft is a cross-platform C++ library to create bots that connect and interact with Minecraft servers with (optional) integrated OpenGL renderer
Stars: ✭ 41 (-99.5%)
Mutual labels:  opengl
Altseed
Stars: ✭ 40 (-99.51%)
Mutual labels:  opengl
Simpleton Engine
What a stupid name for a library
Stars: ✭ 42 (-99.49%)
Mutual labels:  opengl
Qlogo
QLogo is a rewrite of the UCBLogo language and user interface with UCB compatibility. It is cross-platform and uses hardware-accelerated graphics.
Stars: ✭ 39 (-99.53%)
Mutual labels:  opengl
Gpuhaishinkit.swift
Camera and Microphone streaming library via RTMP, HLS for iOS. Powered by GPUImage + HaishinKit.
Stars: ✭ 35 (-99.57%)
Mutual labels:  gpuimage
Melo
melo is mesh loader for OBJ, glTF2 and PLY
Stars: ✭ 41 (-99.5%)
Mutual labels:  opengl
Glfw
A multi-platform library for OpenGL, OpenGL ES, Vulkan, window and input
Stars: ✭ 8,416 (+2.5%)
Mutual labels:  opengl
Knights province
Knights Province missions and wiki.
Stars: ✭ 43 (-99.48%)
Mutual labels:  opengl
Hs Quake 3
Quake 3 map viewer written in Haskell
Stars: ✭ 33 (-99.6%)
Mutual labels:  opengl
Roboviz
Monitor and visualization tool for the RoboCup 3D Soccer Simulation League
Stars: ✭ 36 (-99.56%)
Mutual labels:  opengl
Catacombgl
CatacombGL is a Windows source port with OpenGL graphics for Catacomb 3D (1991), The Catacomb Abyss (1992), The Catacomb Armageddon (1992) and The Catacomb Apocalypse (1993).
Stars: ✭ 41 (-99.5%)
Mutual labels:  opengl
Open Inventor
Open Inventor is an object oriented scene graph library implemented in C++ layered on top of OpenGL. It was originally developed by SGI.
Stars: ✭ 45 (-99.45%)
Mutual labels:  opengl

GPUImage for Android

License Download Maven Central Build Status

Idea from: iOS GPUImage framework

Goal is to have something as similar to GPUImage as possible. Vertex and fragment shaders are exactly the same. That way it makes it easier to port filters from GPUImage iOS to Android.

Requirements

  • Android 2.2 or higher (OpenGL ES 2.0)

Usage

Gradle dependency

repositories {
    mavenCentral()
}

dependencies {
    implementation 'jp.co.cyberagent.android:gpuimage:2.x.x'
}

Sample Code

With preview:

Java:

@Override
public void onCreate(final Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity);

    Uri imageUri = ...;
    gpuImage = new GPUImage(this);
    gpuImage.setGLSurfaceView((GLSurfaceView) findViewById(R.id.surfaceView));
    gpuImage.setImage(imageUri); // this loads image on the current thread, should be run in a thread
    gpuImage.setFilter(new GPUImageSepiaFilter());

    // Later when image should be saved saved:
    gpuImage.saveToPictures("GPUImage", "ImageWithFilter.jpg", null);
}

Kotlin:

public override fun onCreate(savedInstanceState: Bundle?) {
    super.onCreate(savedInstanceState)
    setContentView(R.layout.activity_gallery)

    val imageUri: Uri = ...
    gpuImage = GPUImage(this)
    gpuImage.setGLSurfaceView(findViewById<GLSurfaceView>(R.id.surfaceView))
    gpuImage.setImage(imageUri) // this loads image on the current thread, should be run in a thread
    gpuImage.setFilter(GPUImageSepiaFilter())

    // Later when image should be saved saved:
    gpuImage.saveToPictures("GPUImage", "ImageWithFilter.jpg", null)
}

Using GPUImageView

<jp.co.cyberagent.android.gpuimage.GPUImageView
    android:id="@+id/gpuimageview"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    app:gpuimage_show_loading="false"
    app:gpuimage_surface_type="texture_view" /> <!-- surface_view or texture_view -->

Java:

@Override
public void onCreate(final Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity);

    Uri imageUri = ...;
    gpuImageView = findViewById(R.id.gpuimageview);
    gpuImageView.setImage(imageUri); // this loads image on the current thread, should be run in a thread
    gpuImageView.setFilter(new GPUImageSepiaFilter());

    // Later when image should be saved saved:
    gpuImageView.saveToPictures("GPUImage", "ImageWithFilter.jpg", null);
}

Kotlin:

public override fun onCreate(savedInstanceState: Bundle?) {
    super.onCreate(savedInstanceState)
    setContentView(R.layout.activity_gallery)

    val imageUri: Uri = ...
    gpuImageView = findViewById<GPUImageView>(R.id.gpuimageview)
    gpuImageView.setImage(imageUri) // this loads image on the current thread, should be run in a thread
    gpuImageView.setFilter(GPUImageSepiaFilter())

    // Later when image should be saved saved:
    gpuImageView.saveToPictures("GPUImage", "ImageWithFilter.jpg", null)
}

Without preview:

Java:

public void onCreate(final Bundle savedInstanceState) {
    public void onCreate(final Bundle savedInstanceState) {
    Uri imageUri = ...;
    gpuImage = new GPUImage(context);
    gpuImage.setFilter(new GPUImageSobelEdgeDetection());
    gpuImage.setImage(imageUri);
    gpuImage.saveToPictures("GPUImage", "ImageWithFilter.jpg", null);
}

Kotlin:

public override fun onCreate(savedInstanceState: Bundle?) {
    super.onCreate(savedInstanceState)
    setContentView(R.layout.activity_gallery)
    val imageUri: Uri = ...
    gpuImage = GPUImage(this)
    gpuImage.setFilter(GPUImageSepiaFilter())
    gpuImage.setImage(imageUri)
    gpuImage.saveToPictures("GPUImage", "ImageWithFilter.jpg", null)
}

Support status of GPUImage for iOS shaders

  • Saturation
  • Contrast
  • Brightness
  • Levels
  • Exposure
  • RGB
  • RGB Diation
  • Hue
  • White Balance
  • Monochrome
  • False Color
  • Sharpen
  • Unsharp Mask
  • Transform Operation
  • Crop
  • Gamma
  • Highlights and Shadows
  • Haze
  • Sepia Tone
  • Amatorka
  • Miss Etikate
  • Soft Elegance
  • Color Inversion
  • Solarize
  • Vibrance
  • Highlight and Shadow Tint
  • Luminance
  • Luminance Threshold
  • Average Color
  • Average Luminance
  • Average Luminance Threshold
  • Adaptive Threshold
  • Polar Pixellate
  • Pixellate
  • Polka Dot
  • Halftone
  • Crosshatch
  • Sobel Edge Detection
  • Prewitt Edge Detection
  • Canny Edge Detection
  • Threshold Sobel EdgeDetection
  • Harris Corner Detector
  • Noble Corner Detector
  • Shi Tomasi Feature Detector
  • Colour FAST Feature Detector
  • Low Pass Filter
  • High Pass Filter
  • Sketch Filter
  • Threshold Sketch Filter
  • Toon Filter
  • SmoothToon Filter
  • Tilt Shift
  • CGA Colorspace Filter
  • Posterize
  • Convolution 3x3
  • Emboss Filter
  • Laplacian
  • Chroma Keying
  • Kuwahara Filter
  • Kuwahara Radius3 Filter
  • Vignette
  • Gaussian Blur
  • Box Blur
  • Bilateral Blur
  • Motion Blur
  • Zoom Blur
  • iOS Blur
  • Median Filter
  • Swirl Distortion
  • Bulge Distortion
  • Pinch Distortion
  • Sphere Refraction
  • Glass Sphere Refraction
  • Stretch Distortion
  • Dilation
  • Erosion
  • Opening Filter
  • Closing Filter
  • Local Binary Pattern
  • Color Local Binary Pattern
  • Dissolve Blend
  • Chroma Key Blend
  • Add Blend
  • Divide Blend
  • Multiply Blend
  • Overlay Blend
  • Lighten Blend
  • Darken Blend
  • Color Burn Blend
  • Color Dodge Blend
  • Linear Burn Blend
  • Screen Blend
  • Difference Blend
  • Subtract Blend
  • Exclusion Blend
  • HardLight Blend
  • SoftLight Blend
  • Color Blend
  • Hue Blend
  • Saturation Blend
  • Luminosity Blend
  • Normal Blend
  • Source Over Blend
  • Alpha Blend
  • Non Maximum Suppression
  • Thresholded Non Maximum Suppression
  • Directional Non Maximum Suppression
  • Opacity
  • Weak Pixel Inclusion Filter
  • Color Matrix
  • Directional Sobel Edge Detection
  • Lookup
  • Tone Curve (*.acv files)

Others

  • Texture 3x3
  • Gray Scale

Gradle

Make sure that you run the clean target when using maven.

gradle clean assemble

License

Copyright 2018 CyberAgent, Inc.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

   http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].