1. 深度优先搜索介绍图的深度优先搜索(Depth First Search),和树的先序遍历比较类似。它的思想:假设初始状态是图中所有顶点均未被访问,则从某个顶点v出发,首先访问该顶点,然后依次从它的各个未被访问的邻接点出发深度优先搜索遍历图,直至图中所有和v有路径相通的顶点都被访问到。 若此时尚...
分类:
其他好文 时间:
2014-12-05 12:34:04
阅读次数:
311
这几天在调试一个opencv的demo程序,总是crash,诊断信息为OpenCV Error: Assertion failed (dims ::channels) > ((DataType::depth) & ((1 >(int i0=0, int i1=1) Line 543 + 0xf6 ....
分类:
其他好文 时间:
2014-12-03 23:13:31
阅读次数:
1848
锐化方法:函数方法: 1 void Sharpen(const Mat& myImage, Mat& Result) 2 { 3 CV_Assert(myImage.depth() == CV_8U);//接受uchar类型存储的Mat 4 Result.create(myImage...
分类:
其他好文 时间:
2014-12-03 14:03:25
阅读次数:
320
Adjacency Matrix
邻接矩阵是表示一个图的常用存储表示。它用两个数组分别存储数据元素(顶点)的信息和数据元素之间的关系(边或弧)的信息。阶为n的图G的邻接矩阵A是n*n的。将G的顶点标签为v_1,v_2,...,v_n。若(v_i,v_j)
\in E(G),A_{ij}=1,否则A_{ij}=0。
Depth-First-Se...
分类:
其他好文 时间:
2014-12-02 16:40:54
阅读次数:
144
Kinect SDK v2预览版,取得Depth数据的方法说明。上一节,介绍了通过使用Kinect for Windows SDKv2预览版(以下简称为,Kinect SDKv2预览版)从Kinect for Windowsv2开发者预览版(后面称,Kinectv2预览版)取得Color的方法。这一...
分类:
编程语言 时间:
2014-12-02 01:32:36
阅读次数:
307
通过Kinect SDK v2预览版,取得BodyIndex(人体区域)的方法和示例代码。上一节,介绍了从Kinect v2预览版用Kinect SDK v2预览版获取Depth数据的方法。这一节,介绍从Kinect取得BodyIndex(人体区域)的方法。BodyIndex基于从Kinect取得的...
分类:
编程语言 时间:
2014-12-02 01:32:19
阅读次数:
237
Given a binary tree and a sum, find all root-to-leaf paths where each path's sum equals the given sum.
For example:
Given the below binary tree and sum
= 22,
5
/ \...
分类:
其他好文 时间:
2014-12-01 22:39:17
阅读次数:
186
Given a binary tree and a sum, determine if the tree has a root-to-leaf path such that adding up all the values along the path equals the given sum.
For example:
Given the below binary tree and sum...
分类:
其他好文 时间:
2014-12-01 22:37:27
阅读次数:
146
依题意构造树并遍历,找出最大深度并统计#include #include using namespace std;struct Node { vector children; int depth;};Node nodes[100005];int maxDepth = 0;int tota...
分类:
其他好文 时间:
2014-12-01 12:40:15
阅读次数:
212
Bit depth:32 "Edit"->"(Un)Select all chars" "Edit"->"Open Image Manager" "Image"->"Import image..."
分类:
其他好文 时间:
2014-11-30 20:14:31
阅读次数:
580