opencv_cheatsheet.pdf

opencv_cheatsheet.pdf

ID:48015167

大小:209.86 KB

页数:2页

时间:2019-07-14

opencv_cheatsheet.pdf_第1页
opencv_cheatsheet.pdf_第2页
资源描述:

《opencv_cheatsheet.pdf》由会员上传分享,免费在线阅读,更多相关内容在学术论文-天天文库

1、OpenCV2.4CheatSheet(C++)MatdyImage(image.size(),image.type());add(),subtract(),multiply(),divide(),absdiff(),for(inty=1;y(y-1);mi

2、n(),compare()http://docs.opencv.org.UseQuickSearchtondVec3b*nextRow=image.ptr(y+1);correspondingly,addition,subtraction,element-wisedescriptionsoftheparticularfunctionsandclassesfor(intx=0;x

3、r(intc=0;c<3;c++)matrixandascalar.KeyOpenCVClassesdyImage.at(y,x)[c]=Example.Alphacompositingfunction:Point_Template2Dpointclasssaturate_cast(voidalphaCompose(constMat&rgba1,Point3_Template3DpointclassnextRow[x][c]-prevRow[x][c]);constMat&rgba2,M

4、at&rgba_dest)Size_Templatesize(width,height)class}{VecTemplateshortvectorclassMat_::iteratorit=image.begin(),Mata1(rgba1.size(),rgba1.type()),ra1;MatxTemplatesmallmatrixclassitEnd=image.end();Mata2(rgba2.size(),rgba2.type());Scalar4-elemen

5、tvectorfor(;it!=itEnd;++it)intmixch[]={3,0,3,1,3,2,3,3};RectRectangle(*it)[1]^=255;mixChannels(&rgba1,1,&a1,1,mixch,4);RangeIntegervaluerangemixChannels(&rgba2,1,&a2,1,mixch,4);Mat2Dormulti-dimensionaldensearraysubtract(Scalar::all(255),a1,ra1);(canbeusedtosto

6、rematrices,images,MatrixManipulations:Copying,bitwise_or(a1,Scalar(0,0,0,255),a1);histograms,featuredescriptors,voxelbitwise_or(a2,Scalar(0,0,0,255),a2);volumesetc.)Shuing,PartAccessmultiply(a2,ra1,a2,1./255);SparseMatMulti-dimensionalsparsearraysrc.copyTo(ds

7、t)Copymatrixtoanotheronemultiply(a1,rgba1,a1,1./255);PtrTemplatesmartpointerclasssrc.convertTo(dst,type,scale,shift)Scaleandconverttomultiply(a2,rgba2,a2,1./255);MatrixBasicsanotherdatatypeadd(a1,a2,rgba_dest);m.clone()Makedeepcopyofamatrix}Createamatrixm.resh

8、ape(nch,nrows)Changematrixdimensionsand/ornum-Matimage(240,320,CV_8UC3);sum(),mean(),meanStdDev(),norm(),countNonZero(),berofchannelswithoutcopyingdata[Re]allocateapre-declaredmat

当前文档最多预览五页,下载文档查看全文

此文档下载收益归作者所有

当前文档最多预览五页,下载文档查看全文
温馨提示:
1. 部分包含数学公式或PPT动画的文件,查看预览时可能会显示错乱或异常,文件下载后无此问题,请放心下载。
2. 本文档由用户上传,版权归属用户,天天文库负责整理代发布。如果您对本文档版权有争议请及时联系客服。
3. 下载前请仔细阅读文档内容,确认文档内容符合您的需求后进行下载,若出现内容与标题不符可向本站投诉处理。
4. 下载文档时可能由于网络波动等原因无法下载或下载错误,付费完成后未能成功下载的用户请联系客服处理。
相关文章
更多
相关标签