/RGB-to-Grayscale

RGB to GrayScale using average method in c++ without inbuilt OpenCv function

Primary LanguageC++

RGB-to-Grayscale

RGB to GrayScale using average method in c++ without OpenCv function

Using the average method for grayscaling the image.

  1. Create an empty array of the size of the image.
  2. Now traverse through all the pixels of the image and retrieve the RGB values of each pixel.
  3. Apply average method "(R+G+B)/3"
  4. Load the average values into the empty array which if of the size of the image.
  5. Convert the array into a Matrix and display the image.
  6. The resultant image is similar to a grayscaled image.