RGB2Y | Fastest CPU RGB to grayscale : 2-4x faster | Computer Vision library

 by   komrad36 C++ Version: Current License: MIT

kandi X-RAY | RGB2Y Summary

kandi X-RAY | RGB2Y Summary

RGB2Y is a C++ library typically used in Artificial Intelligence, Computer Vision, OpenCV applications. RGB2Y has no bugs, it has no vulnerabilities, it has a Permissive License and it has low support. You can download it from GitHub.

Fastest CPU (AVX/SSE) implementation of RGB to grayscale. Roughly 3x faster than OpenCV's implementation with AVX2, or 2x faster than OpenCV's implementation if using SSE only. Converts an RGB color image to grayscale. You can use equal weighting by calling the templated function with weight set to 'false', or you can specify non-equal weights (only slightly slower). The default non-equal weights match OpenCV's default. For even more speed see the CUDA version: github.com/komrad36/CUDARGB2Y. If you do not have AVX2, uncomment the #define NO_AVX_PLEASE below to use only SSE isntructions. NOTE THAT THIS IS ABOUT 50% SLOWER. A processor with full AVX2 support is highly recommended. All functionality is contained in RGB2Y.h. 'main.cpp' is a demo and test harness.
Support
    Quality
      Security
        License
          Reuse

            kandi-support Support

              RGB2Y has a low active ecosystem.
              It has 76 star(s) with 20 fork(s). There are 9 watchers for this library.
              OutlinedDot
              It had no major release in the last 6 months.
              There are 3 open issues and 1 have been closed. There are no pull requests.
              It has a neutral sentiment in the developer community.
              The latest version of RGB2Y is current.

            kandi-Quality Quality

              RGB2Y has 0 bugs and 0 code smells.

            kandi-Security Security

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

            kandi-License License

              RGB2Y is licensed under the MIT License. This license is Permissive.
              Permissive licenses have the least restrictions, and you can use them in most projects.

            kandi-Reuse Reuse

              RGB2Y releases are not available. You will need to build from source code and install.

            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 RGB2Y
            Get all kandi verified functions for this library.

            RGB2Y Key Features

            No Key Features are available at this moment for RGB2Y.

            RGB2Y Examples and Code Snippets

            No Code Snippets are available at this moment for RGB2Y.

            Community Discussions

            QUESTION

            VHDL RGB to YUV444 implementation mismatch
            Asked 2021-May-15 at 09:08

            The design

            I'm trying to implement a RGB to YUV444 conversion algorithm in hardware based in the next approximation I've got working in a C based program:

            ...

            ANSWER

            Answered 2021-May-15 at 09:08

            First things first: check if you're using YUV or YCbCr. Those are often confused and not the same!!! Don't mix them.

            Then I see:

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

            QUESTION

            How can I force emscripten/em++/llvm to load constants from .rodata and/or perform better SIMD optimization?
            Asked 2020-Sep-25 at 02:57

            I'm an active author and maintainer of the SSIM.js and jest-image-snapshot. Currently, I'm working to optimize our image processing implementations to leverage WebAssembly where it can provide a performance improvement.

            Right now, I'm noticing that the code being generated adds unnecessary instructions from both the llvm assembly (webassembly text?) output perspective, as well as, the actual assembly output from Node.js (--print-wasm-code). Of particular note, it does super weird stuff when loading constants. For instance, look at the array named multiplier or the constant rounder in the three sections of code below. On GCC, multiplier would be stored in the .rodata section of the assembly to be loaded once or converted to an integer, and rounder would be inlined with a movd or movq. Here it seems to be inserting the values on each round of the loop. It's also doing some stuff with vpblendw that I'm totally clueless on.

            How do I fix this?

            ...

            ANSWER

            Answered 2020-Sep-15 at 20:42

            Copying my answer from the Emscripten issue:

            The reason we don't use v128.const for this is that v128.const was only recently implemented in V8. To avoid breaking origin trial users, we can't update LLVM to emit v128.const until the relevant V8 patches roll into Chrome stable. I'm keeping an eye on this dashboard to determine when will be a good time to make this change. If you're using a more recent build of Chrome or some other execution environment that does support v128.const, you can try compiling your project with the -munimplemented-simd128 flag, which will enable v128.const in LLVM (but might also introduce other changes that you don't want). Once v128.const is widely available, it will be better for LLVM to use v128.const than to load vectors from memory because that allows the engine to determine the best way to materialize vectors given the runtime platform.

            It also might be worth considering porting performance-sensitive parts of your code to use the WebAssembly intrinsics header directly rather than relying on emulated SSE. That would reduce a layer of impedence mismatch between your code and the underlying machine code.

            Finally, if you notice suboptimal instruction selection anywhere, it would be helpful if you could file LLVM bugs (if it's on the code -> wasm side) or V8 bugs (if it's on the wasm -> native side) about the specific issues you see. That kind of feedback is extremely valuable to us.

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

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

            Vulnerabilities

            No vulnerabilities reported

            Install RGB2Y

            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/komrad36/RGB2Y.git

          • CLI

            gh repo clone komrad36/RGB2Y

          • sshUrl

            git@github.com:komrad36/RGB2Y.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