RGB-to-Grayscale
RGB to GrayScale using average method in c++ without OpenCv function
Using the average method for grayscaling the image.
- Create an empty array of the size of the image.
- Now traverse through all the pixels of the image and retrieve the RGB values of each pixel.
- Apply average method "(R+G+B)/3"
- Load the average values into the empty array which if of the size of the image.
- Convert the array into a Matrix and display the image.
- The resultant image is similar to a grayscaled image.