码迷,mamicode.com
首页 >  
搜索关键字:mat    ( 14954个结果
[Leetcode] Remove Element
Given an array and a value, remove all instances of that value in place and return the new length.The order of elements can be changed. It doesn't mat...
分类:其他好文   时间:2014-10-26 13:01:15    阅读次数:208
如何返回固定之间的随机数?
在Java编程会经常用到固定之间的随机数,对于初学者往往对这个固定的随机数感到非常头痛,那有没有什么公式可以轻松达到目的呢? 当然有,公式如下: Math.random()*(n-m)+m 如:要求25至45之间的随机数,Math.random()*(45-25)+25,即Math.random()...
分类:其他好文   时间:2014-10-24 15:56:08    阅读次数:125
POJ 1321
dfs 简单题 1 #include 2 #include 3 #include 4 using namespace std; 5 int vis[9][9]; 6 int mat[9][9],n,k,ans; 7 8 void dfs(int x,int y,int t) 9 {10 ...
分类:其他好文   时间:2014-10-24 12:30:00    阅读次数:162
MATLAB中导入数据:importdata函数
用load函数导入mat文件大家都会。可是今天我拿到一个数据,文件后缀名竟然是‘.data’。该怎么读呢?我仅仅好用matlab界面Workspace区域的“import data”button手工导入该文件。恩,还好,竟然成功了。顺便提一下,这个“import data”button功能非常强大,...
分类:其他好文   时间:2014-10-23 22:22:46    阅读次数:265
POJ 2421 Constructing Roads(最小生成树)
题意  在n个村庄之间修路使所有村庄连通  其中有些路已经修好了  求至少还需要修多长路 还是裸的最小生成树  修好的边权值为0就行咯 #include #include #include #include using namespace std; const int N = 105, M = 10050; int par[N], n, m, mat[N][N]; int ans; struc...
分类:其他好文   时间:2014-10-23 12:29:17    阅读次数:200
[OpenCV] 3、直线提取 houghlines
>__ 4 5 using namespace cv; 6 using namespace std; 7 8 int main(int argc, char** argv) 9 {10 const char* filename ="pic1.png";11 Mat src = i...
分类:其他好文   时间:2014-10-22 23:36:30    阅读次数:198
[OpenCV] 2、边缘检测 canny
>_ 5 6 using namespace cv; 7 using namespace std; 8 9 int edgeThresh = 1;10 Mat image, gray, edge, cedge;11 12 // define a trackbar callback13 void .....
分类:其他好文   时间:2014-10-22 23:22:34    阅读次数:368
split函数和merge函数
split函数的主要功能是把一个彩色图像分割成3个通道,方便进一步的图像处理,具体说明如下:split Divides a multi-channel array into several single-channel arrays.C++: void split(const Mat& mtx, M...
分类:其他好文   时间:2014-10-21 17:40:30    阅读次数:332
raspberry pi (树莓PI)使用socket向PC发送视频流
安装boostsudo apt-get install libboost1.50-all测试boost1.cpp#include #include int main() { std::string text("a fat cat sat on the mat"); b...
分类:Web程序   时间:2014-10-21 12:05:34    阅读次数:371
防火墙 iptables检测是否有重复的规则
iptables新版本中有-C选项进行检测。如下: # iptables -C INPUT -p tcp --dport 8080 --jump ACCEPT iptables: Bad rule (does a matching rule exist in that chain?). # echo $? 1 # iptables -A INPUT -p tcp...
分类:其他好文   时间:2014-10-20 19:41:26    阅读次数:155
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!