GPUImage2 | GPUImage 2 is a BSD-licensed Swift framework for GPU-accelerated video and image processing | iOS library

 by   BradLarson Swift Version: 0.0.1 License: BSD-3-Clause

kandi X-RAY | GPUImage2 Summary

kandi X-RAY | GPUImage2 Summary

GPUImage2 is a Swift library typically used in Mobile, iOS, Tensorflow applications. GPUImage2 has no bugs, it has no vulnerabilities, it has a Permissive License and it has medium support. You can download it from GitHub.

GPUImage 2 is the second generation of the GPUImage framework, an open source project for performing GPU-accelerated image and video processing on Mac, iOS, and now Linux. The original GPUImage framework was written in Objective-C and targeted Mac and iOS, but this latest version is written entirely in Swift and can also target Linux and future platforms that support Swift code. The objective of the framework is to make it as easy as possible to set up and perform realtime video processing or machine vision against image or video sources. By relying on the GPU to run these operations, performance improvements of 100X or more over CPU-bound code can be realized. This is particularly noticeable in mobile or embedded devices. On an iPhone 4S, this framework can easily process 1080p video at over 60 FPS. On a Raspberry Pi 3, it can perform Sobel edge detection on live 720p video at over 20 FPS.
Support
    Quality
      Security
        License
          Reuse

            kandi-support Support

              GPUImage2 has a medium active ecosystem.
              It has 4788 star(s) with 601 fork(s). There are 141 watchers for this library.
              OutlinedDot
              It had no major release in the last 12 months.
              There are 178 open issues and 93 have been closed. On average issues are closed in 40 days. There are 21 open pull requests and 0 closed requests.
              It has a neutral sentiment in the developer community.
              The latest version of GPUImage2 is 0.0.1

            kandi-Quality Quality

              GPUImage2 has 0 bugs and 0 code smells.

            kandi-Security Security

              GPUImage2 has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.
              GPUImage2 code analysis shows 0 unresolved vulnerabilities.
              There are 0 security hotspots that need review.

            kandi-License License

              GPUImage2 is licensed under the BSD-3-Clause License. This license is Permissive.
              Permissive licenses have the least restrictions, and you can use them in most projects.

            kandi-Reuse Reuse

              GPUImage2 releases are available to install and integrate.
              Installation instructions are not available. Examples and code snippets are available.

            Top functions reviewed by kandi - BETA

            kandi's functional review helps you automatically verify the functionalities of the libraries and avoid rework.
            Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of GPUImage2
            Get all kandi verified functions for this library.

            GPUImage2 Key Features

            No Key Features are available at this moment for GPUImage2.

            GPUImage2 Examples and Code Snippets

            No Code Snippets are available at this moment for GPUImage2.

            Community Discussions

            QUESTION

            Capturing still image from camera using gpuimage2
            Asked 2020-Feb-20 at 13:31

            I have a photo/gif app I made previously using AVFoundation as a base for the camera and taking photos, but I wanted to upgrade it to add some live filtering and post capture filtering too.

            After some digging I found gpuimage/gpuimage2 and since my project is in swift 3 I started replacing my previous camera module with gpuimage.

            I got the camera to work again but I have issues capturing a photo from the camera to store it as a uiimage until it is uploaded to a server.

            ...

            ANSWER

            Answered 2017-Dec-08 at 14:41

            I found where my problem was by looking at similar issues and the comments (found one where Brad Larson commented here

            Basically it has to do with the lifespan of my pictureOutput variable, since it was enclosed inside a method is didn't last long enough for the callback to be made and to save the image, by making my pictureOutput variable a class variable I solved my issues

            Source https://stackoverflow.com/questions/47594231

            QUESTION

            I've Broken GIT With CocoaPods and Cannot Merge/Commit
            Asked 2019-Apr-11 at 04:47

            This may be a more complicated issue than I am portraying, but after building an iOS app and occasionally using GIT, I am not in a challenging position; I have additional developers I am working with, and there is a need to properly use a repository (BitBucket) for further work.

            My project is "complicated" for two reasons;

            • I am using CocoaPods for third-party dependencies.
            • I use using GPUImage2, which is a separate .xcproject embedded in my project.

            Somehow, everything was working fine (I had a master branch and several branches that various developers have been working on). Things have been complicated whenever I find the need to switch branches or merge branches. Issues related to CocoaPods constantly come up, though endless efforts at the command line typically get us through our challenges.

            At this point, we are now trying to merge master into a new feature branch, and have hit the end of the line.

            My question: Only one actual project file has a merge conflict. Every other file is related to the .xcworkspace or something with CocoaPods. I would think it would be ideal to remove CocoaPods from GIT control altogether, leaving just the Podfile, which developers can install locally.

            Does anyone have suggestions on dealing with CocoaPods and GIT with Xcode projects?

            ...

            ANSWER

            Answered 2019-Apr-11 at 04:47

            I strongly recommend that you do not add your Pods folder to git, only commit the Podfile and Podfile.lock.

            You can do the following to remove the folder:

            Source https://stackoverflow.com/questions/55620536

            QUESTION

            GPUImage won't compile on iOS 12
            Asked 2018-Sep-18 at 20:02

            I have these errors:

            1. Cocoa.h File Not Found (in GPUImageView.h)

            2. Unknown Type Name: **NSOpenGLContext, CVOpenGLESTextureCacheRef (GPUImageContext)

            Now, I tried to fix all these errors, but ended up making things worse.

            I know OpenGL ES is deprecated in iOS 12, but as I understand deprecation, it should still be working for the moment, right?

            For error #1, I don't understand what's a MAC OS framework (cocoa.h) doing in here (some of the references are not surrounded with #IFDEF MAC_OS statements).

            As for error #2, these types are defined within the AppKit framework (also a MAC_OS framework, not an iOS framework).

            I have considered switching to GPUImage2, but it's a ton of work as it's not as easy as swapping the frameworks, I'll have a lot of code to rewrite. I also see Brad Larson (the semi-God behind this framework) has already started working on GPUImage3 which will use Metal instead of OpenGL ES but it's still work-in-progress but it won't be a simple swap from GPUImage v1 to GPUImage v3.

            ...

            ANSWER

            Answered 2018-Sep-18 at 15:40

            I found a way to fix it. Maybe it will help someone with the same problem. The GPUImage main folder contains the iOS and the MAC projects.

            Go to the framework folder, and delete the GPUImageMac.xcodeproj file.

            Then go to the Source folder located within the framework folder, and delete the whole folder named Mac.

            Clean your project and rebuild. Voilà!

            Good luck!

            Source https://stackoverflow.com/questions/52389886

            QUESTION

            GPUImage2 , Switching between Front and back Camera
            Asked 2018-Sep-03 at 13:31

            How to rotate or switch between front and back camera in GPUImage2(Switch version) using swift (toggle with a button). Any help would be highly appreciated.Thank you in advance.

            ...

            ANSWER

            Answered 2017-May-13 at 15:02

            I found the answer to it.

            I reloaded my view controller again and later checking it by a bool value and accordingly initialised the camera i.e the render view again.

            Source https://stackoverflow.com/questions/43893117

            QUESTION

            Fast Gaussian blur at pause
            Asked 2018-May-04 at 12:51

            In cocos2d-x I need to implement fast gaussian blur and here is how it should looks like( I just found some game on the App Store with already done such blur, in unity):

            So, it's nice fadeIn-fadeOut blur when user pauses the game.

            GPUImage already has a fast blur I need, but I can't find solution for cocos2d-x.

            Here is result of live camera view using GPUImage2 - tested on iPod Touch 5G, and it works fast on this slow and old device.

            Blur in GPUImage works very fast even on very slow devices like iPod Touch 5G.
            Looking for solution with super fast Gaussian blur for cocos2d-x.

            ...

            ANSWER

            Answered 2017-Oct-30 at 19:08

            After studying "Post-Processing Effects in Cocos2d-X" and "RENDERTEXTURE + BLUR", I came along to the following solution.

            The common way to achieve post processing effects in Cocos2s-X is to implement layers. The scene is one layer, and a post process is another layer, which uses the scene layer as an input. With this technique, the post process can manipulate the rendered scene.

            The blur algorithm is implemented in a shader. A common way to apply a blur effect on a scene is to blur first along he X-axis of the viewport and in an second pass along the Y-axis of the viewport (see ShaderLesson5). This is an acceptable approximations, which gives a massive gain of performance.

            This means, that we need 2 post process layers in Cocos2s-X. So wee need 3 layers, one for the scene and 2 for the post processes:

            Source https://stackoverflow.com/questions/46745199

            QUESTION

            What does --> (dash dash greater than) operator means in Swift
            Asked 2018-Mar-29 at 22:44

            I look at the source code of GPUImage2

            ...

            ANSWER

            Answered 2018-Mar-29 at 22:44

            This is an operator declared to add a destination target to the source.

            Source https://stackoverflow.com/questions/42478881

            QUESTION

            Why did UIImageWriteToSavedPhotosAlbum save a red image after rendering?
            Asked 2018-Jan-06 at 05:35

            I wrote a code using GPUImage2(https://github.com/BradLarson/GPUImage2).

            I confirmed that my code successfully save an image before touching a set button (Rendering a filtered image).

            However, my code save a red image (same size, only red filled) after touching a set button.

            My App. includes a RenderView IBOutlet and two IBActions (Set Button & Save Button).

            Here is my full source code.

            How can I successfully save an image after touching a set button?

            ...

            ANSWER

            Answered 2018-Jan-06 at 05:35

            I solved this problem! I added an optional UIImage (tempImage) that is used to save temporarily on the memory. When "saveButtonDown()" is called, I check whether tempImage is nil. If it is nil, I just print an error message (No Image). If it is not nil, it must had been initialized at "setButtonDown()". Here is my full source code. Thank you.

            Source https://stackoverflow.com/questions/48047871

            QUESTION

            EXC_BAD_ACCESS when try shiTomasiFeatureDetector filter in GPUImage2
            Asked 2017-Oct-24 at 09:12

            UPDATE: i update my code last.

            Seems like I have same issue with this site but in different case. So I tried to use shiTomasiFeatureDetector filter from GPUImage2 framework in viewController.swift and i got EXC_BAD_ACCESS with code=1/code=2 in line camera --> blendFilter --> renderView. Here's my code:

            ...

            ANSWER

            Answered 2017-Oct-24 at 09:12

            I got the answers! All you have to do is check your identity inspector on your left (utilities bar), check whether class and module use 'RenderView' class and GPUImage modules or not.

            Source https://stackoverflow.com/questions/46719253

            QUESTION

            How can I tailer GPUImage2 to use only a few filters?
            Asked 2017-Aug-09 at 16:11

            I want to use only a few filters within GPUImage2 in my swift project, how can I tailor GPUImage2 to only a few filters that I need?

            I am not familiar with the code base, and I don't see any documentation on this.

            P.S. My concern is mostly about app size, if including everything doesn't bloat the app size, I am OK with importing GPUImage as a whole.

            ...

            ANSWER

            Answered 2017-Aug-09 at 16:11

            This is a common question for people who want to shrink their binary size by only bringing over the operations they need, so I'll see if I can provide a canonical reference.

            The easiest way to do this is to remove the dependency on GPUImage from your project and instead manually copy into your project just the files necessary to build the core components of the framework. The platform-independent core files are these:

            • CameraConversion.swift
            • SerialDispatch.swift
            • BasicOperation.swift
            • Color.swift
            • FillMode.swift
            • Matrix.swift
            • OpenGLContext_Shared.swift
            • Timestamp.swift
            • OpenGLRendering.swift
            • ShaderProgram.swift
            • ShaderUniformSettings.swift
            • Framebuffer.swift
            • FramebufferCache.swift
            • Position.swift
            • Size.swift
            • Pipeline.swift
            • ImageOrientation.swift

            The following files also need to come over, but they have platform-specific (Mac, iOS, or Linux) variants, so you'll either need to choose the ones for your specific platform target or selectively include them to each of your various targets:

            • PictureInput.swift
            • PictureOutput.swift
            • MovieInput.swift
            • MovieOutput.swift
            • Camera.swift
            • OpenGLContext.swift
            • RenderView.swift

            With those files, you should be able to build a project that can perform image processing in the same manner as GPUImage, but without the long list of operations. If you have one or two operations you want to bring over, you can selectively copy those files into your project. You might need to copy over one or two dependencies if they are subclassed from another operation.

            Source https://stackoverflow.com/questions/45458380

            QUESTION

            Implementing custom filters using GPUImage Swift library
            Asked 2017-Jul-06 at 02:26

            This probably is a dumb question, but I am stuck with this for a while so going to ask it anyway.

            I'm trying to implement a Hudson/Nashville filter on a pet project. I googled a little and checkout out a few open-source projects and found some Objective-C (which I don't understand) based projects. They do have the filters implemented using GPUImage2, but I wasn't sure about their approach.

            I have the overlay and other images that they have used and the GLSL files.

            So my question is how do I go about using this images and shader files to implement a custom filter?

            Note: I tried using the LookupFilter approach as suggested, but the result wasn't so good. It would be super helpful if you can show me some code. Thanks

            Update:

            What I am trying to understand this. Given a custom shader like the one below, how am I supposed to pass the input images for uniform inputImageTexture2, inputImageTexture3 & inputImageTexture4. Do I pass it as a PictureInput to BasicOperation by subclassing it? If so, how? What am I missing? I haven't been able to walk through the code much because of the lack of a proper documentation. I have read up on shaders and its different components now, but still not able to figure out a way to work with custom filters on GPUImage2. Please help.

            ...

            ANSWER

            Answered 2017-Jul-06 at 02:26

            The GPUImage convention is that the first input texture to a shader is called inputTextureCoordinate, the second inputTextureCoordinate2, and so on. In the original Objective-C version of GPUImage, you can to manually subclass a filter type that matched the number of input textures in your shader.

            In the Swift GPUImage 2, I've made it so that you just need to use a BasicOperation class or subclass, and it automatically attaches textures to the number of inputs needed for your shader. You do this by initializing a BasicOperation and setting the number of inputs:

            Source https://stackoverflow.com/questions/44871171

            Community Discussions, Code Snippets contain sources that include Stack Exchange Network

            Vulnerabilities

            No vulnerabilities reported

            Install GPUImage2

            You can download it from GitHub.

            Support

            For any new features, suggestions and bugs create an issue on GitHub. If you have any questions check and ask questions on community page Stack Overflow .
            Find more information at:

            Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items

            Find more libraries
            CLONE
          • HTTPS

            https://github.com/BradLarson/GPUImage2.git

          • CLI

            gh repo clone BradLarson/GPUImage2

          • sshUrl

            git@github.com:BradLarson/GPUImage2.git

          • Stay Updated

            Subscribe to our newsletter for trending solutions and developer bootcamps

            Agree to Sign up and Terms & Conditions

            Share this Page

            share link

            Explore Related Topics

            Consider Popular iOS Libraries

            swift

            by apple

            ionic-framework

            by ionic-team

            awesome-ios

            by vsouza

            fastlane

            by fastlane

            glide

            by bumptech

            Try Top Libraries by BradLarson

            GPUImage3

            by BradLarsonSwift

            OculusRiftSceneKit

            by BradLarsonC++

            HealthKitHeartRateExporter

            by BradLarsonSwift

            AlexNet-Swift

            by BradLarsonSwift

            Quantities

            by BradLarsonSwift