Get Dimension
This function block returns the dimensions of an input image as a list. It is useful when you need to know image width, height and channel information before applying other image operations.
π₯ Inputs
Image Any This input accepts any image data from other function blocks.
π€ Outputs
Dimensions Returns the image dimensions (for example: height, width, channels) as a list of numbers.
πΉοΈ Controls
This function block has no controls.
π― Features
Quick retrieval of image shape information to guide downstream processing.
Works with color and grayscale images; output reflects the image shape format provided.
π Usage Instructions
Connect an image-producing block (camera, loader or processing block) to the
Image Anyinput.Read the
Dimensionsoutput to get the image shape information.Use the dimension values to configure other blocks or to validate image sizes in your scenario.
π Evaluation
When evaluated, this block inspects the connected image and outputs a numeric list describing its dimensions (e.g., height, width, channels). If no image is provided, no dimension list will be produced.
π‘ Tips and Tricks
Use
Load Imageor camera input blocks such asCamera USBandCamera IP (ONVIF)as image sources to quickly check incoming image sizes.If you need to preview the image before checking dimensions, attach a
Show Imageblock to the same image source.To measure a cropped region, connect a cropping block like
Image ROIorImage ROI Selectbefore this block β theDimensionsoutput will then reflect the cropped area.When working with very large images, consider feeding a resized version using
Image ResizeorImage Resizerbefore asking for dimensions to speed up downstream processing.Use
Image Resolution and Channel Valueif you also want separate width/height/channel outputs or more detailed channel information.
π οΈ Troubleshooting
No output or empty result: ensure an image source is connected to the
Image Anyinput.Unexpected number of elements in the result: some images are grayscale (height, width) while color images include a channel count (height, width, channels). Use
Split ImageorImage Resolution and Channel Valueif you need per-channel information.If the input may occasionally be missing, use blocks like
Is NoneorReplace Noneupstream to provide fallback data and avoid interruptions.
Last updated
Was this helpful?