leetcode_Combination Sum II笔记

        Given a collection of candidate numbers (C) and a target number (T), find all unique combinations in C where the candidate numbers sums to T. Each number in C may only be used once in the combination. Note: All numbers (including target) will be positive integers. The solution set must not contain duplicate combinations. For example, given candidate set [10, 1, 2, 7, 6, 1, 5] and target 8, A solution set is: [ [1, 7], [1, 2, 5], [2, 6], [1, 1, 6] ]

阅读更多

leetcode_4Sum笔记

        Given an array S of n integers, are there elements a, b, c, and d in S such that a + b + c + d = target? Find all unique quadruplets in the array which gives the sum of target. Note: The solution set must not contain duplicate quadruplets. For example, given array S = [1, 0, -1, 0, -2, 2], and target = 0. A solution set is: [ [-1, 0, 0, 1], [-2, -1, 1, 2], [-2, 0, 0, 2] ]

阅读更多

实时超像素分割IER方法(CSEO方法)

sgs2        这篇博客介绍博主事先的CSEO超像素分割方法,CSEO法是目前已知最快的超像素分割算法,可以在640*480*3大小的图像上达到38ms的速度(使用单核CPU@2.5GHz),并且分割区域数与时间无关,是目前超像素分割领域的state-of-art。

        OpenCV内封装了主流的SLIC算法,当然,无法实时。这篇博客由于客观原因不提供源码、原理解释,只提供一些论文索引和博主的实验结果,仅供研究者参考。

        博主使用Kinect摄像头采集图像数据,将采集的四通道数据转换为三通道数据,然后缩放至920*540(原图为1080p),采集图像和超像素分割在同一个线程中,最终速度为48ms,如果使用640*480,将算法部分从主线程中分离出来,达到论文中所说的38ms是可能的。

阅读更多

TensorFlow学习笔记(二)——基于图会话数学运算工具

        TensorFlow使用图来表示计算任务,图中的节点被称之为op(operation的缩写)。TensorFlow程序通常被组织成一个构建阶段,和一个执行阶段。在构建阶段,op的执行步骤被描述成一个图。在执行阶段,使用会话执行图中的op(op就是节点)。简单的说,先给出描述,只在run()方法中执行操作。

阅读更多

Qt实现Metro风格界面:拖动无边框窗口

        Qt的GUI功能非常灵活,Metro风格也越来越受欢迎,那么如何使用Qt实现一个Metro风格的界面?

        有两点最重要:一是使用Metro风格的素材,二是加入Metro风格的控制。博主近期将之前写过的一个Metro风格的框架开源了,你只需要下载源码,继承QMetro类就可以实现自己的Metro风格界面了。首先,确保你的Qt版本在5.2以上,那么,我们开始吧。

阅读更多