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