自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(70)
  • 收藏
  • 关注

原创 leetcode 746 python 动态规划

题目要求:https://leetcode-cn.com/problems/min-cost-climbing-stairs/class Solution: def minCostClimbingStairs(self, cost: List[int]) -> int: if len(cost) == 0: return 0 ...

2019-11-29 15:02:28 136

原创 python查找元素的下标 leetcode 392

a_list.index(‘a’) //返回a在列表中每一次出现的位置,默认搜索整个列表a_list.index(‘a’,0,3) //返回a在指定切片内第一次出现的位置题目要求:https://leetcode-cn.com/problems/is-subsequence/class Solution: def isSubsequence(self, s: str, t: str...

2019-11-29 14:41:30 194

原创 双目视觉 立体匹配

双目相机的内参外参:双目相机的四个坐标系:双目相机矫正:双目相机用公式推导法求深度图(需要视差)双目相机求视差的算法:SAD匹配算法、BM算法、SGBM算法、GC算法等https://www.cnblogs.com/zyly/p/9373991.htmlhttps://www.cnblogs.com/riddick/p/8486223.htmlhttps://www.cnblogs....

2019-11-26 21:51:10 688

原创 将txt文件转换成xlsx文件及用matlab读取xlsx

转换:https://blog.csdn.net/yalipf/article/details/95322157https://jingyan.baidu.com/article/f54ae2fcd9a2b91e93b84946.htmlload a.xlsx

2019-11-26 15:54:08 2287

原创 overflow encountered in ubyte_scalars像素加减运算溢出异常

https://blog.csdn.net/Acecai01/article/details/80248139

2019-11-25 16:37:56 3378

原创 python文件读取每一行操作

https://blog.csdn.net/wsLJQian/article/details/81210867

2019-11-24 21:40:32 1444

原创 存灰度值

#!/usr/bin/env python# coding: utf-8# In[49]:import numpy as npf = open("result_final_1.txt","r") #设置文件对象lines = f.readline()lines = lines[:-1]count = 0# A = np.zeros((1468945,3),dtype=f...

2019-11-21 17:22:48 133

原创 matlab查看,缩放,读取图片

%% 读取图像frameLeft = imread('right.png');%figure;imshow(frameLeft);title('输入右图')frameRight = imread('left.png');%figure;imshow(frameRight);title('输入左图')frameDisparity = imread('shicha.png'); %figu...

2019-11-20 21:55:45 431

原创 python+opencv中imread函数第二个参数的含义

= 0: 灰度图0:三通道彩色图<0:原图,带alpha通道

2019-11-20 21:18:16 1551

原创 python opencv 灰度图转换和resize函数的使用

