跳转到内容
STAGING SERVER
DEVELOPMENT SERVER

Painter vTool#

The Painter vTool allows you to paint containing geometric shapes and text into images.

The Painter vTool accepts images via the Image input pin and data for painting via the Data input pins. This data is defined by the output pin data of other vTools, e.g., Texts or Regions. The vTool outputs the image with the data painted into it via the Image output pin.

Download the pylon Software Suite to use the Painter vTool.

Painter vTool

运作原理#

Connect the output pin of a vTool whose data you want to add to your image to one of the Data input pins of the Painter vTool, e.g., the Texts output pin of the Barcode Reader vTool. You can specify the number of Data input pins as required via the Num Input Data Pins parameter.

The Painter vTool draws the following data into the image:

  • Geometric shapes: rectangles, circles, ellipses, lines, points, and regions
  • Text: strings, integers, floats, and Booleans. Optionally, a text representation of geometric data, images, and transformation data can also be drawn.

Arrays of these types are also supported. Geometric arrays are drawn element by element. Arrays of strings, numbers, or Booleans are combined into one text block unless a matching coordinate array is provided.

Use the Input Data Pin Selector parameter to select the Data pin you want to configure. Drawing, color, and text placement are configured per pin. For more details, see Configuration Settings below.

You can use the Features - All pane to test settings while the recipe is running.

Configuration Settings#

  • Num Input Data Pins: Specifies how many Data input pins the vTool provides. You can add up to 100 pins. This parameter can't be changed while the recipe is running.
  • Input Data Pin Selector: Sets the Data pin whose settings you want to configure. The parameters below apply to the selected pin, except Output Pixel Format, which applies to the vTool as a whole.
  • Pin Description: Optional note for the selected pin, e.g., to record what is connected. This value is for user reference only and isn't used for drawing.
  • Draw Enable: Enables or disables drawing for the selected pin.
  • Draw Outline Enable: Enables or disables outline drawing for rectangles, circles, ellipses, and region bounding boxes on the selected pin.
  • Draw Center Enable: Enables or disables drawing a center mark for rectangles, circles, ellipses, and region bounding boxes on the selected pin.
  • ToString Enable: Enables or disables drawing a text representation of geometric data, images, and transformation data on the selected pin. Strings, integers, floats, and Booleans are always drawn as text, regardless of this setting.
  • Pen Color Red / Green / Blue / Alpha: Color used for outlines, fills, center marks, and text on the selected pin. The alpha component is used when filling regions.
  • Pen Width: Width of drawn lines. For points, this value also determines the size of the marker drawn.
  • Font Size: Size of the text drawn on the selected pin.
  • Size Offset: Offset added to the size of rectangles, circles, ellipses, and region bounding boxes so that the outline drawn doesn't overlap the region of interest.
  • Text Offset X / Text Offset Y: Offset added to the origin of the text area.
  • Text Position: Origin of the text area relative to a line, rectangle, circle, ellipse, or region bounding box.
    • Top Left: Origin of the text area starts on the left-hand side of the geometric figure.
    • Top Right: Origin of the text area starts on the right-hand side of the geometric figure.
    • Bottom Left: Origin of the text area starts on the left-hand side below the geometric figure.
    • Bottom Right: Origin of the text area starts on the right-hand side below the geometric figure.
    • Center: Origin of the text area starts at the center of the geometric figure.
  • Text Coordinate Data Pin Index: Index of another Data pin whose geometry is used to place text from the selected pin. Use this, for example, to place barcode text next to a region or rectangle received on a different pin. An index of 0 turns this feature off, and the selected pin's own data is used to determine the text position.
  • Text Box Origin: Starting corner for writing text.
    • Top Left: Text writing starts from the top left.
    • Bottom Left: Text writing starts from the bottom left.
  • Text Format: Defines what is printed when text is drawn. If this parameter is empty, a default representation of the data is used. Placeholders such as {Width}, {Height}, {Center_X}, {Radius}, and {_Hour_} are replaced with values from the data. New line characters are supported if you copy the format from an editor into the parameter's edit box. For the full list of placeholders, select Text Format and check the Feature Documentation pane.
  • Output Pixel Format: Pixel format of the painted output image. Input images are converted to this format before drawing.
    • BGR8: Color output image
    • Mono8: Mono output image

配置 vTool#

To configure the Painter vTool, double-click it in the Workbench. A dialog opens showing all the available settings. Alternatively, you can find the same settings in the Features - All pane.

You can view the result of the Painter vTool in a pin data view.

输入#

图像#

直接从 Camera vTool 或从输出图像的 vTool(例如 Image Format Converter vTool)接受图像。

  • 数据类型:图像
  • Image format: Input images are converted to the format selected by the Output Pixel Format parameter (BGR8 or Mono8) before drawing.

Data1#

Accepts data of any type that can be painted into the image. Additional Data input pins become available according to the Num Input Data Pins parameter.

  • Data type: Initially Value. Once a connection is made, the input pin takes the data type of the output pin connected.

输出#

图像#

Returns the image with the additional content painted into it.

  • 数据类型:图像
  • Image format: BGR8 or Mono8, according to the Output Pixel Format parameter.

典型前置项#

典型后置项#

  • Any vTool that accepts input of data type Image.