Suppose I want to use VTK to simulate a stereo vision system composed of a
line laser and a camera. The laser is capable of projecting a uniform line
beam onto some 3D geometry, which I have in the form of an STL file. The
camera is located somewhere next to the laser and captures the light that is
reflected from the surface. The result is a 2D image where the intersection
between the laser beam and the 3d geometry is highlighted. Based on this
image I would like to test various algorithms.
My question is: Does VTK have tools that are suitable for this task?
I have generated this with ParaView but in VTK, you have to use vtkCutter using a vtkPlane as implicit function. The output is a polydata containing the contour (a polyline) of the initial surface. Create two actors for both the initial surface and the contour (set color to red and line width to 3) and that’s basically it.
The plane equation can be computed based on the vtkCamera parameters.