函数名 函数
Chapter one:图片
保存图像 cv2.imwrite(filename,img[, params]) → retval
Chapter two: 视频
关闭视频文件 .release()→ None
Chapter three: 绘图
画外部和内部的轮廓 cv2.drawContours(image,contours,contourIdx,color[,thickness[,lineType[,hierarchy[,maxLevel[,offset]]]]]) → None
Chapter four: 处理鼠标事件
处理鼠标事件 cv2.SetMouseCallback(winname,onMouse,param=None) → None
Chapter five: 滑动条
设置滑动条属性 cv2.setTrackbarPos(trackname,winname,pos) → None
Chapter six:图像操作
cv2.bitwise_xor(src1,src2[,dst[,mask]]) → dst
Chapter seven: 颜色空间转换
检查数组元素是否在两个数量之间 cv2.inRange(src,lowerb,upperb[,dst]) → dst
Chapter eight: 几何变换
http://www.cnblogs.com/dupuleng/articles/4055020.html
cv2.warpPerspective(src,M,dsize[,dst[,flags[,borderMod[,borderValue]]]]) → dst
Chapter nine:图像阈值
自适应阈值 cv2.adaptiveThreshold(src,maxvalue,adaptiveMethod,thresholdType,blockSize,[,dst]) → dst
Chapter ten: 图像平滑
双边滤波 cv2.bilateralFilter(src,d,sigmaColor,sigmaSpace[,dst[,borderType]]) → dst
Chapter eleven: 形态学转换
结构化元素 cv2.getStructuringElement(shape,ksize[,anchor])→retval
Chapter twelve: 图像梯度
Laplacian算子 cv2.Laplacian(src,ddepth[,dst[,ksize[,scale[,delta[,borderType]]]]])→dst
Chapter thirteen: canny边缘检测
cv2.Canny(image,threshold1,threshold2[,edges[,apertureSize[,L2gradient]]]) → edges
Chapter fourteen: 轮廓
平均颜色/灰度 cv2.mean(src[,mask]) → retval
Chapter fifteen: 直方图
归一化 cv2.normalize(src[,dst[,alpha[,beta[,norm_type[.dtype[,mask]]]]]])→dst
Chapter sixteen: 图像变换
cv2.getOptimalDFTSize(vecsize) → retvach
Chapter seventeen: 霍夫变换
霍夫圆环变换 cv2.HoughCircles(image,method,dp,minDist[,circles[,param1[,param2[,minRadius[,maxRadius]]]]]) → lines
Chapter eighteen: 分水岭算法图像分割
连通分支 cv2.connectedComponents(image[,labels[,connectivity[,ltype]]]) → retval,labels
Chapter nineteen: grabcut算法交互式前景提取
cv2.grabcut(image,mask,rect,bgdModel,fgdModel,iterCount[,mode]) → None
Chapter twenty: 角点检测
绘制要点 cv2.drawKeypoints(image,keypoints,outImage[,color[,flags]])→outImg
Chapter twenty-one: 特征匹配
对象透视图变换 cv2.findHomography(srcPoints,dstPoints[,method[,ransacReprojThreshold[,mask]]]) → retval,mask
Chapter twenty-two: 在视频中找到并跟踪目标对象
camshift cv2.camShift(proImage,window,criteria) → retval,window
Chapter twenty-three: 光流
GF稠密光流 cv2.calcOpticalFlowFarneback(prevImg,nextImg,pyr_scale,levels,winsize,iterations,poly_n,poly_sigma,flags[,flow]) → flow
Chapter twenty-four: 背景减除
BackgroundSubtractorGMG
createBackgroundSubtractorMOG2([, history[, varThreshold[, detectShadows]]]) → retval
Chapter twenty-five: 摄像机设定和3D重构
畸变校正 cv2.getOptimalNewCameraMatrix(cameraMatrix,distCoeffs,imageSize,alpha[,newImgSize[,centerPrincipalPoint]])
→ rvec,tvec,inliers
Chapter twenty-six: 机器学习
K值聚类 cv2.kmeans(data,K,criteria,attempts,flags[,bestLabels[,centers]]) → retval,bestLabels,centers
Chapter twenty-seven: 计算摄影学
图像修补 cv2.inpaint(src,inpaintMask,inpaintRange,flags[,dst]) →dst
Chapter twenty-eight: 使用Haar 分类器进行面部检测
.detectMultiScale(image,rejectLevels,levelWeights[,scaleFactor[,minNeighbors[,flags[,minSize[,maxSize[,outputRejectLevels]]]]]]) → objects
这里面还有是很多缺陷,有一些函数在网站里是找不到的,有一些是这有C语言的,而不是python的。