
学习opencv
文章平均质量分 74
sunnyrainab
提供的代码希望能帮助到大家,用于有意义的地方
展开
-
已知旋转中心和旋转角度,获得旋转之后的一组点坐标
//已知旋转中心和旋转角度,获得旋转之后的一组点坐标bool rotPoint(CPoint center,float rotAngleNow,CPoint src_corners[],CPoint dst_corners[],int num){ float reverseH[6]; float x = (float) (cos (rotAngleNow * PI / 180.));原创 2013-12-26 10:13:34 · 6195 阅读 · 1 评论 -
带有汉字的字符串与ASCII码相互转换
//带有汉字的字符串与ASCII码相互转换class AsciiTranslation{public: AsciiTranslation(); ~AsciiTranslation(); char * getAscii(char * input); char * AsciitoNum(char * input);private:};AsciiTranslation :: Asci原创 2013-12-10 10:10:53 · 1839 阅读 · 0 评论 -
opencv 颜色识别
int whetherYellow(CvScalar temp, int T) { if (((temp.val[2] - temp.val[0]) > T) && ((temp.val[1] - temp.val[0])> T)) { return 1; } return 0; } int whetherRed(CvScalar temp原创 2014-02-14 12:01:29 · 1500 阅读 · 0 评论 -
OPENCV 两点之间的操作
#include #include #include #include "cxcore.h" #include #include using namespace std;#pragma onceclass calTwoPoint{public: calTwoPoint(CvPoint pointO,CvPoint pointA); ~calTwoPoint(原创 2014-02-18 11:22:11 · 12630 阅读 · 2 评论