image = | buildLines3dImg (sizeX,sizeY,sizeZ,theta,phi,alpha,offset) |
Generates a 3D binary image with oriented lines.
This algorithm generates an image of 3D oriented lines with an angle (InTheta, InPhi), expressed in radians. theta is the angle between the z-axis and the xy-plane. phi is the angle in the xy-plane. Please, see Geometrical conventions for more details about the IPSDK geometric conventions.
The lines intersect an orthogonal plane. The lines are reduced to points in such a plane, describing a rectangular grid. This concept is illustrated in the figure below. The intersection between the lines and the plane is displayed in green and the virtual grid formed by the lines in the plane is showed as thin black lines.
The angle of this grid is defined by the parameter alpha.
One of the generated line is centered in the image and the other are shifted by a distance multiple of offset
Here is an example of generation of a 100x100 image with lines oriented with theta = 20°, phi = 40°, alpha = 10° and the offset is set to 30 pixels.