00001
00006 #ifndef P_SDRAW_HH
00007 #define P_SDRAW_HH
00008
00009
00010
00011
00012
00013 #include <opencv2/opencv.hpp>
00014 #include <blort/Recognizer3D/PNamespace.hh>
00015 #include <blort/Recognizer3D/Vector2.hh>
00016 #include <blort/Recognizer3D/Array.hh>
00017
00018 namespace P
00019 {
00020
00021 class SDraw
00022 {
00023 public:
00024 static void DrawCross(IplImage *img, double x, double y,
00025 CvScalar c=CV_RGB(0,0,255), int thickness=1);
00026 static void DrawLine(IplImage *img, double x1, double y1, double x2, double y2,
00027 CvScalar c=CV_RGB(255,255,255), int thickness=1);
00028 static void DrawCircle(IplImage *img, double x, double y, double r,
00029 CvScalar c=CV_RGB(255,255,255), int thickness=1);
00030 static void DrawEllipse(IplImage *img, double x, double y, double a, double b,
00031 double angle, CvScalar c=CV_RGB(255,255,255), int thickness=1);
00032 static void DrawArc(IplImage *img, double x, double y, double r, double start_angle,
00033 double angular_span, CvScalar c=CV_RGB(255,0,0), int thickness=1);
00034 static void DrawTriangle(IplImage *img, double x1, double y1, double x2, double y2,
00035 double x3, double y3, CvScalar c=CV_RGB(0,0,255), int thickness=1);
00036 static void DrawRectangle(IplImage *img, double x1, double y1, double x2, double y2,
00037 CvScalar c=CV_RGB(0,0,255), int thickness=1);
00038 static void DrawPoly(IplImage *img, P::Array<Vector2> &vs,
00039 CvScalar c=CV_RGB(0,0,255), int thickness=1);
00040 static void DrawFillPoly(IplImage *img, P::Array<Vector2> &vs,
00041 CvScalar c=CV_RGB(0,0,255));
00042 static void DrawSIFT(IplImage *img, double x, double y, double l, double o,
00043 CvScalar c=CV_RGB(0,0,255), int thickness=1);
00044 static void WriteText(IplImage *img, const char* text, double x, double y, CvScalar c);
00045 };
00046
00047
00048 }
00049
00050 #endif
00051