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
Resolutionlabel 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 Anyinput socket (for exampleCamera USB,Camera IP (ONVIF)orLoad Image).Read the
Resolutionlabel for a quick summary.Use the numeric outputs
Width,HeightandChannelto 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 Imageso you can preview frames while reading dimensions.If you only need a specific region, use
Image ROI Selectbefore this block to measure the crop area resolution rather than the full image.To inspect color information further, combine this block with
Split Imageto separate channels or withMerge Channelsafter custom adjustments.Use
Image Memorywhen 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 Anyinput 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 ImageandMerge Channelsor color-conversion blocks before this block.Very large image sizes slowing the flow: resize upstream with
Image Resizerto reduce processing load before sending images to compute-heavy blocks.
Last updated
Was this helpful?