Package pyvision :: Package types :: Module img
[hide private]
[frames] | no frames]

Module img

source code


Version: $Revision$

Author: $Author$

Classes [hide private]
  Image
The primary purpose of the image class is to provide a structure that can transform an image back and fourth for different python libraries such as PIL, OpenCV, and Scipy Images.
Functions [hide private]
 
OpenCVToNumpy(cvmat)
Convert an OpenCV matrix to a numpy matrix.
source code
 
NumpyToOpenCV(a)
Convert a numpy matrix to an OpenCV matrix.
source code
Variables [hide private]
  TYPE_MATRIX_2D = 'TYPE_MATRIX2D'
Image was created using a 2D "gray-scale" numpy array
  TYPE_MATRIX_RGB = 'TYPE_MATRIX_RGB'
Image was created using a 3D "color" numpy array
  TYPE_PIL = 'TYPE_PIL'
Image was created using a PIL image instance
  TYPE_OPENCV = 'TYPE_OPENCV'
Image was created using a OpenCV image instance
  TYPE_OPENCV2 = 'TYPE_OPENCV2'
Image was created using a OpenCV image instance
  TYPE_OPENCV2BW = 'TYPE_OPENCV2BW'
Image was created using a OpenCV image instance
  LUMA = [0.299, 0.587, 0.114, 1.0]
Values used when converting color to gray-scale.
  __package__ = 'pyvision.types'
Function Details [hide private]

OpenCVToNumpy(cvmat)

source code 

Convert an OpenCV matrix to a numpy matrix.

Based on code from: http://opencv.willowgarage.com/wiki/PythonInterface

NumpyToOpenCV(a)

source code 

Convert a numpy matrix to an OpenCV matrix.

Based on code from: http://opencv.willowgarage.com/wiki/PythonInterface