自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

zhangpan的博客

zhangpan的博客

  • 博客(12)
  • 资源 (1)
  • 收藏
  • 关注

转载 python 中NumPy和Pandas工具包中的函数使用笔记(方便自己查找)

转自:https://www.cnblogs.com/xk-bench/p/7825079.html常用库1.NumPy  NumPy是高性能科学计算和数据分析的基础包。部分功能如下:ndarray, 具有矢量算术运算和复杂广播能力的快速且节省空间的多维数组。 用于读写磁盘数据的工具以及用于操作内存映射文件的工具。 线性代数、随机数生成以及傅里叶变换功能。 用于集成C、C++...

2019-01-28 14:06:59 529 1

转载 图像分割 传统方法 整理

转自:https://zhuanlan.zhihu.com/p/30732385图片分割根据灰度、颜色、纹理、和形状等特征将图像进行划分区域,让区域间显差异性,区域内呈相似性。主要分割方法有:基于阈值的分割 基于边缘的分割 基于区域的分割 基于图论的分割 基于能量泛函的分割基于阈值的分割方法参考: 基于阈值的图像分割方法阈值法的基本思想是基于图像的灰度特征来计算一个或多个灰...

2019-01-24 13:57:05 6005

原创 Python3 AttributeError: 'cv2.ml_KNearest' object has no attribute 'find_nearest'

问题:在用python3使用knn.find_nearest(newcomer, 3)的时候,可能会产生错误:AttributeError: 'cv2.ml_KNearest' object has no attribute 'find_nearest'ret, results, neighbours, dist = knn.find_nearest(newcomer, 3)print("...

2019-01-10 10:43:40 1555

原创 Python3 TypeError: only size-1 arrays can be converted to Python scalars

问题:在用python3使用knn.train(trainData, responses)的时候,可能会产生错误:TypeError: only size-1 arrays can be converted to Python scalarsnewcomer = np.random.randint(0, 100, (1, 2)).astype(np.float32)plt.scatter(...

2019-01-10 10:40:07 10772 2

原创 Python3 AttributeError: module 'cv2' has no attribute 'KNearest'

问题:在用python3使用knn = cv2.KNearest()的时候,可能会产生错误:AttributeError: module 'cv2' has no attribute 'KNearest'newcomer = np.random.randint(0, 100, (1, 2)).astype(np.float32)plt.scatter(newcomer[:, 0], new...

2019-01-10 10:32:39 2601

原创 Python3 AttributeError: module 'cv2' has no attribute 'createBackgroundSubtractorMOG'

问题:在用python3使用cv2.createBackgroundSubtractorMOG()的时候,可能会产生错误:AttributeError: module 'cv2' has no attribute 'createBackgroundSubtractorMOG'import numpy as npimport cv2cap = cv2.VideoCapture(0)fgb...

2019-01-09 16:11:30 4887 1

原创 Python3 TypeError: Required argument 'outImg' (pos 6) not found

问题:在用python3使用img3 = cv2.drawMatchesKnn(img1,kp1,img2,kp2,good,flags=2)的时候,可能会产生错误:TypeError: Required argument 'outImg' (pos 6) not foundimport numpy as npimport cv2from matplotlib import pyplot...

2019-01-09 10:42:20 2875

原创 python3 TypeError: Incorrect type of self (must be 'Feature2D' or its derivative)

问题:在用python3使用orb = cv2.ORB()进行ORB时候,可能会产生错误:TypeError: Incorrect type of self (must be 'Feature2D' or its derivative)import numpy as npimport cv2from matplotlib import pyplot as pltimg1 = cv2.i...

2019-01-09 10:03:08 4197 1

原创 Python3 AttributeError: module 'cv2' has no attribute 'SIFT'

问题:在用python3使用sift = cv2.SIFT()进行SIFT时候,可能会产生错误:AttributeError: module 'cv2' has no attribute 'SIFT'import numpy as npimport cv2from matplotlib import pyplot as pltimg1 = cv2.imread('data/queryI...

2019-01-09 09:53:22 1811

原创 Python3 TypeError: slice indices must be integers or None or have an __index__ method

在使用Python3进行矩阵操作时,当内部含有除法时结果的是浮点型,与原数据类型不一致,会产生错误:TypeError: slice indices must be integers or None or have an __index__ methodcrow,ccol = rows/2 , cols/2mask = np.zeros((rows,cols,2),np.uint8)解...

2019-01-08 10:19:28 959

原创 python视频帧转BASE64编码

直接上代码: #coding: utf-8#python3import cv2import base64from PIL import Imagefrom io import BytesIOdef frame2base64(frame): img = Image.fromarray(frame) #将每一帧转为Image output_buffer = Byte...

2018-12-30 21:12:41 4363 2

原创 Linux删除自带mysql 5.1

一、 whereis mysqlrpm -qa | grep -i mysqlservice mysql stopfind / -name mysqlrm -rf /usr/lib64/mysqlrm -rf /usr/share/mysql/  rpm -qa | grep -i mysqlrpm -ev mysql-libs-5.1.73-5.el6_6.x...

2017-04-29 11:26:38 1684

CollabNetSubversionEdge-5.2.2_setup-x86_64.zip

windows CollabNetSubversionEdge-5.2.2_setup-x86_64.zip

2018-04-22

空空如也

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

TA关注的人

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