Images

This section describes operators belonging to the Images category.

This page discusses:

3D Image

Create an image in the 3D viewer.

Inputs

Name Type Description
Image Bitmap The Image to add in the 3D viewer.
Plane Plane The plane on which the image will be placed.
Width Length The width of the image in the 3D.
Height Length The height of the image in the 3D. if set to 0 the height will be computed internally to keep the aspect ratio of the image.
Center Boolean Center the image on the plane.

Outputs

Name Type Description
3D Image VisuInstance —

Apply Mask

Creates an image by setting the alpha values of each pixel of the input image by using the luminance of the mask image.

Inputs

Name Type Description
Image Bitmap Input image.
Image Mask Bitmap Mask image.

Outputs

Name Type Description
Result Image Bitmap Resulting image.

Close (Morpho)

Applies a dilatation followed by an erosion.

Inputs

Name Type Description
Image Bitmap Input image.
Radius Integer Number of pixels over which we propagate.

Outputs

Name Type Description
Result Image Bitmap Resulting image.

Color Pixels

Colorizes pixels of an image using a list of coordinates (a list of columns indexes and a list of row indexes, starting at 1 from the bottom-left) and one or several colors.

Inputs

Name Type Description
Image Bitmap Input image.
X Integer Column of the pixel to colorize starting at 1 from the left of the picture.
Y Integer Column of the pixel to colorize starting at 1 from the left of the picture.
Color Color Color to apply. Can be one color for all pixels or one color per pixel.

Outputs

Name Type Description
Result Image Bitmap Resulting image.

Crop Image

Crop Image with given pixels coordinates. If none given, crop around the object of the image.

Inputs

Name Type Description
In Bitmap Image to crop.
X Integer X coordinate of bottom left pixel. When set to (-1) takes the leftest pixel with a different color from the background and takes uses its X coordinates to crop.
Y Integer Y coordinate of bottom left pixel. When set to (-1) takes the lowest pixel with a different color from the background and takes uses its Y coordinates to crop.
Width Integer Width (in number of pixels) of the cropped image. When set to (-1) takes the rightmost pixel with a different color from the background and takes uses its X coordinates to crop.
Height Integer Height (in number of pixels) of the cropped image. When set to (-1) takes the pixel at the top with a different color from the background and takes uses its X coordinates to crop.
Background Color Color Color to consider as background. Background color is the ignored color. When NULL, uses white as background color.

Outputs

Name Type Description
Cropped image Bitmap Resulting cropped image.

Dilate

Morphological dilatation : propagation of the white pixels to their neighbours.

Inputs

Name Type Description
Image Bitmap Input image.
Radius Integer Number of pixels over which we propagate.

Outputs

Name Type Description
Result Image Bitmap Resulting image.

Erode

Morphological erosion : propagation of the black pixels to their neighbours.

Inputs

Name Type Description
Image Bitmap Input image.
Radius Integer Number of pixels over which we propagate.

Outputs

Name Type Description
Result Image Bitmap Resulting image.

Find Contours

Returns lists of contours pixels positions. All contours are closed. Isolated pixels are ignored.

Inputs

Name Type Description
Image Bitmap Input image.
Threshold Integer Threshold for the binary conversion.
Sampling Integer By increasing this value you will reduce the number of returned positions.

Outputs

Name Type Description
Pixel Contours List Lists of contours pixels positions.

Gaussian Blur

Creates a blured image based on a gaussian kernel.

Inputs

Name Type Description
Image Bitmap Input image.
Radius Integer Size of the bluring.

Outputs

Name Type Description
Result Image Bitmap Blured image.

Get Dimensions

Gives the dimensions of an image.

Inputs

Name Type Description
Image Bitmap —

Outputs

Name Type Description
Width Integer —
Height Integer —

Get Pixel

Gives the RGBA values of the input image pixel for a given column (x) and row (y) starting at 1 from the bottom-left of the picture.

Inputs

Name Type Description
Image Bitmap Input image.
X Integer Column of the pixel to read starting at 1 from the left of the picture.
Y Integer Row of the pixel to read starting at 1 from the bottom of the picture.

