ShaderCam | Demo app to discuss rendering camera frame using OpenGL ES

 by   yulu Java Version: Current License: No License

kandi X-RAY | ShaderCam Summary

kandi X-RAY | ShaderCam Summary

ShaderCam is a Java library. ShaderCam has no bugs, it has no vulnerabilities and it has low support. However ShaderCam build file is not available. You can download it from GitHub.

##Shader Camera By LittleCheeseCake. Occasionally I receives emails asking how to render Camera Frame using OpenGL ES on Android. I lazily used some codes from an open source project InstaCam without fully understand until recently I reviewed some fundamentals of OpenGL ES and re-impelemented a demo app for camera frame rendering using shaders. This post is to discuss some key aspects in the implementation and share the demo codes. ###CameraRenderer Drawing using OpenGL is implemented by rendering on GLSurfaceView. The common approach is subclass the GLSurfaceView and implements the GLSurfaceView.Renderer. The rendering tasks are performed by implementing the interface.
Support
    Quality
      Security
        License
          Reuse

            kandi-support Support

              ShaderCam has a low active ecosystem.
              It has 117 star(s) with 39 fork(s). There are 10 watchers for this library.
              OutlinedDot
              It had no major release in the last 6 months.
              There are 2 open issues and 1 have been closed. On average issues are closed in 36 days. There are no pull requests.
              It has a neutral sentiment in the developer community.
              The latest version of ShaderCam is current.

            kandi-Quality Quality

              ShaderCam has 0 bugs and 0 code smells.

            kandi-Security Security

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

            kandi-License License

              ShaderCam does not have a standard license declared.
              Check the repository for any license declaration and review the terms closely.
              OutlinedDot
              Without a license, all rights are reserved, and you cannot use the library in your applications.

            kandi-Reuse Reuse

              ShaderCam releases are not available. You will need to build from source code and install.
              ShaderCam has no build file. You will be need to create the build yourself to build the component from source.
              Installation instructions are not available. Examples and code snippets are available.
              ShaderCam saves you 745 person hours of effort in developing the same functionality from scratch.
              It has 1717 lines of code, 25 functions and 18 files.
              It has low code complexity. Code complexity directly impacts maintainability of the code.

            Top functions reviewed by kandi - BETA

            kandi has reviewed ShaderCam and discovered the below as its top functions. This is intended to give you an instant insight into ShaderCam implemented functionality, and help decide if they suit your requirements.
            • Called when the surface is created
            • Deletes the shader program
            • Loads string from rawId
            • Compiles the shader source
            • Sets the program
            • Called when the surface is updated
            • Initialize internal variables
            • Returns the texture id for this texture
            • Render the surface
            • Use OpenGL
            • Render a quad at the given position
            • OnPause
            • Destroy the surface
            • Returns the indexes of the given names
            • Get the handle for a named shader
            • Initialize the camera
            • Initialize the renderer
            Get all kandi verified functions for this library.

            ShaderCam Key Features

            No Key Features are available at this moment for ShaderCam.

            ShaderCam Examples and Code Snippets

            No Code Snippets are available at this moment for ShaderCam.

            Community Discussions

            QUESTION

            Calculate mean of a row in the fragment shader (OpenGL ES 2.0)
            Asked 2017-Jun-12 at 12:34

            I am currently programming an application for image processing. To achieve the needed performance, I have to use the GPU to compute the camera input, more specifically use OpenGL ES 2.0. With the help of this project (https://github.com/yulu/ShaderCam) I achieved to pass the image to the pipeline and do simple operations with the fragment shader (like inverting colors etc).

            My knowledge of GLSL, fragment shaders and vertex shaders is fairly limited but I am aware of pipeline constraints and what the two shaders do in the pipeline. So - formulating the problem - I would like to calculate the average color of a row in my received image and return it (per row) to my application. I read here https://stackoverflow.com/a/13866636/8038866 that this is generally possible, however I can't seem to find out the following things:

            1 (edit: SOLVED by simply passing the w and h of my texture to the vertex and fragment shader): Knowing where the row ends (and having that information in the fragment shader). For this I assume that I would have to pass the width of the picture to the vertex shader and from there to the fragment shader, right?

            2.: How to calculate the average the color values of each row in the fragment shader and then pass them to the application. If I understand it correctly - the fragment shader only excutes the code per pixel, so I am not sure how to achieve this.

            Here are the two very basic shaders vertex shader:

            ...

            ANSWER

            Answered 2017-Jun-11 at 13:34

            I found a way that does the trick for me. The idea is to calculate the mean for only one row of pixels and then later in the application to get this line with

            glReadPixels( GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLvoid * data);

            Here is my fragment shader (notice that the width of the surface is required as well):

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

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

            Vulnerabilities

            No vulnerabilities reported

            Install ShaderCam

            You can download it from GitHub.
            You can use ShaderCam like any standard Java library. Please include the the jar files in your classpath. You can also use any IDE and you can run and debug the ShaderCam component as you would do with any other Java program. Best practice is to use a build tool that supports dependency management such as Maven or Gradle. For Maven installation, please refer maven.apache.org. For Gradle installation, please refer gradle.org .

            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/yulu/ShaderCam.git

          • CLI

            gh repo clone yulu/ShaderCam

          • sshUrl

            git@github.com:yulu/ShaderCam.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