Aligning Rotated Objects
If your application uses vision tools which are not rotation-invariant, such as CNLSearch, you may need to correct for scene rotation before applying vision tools to input images.
For example, if you are using a non-rotation-invariant tool to measure a part, and input images may contain rotated instances of the part, you can use the Affine Rectangle Sampling tool to produce an un-rotated version of the input image.
The figure below shows an example of using the Affine Rectangle Sampling tool to correct for a rotated input image.
Using affine rectangle sampling to correct scene rotation
You can also use the Affine Rectangle Sampling tool to create images from skewed or scaled images of scenes.