Operator CutImage

Operator Library: Synchronization

The operator CutImage dynamically cuts the input image into a number of smaller images. Cutting is controlled by the input Cut, which is synchronous to input I. The operator supports two cutting modes which are set by the parameter Mode:

  • If Mode is set to Split (default), the incoming image is split into several pieces. Whenever any of the pixels of the current line at input Cut has the value 1, the ongoing output image is terminated at the end of that line and a new image is started with the beginning of the next incoming line. Any value of 1 in the last line of an image at input Cut has no effect.

  • If Mode is set to Truncate the incoming image is cut to a single image which may have less lines than the incoming image. Whenever any of the pixels of the current line at input Cut has the value 1, the ongoing output image is terminated at the end of that line. No further image data is forwarded to the output O until the end of the current image.

[Important] Increased Frame Rate

In mode Split, the operator may increase the frame rate by keeping the original bandwidth. In mode Truncate, the operator doesn't change the frame rate but may reduce the mean bandwidth.

You can use the operator CutImage to convert a 1D image into a 2D image. The conversion is automatically performed, if a link using the image protocol VALT_LINE1D is connected to the operator's input. In this case the operator is always in Split mode and the parameter Mode is disabled. For example, the 1D input of a line scan camera can be split into images of varying height depending on the control input, effectively creating a 2D output stream.

The operator supports images with variable line length.

I/O Properties

Property Value
Operator Type P
Input Links I, data input
Cut, control input
Output Link O, data output

Supported Link Format

Link Parameter Input Link I Input Link Cut Output Link O
Bit Width [1, 64]1 1 as I
Arithmetic {unsigned, signed} unsigned as I
Parallelism any as I as I
Kernel Columns any 1 as I
Kernel Rows any 1 as I
Img Protocol {VALT_IMAGE2D, VALT_LINE1D} as I VALT_IMAGE2D
Color Format any VAF_GRAY as I
Color Flavor any FL_NONE as I
Max. Img Width any as I as I
Max. Img Height any as I as I

1

The range of the input bit width is:

  • For unsigned inputs: [1, 64]

  • For signed inputs: [2, 64]

  • For unsigned color inputs: [3, 63]

  • For signed color inputs: [6, 63].

Parameters

Mode
Type static read/write parameter
Default Split
Range {Split,Truncate}

Operation mode.

  • If Mode is set to Split (default), the incoming image is split into several pieces. Whenever any of the pixels of the current line at input Cut has the value 1, the ongoing output image is terminated at the end of that line and a new image is started with the beginning of the next incoming line. Any value of 1 in the last line of an image at input Cut has no effect.

  • If Mode is set to Truncate the incoming image is cut to a single image which may have less lines than the incoming image. Whenever any of the pixels of the current line at input Cut has the value 1, the ongoing output image is terminated at the end of that line. No further image data is forwarded to the output O until the end of the current image.

Examples of Use

The use of operator CutImage is shown in the following examples: