oevislib_net  0.14.3.0
Loading...
Searching...
No Matches
Spatial Transforms

Functions

Region oevislib_net.Region.Mirror (MirrorDirection inMirrorDirection=MirrorDirection.Horizontal)
 Mirrors the region along the provided direction.
Region oevislib_net.Region.Translate (int inDeltaX, int inDeltaY, Optional< Size > inFrame=null, bool inInverse=false)
 Translates the object.
Region oevislib_net.Region.EnlargeNTimes (int inN)
 Increase the region by a given number of times.
Region oevislib_net.Region.Transpose ()
 Returns the transposed region.
Region oevislib_net.Region.Reflect (Point2Di inReflectionCenter)
 Rotates the region by 180 degrees using the provided rotation center.
Region oevislib_net.Region.Rotate (Point2D inCenter, float inAngle, Optional< Size > inFrame=null, bool inInverse=false)
 Performs a clockwise rotation of the region by a given angle using the provided rotation center.
Region oevislib_net.Region.Crop (Box inSelection)
 Crops the region to the provided box.
Region oevislib_net.Region.Uncrop (Box inSelection, Size inUncroppedFrame)
 Translates a cropped region in the original coordinates.
Region oevislib_net.Region.Crop (Rectangle2D inRectangle, Optional< UCS2D > inRectangleAlignment=null, Optional< Rectangle2D > outAlignedRectangle=null, Optional< UCS2D > outOutputAlignment=null)
 Crops the region to the provided rectangle.
Region oevislib_net.Region.Trim (Rectangle2D inRectangle, Optional< UCS2D > inRectangleAlignment=null, Optional< Rectangle2D > outAlignedRectangle=null)
 Trim the region points to the provided rectangle.
Region oevislib_net.Region.ResizeFrame (Size inNewFrame)
 Resizes the region using the provided frame.
Region oevislib_net.Region.ResizeFrame (float inScaleX, float inScaleY)
 Resizes the region using a scale factor.
Region oevislib_net.Region.Align (UCS2D inAlignment, Optional< Size > inFrame=null, bool inInverse=false)
 Aligns the region using the provided coordinate system.
Region oevislib_net.Region.Downsample (DownsampleRegionMode inDownsampleRegionMode=DownsampleRegionMode.Any, int inScaleStep=1)
 Downsamples the region using the provided downsample mode.
Region oevislib_net.Region.Shear (Axis inAxis, float inShear, float inCenter, ShearSize inShearSize=ShearSize.Preserve)
 Shear the region along the given axis.
Region oevislib_net.Region.ShrinkNTimes (int inNX=2, Optional< int > inNY=null, float inThreshold=0.5f)
 Shrinks the region by a given number of times.

Detailed Description

Function Documentation

◆ Align()

Region oevislib_net.Region.Align ( UCS2D inAlignment,
Optional< Size > inFrame = null,
bool inInverse = false )
inline

Aligns the region using the provided coordinate system.

Parameters
inAlignmentCoordinate system used to align the region.
inFrameFrame of the new region. If Null, the frame of the current object is used.
inInverseIf true, the opposite alignment is performed.
Returns
The aligned region.

◆ Crop() [1/2]

Region oevislib_net.Region.Crop ( Box inSelection)
inline

Crops the region to the provided box.

Parameters
inSelectionSelection used to create the new region.
Returns
The cropped region.

◆ Crop() [2/2]

Region oevislib_net.Region.Crop ( Rectangle2D inRectangle,
Optional< UCS2D > inRectangleAlignment = null,
Optional< Rectangle2D > outAlignedRectangle = null,
Optional< UCS2D > outOutputAlignment = null )
inline

Crops the region to the provided rectangle.

Parameters
inRectangleRectangle area used to create the new region.
inRectangleAlignmentCoordinate system used to align the rectangle.
outAlignedRectangleRectangle object aligned to the provided coordinate system.
outOutputAlignmentCoordinate system associated to the aligned rectangle.
Returns
The cropped region.

◆ Downsample()

Region oevislib_net.Region.Downsample ( DownsampleRegionMode inDownsampleRegionMode = DownsampleRegionMode::Any,
int inScaleStep = 1 )
inline

Downsamples the region using the provided downsample mode.

Parameters
inDownsampleRegionModeAlgorithm used to downsample the region.
inScaleStepThe number of times the region dimensions will be divided by 2.
Returns
The downsampled region.

