Itseez/opencv — pull request #3520 by JoeHowse (2014-12-17 00:39:25+00:00)
Title: Allow BGR, RGB, or gray capture via libv4l

The changes allow the user to get/set CV_CAP_PROP_MODE when using a VideoCapture with the libv4l back-end. The new, supported modes are:
- CV_CAP_MODE_BGR : BGR24 (default)
- CV_CAP_MODE_RGB : RGB24
- CV_CAP_MODE_GRAY : Y8, extracted from YUV420

The three modes have been tested successfully on the following cameras:
- PlayStation 3 Eye
- Logitech C920
- Odroid USB-CAM 720P

Here are the results of writing captured BGR, RGB, and gray images to file using imwrite:

![bgr](https://cloud.githubusercontent.com/assets/376134/5464676/26a4efb8-8562-11e4-8719-66a3d2cf063e.png)
![rgb](https://cloud.githubusercontent.com/assets/376134/5464678/26a6093e-8562-11e4-87d6-65b8914d2bc4.png)
![gray](https://cloud.githubusercontent.com/assets/376134/5464677/26a51272-8562-11e4-9846-06958a599b39.png)

Additionally, some spelling irregularities are addressed by adding pseudonyms of the following capture properties:
- CV_CAP_PROP_MONOCROME (wrong spelling) now has a pseudonym, CV_CAP_PROP_MONOCHROME (correct spelling).
- CV_CAP_ANDROID_GREY_FRAME (UK spelling) now has a pseudonym, CV_CAP_ANDROID_GRAY_FRAME (US spelling).