import cv2import numpy as npimg1 = cv2.imread('left.png',1)img1 = cv2.resize(img1, (797,1212))dst1 = cv2.cvtColor(img1,cv2.COLOR_BGR2GRAY)cv2.imwrite('l.png',dst1)img1 = cv2.imread('left.png',1...

2019-11-20 20:54:18 1852

原创 视差统计

import cv2import numpy as npimport csvimport pandas as pdl = []lena = cv2.imread('shicha.png',0) # 读取和代码处于同一目录下的 lena.pngfor i in range(0, 797): for j in range(0, 1212): if lena[i, ...

2019-11-20 15:44:50 151

原创 matlab中for循环的步长

循环结构:for语句格式:for 循环变量=表达式1:表达式2:表达式3循环体end【注】:表达式1:循环变量初值,表达式2:步长,为1时,可省略;表达式3:循环变量终值。...

2019-11-20 15:43:35 23088

原创 数据统计

Result_final_1 : 第一行result_final_2: 第二行(下同)result_3: 第3到10行result_4: 第11到20 行result_5 :第21到30行result_6: 31-407: 41-508: 51-60

2019-11-20 15:24:44 107

原创 python读取txt文件的前几行

法一:f = open("result_final_7.txt","r") #设置文件对象for i in range(5): print(f.readline().strip())

2019-11-20 15:19:21 12931 1

原创 matlab利用双目图像视差进行三维重建

法一:%%% 清理空间clc;clear;close all;%%% 导入立体标定参数load stereoParams.mat% 立体参数的可视化figure;showExtrinsics(stereoParams);%% % 导入数据frameLeft = imread('pattern_cam1_im1.png');frameRight = imread('...

2019-11-20 15:17:41 9885 20

原创 mac上安装tensorflow

pip install tensorflow

2019-11-19 17:03:59 164

原创 leetcode 303 python(动态规划)

题目要求:https://leetcode-cn.com/problems/range-sum-query-immutable/class NumArray: def __init__(self, nums: List[int]): self.dp = nums[:] # self.dp[i]存储0~i的子序列和 fo...

2019-11-18 19:25:48 213

原创 leetcode 198 python

题目要求:https://leetcode-cn.com/problems/house-robber/class Solution: def rob(self, nums: List[int]) -> int: if not nums: return 0 if len(nums) == 1: retu...

2019-11-18 16:24:20 186

原创 leetcode 121 python(动态规划)

题目要求:https://leetcode-cn.com/problems/best-time-to-buy-and-sell-stock/class Solution: def maxProfit(self, prices: List[int]) -> int: if not prices: return 0 dp = [...

2019-11-18 16:16:18 211

原创 leetcode 70 python (动态规划)

题目要求:https://leetcode-cn.com/problems/climbing-stairs/class Solution: def climbStairs(self, n: int) -> int: if n == 1: return 1 if n == 2: return 2 ...

2019-11-17 22:36:42 142

原创 leetcode 53 python 动态规划

题目要求:https://leetcode-cn.com/problems/maximum-subarray/弄一个数组,dp[i]存到当前位置结束时最大的前缀和。class Solution: def maxSubArray(self, nums: List[int]) -> int: if not nums: return 0 ...

2019-11-17 21:43:25 75

原创 机械臂

分拣机器人:

2019-11-17 21:15:04 131

原创 各种深度相机总结

分类:https://blog.csdn.net/qq_37761077/article/details/88753698zed双目立体相机的使用:https://blog.csdn.net/bluewhalerobot/article/details/81587058b站:AV24558065

2019-11-17 20:32:37 228

原创 感知器模型为什么不能解决异或问题

没有一条直线能把它们分开,即归为正确的一类。具体可以看这篇文章讲的很好:https://www.jianshu.com/p/853ebc9e69f6

2019-11-17 17:28:12 766

原创 leetcode 315 python

题目要求:https://leetcode-cn.com/problems/count-of-smaller-numbers-after-self/python列表insert的操作:https://www.iplaypy.com/jinjie/list-insert.htmlpython内置函数binect的用法:https://www.cnblogs.com/skydesign/ar...

2019-11-16 22:31:20 236

原创 leetcode 179 python

题目要求:https://leetcode-cn.com/problems/largest-number/python中map函数的用法:https://www.runoob.com/python/python-func-map.htmlpython中lstrip和rstrip的用法:https://blog.csdn.net/csdn15698845876/article/detail...

2019-11-16 20:23:05 174

原创 leetcode 151 python

题目要求:https://leetcode-cn.com/problems/reverse-words-in-a-string/split()当不带参数时以空格进行分割(不管几个空格全部砍掉),当代参数时,以该参数进行分割。python 字符串(str)和列表(list)的互相转换:https://blog.csdn.net/roytao2/article/details/534333...

2019-11-16 16:14:00 311

原创 leetcode 646 python

题目要求:https://leetcode-cn.com/problems/maximum-length-of-pair-chain/思路:很简单的贪心class Solution: def findLongestChain(self, pairs: List[List[int]]) -> int: pairs.sort(key=lambda x: x[1])...

2019-11-16 15:55:20 123

原创 leetcode 241 python

题目要求:https://leetcode-cn.com/problems/different-ways-to-add-parentheses/思路:分治法,递归def diffWaysToCompute(input): # 如果只有数字,直接返回 if input.isdigit(): return [int(input)] ...

2019-11-16 15:41:55 192

原创 图像分割的评测指标

coefficient

2019-11-15 19:35:24 733

原创 leetcode 42 python

题目要求:https://leetcode-cn.com/problems/trapping-rain-water/看到的一个大佬思路,实在是太有意思了!class Solution(object): def trap(self, height): """ :type height: List[int] :rtype: int ...

2019-11-15 15:13:43 104

原创 leetcode 45 python

题目要求:https://leetcode-cn.com/problems/jump-game-ii/

2019-11-13 21:38:30 143

原创 leetcode 61 python

题目要求:https://leetcode-cn.com/problems/rotate-list/

2019-11-13 21:07:18 228

原创 leetcode 76 python

题目要求:https://leetcode-cn.com/problems/minimum-window-substring/思路:滑动窗口

2019-11-13 20:08:07 106

原创 leetcode 81 python

题目要求:https://leetcode-cn.com/problems/search-in-rotated-sorted-array-ii/

2019-11-13 19:52:58 148

原创 leetcode 85 python

题目要求:https://leetcode-cn.com/problems/maximal-rectangle/思路:https://blog.csdn.net/u014626513/article/details/81381948

2019-11-13 19:38:46 155

原创 leetcode 84 python

题目要求:https://leetcode-cn.com/problems/largest-rectangle-in-histogram/思路:https://blog.csdn.net/qq_17550379/article/details/85093224

2019-11-13 19:26:17 255

原创 leetcode 65 python

题目要求:https://leetcode-cn.com/problems/valid-number/

2019-11-13 17:23:05 107

原创 leetcode 92 python

题目要求:https://leetcode-cn.com/problems/reverse-linked-list-ii/

2019-11-13 17:14:29 114

原创 leetcode 95 python

题目要求:https://leetcode-cn.com/problems/unique-binary-search-trees-ii/comments/

2019-11-13 16:42:27 109

空空如也

空空如也

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

TA关注的人

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