API Documentation
Colors:
A color in rgba format, i.e. \(r,g,b,a \in [0,1]\).
Returns a default color for the \(x\), \(y\), or \(z\) axis.
Alias of
viren2d.Color.from_object_category().Alias of
viren2d.Color.from_object_id().Returns a list of the predefined color names.
Color transition function for
viren2d.Painter.draw_trajectory().Color transition function for
viren2d.Painter.draw_trajectory().Color transition function for
viren2d.Painter.draw_trajectory().Alias of
viren2d.Color.object_category_names().Creates a
Colorfrom \(r,g,b,a \in [0,1]\).Creates a
Colorfrom \(R,G,B \in [0, 255]\) and alpha \(a \in [0, 1]\).
Color Gradients:
Base class for
LinearColorGradientandRadialColorGradient.Gradient definition for linear color blending along a line.
Radial gradient between two circles.
Color Maps:
Enumeration of available color maps.
Colorizes a label image.
Colorizes 2D data array using a colormap.
Returns corresponding color map colors for a list of scalar values.
Registers a customized color map.
Utility class for scaled colorization of a data stream.
Computes the peaks example data.
Drawing Functionality:
The
Painterprovides the following drawing functionality:
Draws a circular arc.
Draws an arrow.
Draws a single 2D bounding box.
Draws a circle.
Draws an ellipse.
Draws a color gradient.
Draws a grid.
Draws the estimated line of horizon.
Draws an image onto the canvas.
Draws a line.
Draws a single marker/keypoint.
Draws multiple (similarly styled) markers/keypoints.
Draws a polygon.
Draws a rectangle.
Draws single- or multi-line text.
Draws a single- or multi-line text box.
Draws multiple (similarly styled) trajectories.
Draws a single trajectory.
Visualizes a coordinate system reference frame.
Resets the latest clip region.
Establishes a circular clip region for the current canvas.
Establishes a rectangular clip region for the current canvas.
Image Handling:
Encapsulates image data.
Creates a collage.
Returns an image where the specified color range is highlighted.
Converts a grayscale image to RGB(A).
Converts a HSV image to RGB(A)/BGR(A).
Converts RGB(A)/BGR(A) images to grayscale.
Converts a RGB(A)/BGR(A) image to HSV.
Reads an 8-bit image from disk.
Stores an 8-bit image to disk as either JPEG or PNG.
Optical Flow:
Colorizes a two-band optical flow field.
Loads an optical flow field from a
.flofile.Returns the color wheel visualization.
Saves a two-band optical flow field as
.flofile.
Points/Vectors:
Positioning:
Placement options with respect to a reference point.
Enumeration for horizontal alignment.
Placement options for labels.
Options for vertical alignment.
Shapes:
An ellipse for visualization.
A line (or line segment) in 2D space.
A rectangle for visualization.
Alias of
viren2d.Ellipse.from_endpoints().Alias of
viren2d.Rect.from_cwh().Alias of
viren2d.Rect.from_lrtb().Alias of
viren2d.Rect.from_ltwh().
Style Definitions:
How an arrow should be drawn.
How a 2D bounding box should be drawn."
Enumeration specifying how to render the endpoints of a line/dash stroke.
Enumeration specifying how to render the junction of two lines/segments.
How a line/contour should be drawn.
Enumeration specifying the marker shape.
How a marker/keypoint should be drawn.
How text should be rendered.