- 博客(71)
- 收藏
- 关注
原创 labelimg make: *** No rule to make target `qt4py2'
在ubuntu下如果安装labelimg出现make: *** No rule to make target `qt4py2'或者输入 python labelImg.py出现Traceback (most recent call last): File "./labelImg.py", line 29, in <module> import resou...
2018-08-07 19:51:21
1086
转载 正则表达式集合
转自http://www.zjmainstay.cn/regexp-one正则表达式入门和高级教程与在线测试工具作者: Zjmainstay1. 正则表达式入门教程正则表达式入门教程2. 正则表达式高级教程正则表达式高级教程3. 正则表达式工具3.1 正则表达式在线测试工具正则表达式在线测试工具 注:ctrl+s 可
2017-05-24 16:16:38
1227
原创 python 低通滤波
低通滤波:import cv2import numpy as npdef function(img): h,w=img.shape newimg=np.zeros((h,w),np.uint8) img2=np.fft.fft2(img) fshift = np.fft.fftshift(img2) st=fshift.copy() h,w=fshift.shape sh
2016-12-21 09:46:17
4786
1
原创 python 图像插值 最近邻、双线性、双三次
最近邻:import cv2import numpy as npdef function(img): height,width,channels =img.shape emptyImage=np.zeros((2048,2048,channels),np.uint8) sh=2048/height sw=2048/width for i in ran
2016-12-21 09:38:22
13972
4
原创 python 图像平移和旋转
import cv2import mathimport numpy as npdef move(img): height, width, channels = img.shape emptyImage2 = img.copy() x=20 y=20 for i in range(height): for j in range(width):
2016-12-21 09:36:33
7055
转载 链表各类操作详解
链表概述 链表是一种常见的重要的数据结构。它是动态地进行存储分配的一种结构。它可以根据需要开辟内存单元。链表有一个“头指针”变量,以head表示,它存放一个地址。该地址指向一个元素。链表中每一个元素称为“结点”,每个结点都应包括两个部分:一为用户需要用的实际数据,二为下一个结点的地址。因此,head指向第一个元素:第一个元素又指向第二个元素;……,直到最后一个元素,该元素不再指向其它元素,
2015-04-15 15:19:01
480
转载 单链表基本操作
//////////////////////////////////////////////单链表的初始化,建立,插入,查找,删除。////Author:Wang Yong // //Date: 2010.8.19 ////////////////////////////////////////////// #include #include ty
2015-04-15 15:17:21
372
原创 蓝桥杯 剪格子
问题描述如下图所示,3 x 3 的格子中填写了一些整数。+--*--+--+|10* 1|52|+--****--+|20|30* 1|*******--+| 1| 2| 3|+--+--+--+我们沿着图中的星号线剪开,得到两个部分,每个部分的数字和都是60。本题的要求就是请你编程判定:对给定的m x n 的格子中的整数,是否可以分割为
2015-04-07 16:58:07
323
原创 UVa10534 Wavio Sequence
http://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&problem=1475
2014-09-16 20:26:25
400
转载 最长上升子序列(LIS)长度的O(nlogn)算法
hdu 1950 Bridging signalshttp://acm.hdu.edu.cn/showproblem.php?pid=1950===================================最长上升子序列(LIS)的典型变形,熟悉的n^2的动归会超时。LIS问题可以优化为nlogn的算法。定义d[k]:长度为k的上升子序列的最末元素,若有多个长度为k的
2014-09-16 20:24:50
324
原创 hdu 5012 dice
http://acm.hdu.edu.cn/showproblem.php?pid=5012题意:就是说有两个shaizi
2014-09-15 12:58:43
357
原创 hdu1025 Constructing Roads In JGShining's Kingdom
题目好难懂,懂了之后也没想到这是一个LIS的题目,注意输出的细节,wrong了n遍输出,注意一条多条的不同输出,样例之间打印空行2、题目大意有2n个城市,其中有n个富有的城市,n个贫穷的城市,其中富有的城市只在一种资源富有,且富有的城市之间富有的资源都不相同,贫穷的城市只有一种资源贫穷,且各不相同,现在给出一部分贫穷城市的需求,每个需求都是一个贫穷的向一个富有的城市要资源,
2014-09-01 22:45:43
428
原创 hdu 1024 Max Sum Plus Plus
http://acm.hdu.edu.cn/showproblem.php?pid=1024
2014-08-15 19:58:35
366
原创 Ural 1917 Titan Ruins: Better late than killed
http://acm.timus.ru/problem.aspx?space=1&num=1917
2014-08-13 23:21:12
392
原创 ural 1915 Titan Ruins: Repeating Success and Failure
http://acm.timus.ru/problem.aspx?space=1&num=1915题意:给你一堆数he
2014-08-13 23:12:55
493
原创 ural 1809 Chapaev and Potatoes
http://vjudge.net/contest/view.action?cid=53296#problem/Jti
2014-08-11 20:36:43
462
原创 ural 1804 The Machinegunners in a Playoff
http://vjudge.net/contest/view.action?cid=53296#problem/E题意:这题就像是欧冠主客场淘汰赛
2014-08-11 19:59:32
408
原创 hdu3126 Prime Path
http://poj.org/problem?id=3126题目大意:就是说给你两个素数,让你每次可以改变y
2014-08-05 14:42:32
412
转载 经典背包问题 01背包+完全背包+多重背包
转载来源 http://blog.youkuaiyun.com/lyhvoyage/article/details/8545852
2014-08-01 15:17:52
370
原创 hdu1026 Ignatius and the Princess I
http://acm.hdu.edu.cn/showproblem.php?pid=1026
2014-07-30 16:20:44
269
原创 hdu1754 I Hate It 线段树运用求最大值
#include #include #include using namespace std;int A[200005];//int max;//int min;struct node{ int left; int right; int max; //维护最大值 int sum; //维护区间和 int
2014-07-25 15:48:00
450
原创 hdu2594 Simpsons’ Hidden Talents kmp next函数的运用
http://acm.hdu.edu.cn/showproblem.php?pid=2594题意:给你两个数组,
2014-07-24 16:47:19
407
原创 hdu3746 Cyclic Nacklace 利用kmp算最小周期
http://acm.hdu.edu.cn/showproblem.php?pid=3746
2014-07-22 16:57:51
420
原创 hdu3336 Count the string KMP
http://acm.hdu.edu.cn/showproblem.php?pid=3336题目大意:abab这样的一个zi
2014-07-22 14:46:26
431
转载 【经典算法】——KMP,深入讲解next数组的求解
http://www.cnblogs.com/c-cloud/p/3224788.html前言 之前对kmp算法虽然了解它的原理,即求出P0···Pi的最大相同前后缀长度k;但是问题在于如何求出这个最大前后缀长度呢?我觉得网上很多帖子都说的不是很清楚,总感觉没有把那层纸戳破,后来翻看算法导论,32章 字符串匹配虽然讲到了对前后缀计算的正确性,但是大量的推理证明不大好理
2014-07-22 13:24:49
402
转载 KMP算法之总结篇(转)
六之再续:KMP算法之总结篇(必懂KMP)作者:July。出处:http://blog.youkuaiyun.com/v_JULY_v/
2014-07-22 13:23:32
498
原创 hdu1087 Super Jumping! Jumping! Jumping!
http://acm.hdu.edu.cn/showproblem.php?pid=1087#include#include#includeusing namespace std;int main(){ int n,i,j; __int64 max; __int64 a[1005],sum[1005]; while(scanf("%d",&n)!=EOF) { if(n=
2014-07-02 15:35:07
388
转载 C++ 中string函数的用法总结(转载)
#include #include using namespace std;void main(){[cpp] view plaincopy ////find函数返回类型 size_type string s("1a2b3c4d5e6f7g8h9i1a2b3c4d5e6f7g8ha9i"); string flag
2014-06-21 16:06:43
502
原创 hdu1240 Asteroids!
http://acm.hdu.edu.cn/showproblem.php?pid=1240#include#include#include#includeusing namespace std;int sx,sy,sz,sum,n,ans,ex,ey,ez;int a[6][3]={{0,0,1},{0,0,-1},{0,1,0},{0,-1,0},{1,0,0},{-1,0,0
2014-05-20 20:47:31
458
原创 hdu1010 Tempter of the Bone
http://acm.hdu.edu.cn/showproblem.php?pid=1010
2014-05-19 19:48:29
390
原创 poj 1002 487-3279
http://poj.org/problem?id=1002题目大意:意思是说将某些字母对应成数字,然后找出输入的数据当中有多少个是重复出现的,将这些重复出现的输出,并且输出重复的次数。如果输入的数据都不相同,那么就输出“No duplicates. ”。分析:首先得注意几点,虽然说最后的数字只有7个,但是在输入的时候因为会有“-”符号的出现,所以字符数组需要开大一点。还有就是对于0的处理
2014-03-07 16:42:57
459
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人