Package boofcv.visualize
Class RenderMesh
java.lang.Object
boofcv.visualize.RenderMesh
- All Implemented Interfaces:
VerbosePrint
Simple algorithm that renders a 3D mesh and computes a depth image. This rendering engine is fairly basic and makes
the following assumptions: each shape has a single color and all colors are opaque. What's configurable:
defaultColorRgba
Specifies what color the background is.surfaceColor
Function which returns the color of a shape. The shape's index is passed.intrinsics
Camera intrinsics. This must be set before use.worldToView
Transform from work to the current view.
-
Nested Class Summary
-
Field Summary
Modifier and TypeFieldDescriptionint
What color background pixels are set to by default in RGBA.final GrayF32
Rendered depth image.final CameraPinhole
Pinhole camera model needed to go from depth image to 3D pointfinal InterleavedU8
Rendered color image.Used to change what color a surface is.final Se3_F64
Transform from world (what the mesh is in) to the camera view -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
render
(VertexMesh mesh) Renders the mesh onto an image.void
setVerbose
(@Nullable PrintStream out, @Nullable Set<String> configuration)
-
Field Details
-
defaultColorRgba
public int defaultColorRgbaWhat color background pixels are set to by default in RGBA. Default value is white -
surfaceColor
Used to change what color a surface is. By default, it's red. -
depthImage
Rendered depth image. Values with no depth information are set to NaN. -
rgbImage
Rendered color image. Pixels are in RGBA format. -
intrinsics
Pinhole camera model needed to go from depth image to 3D point -
worldToView
Transform from world (what the mesh is in) to the camera view
-
-
Constructor Details
-
RenderMesh
public RenderMesh()
-
-
Method Details
-
render
Renders the mesh onto an image. Produces an RGB image and depth image. Must have configuredintrinsics
already and setworldToView
.- Parameters:
mesh
- The mesh that's going to be rendered.
-
setVerbose
public void setVerbose(@Nullable @Nullable PrintStream out, @Nullable @Nullable Set<String> configuration) - Specified by:
setVerbose
in interfaceVerbosePrint
-