Skip to content
/ RGB2Y Public
forked from komrad36/RGB2Y

Fastest CPU (AVX/SSE) RGB to grayscale: 2-4x faster than OpenCV. For image processing/computer vision.

Notifications You must be signed in to change notification settings

Lstions/RGB2Y

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

Fastest CPU (AVX/SSE) RGB to grayscale: 2-4x faster than OpenCV. For image processing/computer vision.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C++ 96.2%
  • Makefile 3.8%