自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

沉淀。

小本一枚

  • 博客(28)
  • 收藏
  • 关注

原创 车牌识别系统 opencv

最近刚开始接触opencv,打算做一个车牌识别系统。前段时间已经将车牌定位,字符分割做出来了。但是字符识别还没有进展。自己将过程和源码都放上来,大家一起研究吧~1.图像预处理车牌识别系统的第一个步骤为图像预处理。简单的说,为了方便计算,减少计算量,我们通常将获取的图片灰度化。所谓灰度化就是让图片每个像素点在0-255之间。灰度化后图片可以方便我们操作而且不影响我们对车牌的操作。这里先说下,

2012-10-18 18:29:51 5675 5

原创 378. Kth Smallest Element in a Sorted Matrix

Given a n x n matrix where each of the rows and columns are sorted in ascending order, find the kth smallest element in the matrix.Note that it is the kth smallest element in the sorted order, not

2016-09-14 16:48:26 356

原创 vbox 命令行操作

老大让搭个服务器,做IoT端的接受服务器。我选了KAA,官网提供vbox的沙盒镜像,直接装即可。服务器上装的是centos,我就想直接在centos上装virtuanl box ,然后导入沙盒。奈何服务器是个workstation,木有图形界面,一下懵逼了。镇定之下,想起可以命令行导入虚拟机。1.导入虚拟机 VBoxManage  import kaa-sandbox-0.9.0.

2016-08-18 16:59:11 3647

原创 leetcode Majority Element

Given an array of size n, find the majority element. The majority element is the element that appears more than ⌊ n/2 ⌋ times.You may assume that the array is non-empty and the majority element

2016-08-04 16:35:15 263

原创 leetcode Integer Break

Given a positive integer n, break it into the sum of at least two positive integers and maximize the product of those integers. Return the maximum product you can get.For example, given n = 2, ret

2016-08-04 16:28:05 231

原创 leetcode Valid Anagram

Given two strings s and t, write a function to determine if t is an anagram of s.For example,s = "anagram", t = "nagaram", return true.s = "rat", t = "car", return false.用一个26位长度的桶

2016-08-04 16:18:40 242

原创 leetcode Excel Sheet Column Number

Given a column title as appear in an Excel sheet, return its corresponding column number.For example: A -> 1 B -> 2 C -> 3 ... Z -> 26 AA -> 27 AB -> 28 思路,就是26进

2016-08-04 16:15:45 227

原创 leetcode Top K Frequent Elements

Given a non-empty array of integers, return the k most frequent elements.For example,Given [1,1,1,2,2,3] and k = 2, return [1,2].Note: You may assume k is always valid, 1 ≤ k ≤ number

2016-08-03 17:50:09 233

原创 leetcode Same Tree

Given two binary trees, write a function to check if they are equal or not.Two binary trees are considered equal if they are structurally identical and the nodes have the same value.思路:这

2016-08-03 17:37:06 185

原创 Intersection of Two Arrays

Given two arrays, write a function to compute their intersection.Example:Given nums1 = [1, 2, 2, 1], nums2 = [2, 2], return [2].思路,求两个数组的交集。很明显要用hashmap或者集合,字典的数据结构,因为他们的key都是唯

2016-08-03 17:24:47 214

原创 leetcode Product of Array Except Self

