Invert Image

This function block inverts the pixel values of the incoming image, producing a visual negative of the input. It works with grayscale and color images and is useful for highlighting features or preparing images for further binary/shape processing.

πŸ“₯ Inputs (sockets)

  • Image Any Accepts any image (grayscale or color) to be inverted.

πŸ“€ Outputs (sockets)

  • Image Any The resulting image with inverted pixel values.

πŸ•ΉοΈ Controls

This block has no interactive controls or widgets.

🎨 Features

  • Works with both grayscale and color images.

  • Fast per-frame operation suitable for real-time previews.

  • Preserves image dimensions and channel count while inverting pixel values.

πŸ“ Usage Instructions

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

  2. Read the inverted image from the Image Any output and feed it to visualization or analysis blocks.

πŸ“Š Running behavior

When the block runs, it processes the latest input image and outputs a version where pixel intensities are inverted. If no image is present, the last valid image may be preserved for display.

πŸ’‘ Tips and Tricks

  • Use Show Image to preview the inverted result during debugging or tuning.

  • Combine with Image Threshold to invert a thresholded image for easier contour or blob detection.

  • Use Apply Mask together with this block to invert only selected regions of an image.

  • Crop the area of interest first with Image ROI or Image ROI Select, then invert only that region to limit processing or emphasize specific features.

  • Follow inversion with Blur or Denoising if inversion amplifies noise before downstream analysis.

πŸ› οΈ Troubleshooting

  • If the output looks unexpected, confirm the incoming image format (grayscale vs. color) using Image Resolution and Channel Value.

  • If colors appear unusual after inversion, try applying Color Space or Adjust Colors before or after inversion to restore expected color balance.

Last updated