Slice Image

This function block allows you to slice an input image into smaller sections based on specified horizontal and vertical proportions. This is useful for analyzing parts of an image separately or for processing images in more manageable segments.

📥 Inputs

Image Any The main image that you want to slice.

Horizontal Percentage The number of horizontal slices to create from the image.

Vertical Percentage The number of vertical slices to create from the image.

📤 Outputs

Image Any The reconstructed output image assembled from the sliced pieces.

Sliced Images This output consists of the individual image segments obtained from the slicing process.

Sliced Coordinates The coordinates corresponding to where each slice is located in the original image.

🕹️ Controls

Horizontal Percentage A numeric input specifying how many segments the image should be divided into horizontally. Default is 1.

Vertical Percentage A numeric input specifying how many segments the image should be divided into vertically. Default is 1.

🎨 Features

Flexible Slicing You can define the number of horizontal and vertical slices independently to get the desired segmentations.

Structured Output The block returns both the sliced image segments and their coordinates, making it easy to link with other processing functions.

📝 Usage Instructions

  1. Input an Image: Connect the image you want to slice to the Image Any input.

  2. Set Slices: Determine how many horizontal and vertical segments you want from the image by specifying values in the Horizontal Percentage and Vertical Percentage inputs.

  3. Evaluate the Block: Execute the function block to perform the slicing. The output will include the reconstructed main image and the individual sliced segments.

📊 Evaluation

When executed, this function block will process the input image according to the specified slice parameters, returning the sliced images and their coordinates for further processing.

💡 Tips and Tricks

Efficiency with Large Images

For larger images, consider slicing them into smaller sections to allow for more efficient processing and analysis. Use meaningful horizontal and vertical slice values for your specific analysis.

Verify Slice Values

Make sure that the slice values are greater than zero. Using slices of one or more will yield useful segments; slice values of zero may cause the block to fail.

Combining with Other Blocks

You can connect this block's output to other processing blocks like Image Color Match, Object Detection, or OCR to analyze sections of your images more effectively.

🛠️ Troubleshooting

No Output Generated

If no output is generated, ensure that you have provided valid input images and set reasonable slice values in Horizontal Percentage and Vertical Percentage.

Invalid Slicing

If you encounter errors related to slicing invalid images, double-check the dimensions of your input image to ensure it can correctly support the number of slices specified.

Last updated