- 博客(4)
- 收藏
- 关注
原创 Leetcode 132Pattern 题意很简单,过程很巧妙
Given a sequence of n integers a1, a2, …, an, a 132 pattern is a subsequence ai, aj, ak such that i < j < k and ai < ak < aj. Design an algorithm that takes a list of n numbers as input an...
2019-03-12 11:33:04
346
原创 Two_Pass实现连通域分析
Two-Pass就是通过扫描两遍图像,就可以将图像中存在的所有连通区域找出并标记。 基本思路:首先将图像二值化,将不是background的像素点都标记为同一个初始label,background的像素点都标记为0,然后第一遍扫描过程中同一个连通区域内的像素中可能会被赋予一个或多个不同label,这些同一连通域的不同label是相连的,在此过程中记录下它们的连通性;第二遍扫描就是根据第一遍...
2019-03-11 23:36:37
2641
原创 LeetCode: Counting Bits 利用位运算解题
Given 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.Example 1:Input: 2Output...
2019-03-06 21:06:57
228
1
原创 Python实现图像插值——使用OpenCV中remap解决griddata速度慢的问题
两种图像插值实现方法当我们想对一张图片进行任意形状变化时,我们可以通过对图像的像素点重新插值来实现,在python中,scipy.interpolate的griddata和OpenCV的remap都可以实现图像插值功能def griddata(points, values, xi, method='linear', fill_value=np.nan)points是原图像的坐标点,valu...
2019-03-05 17:10:47
3885
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人