Fork me on GitHub
上一页 1 2 3 4 5 6 7 8 9 10 ··· 37 下一页
摘要: An image is represented by a 2-D array of integers, each integer representing the pixel value of the image (from 0 to 65535). Given a coordinate (sr, 阅读全文
posted @ 2017-12-19 16:39 hellowOOOrld 阅读(289) 评论(0) 推荐(0) 编辑
摘要: On a staircase, the i-th step has some non-negative cost cost[i] assigned (0 indexed). Once you pay the cost, you can either climb one or two steps. Y 阅读全文
posted @ 2017-12-19 14:57 hellowOOOrld 阅读(548) 评论(0) 推荐(0) 编辑
摘要: 最近做实验需要对比实验结果,需要将几张图片拼在一起,直观对比。 尝试用OpenCV解决。 核心思想其实是 声明一个足够大的,正好容纳下那几张图片的mat,然后将拼图依次copy到大图片相应的位置。 效果: 参考: http://blog.csdn.net/zuiyuchenfeng/article/ 阅读全文
posted @ 2017-12-05 21:16 hellowOOOrld 阅读(5440) 评论(0) 推荐(0) 编辑
摘要: 最近学习了人体姿态的相似性评价。需要用到KNN来统计与当前姿态相似的k个姿态信息。 假设我们已经有了矩阵W和给定的测试样本姿态Xi,需要寻找与Xi相似的几个姿态,来估计当前Xi的姿态标签。 //knn操作 //读入一帧测试帧 去训练集里面求距离/*1、计算已知类别数据集合汇总的点与当前点的距离2、按 阅读全文
posted @ 2017-12-01 17:32 hellowOOOrld 阅读(1879) 评论(0) 推荐(0) 编辑
摘要: 最近用到KNN方法,学习一下OpenCV给出的demo。 demo大意是随机生成两团二维空间中的点,然后在500*500的二维空间平面上,计算每一个点属于哪一个类,然后用红色和绿色显示出来每一个点 如下是一系demo里用到的相关函数。 运行效果: 红色背景应该是表示每一个像素的类别标签和红色的点的标 阅读全文
posted @ 2017-11-29 16:59 hellowOOOrld 阅读(1071) 评论(0) 推荐(0) 编辑
摘要: A self-dividing number is a number that is divisible by every digit it contains. For example, 128 is a self-dividing number because 128 % 1 == 0, 128 阅读全文
posted @ 2017-11-25 22:55 hellowOOOrld 阅读(243) 评论(0) 推荐(0) 编辑
摘要: Given an array of integers nums, write a method that returns the "pivot" index of this array. We define the pivot index as the index where the sum of 阅读全文
posted @ 2017-11-13 14:31 hellowOOOrld 阅读(263) 评论(0) 推荐(0) 编辑
摘要: 最近需要读取一些格式化路径的文件。路径文件名字最后是数字从0开始到100结束,但是占了4位,即0000到0100这样。 需要将int转成string的同时加上前缀0. 方法一: 用sprintf()函数。 方法二: 使用c++的stringstream 。 添加头文件 #include <iostr 阅读全文
posted @ 2017-11-09 18:31 hellowOOOrld 阅读(16785) 评论(0) 推荐(2) 编辑
摘要: Given two integer arrays A and B, return the maximum length of an subarray that appears in both arrays. Example 1: Note: 思路: 动态规划,dp[i][j]代表长度为i的a与长度为 阅读全文
posted @ 2017-10-31 16:33 hellowOOOrld 阅读(472) 评论(0) 推荐(0) 编辑
摘要: We have two special characters. The first character can be represented by one bit 0. The second character can be represented by two bits (10 or 11). N 阅读全文
posted @ 2017-10-29 23:25 hellowOOOrld 阅读(664) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 7 8 9 10 ··· 37 下一页