Image Resolution and Channel Value

This function block reports basic size and channel information for an input image. It is useful for quickly checking image dimensions before applying processing or sending data to other blocks.

πŸ“₯ Inputs

Image Any β€” Image input socket. Provide any image (color or grayscale) to analyze.

πŸ“€ Outputs

Width β€” Width of the input image in pixels (number).

Height β€” Height of the input image in pixels (number).

Channel β€” Number of channels in the input image (e.g., 1 for grayscale, 3 for RGB).

πŸ•ΉοΈ Controls

Resolution β€” Readout label on the block that shows a human-friendly string with image width, height and channel count.

🎯 Features

  • Fast metadata extraction: instantly returns image width, height and channel count when an image is present on the input socket.

  • Grayscale and color aware: recognizes single-channel images and multi-channel images and reports channel count accordingly.

  • Visual feedback: the Resolution label on the block displays the current result for quick inspection.

βš™οΈ Running mechanism

When this block runs it inspects the supplied image from the Image Any input socket, determines its pixel dimensions and channel count, updates the on-block Resolution label, and sends the numeric values through the Width, Height and Channel output sockets so downstream blocks can use them.

πŸ“ Usage

  • Connect any image-producing block to the Image Any input socket (for example Camera USB, Camera IP (ONVIF) or Load Image).

  • Read the Resolution label for a quick summary.

  • Use the numeric outputs Width, Height and Channel to drive logic, preprocessing decisions, or display information in other blocks.

πŸ’‘ Tips and Tricks

  • To visually check the image while inspecting size, connect the same image source to Show Image so you can preview frames while reading dimensions.

  • If you only need a specific region, use Image ROI Select before this block to measure the crop area resolution rather than the full image.

  • To inspect color information further, combine this block with Split Image to separate channels or with Merge Channels after custom adjustments.

  • Use Image Memory when working with a static test image so the reported values remain stable while you tune other processing steps.

(hint) Combine this block early in your processing chain to make adaptive decisions (for example selecting an appropriate algorithm or resizing strategy) based on the actual image size and channel count.

πŸ› οΈ Troubleshooting

  • No data output: ensure an image-producing block is connected to the Image Any input socket and that it is actively providing images.

  • Unexpected channel count: some grayscale images are single-channel while color images are three-channel. If you need a different channel format, use Split Image and Merge Channels or color-conversion blocks before this block.

  • Very large image sizes slowing the flow: resize upstream with Image Resizer to reduce processing load before sending images to compute-heavy blocks.

Last updated

Was this helpful?