Computer Vision

Photometric stereo 2009-06-05

maetel 2009. 6. 5. 15:49

To do: draw a needle map

ref. Washington University's source code:  


http://opencv.willowgarage.com/wiki/CxCore#CurvesandShapes

Line

Draws a line segment connecting two points

void cvLine( CvArr* img, CvPoint pt1, CvPoint pt2, CvScalar color,
             int thickness=1, int line_type=8, int shift=0 );
img
The image.
pt1
First point of the line segment.
pt2
Second point of the line segment.
color
Line color.
thickness
Line thickness.
line_type
Type of the line:
  • 8 (or omitted) - 8-connected line.

  • 4 - 4-connected line.

  • CV_AA - antialiased line.

shift
Number of fractional bits in the point coordinates.

The function cvLine draws the line segment between pt1 and pt2 points in the image. The line is clipped by the image or ROI rectangle. For non-antialiased lines with integer coordinates the 8-connected or 4-connected Bresenham algorithm is used. Thick lines are drawn with rounding endings. Antialiased lines are drawn using Gaussian filtering. To specify the line color, the user may use the macro CV_RGB( r, g, b ).