第一题 Shaking hands
题意:你邀请n个好友聚会,好友之间互相认识的要喝酒,你和每个好友也要喝酒,问要准备多少杯酒。
题解:答案为ans=2?n+bitmatans=2*n+bit_{mat}其中bitmatbit_{mat}表示关系矩阵中1的个数。
#include int main() {
int n, a; while (~scanf(...
分类:
其他好文 时间:
2015-05-30 12:16:20
阅读次数:
137
在OpenCV中Mat、CvMat和IplImage类型都可以代表和显示图像。IplImage由CvMat派生,而CvMat由CvArr派生即CvArr -> CvMat -> IplImage,Mat类型则是C++版本的矩阵类型(CvArr用作函数的参数,无论传入的是CvMat或IplImage,...
分类:
其他好文 时间:
2015-05-30 10:34:46
阅读次数:
114
第一题 Shaking hands
题意:你邀请n个好友聚会,好友之间互相认识的要喝酒,你和每个好友也要喝酒,问要准备多少杯酒。
题解:答案为$$ans=2*n+bit{mat}$$其中$bit{mat}$表示关系矩阵中1的个数。 ```c++
include
int main() { int n, a;
while (~scanf(" %d", &n))...
分类:
其他好文 时间:
2015-05-29 23:21:54
阅读次数:
352
最近由于在项目中用到了Opencv库,但是为了更好的显示图像还是使用了Cximage库,它可以快捷地存取、显示、转换各种图像。Opencv库用于高级图像处理与识别。为了使Cximage图像与Opencv图像交互,写了个Cximage转换到IplImage的类。OpenCV2CXimage.h#pr....
分类:
其他好文 时间:
2015-05-29 15:20:43
阅读次数:
564
Long time=System.currentTimeMillis();
Date date=new Date(time);
String mat="yyyy-MM-dd";
String ma="yyyyMMdd";
SimpleDateFormat format=new SimpleDateFormat(mat);
SimpleDateFor...
分类:
编程语言 时间:
2015-05-29 09:58:37
阅读次数:
125
在Ax=0时候是不能用cvsolve来接函数的,但是可以利用一下函数来求解
#include
#include
using namespace std;
using namespace cv;
int main()
{
Mat A(7, 3, CV_64FC1);
Mat vec(3, 1, CV_64FC1);//最后的答案
for(int i=0;i<7;i++)
for(i...
分类:
其他好文 时间:
2015-05-28 16:19:54
阅读次数:
1059
简介
在使用美图秀秀之类工具的时候,发现了一个拼图功能,然后这里用opencv实现了类似效果。
实现原理
具体代码
#include
#include
#include
#include
#include
#include
#include
#include
using namespace cv;
#define pic_num 4
Mat...
分类:
其他好文 时间:
2015-05-28 09:33:58
阅读次数:
617
一、Accessingpixel values访问像素值。(用类自带的方法:方便,但效率不高)
1. cv::Mat has the a templatemethod
at(int y, int x)
用法image.at(j,i)[channel]= value;
注意事项:the programmer needs to specify the return type ...
分类:
其他好文 时间:
2015-05-27 22:57:10
阅读次数:
594
问题中文描述:任务描述:primary color 本应该为不透明的
今天写好values-v21 下的style之后,
#354c9b
#2878f4
@color/sky_blue
@color/deep_blue
@color/mat...
分类:
其他好文 时间:
2015-05-27 21:15:17
阅读次数:
191
1 #include "stdafx.h" 2 #include "WaveTransform.h" 3 #include 4 #include 5 Mat WaveTransform::WDT(const Mat &_src,const string _wname,const ...
分类:
其他好文 时间:
2015-05-27 15:24:02
阅读次数:
749