Draw Geometry

Description

Draw geometric objects in an image. Type : polymorphic.

 

Documentation illustration (illustration unavailable in the archive).

Input parameters

 

Documentation illustration (illustration unavailable in the archive). Image Src : class, type accepted U8, I16, RGB and HSL.
Documentation illustration (illustration unavailable in the archive).
Coordinates : array,
is an array of four elements. A line is specified by the two points forming it. Rectangles and ovals are specified by their bounding rectangle, with the format (Left/Top/Right/Bottom). In these cases, the tracing of a rectangle or oval stops at the column (Right – 1) and at the row (Bottom – 1). The values by default are (0, 0, SizeX, SizeY) where (SizeX, SizeY) is the resolution of the image. The default is used if the input is 0 or is not connected.
Documentation illustration (illustration unavailable in the archive).
Shape To Draw : integer,
is the form to draw.

    • Line : defined by the two points specified in the array Coordinates
    • Rectangle : defined by the bounding rectangle specified in the array Coordinates
    • Oval : defined by the bounding oval specified in the array Coordinates
    • Polygon : defined by the bounding polygon specified in the array Coordinates
  •  

Documentation illustration (illustration unavailable in the archive). Pixel Color : integer, pixel value used for tracing the design. This value is not used when in the mode Invert Frame or Invert Paint.
Documentation illustration (illustration unavailable in the archive). Draw Mode : integer,
defines how to draw the object.

    • Frame : specifies to use Pixel Color when tracing the contour
    • Paint : specifies to use Pixel Color when tracing the contour and the interior of the shape
    • Invert Frame : specifies to use the inverse of the pixel values when drawing the contour
    • Invert Paint : specifies to use the inverse of the pixel values when drawing the contour and the interior of the shape

 

Documentation illustration (illustration unavailable in the archive). Features : cluster

  • Documentation illustration (illustration unavailable in the archive). thickness : integer, line thickness of geometric object.
    Documentation illustration (illustration unavailable in the archive). transparency : float, transparency percentage of geometric object. This value is not used when in the mode Invert Frame or Invert Paint.
  •  

 

Documentation illustration (illustration unavailable in the archive).

Output parameters

 

Documentation illustration (illustration unavailable in the archive). Image Dst : class

Examples

All these examples are snippets PNG, you can drop these Snippet onto the block diagram and get the depicted code added to your VI (Do not forget to install Computer Vision ​library to run it).