projective_trans_regionT_projective_trans_regionProjectiveTransRegionProjectiveTransRegionprojective_trans_region — Apply a projective transformation to a region.
If 'clip_region'"clip_region""clip_region""clip_region""clip_region" is set to its default value
'true'"true""true""true""true" by set_system('clip_region', 'true')set_system("clip_region", "true")SetSystem("clip_region", "true")SetSystem("clip_region", "true")set_system("clip_region", "true") or if
the transformation is degenerated and thus produces infinite
regions, the output region is clipped by the rectangle with upper
left corner (0, 0) and lower right corner ('width'"width""width""width""width",
'height'"height""height""height""height"), where 'width'"width""width""width""width" and 'height'"height""height""height""height" are
system variables (see also get_systemget_systemGetSystemGetSystemget_system). If
'clip_region'"clip_region""clip_region""clip_region""clip_region" is 'false'"false""false""false""false", the output region is not
clipped except by the maximum supported coordinate size.
See the “Installation Guide” for further information about
coordinate range limitations.
This may result in extremely memory and time intensive computations,
so use with care.
Attention
The used coordinate system is the same as in affine_trans_pixelaffine_trans_pixelAffineTransPixelAffineTransPixelaffine_trans_pixel. This
means that in fact not HomMat2DHomMat2DHomMat2DhomMat2Dhom_mat_2d is applied but a modified
version. Therefore, applying projective_trans_regionprojective_trans_regionProjectiveTransRegionProjectiveTransRegionprojective_trans_region corresponds to
the following chain of transformations, which is applied to each point
of the region (input and output
pixels as homogeneous vectors):
As an effect, you might get unexpected results when creating projective
transformations based on coordinates that are derived from the
region, e.g., by operators like
area_centerarea_centerAreaCenterAreaCenterarea_center. For example, if you use this operator to calculate
the center of gravity of a rotationally symmetric region and then rotate
the region around this point using hom_mat2d_rotatehom_mat2d_rotateHomMat2dRotateHomMat2dRotatehom_mat2d_rotate, the resulting
region will not lie on the original one. In such a case, you can compensate
this effect by applying the following translations to HomMat2DHomMat2DHomMat2DhomMat2Dhom_mat_2d
before using it in projective_trans_regionprojective_trans_regionProjectiveTransRegionProjectiveTransRegionprojective_trans_region:
List of values:
'bilinear'"bilinear""bilinear""bilinear""bilinear", 'nearest_neighbor'"nearest_neighbor""nearest_neighbor""nearest_neighbor""nearest_neighbor"