# GPUImage for Android
Idea from: [iOS GPUImage framework](https://github.com/BradLarson/GPUImage)
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
### Include in own project
GPUImage can be used as a library project or by copying the following files/folders to your libs folder.
* library/libs/armeabi (only needed for camera live preview)
* library/bin/gpuimage.jar
### Maven dependency
<dependency>
<groupId>jp.co.cyberagent.android.gpuimage</groupId>
<artifactId>gpuimage-library</artifactId>
<type>apklib</type>
<version>(use current version here)</version>
</dependency>
If you want to use it with live camera preview, than you will need to add the following as well:
<dependency>
<groupId>jp.co.cyberagent.android.gpuimage</groupId>
<artifactId>gpuimage-library</artifactId>
<classifier>armeabi</classifier>
<type>so</type>
<version>(use current version here)</version>
</dependency>
### Sample Code
With preview:
@Override
public void onCreate(final Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity);
Uri imageUri = ...;
mGPUImage = new GPUImage(this);
mGPUImage.setGLSurfaceView((GLSurfaceView) findViewById(R.id.surfaceView));
mGPUImage.setImage(imageUri); // this loads image on the current thread, should be run in a thread
mGPUImage.setFilter(new GPUImageSepiaFilter());
// Later when image should be saved saved:
mGPUImage.saveToPictures("GPUImage", "ImageWithFilter.jpg", null);
}
Without preview:
Uri imageUri = ...;
mGPUImage = new GPUImage(context);
mGPUImage.setFilter(new GPUImageSobelEdgeDetection());
mGPUImage.setImage(imageUri);
mGPUImage.saveToPictures("GPUImage", "ImageWithFilter.jpg", null);
## Create libs/armeabi
Run the following command in the library folder. Make sure you have android-ndk in your PATH.
cd library
ndk-build
### Maven
Make sure that you run the clean target when using maven.
mvn clean install
## License
Copyright 2012 CyberAgent
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.
没有合适的资源?快使用搜索试试~ 我知道了~
温馨提示
实现各种各样图像滤镜(图像处理)效果,多达50多种效果,基本囊括了最常见的图像处理效果。包括:contrast,hue,gamma,brightness,sharpness,emboss,saturation,exposure,shadow,blend等等。 由于需要用到OpenGL ES 2.0,所以,仅能在真机中测试。可以载入本地相册的照片或者直接拍照后进行照片处理。
资源推荐
资源详情
资源评论
收起资源包目录
实现各种各样图像滤镜(图像处理)效果,多达50多种效果 (278个子文件)
tone_cuver_sample.acv 62B
resources.ap_ 53KB
gpuimage-sample.apk 115KB
yuv-decoder.c 4KB
jarlist.cache 120B
GPUImageFilterTools.class 14KB
GPUImage.class 11KB
GPUImageRenderer.class 10KB
GPUImageFilterTools$FilterAdjuster.class 10KB
GPUImageToneCurveFilter.class 9KB
ActivityCamera.class 8KB
GPUImageFilter.class 8KB
PixelBuffer.class 7KB
GPUImage$LoadImageTask.class 5KB
ActivityGallery.class 5KB
GPUImageFilterGroup.class 4KB
OpenGlUtils.class 4KB
GPUImage$SaveTask.class 4KB
GPUImageFilterTools$FilterType.class 4KB
ActivityCamera$CameraLoader.class 4KB
GPUImage3x3TextureSamplingFilter.class 4KB
GPUImageTwoInputFilter.class 4KB
GPUImageSharpenFilter.class 3KB
CameraHelper.class 3KB
ActivityCamera$3.class 3KB
GPUImageVignetteFilter.class 3KB
GPUImageView.class 3KB
GPUImageSaturationBlendFilter.class 3KB
GPUImageHueBlendFilter.class 3KB
GPUImageMonochromeFilter.class 3KB
GPUImageChromaKeyBlendFilter.class 3KB
GPUImage3x3ConvolutionFilter.class 3KB
GPUImageSobelEdgeDetection.class 3KB
GPUImage$LoadImageUriTask.class 3KB
GPUImageWhiteBalanceFilter.class 3KB
GPUImageHueFilter.class 3KB
GPUImageDirectionalSobelEdgeDetectionFilter.class 2KB
GPUImageHighlightShadowFilter.class 2KB
GPUImageFilterTools$FilterAdjuster$Adjuster.class 2KB
GPUImageRGBFilter.class 2KB
GPUImageFilterTools$1.class 2KB
GPUImageColorMatrixFilter.class 2KB
TextureRotationUtil.class 2KB
GPUImageRenderer$5.class 2KB
CameraHelperGB.class 2KB
CameraHelperBase.class 2KB
GPUImagePixelationFilter.class 2KB
GPUImageRenderer$1.class 2KB
GPUImageSaturationFilter.class 2KB
GPUImageHardLightBlendFilter.class 2KB
GPUImageToneCurveFilter$1.class 2KB
GPUImageFilterTools$FilterAdjuster$HighlightShadowAdjuster.class 2KB
GPUImage$SaveTask$1.class 2KB
GPUImageOverlayBlendFilter.class 2KB
GPUImageDivideBlendFilter.class 2KB
GPUImage$LoadImageFileTask.class 2KB
GPUImageFilterTools$FilterAdjuster$GPU3x3TextureAdjuster.class 2KB
GPUImageFilterTools$FilterAdjuster$WhiteBalanceAdjuster.class 2KB
GPUImageFilterTools$FilterAdjuster$DissolveBlendAdjuster.class 2KB
GPUImageFilterTools$FilterAdjuster$BrightnessAdjuster.class 2KB
GPUImageFilterTools$FilterAdjuster$PixelationAdjuster.class 2KB
GPUImageFilterTools$FilterAdjuster$SharpnessAdjuster.class 2KB
GPUImageFilterTools$FilterAdjuster$SaturationAdjuster.class 2KB
GPUImageFilterTools$FilterAdjuster$MonochromeAdjuster.class 2KB
GPUImageFilterTools$FilterAdjuster$ExposureAdjuster.class 2KB
GPUImageFilterTools$FilterAdjuster$VignetteAdjuster.class 2KB
GPUImageFilterTools$FilterAdjuster$PosterizeAdjuster.class 2KB
GPUImageFilterTools$FilterAdjuster$SobelAdjuster.class 2KB
GPUImageFilterTools$FilterAdjuster$ContrastAdjuster.class 2KB
GPUImageFilterTools$FilterAdjuster$EmbossAdjuster.class 2KB
GPUImageFilterTools$FilterAdjuster$OpacityAdjuster.class 2KB
GPUImageLookupFilter.class 2KB
GPUImageFilterTools$FilterAdjuster$GammaAdjuster.class 2KB
GPUImageFilterTools$FilterAdjuster$SepiaAdjuster.class 2KB
GPUImageFilterTools$FilterAdjuster$HueAdjuster.class 2KB
GPUImageFilterTools$FilterAdjuster$RGBAdjuster.class 2KB
GPUImageLuminosityBlendFilter.class 2KB
GPUImageColorBlendFilter.class 2KB
GPUImageRenderer$2.class 2KB
GPUImageContrastFilter.class 2KB
GPUImageBrightnessFilter.class 2KB
GPUImageExposureFilter.class 2KB
GPUImageOpacityFilter.class 2KB
GPUImageGammaFilter.class 2KB
ActivityMain.class 2KB
GPUImageAddBlendFilter.class 2KB
GPUImagePosterizeFilter.class 2KB
ActivityGallery$1.class 2KB
GPUImageRenderer$3.class 1KB
GPUImageColorDodgeBlendFilter.class 1KB
ActivityCamera$3$1.class 1KB
GPUImage$SaveTask$1$1.class 1KB
GPUImageFilterTools$FilterList.class 1KB
ActivityCamera$1.class 1KB
GPUImageToneCurveFilter$2.class 1KB
GPUImage$ScaleType.class 1KB
Rotation.class 1KB
GPUImageMixBlendFilter.class 1KB
GPUImageTwoInputFilter$1.class 1KB
GPUImageNormalBlendFilter.class 1KB
共 278 条
- 1
- 2
- 3
anonymousblogs
- 粉丝: 34
- 资源: 21
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
- Xilinx FPGA
- 奇迹Mu服务器端 罗兰攻城时间设置表
- 【微信小程序】零象废品回收 v2.7.1.zip
- 445asp.net海派电影网站系统【自动转换成.flv格式】毕业课程源码设计+论文资料
- 西门子PID调节程序,1200plc和1500plc通用,只需一个PLC实物,就能轻松实现PID工艺对象的fang真,是学习PID的参数的好工具 针对这套程序,录制了一段视频解说,手把手教你如何使用
- 446苹果ios俄罗斯方块源码毕业课程源码设计
- 三菱plc,恒压供水程序,一拖四,有cad图,mcgse触摸屏 内容非常丰富可借鉴程度高,已在设备上稳定运行,程序非常可靠
- 基于DenseUnet和Unet 实现的语义分割对比项目:高压线绝缘子图像语义分割
- 00898互联网软件应用与开发 -课件PPT、历年试卷与答案
- 基于Swing技术下的酒店客房信息管理系统源码+数据库+实验报告(高分项目)
- Bandgap二阶温度补偿参考文献
- 西门子1200plc程序实例,TCP IP及modbus通讯,博图14以上可以打开,程序已在设备上运行相对稳定了,比较成熟的一款程序,包含plc程序以及威纶通hml程序,以及伺服说明,具体功能如下:
- Web通信领域全双工通信协议WebSocket解析及其Python实现
- 全自动铜膜信号线切割检测自动化生产线(sw20可编辑+工程图)全套技术资料100%好用.zip
- 基于JavaSwing技术下的酒店客房信息管理系统源码+数据库+实验报告
- 00898互联网软件应用与开发 课件PPT
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功
- 1
- 2
- 3
- 4
- 5
前往页