摘要: #include "opencv2/highgui/highgui.hpp"#include using namespace cv;using namespace std;int main(int argc, char* argv[]){ VideoCapture cap(0); // open the video camera no. 0 if (!cap.isOpened()) // if not success, exit program { cout >frame; imshow("MyVideo", frame); //show th.. 阅读全文
posted @ 2014-03-04 20:07 xlturing 阅读(6887) 评论(2) 推荐(0) 编辑
摘要: 上计算机视觉课老师布置的作业实现论文:Color Transferbetween Images基本思路是:1.给定srcImg和targetImg2.将RGB空间转为Lab空间3.根据论文中公式:计算每一个像素点4.将resultImg转回到RGB空间显示效果图:见代码: 1 #include 2 #include 3 #include 4 #include 5 using namespace std; 6 using namespace cv; 7 8 class ColorTransfer 9 { 10 public: 11 Mat result... 阅读全文
posted @ 2013-12-08 14:33 xlturing 阅读(4895) 评论(0) 推荐(0) 编辑
摘要: 最近在上计算机视觉这门课程用到了OpenCV,于是找到了"Using OpenCV Java with Eclipse"这篇博文,是英文的,我将它翻译如下与大家分享正文:从2.4.4版本以后,OpenCV开始支持Java。在这个教程中我会教你在Eclipse下怎么部署环境来使用OpenCV Java... 阅读全文
posted @ 2013-12-05 19:43 xlturing 阅读(6052) 评论(4) 推荐(2) 编辑
摘要: Today we have learned the Matrix Factorization, and I want to record my study notes. Some kownledge which I have learned before is forgot...(呜呜)1.Terminology单位矩阵:identity matrix特征值:eigenvalues特征向量:eigenvectors矩阵的秩:rank对角矩阵:diagonal matrix对角化矩阵:Diagonalizing a Matrix矩阵分解:matrix factorization奇异值分解:SVD 阅读全文
posted @ 2013-10-23 11:00 xlturing 阅读(2536) 评论(0) 推荐(0) 编辑
摘要: 比较简单的题目,题目大意就是将n个数字围成一个圈,找到一个划分,是的划分左边的数字之和等于右边的数字之和:e.g 10 1 2 2 5,那么可以找到一个划分10 | 1 2 2 5使得两边数字之和都等于10见ac代码#include int main(){ int g,N[31]; while(scanf("%d",&g)!=EOF&&g) { int i,j; for(i=1;i<=g;i++) scanf("%d",&N[i]); int sam=0,ella=0; for(i=1,j=g;i<... 阅读全文
posted @ 2013-10-17 10:42 xlturing 阅读(342) 评论(0) 推荐(0) 编辑
摘要: Recently, I am studying Maching Learning which is our course. My English is not good but this course use English all, and so I use English to record my studying notes. And our teacher is Dr.Deng Caiand reference book is Pattern Classfication. This is only my studing notes and I want to share to th.. 阅读全文
posted @ 2013-10-15 21:10 xlturing 阅读(833) 评论(0) 推荐(0) 编辑
摘要: 这道题目还是简单的,但是自己WA了好几次,总结下:1.对输入的总结,加上上次ZOJ Problem Set - 1334 Basically Speaking ac代码及总结这道题目的总结题目要求输入的格式:STARTX Y ZEND这算做一个data set,这样反复,直到遇到ENDINPUT。我们可以先吸纳一个字符串判断其是否为ENDINPUT,若不是进入,获得XYZ后,吸纳END,再进行输出结果2.注意题目是一个圆周,所以始终用锐角进行计算,即z=360-z;3.知识点的误区:浮点数截断double data;printf("%d",int(data)); //强制类 阅读全文
posted @ 2013-10-15 09:40 xlturing 阅读(281) 评论(0) 推荐(0) 编辑
摘要: 水题,输出的时候注意下#include #include int main(){ int d; scanf("%d",&d); while(d--) { int binary[30]; int n,i=0; scanf("%d",&n); while(n!=0) { binary[i++]=n%2; n/=2; } int flag=1; for(int j=0;j<i;j++) { ... 阅读全文
posted @ 2013-10-13 19:06 xlturing 阅读(284) 评论(0) 推荐(0) 编辑
摘要: 题目不难,主要说下这道题目在输入终止上的问题:题目要求当输入为0时一次case结束,当输入为#时整个输入全部结束,可以用如下格式解决while(scanf("%s",str)!=EOF&&strcmp(str,"#")){ if(!strcmp(str,"0")) { //做出相应处理 continue; }}见ac代码#include #include #include #include using namespace std;int main(){ int mile; char type[10... 阅读全文
posted @ 2013-10-10 18:38 xlturing 阅读(379) 评论(0) 推荐(0) 编辑
摘要: 这是一道很简单的题目,题目大概意思说下:就是有n个监狱(编号从1到n),第一次全部打开,第二次打开编号为2的倍数的,第三次打开编号为3的倍数的,以此类推。。。最后问你有几个监狱是打开的题目中我使用了memset函数来为数组初始化,发现了自己一个以前疏忽的地方1.void * memset(void*,int,size_t)这里的size需要注意是以字节为单位,所以当你为个数为n的整型数组赋初值时要这样写memset(name,1,n*sizeof(int));2.memset在头文件string.h中3.memset只能赋初值0或者1(这个好理解,因为计算机中bit只有这两种状态)代码:#in 阅读全文
posted @ 2013-10-08 16:33 xlturing 阅读(301) 评论(0) 推荐(0) 编辑