gpuimage

How to generate an histogram using iOS GPUImage?

a 夏天 提交于 2019-12-02 08:33:48
问题 Working on https://github.com/luisespinoza/LEColorPicker project, I am trying to generate an histogram UIImage from an arbitrary input UIImage using the project GPUImage (https://github.com/BradLarson/GPUImage). The current code that I'm using is the following: - (NSDictionary*)dictionaryWithColorsPickedFromImage:(UIImage *)image { GPUImageFilter *filter = [[GPUImageHistogramFilter alloc] initWithHistogramType:kGPUImageHistogramRGB]; UIImage *filteredImage = [filter imageByFilteringImage

Filtering video with GPUImage

爷,独闯天下 提交于 2019-12-02 08:21:58
I'm using GPUImage in my application and trying to filter video. Live video filtering is working well. The trouble comes up when I try to read a video into memory from the filesystem and apply filters using the code posted on the sunsetlakessoftware tutorial page and in the SimpleVideoFileFilter demo. EDIT : I realized that my original post may not have been posing a specific enough question. What I am asking is: How exactly can I read a video from disk into memory, apply a GPUImageFilter, and then overwrite the original with the filtered version? The application is crashing with the following

How to generate an histogram using iOS GPUImage?

假装没事ソ 提交于 2019-12-02 04:19:47
Working on https://github.com/luisespinoza/LEColorPicker project, I am trying to generate an histogram UIImage from an arbitrary input UIImage using the project GPUImage (https://github.com/BradLarson/GPUImage). The current code that I'm using is the following: - (NSDictionary*)dictionaryWithColorsPickedFromImage:(UIImage *)image { GPUImageFilter *filter = [[GPUImageHistogramFilter alloc] initWithHistogramType:kGPUImageHistogramRGB]; UIImage *filteredImage = [filter imageByFilteringImage:image]; [UIImagePNGRepresentation(filteredImage) writeToFile:@"/Users/Luis/histogram.png" atomically:YES];

“libRestKit.a, file was built for archive which is not the architecture being linked (armv7)”

南笙酒味 提交于 2019-12-02 00:25:28
I'm trying to use xcodebuild to build a project, but RestKit and GPUImage are giving issues below: ld: warning: ignoring file /project/libGPUImage.a, missing required architecture armv7 in file /project/libGPUImage.a (2 slices) ld: warning: ignoring file /project/libRestKit.a, file was built for archive which is not the architecture being linked (armv7): /project/libRestKit.a Please help! Set Build Active Architecture Only to NO for static Library in project target setting. I guess you are not using latest versions of the libraries, though I am not sure about this that the latest one supports

Got a crash when using GPUImageFilter

谁说胖子不能爱 提交于 2019-12-01 14:07:54
I started from Brad Larson's Tutorial on Github.Here when i added these code into my project - (void)viewDidLoad { [super viewDidLoad]; GPUImageVideoCamera *videoCamera = [[GPUImageVideoCamera alloc] initWithSessionPreset:AVCaptureSessionPreset640x480 cameraPosition:AVCaptureDevicePositionBack]; videoCamera.outputImageOrientation = UIInterfaceOrientationPortrait; GPUImageFilter *customFilter = [[GPUImageFilter alloc] initWithFragmentShaderFromFile:@"CustomShader"]; GPUImageView *filteredVideoView = [[GPUImageView alloc] initWithFrame:self.view.bounds]; [self.view addSubview:filteredVideoView];

Got a crash when using GPUImageFilter

半世苍凉 提交于 2019-12-01 12:33:03
问题 I started from Brad Larson's Tutorial on Github.Here when i added these code into my project - (void)viewDidLoad { [super viewDidLoad]; GPUImageVideoCamera *videoCamera = [[GPUImageVideoCamera alloc] initWithSessionPreset:AVCaptureSessionPreset640x480 cameraPosition:AVCaptureDevicePositionBack]; videoCamera.outputImageOrientation = UIInterfaceOrientationPortrait; GPUImageFilter *customFilter = [[GPUImageFilter alloc] initWithFragmentShaderFromFile:@"CustomShader"]; GPUImageView

ios GPUImage,bad result of image processing with small-size images?

守給你的承諾、 提交于 2019-12-01 01:18:53
I'm trying prepare image for OCR,I use GPUImage to do it,code work fine till i crop image!!After cropping i got bad result... Crop area: https://www.dropbox.com/s/e3mlp25sl6m55yk/IMG_0709.PNG Bad Result=( https://www.dropbox.com/s/wtxw7li6paltx21/IMG_0710.PNG + (UIImage *) doBinarize:(UIImage *)sourceImage { //first off, try to grayscale the image using iOS core Image routine UIImage * grayScaledImg = [self grayImage:sourceImage]; GPUImagePicture *imageSource = [[GPUImagePicture alloc] initWithImage:grayScaledImg]; GPUImageAdaptiveThresholdFilter *stillImageFilter = [

Pod install GPUImage does not work

大憨熊 提交于 2019-11-30 23:55:52
问题 I am working on a Swift project with cocoapods . Here is Podfile: pod 'GPUImage', '~> 0.1.4' After i run pod install , i try got the error about import file: import GPUImage I uninstalled GPUImage from podfile, then try the second solution, i got different error. This link is the project instruction on github. My steps are: Copy&Paste GPUImage.xcodeproj into project root directory, and added it into my project. Go to " Build settings " -> " Build Phases " -> " Target Dependencies ", added

GPUImage Video with transparency over UIView

自闭症网瘾萝莉.ら 提交于 2019-11-30 21:35:13
I am working on an iOS project that uses AV-Out to show contents in a 1280x720 window on a second screen. I have a MPMoviePlayerController 's view as background and on top of that different other elements like UIImages and UILabels . The background movie plays in a loop. Now I want to overlay the whole view including all visible elements with another fullscreen animation that has transparency so that only parts of the underlying view are visible. I first tried a png animation with UIImageView . I was surprised to find that actually works on iPhone5, but of course the pngs are so big in size

Kubernetes V1.15管理NVIDIA GPU容器

荒凉一梦 提交于 2019-11-30 19:17:41
参考链接: nvidia-k8s-device-plugin k8s-1.15调度GPU文档 nvidia-docker 0. GPU主机依赖 1.下载 nvidia-driver (官方提示要约等于361.93) 2.安装 nvidia-docker2.x (nvidia-docker1.x和2.x完全不同) 3. docker 配置成 nvidia 的默认运行时 4. kubernetes 版本大于1.10 1. systemd服务配置文件 注意: 在企业级生产环境里通常都会使用 Centos 来运行服务,但由于 GPU 环境下需要安装GPU驱动、cuda、cudnn之类的依赖库,导致操作不方便,因此可能会使用 Ubuntu 来运行GPU相关服务,两种发型版的 systemd 服务启动配置默认不同,因此在自动化安装时需要适配到多个发行版 1.centos服务默认目录: /usr/lib/systemd/system/docker.service 2.ubuntu服务默认目录: /lib/systemd/system/docker.service 可在手动部署服务时,将服务配置文件都放置到 /etc/systemd/system/ 目录 提示:systemd加载配置文件的顺序和优先级可自行查阅 2. kubelet默认配置 注意: k8s官方文档依然标明需要添加 -