Outputs

Name Type Description
Red Integer Pixel red value (between 0 and 255).
Green Integer Pixel green value (between 0 and 255).
Blue Integer Pixel blue value (between 0 and 255).
Alpha Integer Pixel alpha value (between 0 and 255).

Get Pixels

Gives the RGBA values of all the pixels of the input image.

Inputs

Name Type Description
Image Bitmap Input image.

Outputs

Name Type Description
Red List Table of pixels red values (between 0 and 255).
Green List Table of pixels green values (between 0 and 255).
Blue List Table of pixels blue values (between 0 and 255).
Alpha List Table of pixels alpha values (between 0 and 255).

Grey

Creates a grey level image.

Inputs

Name Type Description
Image Bitmap Color input image.

Outputs

Name Type Description
Result Image Bitmap Grey level output image.

Image To Geometry

Creates Geometry from an image.

Inputs

Name Type Description
Img Bitmap Input Image.
Threshold Integer Threshold value used by the algorithm to find contours in the image.
Sampling Integer Sampling value used to approximates contours of the image.
Geometry Integer Type of geometry targeted as the output of the operator.
Plane Plane Support plane of the generated geometry.
Width Length Width of the output geometry.
Height Length Height of the output geometry.
Pivot Integer Pivot point of the image used to generate the output. Can be center, bottom-left corner, bottom-right corner, top-left corner, top-right corner.
Crop Image Boolean If true, the input image is croped to take into account only the region with non-white pixels. Else, the full image is processed.

Outputs

Name Type Description
Geometries GeometricObject Output geometries generated to match the image, regarding the choosen output geometry type (Points, Edges, Surfaces).

Morphological Transformation

Perform choosen morphological transformation to the image. White pixels are considered active (eg. Erosion will remove white pixels).

Inputs

Name Type Description
Image Bitmap Input Image on which the morphological transform will be applied.
Operator Integer Which type of transformation to apply on the image.
Kernel Shape Integer Shape of the structuring element. 3 possibilities: rectangular, cross-shaped or elliptic.
X Kernel Size Integer Kernel Size along the X axis.
Y Kernel Size Integer Kernel Size along the Y axis.
Iterations Integer Number of iterations performed.

Outputs

Name Type Description
Output Image Bitmap Result of the morphological transformation.

Negative

Creates the negative of the input image.

Inputs

Name Type Description
Image Bitmap Input image.

Outputs

Name Type Description
Result Image Bitmap —

Open (Morpho)

Applies an erosion followed by a dilatation.

Inputs

Name Type Description
Image Bitmap Input image.
Radius Integer Number of pixels over which we propagate.

Outputs

Name Type Description
Result Image Bitmap Resulting image.

Resize Image

Resizes the input image. If factor is FALSE, width and height inputs drives the resulting image's dimensions in pixels. If factor is TRUE, resulting image's dimensions are original dimensions multiplied by width and height inputs values. If one of width or height is 0 the original ratio is preserved.

Inputs

Name Type Description
Image Bitmap Input image.
Width Real Expected width for resize. 0 to keep ratio while controlling the height.
Height Real Expected height for resize. 0 to keep ratio while controlling the width.
Factor Boolean If TRUE, use width and height input to multiply the original dimensions.

Outputs

Name Type Description
Result Image Bitmap Resized image.

Rotate Image

Rotate the image.

Inputs

Name Type Description
Image Bitmap —
Angle Angle The rotation angle.
Repeat Boolean Rotates the repeated image to fill the gaps in the output image.

Outputs

Name Type Description
Rotated Imag Bitmap —

Sobel

Creates a contour image based on a sobel filter.

Inputs

Name Type Description
Image Bitmap Input image.
Radius Integer —

Outputs

Name Type Description
Result Image Bitmap Resulting image.

Threshold Image

Creates a black and white image. Every pixel which luminence is above the given threshold will be white. Others will be black.

Inputs

Name Type Description
Image Bitmap Input image.
Threshold Integer Black and white threshold.

Outputs

Name Type Description
Result Image Bitmap Output black and white (binary) image.