Package pycv :: Package cs :: Package cv :: Module imageview :: Class ImageView
[hide private]
[frames] | no frames]

Class ImageView

source code

A rotated rectangular view of an image.

:Parameters:
    iparam : array((3,),'i')
        iparam[0] : width of the output patch
        iparam[1] : height of the output patch
        iparam[2] : flipping flag
            Non-zero if in the view the direction from x-axis to
                y-axis is counter-clockwise
            Zero if in the view the direction from x-axis to
                y-axis is clockwise
    dparam : array((4,),'d')
        dparam[0] : angle of rotation from the image's x-axis to the view's
            x-axis, clockwise, (in radians)
        dparam[1] : scaling ratio, or the view's one unit length
            (in image pixels)
        dparam[2] : x-coordinate of the center point (in image pixels)
        dparam[3] : y-coordinate of the center point (in image pixels)
            the center point of the view on the image is geometrically
            transformed into location (0.5*w,0.5*h) on the output patch



Instance Methods [hide private]
 
__init__(self, w=10, h=10, x0=0, y0=0, scale=1, angle=0, flip=False)
Initialize an image view.
source code
 
__del__(self) source code
 
slide(self, x=0, y=0)
Slide the view along its x-axis and y-axis in the image.
source code
 
get_transformation_matrix(self) source code
Method Details [hide private]

__init__(self, w=10, h=10, x0=0, y0=0, scale=1, angle=0, flip=False)
(Constructor)

source code 

Initialize an image view.

:Parameters:
    w : int
        width of the output patch
    h : int
        height of the output patch
    x0, y0 : double, double
        center point, location (x0,y0) on the image is geometrically
        transformed to location (0.5*w,0.5*h) on the output patch
    scale : double
        scaling ratio, or the view's one unit length (in image pixel)
    angle : double
        angle of rotation from the image's x-axis to the view's x-axis,
        clockwise, (in radian)
    flip : boolean
        to flip the view's y-axis or not
        Non-zero if in the view the direction from x-axis to
            y-axis is counter-clockwise
        Zero if in the view the direction from x-axis to
            y-axis is clockwise

slide(self, x=0, y=0)

source code 
Slide the view along its x-axis and y-axis in the image.
Parameters:
  • x (double) - number of (patch) pixels to slide along the x-axis
  • y (double) - number of (patch) pixels to slide along the y-axis
Returns:
The dparam array is updated.