Given an array of n integers where n > 1, nums, return an array output such that output[i] is equal to the product of all the elements ofnums except nums[i].Solve it without division and in O(

2016-08-03 17:20:28 451

原创 leetcode Move Zeroes

Given an array nums, write a function to move all 0's to the end of it while maintaining the relative order of the non-zero elements.For example, given nums = [0, 1, 0, 3, 12], after calling you

2016-08-03 17:11:20 204

原创 leetcode Revert Binary Tree

homebrew的作者面试google,面试官要求他手写一个反转一个二叉树的功能。最后却没写出来,于是有了下面的新闻:Google: 90% of our engineers use the software you wrote (Homebrew), but you can’t invert a binary tree on a whiteboard so fuck off.

2016-08-02 17:38:57 275

原创 leetcode Maximum Depth of Binary Tree

Given a binary tree, find its maximum depth.The maximum depth is the number of nodes along the longest path from the root node down to the farthest leaf node.统计二叉树的最大深度,分为BFS,和DFS

2016-08-02 17:27:22 225

原创 leetcode Add digits

Given a non-negative integer num, repeatedly add all its digits until the result has only one digit.For example:Given num = 38, the process is like: 3 + 8 = 11, 1 + 1 = 2. Since 2 has on

2016-08-02 17:11:20 201

原创 leetcode single Number

Given an array of integers, every element appears twice except for one. Find that single one.Note:Your algorithm should have a linear runtime complexity. Could you implement it without using ext

2016-08-02 17:04:37 258

原创 Leetcode Sum of Two Intergers

Calculate the sum of two integers a and b, but you are not allowed to use the operator + and -.Example:Given a = 1 and b = 2, return 3.思路:1.两数相与,得到进位情况.2.两数异或,得到和。(without carray)利用这两条

2016-08-02 16:52:13 339

原创 leetcode Nim Game

292.Nim GameYou are playing the following Nim Game with your friend: There is a heap of stones on the table, each time one of you take turns to remove 1 to 3 stones. The one who removes the last

2016-08-01 17:05:10 249

原创 leetcode Counting Bits

Counting BitsGiven a non negative integer number num. For every numbers i in the range 0 ≤ i ≤ num calculate the number of 1's in their binary representation and return them as an array.Ex

2016-08-01 16:40:38 241

原创 Leetcode Reverse String

LeetCode 344Write a function that takes a string as input and returns the string reversed.Example:Given s = "hello", return "olleh".思路:两根指针,分别指向字符串首尾。互相交换所指向的数值。当两根指针相遇时,即可遍历完毕。time

2016-08-01 16:06:05 225

原创 快速排序 两种方法

1.分治思想。用递归实现Partition 函数将数组最后一个元素作为Key.所有比Key小的数放到Key的左边,所有比Key大的数放到Key的右边。实现后list[0,1,.....key-1....]范围的数都比key小list[key+1,key+2...]范围的数都比key大这意味着,key的位置已经排好了int Partition(in

2016-07-28 15:56:24 820

原创 python 列表推导 求100内的素数

列表推导式(list comprehension)是利用其他列表创建新列表(类似于数学术语中的集合推导式)的一种方法。它的工作方式类似于for循环,也很简单:In [39]: [x*x for x in range(10)]Out[39]: [0, 1, 4, 9, 16, 25, 36, 49, 64, 81]比如一个字典如下:a={1:2,2:3,3:4},要求链接字典的键值,并且

2015-07-09 14:01:49 12119

原创 python zip map

1.zip平行遍历操作1 >>> name=('jack','beginman','sony','pcky') 2 >>> age=(2001,2003,2005,2000) 3 >>> for a,n in zip(name,age): 4print a,n 5 6输出: 7 jack 2001 8 beginman 2003 9 sony 200510 pcky 2000

2015-07-09 14:00:49 576

原创 python 切片,字符串逆序神器

字符串、列表、元组在python中都符合“序列”这一特征,只要符合这一特征的变量我们都可以用切片(slice)去存取它们的任意部分。我们可以把序列想像成一个队列,我可能需要前面三位、后面三位、或从第三位后的四位、或隔一个取一个等,我们用切片操作符来实现上述要求。切片操作符在python中的原型是[start:stop:step]  即:[开始索引:结束索引:步长值]步长>0 切

2015-07-09 13:59:10 7875 2

原创 python 字典/集合操作

字典的基本操作1、如何访问字典中的值?adict[key] 形式返回键key对应的值value,如果key不在字典中会引发一个KeyError。2、如何检查key是否在字典中?a、has_key()方法 形如:adict.haskey(‘name') 有–>True,无–>Falseb、in 、not in   形如:'name' in adict      有–>

2015-07-09 13:57:32 565

原创 欧几里得求最大公约数/python

这个个求最大公约数的函数,利用了欧几里得算法。欧几里得法求最大公约数:求a和b的最大公约数记 a mod b=c ,即a=kb+c 设a b的最大公约数为d,则a=m*d b=n*d,m和n互质。c=a-kb=md-knd=(m-kn)d,m和n互质,则n和m-kn互质,c和b的最大公约数也是d所以: "a和b(a>b)的最大公约数等于b和a Mode b的最大公约

2015-07-09 13:48:39 3180 1

转载 两个大数相乘

# include# include# include void multiply(char* a,char* b,char* c){    int i,j,ca,cb,* s;    ca=strlen(a);    cb=strlen(b);    s=(int*)malloc(sizeof(int)*(ca+cb));    for (i=0;i 

2014-03-31 19:53:50 588

原创 STM32+ucos+ucgui+fatfs+bmp解码+JPG解码

1.整个project由一个基本菜单组成,可以读出SD卡里面的文档。可以显示320*240以内的任意图片(BMP,JGP)。是自动解码的哈~ 2.本来想附上两张图,无奈手机像素太低。效果很不好,就免去了。整个project是基于奋斗V3板子的硬件做的。只用到了240*320液晶,SDIO。有些基本的函数的确是移植奋斗的哈!像USART_OUT的函数。显示器控制器是ili9320,以前我曾自己写

2012-12-15 17:51:37 4206 1

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除