@@ -0,0 +1,1324 @@
+#!/usr/bin/env python%0A# -*- coding: utf-8 -*-%0A%0A# Copyright (c) 2015 J%C3%A9r%C3%A9mie DECOCK (http://www.jdhp.org)%0A%0A%22%22%22%0AOpenCV - Changing colorspaces: convert images from one color-space to another%0A%0ARequired: opencv library (Debian: aptitude install python-opencv)%0A%0ASee: https://opencv-python-tutroals.readthedocs.org/en/latest/py_tutorials/py_imgproc/py_colorspaces/py_colorspaces.html#converting-colorspaces%0A%22%22%22%0A%0Afrom __future__ import print_function%0A%0Aimport cv2 as cv%0A%0Adef main():%0A%0A    device_number = 1%0A    video_capture = cv.VideoCapture(device_number)%0A%0A    print(%22Press q to quit.%22)%0A%0A    while(True):%0A        # Capture frame-by-frame.%0A%0A        # 'ret' is a boolean ('True' if frame is read correctly, 'False' otherwise).%0A        # 'img_np' is an numpy array.%0A        ret, img_bgr = video_capture.read()%0A%0A        # Display the resulting frame (BGR)%0A        cv.imshow('BGR (orignal)', img_bgr)%0A%0A        # Display the resulting frame (Gray)%0A        img_gray = cv.cvtColor(img_bgr, cv.COLOR_BGR2GRAY)%0A        cv.imshow('Gray', img_gray)%0A%0A        # Display the resulting frame (HSV)%0A        img_hsv = cv.cvtColor(img_bgr, cv.COLOR_BGR2HSV)%0A        cv.imshow('HSV', img_hsv)%0A%0A        if cv.waitKey(1) & 0xFF == ord('q'):%0A            break%0A%0A    video_capture.release()%0A    cv.destroyAllWindows()%0A%0Aif __name__ == '__main__':%0A    main()%0A

Add a snippet (Python OpenCV).