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

  1. Connect an image-producing block to the Image Any input.

  2. The block will output the rotated image on the Image Any output.

  3. Use the rotated image with downstream blocks for reliable measurements or visualization.

πŸ’‘ Tips and Tricks

  • Preview results quickly by connecting the output to Show Image to confirm correct orientation.

  • If images are large and slow to process, pair with Image Resizer before this block to speed up evaluation.

  • When you expect only a small region to determine orientation, crop first with Image ROI Select and run this block on the ROI for more robust results.

  • Use Blur or Image Threshold before 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 Angle to 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 Blur or Image Threshold to reduce background noise.

  • If the subject fills only a small portion of the image, crop with Image ROI Select so the block analyzes the relevant area.

  • For very large images that are slow to process, resize with Image Resizer to balance speed and accuracy.

Last updated

Was this helpful?