随笔分类 -  OpenCV

摘要:自己写的,不免有问题,欢迎纠正。1.旋转 1 //旋转 2 int size = sqrt(p_img->width/2 * p_img->width/2 + p_img->height/2 * p_img->height/2); 3 IplImage* dst = cvCreateImage(cvSize(size*2, size*2), IPL_DEPTH_8U, 3); 4 RgbImage spin(dst); 5 6 int angle = 290; //旋转角度 7 for(int i... 阅读全文
posted @ 2011-09-10 21:17 杨溪 阅读(570) 评论(0) 推荐(2)
摘要:1 template<class T> class Image 2 { 3 private: 4 IlpImage *imgp; 5 public: 6 Image(IplImage* img = 0) 7 { 8 imgp = img; 9 }10 inline T* operator[](const int rowIndx)11 {12 return( (T*)(imgp ->imageData + rowIndx * imgp ... 阅读全文
posted @ 2011-09-07 20:56 杨溪 阅读(416) 评论(0) 推荐(1)