◆ EnlargeNTimes()

Region oevislib_net.Region.EnlargeNTimes ( int inN)
inline

Increase the region by a given number of times.

Parameters
inNNumber of times the region is enlarged. Range: [1, +inf).
Returns
The enlarged region.

◆ Mirror()

Region oevislib_net.Region.Mirror ( MirrorDirection inMirrorDirection = MirrorDirection::Horizontal)
inline

Mirrors the region along the provided direction.

Parameters
inMirrorDirectionMirror direction.
Returns
The mirrored region.

◆ Reflect()

Region oevislib_net.Region.Reflect ( Point2Di inReflectionCenter)
inline

Rotates the region by 180 degrees using the provided rotation center.

Parameters
inReflectionCenterThe point used to reflect the region.
Returns
The reflected region.

◆ ResizeFrame() [1/2]

Region oevislib_net.Region.ResizeFrame ( float inScaleX,
float inScaleY )
inline

Resizes the region using a scale factor.

Parameters
inScaleXHorizontal scale factor. Range: [0, +inf).
inScaleYVertical scale factor. Range: [0, +inf).
Returns
The resized region.

◆ ResizeFrame() [2/2]

Region oevislib_net.Region.ResizeFrame ( Size inNewFrame)
inline

Resizes the region using the provided frame.

Every point of the region that fall outside the new frame will be discarded.

Parameters
inNewFrameNew frame.
Returns
The resized region.

◆ Rotate()

Region oevislib_net.Region.Rotate ( Point2D inCenter,
float inAngle,
Optional< Size > inFrame = null,
bool inInverse = false )
inline

Performs a clockwise rotation of the region by a given angle using the provided rotation center.

Parameters
inCenterRotation center.
inAngleRotation angle.
inFrameFrame of the new region. If Null, the frame of the current object is used.
inInverseIf true, the rotation is performed counterclockwise.
Returns
The rotated region.

◆ Shear()

Region oevislib_net.Region.Shear ( Axis inAxis,
float inShear,
float inCenter,
ShearSize inShearSize = ShearSize::Preserve )
inline

Shear the region along the given axis.

Parameters
inAxisSwitches between X-shear or Y-shear
inShearShear coefficient.
inCenterCenter coordinate in the direction orthogonal to the shear direction.
inShearSizeControls the shear post-processing mode.
Returns
The sheared region.

◆ ShrinkNTimes()

Region oevislib_net.Region.ShrinkNTimes ( int inNX = 2,
Optional< int > inNY = null,
float inThreshold = 0::5f )
inline

Shrinks the region by a given number of times.

Parameters
inNXNumber of times the region width is divided by 2. Range [1, +inf).
inNYNumber of times the region height is divided by 2. If Null, the same value as inNX will be used. Range: [1, +inf).
inThresholdThe fraction of pixels used to determine if a point is contained in the region while downsampling. Range [0, 1].
Returns
The shrunk region.

◆ Translate()

Region oevislib_net.Region.Translate ( int inDeltaX,
int inDeltaY,
Optional< Size > inFrame = null,
bool inInverse = false )
inline

Translates the object.

Parameters
inDeltaXTranslation in the X direction.
inDeltaYTranslation in the Y direction.
inFrameFrame of the new region. If Null, the frame of the current object is used.
inInverseIf true, the translation is done in the opposite direction.
Returns
The translated region.

◆ Transpose()

Region oevislib_net.Region.Transpose ( )
inline

Returns the transposed region.

Returns
The transposed region.

◆ Trim()

Region oevislib_net.Region.Trim ( Rectangle2D inRectangle,
Optional< UCS2D > inRectangleAlignment = null,
Optional< Rectangle2D > outAlignedRectangle = null )
inline

Trim the region points to the provided rectangle.

Parameters
inRectangleInput rectangle used to trim the region.
inRectangleAlignmentCoordinate system used to align the rectangle.
outAlignedRectangleRectangle object aligned to the provided coordinate system.
Returns
The trimmed region.

◆ Uncrop()

Region oevislib_net.Region.Uncrop ( Box inSelection,
Size inUncroppedFrame )
inline

Translates a cropped region in the original coordinates.

Parameters
inSelectionBox used for the original cropping.
inUncroppedFrameNew frame of the uncropped region.
Returns
The uncropped region.