ImageGear .NET v24.12 - Updated
TransformRectangle Method




ImageGear24.Recognition Assembly > ImageGear.Recognition Namespace > ImGearRecImage Class : TransformRectangle Method
Rectangle whose coordinates are to be transformed.
When true, the method will treat the values in rect rectangle as coordinates belonging to the current image, and so it will calculate the corresponding coordinates on the original (incoming) image.When false, the method will treat the values in rect rectangle as coordinates belonging to original (incoming) image, and so the method will calculate the corresponding coordinates on the current image.
Transforms the coordinates of a rectangle between original input and processed versions of the image.
Syntax
'Declaration
 
Public Sub TransformRectangle( _
   ByRef rect As ImGearRectangle, _
   ByVal fromCurrentToOriginal As Boolean _
) 
'Usage
 
Dim instance As ImGearRecImage
Dim rect As ImGearRectangle
Dim fromCurrentToOriginal As Boolean
 
instance.TransformRectangle(rect, fromCurrentToOriginal)
public void TransformRectangle( 
   ref ImGearRectangle rect,
   bool fromCurrentToOriginal
)
public: void TransformRectangle( 
   ref ImGearRectangle rect,
   bool fromCurrentToOriginal
) 
public:
void TransformRectangle( 
   ImGearRectangle% rect,
   bool fromCurrentToOriginal
) 

Parameters

rect
Rectangle whose coordinates are to be transformed.
fromCurrentToOriginal
When true, the method will treat the values in rect rectangle as coordinates belonging to the current image, and so it will calculate the corresponding coordinates on the original (incoming) image.When false, the method will treat the values in rect rectangle as coordinates belonging to original (incoming) image, and so the method will calculate the corresponding coordinates on the current image.
Remarks
This method can be used to learn the coordinates of a rectangle on the original (incoming) image, when the coordinates of the rectangle on the current image are known. This might be necessary, since images often undergo different image preprocessing steps, such as deskewing, rotation, etc. Alternatively, this method can provide the coordinates of a rectangle on the current image when its coordinates on the original image are given.

Note: ReduceToBitonal method clears the history of image transforms. After applying this method, Recognition engine treats the bitonal image as if it was the original one.

See Also

Reference

ImGearRecImage Class
ImGearRecImage Members
ImGearRectangle Structure