There are lots of different ways of converting a color image to Black and White, but, once you understand the basic idea, it gets simpler from there. The short version is that in a color image, there are different RGB (Red,Green,Blue) values for each pixel, while in a B&W image the RGB values for each pixel are the same.
For example, the RGB values for a pixel in a color image might be 200,100,50 and if one was to convert it to a red channel B&W, you would set the values of the pixel to 200,200,200.
Some of the simpler B&W algorithms include,
- Red channel -> Set the blue and green pixels to match the red pixels
- Blue channel -> Set the red and green pixels to match the blue pixels
- Green channel -> Set the blue and red pixels to match the green pixels
- Maximum -> Set the values of the pixel to match the largest value
- Minimum -> Set the values of the pixel to match the smallest value
To demonstrate
As a matter of performance, the red, blue and green channel conversions are the fastest and and max and min conversions are the slowest. A color channel conversion only requires finding that color, max and min require sorting the values. Averaging comes in between as it requires calculations but no sorting.