Skip to content

drpaneas/cuda

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

cuda

// Color to Greyscale Conversion

//A common way to represent color images is known as RGBA - the color //is specified by how much Red, Grean and Blue is in it. //The 'A' stands for Alpha and is used for transparency, it will be //ignored in this homework.

//Each channel Red, Blue, Green and Alpha is represented by one byte. //Since we are using one byte for each color there are 256 different //possible values for each color. This means we use 4 bytes per pixel.

//Greyscale images are represented by a single intensity value per pixel //which is one byte in size.

//To convert an image from color to grayscale one simple method is to //set the intensity to the average of the RGB channels. But we will //use a more sophisticated method that takes into account how the eye //perceives color and weights the channels unequally.

//The eye responds most strongly to green followed by red and then blue. //The NTSC (National Television System Committee) recommends the following //formula for color to greyscale conversion:

//I = .299f * R + .587f * G + .114f * B

//Notice the trailing f's on the numbers which indicate that they are //single precision floating point constants and not double precision //constants.

About

Greyscale image using NVIDIA CUDA 5 Toolkit and OpenCV in C++

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published