gpuimage

Rotate GPUImageTiltShiftFilter - GPUImage

▼魔方 西西 提交于 2020-01-04 14:16:37
问题 I want a non-horizontal GPUImageTiltShiftFilter rotation. I want to rotate it to an arbitrary rotation angle. I also want the filter to be fast it can be rotated with a UI with a UIRotationGestureRecongizer. How do I do this? 回答1: Ah, figured it out! Instead of modifying GPUImageTiltShiftFilter, make a new GPUImageFilterGroup as a modified version of GPUImageGaussianSelectiveBlurFilter to add rotation. I added: uniform highp float rotation; within kGPUImageSMTiltShiftFragmentShaderString, and

GPUImage create a custom Filter that change selected colors

我怕爱的太早我们不能终老 提交于 2020-01-01 17:36:31
问题 Using the amazing GPU image framework, I'm trying to create a custom filter using a custom fragment shader that passed some color vectors as uniforms, elaborate each fragment substituting a choosen color with one in the uniform. I made that using Quartz and it works, but since I'm moving my first step in OpenGL world using this framework, I'd like to give a try to the GPU processing. The fragment shader I made seems to work fine, but there is a problem in the output. I post just a sample for

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

荒凉一梦 提交于 2019-12-31 03:24:21
问题 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! 回答1: Set Build Active Architecture Only to NO for static Library in project target setting. 回答2: I guess

What's the Swift equivalent of declaring `typedef SomeClass<SomeProtocol> MyType`?

旧时模样 提交于 2019-12-29 07:01:14
问题 I’m currently writing some Swift code in a project that is predominately Objective-C. In our ObjC code, we have a header that declares typedef GPUImageOutput<GPUImageInput> MyFilter; . We can then declare e.g. a @property that can only be a GPUImageOutput subclass that implements GPUImageInput . (NOTE: GPUImageOutput and GPUImageInput are not defined by me; they are part of the GPUImage library) Our Swift code doesn't seem to recognize this, even though the header is #imported in our Bridging

视频直播服务器系统搭建需要做的工作有哪些?

余生颓废 提交于 2019-12-26 11:18:32
【推荐】2019 Java 开发者跳槽指南.pdf(吐血整理) >>> 当下, 视频直播 行业在中国逐渐走红。在刚刚过去的 2018 年,视频直播成为互联网行业最抢眼的领域之一。从游戏到秀场,从传统的网页端到移动互联网,各大直播平台包括斗鱼、熊猫 tv 、虎牙战旗还有纯移动端的映客、花椒等,群雄割据。接下来天下数据小编从技术的角度分析如何搭建一个自己的直播平台。 一、移动直播系统搭建推流端需要做哪些工作? 直播推流端即主播端,主要通过手机摄像头采集视频数据和麦克风采集音频数据,经过一系列前处理、编码、封装,然后推流到 CDN 进行分发。 1 、直播系统搭建采集 移动直播 SDK 通过手机摄像头和麦克风直接采集音视频数据。其中,视频采样数据一般采用 RGB 或 YUV 格式、音频采样数据一般采用 PCM 格式。采集到的原始音视频的体积是非常大的,需要经过压缩技术处理来提高传输效率。 2 、直播系统搭建前处理 在这个环节主要处理美颜、水印、模糊等效果。美颜功能几乎是直播的标配功能。我们调研中发现太多 case 是因为没有美颜功能被抛弃使用的。另外国家明确提出了,所有直播都必须打有水印并回放留存 15 天以上。 美颜实际上是通过算法去识别图像中的皮肤部分,对皮肤区域进行色值调整。通过颜色对比找到皮肤区域,可以进行色值调整、添加白色图层或调整透明度等来达到美白效果。在美颜处理方面,最著名的

I'm trying to get the video filtering working

旧巷老猫 提交于 2019-12-25 20:02:58
问题 I've tried the examples from the GPUImage library. I tried the 'SimpleVideoFileFilter' but all I see its black screen with the slider. I tried to do the same by my self, I got the images working perfect. but I can't really understand the videos process. the examples taking the videos from the project itself ? folder from the mac ? or its from the iPhone's videos ? I don't have Apple Developer account, so I can't really test it on my device. I found way to put an random (.m4v) file in the

Remove blur Effect on Image, when user touch the screen [closed]

断了今生、忘了曾经 提交于 2019-12-25 18:58:20
问题 Closed . This question needs details or clarity. It is not currently accepting answers. Want to improve this question? Add details and clarify the problem by editing this post. Closed 5 years ago . I want to Remove blur for specific where user Touch on the screen. When User Move his finger on the screen Only current touch part will have clear Image. Rest all screen will have blur Image. And when user remove his finger from the screen complete image will be blur again. What I have done so far

GPUImageLookupFilter with intensity control?

て烟熏妆下的殇ゞ 提交于 2019-12-25 05:50:33
问题 I am using Brad Larson's GPUImage framework for my project. I was trying to find a way to implement intensity control to GPUImageLookupFilter and came across https://github.com/BradLarson/GPUImage/issues/1485 gl_FragColor = mix(textureColor, vec4(vec3(newColor),1.0), mixTexture); the "textureColor" is the original texture, and "newColor" is the LookupFilter result, and mixTexture is the Alpha value which is (0 ~ 1.0), you can think it as intensity variable. I do not know how to implement this

GPUImage shader crashing with “ERROR: One or more attached shaders not successfully compiled”

匆匆过客 提交于 2019-12-24 13:27:53
问题 I'm trying to build a Vibrance filter for GPUImage based on this Javascript: /** * @filter Vibrance * @description Modifies the saturation of desaturated colors, leaving saturated colors unmodified. * @param amount -1 to 1 (-1 is minimum vibrance, 0 is no change, and 1 is maximum vibrance) */ function vibrance(amount) { gl.vibrance = gl.vibrance || new Shader(null, '\ uniform sampler2D texture;\ uniform float amount;\ varying vec2 texCoord;\ void main() {\ vec4 color = texture2D(texture,

Blends with GPUImageView are not giving expected result

眉间皱痕 提交于 2019-12-24 08:12:26
问题 When I use blends with a GPUImageView they don't seem to work. For example test1 which grabs the result into an image and puts that into an imageView works... where test2 which set the GPUImageView as a target... doesn't seem to work. test1 gives me the expected image... with my test images test2 gives me a black screen. + (void)test1:(UIImage*)image imageView:(UIImageView*)imageView { GPUImagePicture *pictureBase = [[GPUImagePicture alloc] initWithImage:image]; GPUImagePicture