projective_trans_pixel ( : : HomMat2D, Row, Col : RowTrans, ColTrans )

Project pixel coordinates using a homogeneous projective transformation matrix.

projective_trans_pixel applies the homogeneous projective transformation matrix HomMat2D to all input pixels (Row,Col) and returns an array of output pixels (RowTrans,ColTrans). The transformation is described by the homogeneous transformation matrix given in HomMat2D.

The difference between projective_trans_pixel and projective_trans_point_2d lies in the used coordinate system: projective_trans_pixel uses a coordinate system with origin in the upper left corner of the image, while projective_trans_point_2d uses the standard image coordinate system, whose origin lies in the middle of the upper left pixel and which is also used by operators like area_center.

projective_trans_pixel corresponds to the following steps (input and output points as homogeneous vectors):

  / RTrans \   / 1 0 -0.5 \              / 1 0 +0.5 \   / Row \
  | CTrans | = | 0 1 -0.5 | * HomMat2D * | 0 1 +0.5 | * | Col |
  \ WTrans /   \ 0 0   1  /              \ 0 0   1  /   \  1  /

  ( RowTrans, ColTrans ) = ( RTrans/WTrans, CTrans/WTrans )

If a point at infinity (WTrans = 0) is created by the transformation, an error is returned.


Parameters

HomMat2D (input_control)
hom_mat2d-array -> real
Homogeneous projective transformation matrix.

Row (input_control)
point.x(-array) -> real / integer
Input pixel(s) (row coordinate).
Default value: 64
Suggested values: 0, 16, 32, 64, 128, 256, 512, 1024

Col (input_control)
point.y(-array) -> real / integer
Input pixel(s) (column coordinate).
Default value: 64
Suggested values: 0, 16, 32, 64, 128, 256, 512, 1024

RowTrans (output_control)
point.x(-array) -> real
Output pixel(s) (row coordinate).

ColTrans (output_control)
point.y(-array) -> real
Output pixel(s) (column coordinate).


Parallelization Information

projective_trans_pixel is reentrant and processed without parallelization.


Possible Predecessors

vector_to_proj_hom_mat2d, hom_vector_to_proj_hom_mat2d, proj_match_points_ransac, hom_mat3d_project


See also

projective_trans_image, projective_trans_image_size, projective_trans_region, projective_trans_contour_xld, projective_trans_point_2d


Module

Foundation



Copyright © 1996-2008 MVTec Software GmbH