00001
00002
00003
00004
00005
00006
00007 #ifndef MCV_HH_
00008 #define MCV_HH_
00009
00010 #include <stdio.h>
00011 #include <vector>
00012
00013 #include <cv.h>
00014
00015 using namespace std;
00016
00017 namespace LaneDetector
00018 {
00019
00020
00021 #define FLOAT_MAT_TYPE CV_32FC1
00022 #define FLOAT_MAT_ELEM_TYPE float
00023
00024 #define INT_MAT_TYPE CV_8UC1
00025 #define INT_MAT_ELEM_TYPE unsigned char
00026
00027 #define FLOAT_IMAGE_TYPE IPL_DEPTH_32F
00028 #define FLOAT_IMAGE_ELEM_TYPE float
00029
00030 #define INT_IMAGE_TYPE IPL_DEPTH_8U
00031 #define INT_IMAGE_ELEM_TYPE unsigned char
00032
00033 #define FLOAT_POINT2D CvPoint2D32f
00034 #define FLOAT_POINT2D_F cvPoint2D632f
00035
00036 #define FLOAT float
00037 #define INT int
00038 #define SHORT_INT unsigned char
00039
00040
00041 void SHOW_MAT(const CvMat *pmat, char str[]="Matrix");
00042
00043 void SHOT_MAT_TYPE(const CvMat *pmat);
00044
00045 void SHOW_IMAGE(const CvMat *pmat, const char str[]="Window", int wait=0);
00046 void SHOW_IMAGE(const IplImage *pmat, char str[]="Window");
00047
00048 void SHOW_POINT(const FLOAT_POINT2D pt, char str[]="Point:");
00049
00050 void SHOW_RECT(const CvRect rect, char str[]="Rect:");
00051
00062 void mcvLoadImage(const char *filename, CvMat **clrImage, CvMat** channelImage);
00063
00064
00071 void mcvScaleMat(const CvMat *inImage, CvMat *outMat);
00072
00080 template <class T>
00081 CvMat* mcvVector2Mat(const vector<T> &vec);
00082
00083 }
00084
00085 #endif