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 AnyAccepts any image (grayscale or color) to be inverted.
π€ Outputs (sockets)
Image AnyThe 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
Connect an image-producing block to the
Image Anyinput.Read the inverted image from the
Image Anyoutput 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 Imageto preview the inverted result during debugging or tuning.Combine with
Image Thresholdto invert a thresholded image for easier contour or blob detection.Use
Apply Masktogether with this block to invert only selected regions of an image.Crop the area of interest first with
Image ROIorImage ROI Select, then invert only that region to limit processing or emphasize specific features.Follow inversion with
BlurorDenoisingif 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 SpaceorAdjust Colorsbefore or after inversion to restore expected color balance.
Last updated