Image AutoRotator
This function block automatically orients an image so its main content appears upright. It is useful when images may be rotated during capture and you want a consistent orientation before further processing.
π₯ Inputs
Image Any The input accepts any image that you want to auto-rotate.
π€ Outputs
Image Any The output is the rotated image adjusted to a more upright orientation.
πΉοΈ Controls
This block has no user-facing controls. It runs automatically when an image is provided.
π¨ Features
Automatic orientation correction for images with a dominant axis or elongated object.
Transparent operation β no manual tuning is required for typical use cases.
Fast, single-step processing suitable for live streams or batch images.
βοΈ Running mechanism
When an image is provided to the block, it analyzes the image to determine the main orientation and returns a version rotated to align that main axis vertically. This happens each time the block is evaluated, so you receive an updated, oriented image whenever the input changes.
π Usage Instructions
Connect an image-producing block to the
Image Anyinput.The block will output the rotated image on the
Image Anyoutput.Use the rotated image with downstream blocks for reliable measurements or visualization.
π‘ Tips and Tricks
Preview results quickly by connecting the output to
Show Imageto confirm correct orientation.If images are large and slow to process, pair with
Image Resizerbefore this block to speed up evaluation.When you expect only a small region to determine orientation, crop first with
Image ROI Selectand run this block on the ROI for more robust results.Use
BlurorImage Thresholdbefore auto-rotation when noise or background clutter confuse orientation detection β preprocessing can improve stability.If you need a fixed manual rotation after auto-orienting, chain with
Rotate Image Angleto apply a custom tweak.
(hint: combine these with other analysis and detection blocks such as Find Object or Histogram On Line to ensure downstream processing uses consistently oriented images.)
π οΈ Troubleshooting
If output looks unchanged or still slanted, try preprocessing the input with
BlurorImage Thresholdto reduce background noise.If the subject fills only a small portion of the image, crop with
Image ROI Selectso the block analyzes the relevant area.For very large images that are slow to process, resize with
Image Resizerto balance speed and accuracy.
Last updated
Was this helpful?