基于C++的OpenCV常用函数
C++版本的好处:
1、在于可以尽量避免使用指针这种危险的东西;
2、不用费心去release资源了,因为在其destructor里面,系统会自动帮你搞定。
3、在某些情况下会比C版本运行速度快。
在文件中包含 using namespace cv;
1. imread(cvLoadImage):loads an image from a file;
2. imshow(cvShowImage):displays an image in the specifiedwidow;
3. waitKey(cvWaitKey):waits for a pressed key;
4. cvtColor(cvCvtColor):converts an image from one colorspace to another;
5. reduce(cvReduce):reduces a matrix to a vector;
6. minMaxLoc(cvMinMaxLoc):finds the global minimum andmaximum in a whole array or sub-array;
7. namedWindow(cvNamedWindow):creates a window;
8. destroyWindow(cvDestroyWindow):destroys a window;
9. destroyAllWindows(cvDestroyAllWindows):destroys all of the HighGUIwindows;
10. imwrite(cvSaveImage):saves an image to a specified file;
11. resize(cvResize):resizes an image;
12. pyrDown(cvPyrDown):blurs an image and downsamples it;
13. pyrUp(cvPyrUp):upsamples an image and then blursit;
14. threshold(cvThreshold):applies a fixed-level threshold toeach array element;
15. adaptiveThreshold(cvAdaptiveThreshold):applies an adaptive threshold toan array;
16. VideoCapthure::open(cvCaptureFromFile):open video file or a capturingdevice for video capturing;
17. VideoCapture::isOpened:returns true if video capturinghas been initialized already;
18. VideoCapture::release(cvReleaseCapture):closes video file or capturingdevice;
19. VideoCapture::grab(cvGrabFrame):grabs the next frame from videofile or capturing device;
20. VideoCaputre::retrieve(cvRetrieveFrame):decodes and returns the grabbedvideo frame;
21. VideoCapture::read(cvQueryFrame):grabs,decodes and returns the nextvideo frame;
22. VideoCapture::get(cvGetCaptureProperty):returns the specified VideoCaptureproperty;
23. VideoCapture::set(cvSetCaptureProperty):sets a property in theVideoCapture;
24. VideoWriter::open:initializes or reinitializes videowriter;
25. VideoWriter::isOpened:returns true if video writer hasbeen successfully initialized;
26. VideoWriter::write:writes the next video frame;
27. Mat::row:creates a matrix header for thespecified matrix row;
28. Mat::col:creates a matrix header for thespecified matrix column;
29. Mat::rowRange:creates a matrix header for thespecified row span;
30. Mat::colRange:creates a matrix header for thespecified col span;
31. Mat::diag:extracts a diagonal from a matrix,or creates a diagonal matrix;
32. Mat::clone:creates a full copy of the arrayand the underlying data;
33. Mat::copyTo(cvCopy):copies the matrix to another one;
34. Mat::convertTo(cvConvertScale):converts an array to anotherdatatype with optional scaling;
35. Mat::assignTo:provides a functional form ofconvertTo;
36. Mat::setTo:sets all or some of the arrayelements to the specified value;
37. Mat::reshape:changes the shape and/or thenumber of channels of a 2D matrix without copying the data;
38. Mat::t:transposes a matrix;
39. Mat::inv:inverses a matrix;
40. Mat::mul:performs an element-wisemultiplication or division of the two matrices;
41. Mat::cross:computes a cross-product of two3-element vectors;
42. Mat::dot:computes a dot-product of twovectors;
43. Mat::zeros:returns a zero array of thespecified size and type;
44. Mat::ones:returns an array of all 1’s of thespecified size and type;
45. Mat::eye:returns an identity matrix of thespecified size and type;
46. Mat::create:allocates new array data if needed;
47. Mat::addref:increments the reference counter;
48. Mat::release:decrements the reference counterand deallocates the matrix if needed;
49. Mat::resize:changes the number of matrix rows;
50. Mat::reserve:reserves space for the certainnumber of rows;
51. Mat::push_back:adds elements to the bottom of thematrix;
52. Mat::pop_back:removes elements from the bottomof the matrix;
53. Mat::locateROI:locates the matrix header within aparent matrix;
54. Mat::adjustROI:adjusts a submatrix size andposition within the parent matrix;
55. Mat::operator:extracts a rectangular submatrix;
56. Mat::operatorCvMat:creates the CvMat header for thematrix;
57. Mat::operatorIplImage:creates the IplImage header forthe matrix;
58. Mat::total:returns the total number fo arrayelements;
59. Mat::isContinuous:reports whether the matrix iscontinuous or not;
60. Mat::elemSize:returns the matrix element size inbytes;
61. Mat::elemSize1:returns the size of each matrixelement channel in bytes;
62. Mat::type:returns the type of a matrixelement;
63. Mat::depth:returns the depth of a matrixelement;
64. Mat::channels:returns the number of matrix channels;
65. Mat::step1:returns a normalized step;
66. Mat::size:returns a matrix size;
67. Mat::empty:returns true if the array has noelemens;
68. Mat::ptr:returns a pointer to the specifiedmatrix row;
69. Mat::at:returns a reference to thespecified array element;
70. Mat::begin:returns the matrix iterator andsets it to the first matrix element;
71. Mat::end:returns the matrix iterator andsets it to the after-last matrix element;
72. calcHist(cvCalcHist):calculates a histogram of a set ofarrays;
73. compareHist(cvCompareHist):compares two histograms;
74. equalizeHist(cvEqualizeHist):equalizes the histogram of agrayscale image(直方图均衡化);
75. normalize:normalizes the norm or value rangeof an array;
76. CascadeClassifier::CascadeClassifier:loads a classifier from a file;
77. CascadeClassifier::empth:checks whether the classifier hasbeen loaded;
78. CascadeClassifier::load(cvLoadHaarClassifierCascade):loads a classifier from a file;
79. CascadeClassifier::read:reads a classifier from aFileStorage node;
80. CascadeClassifier::delectMultiScale(cvHaarDetectObjects):detects objects of different sizesin the input image(检测图像中的目标);
81. CascadeClassifier::setImage(cvSetImagesForHaarClassifierCascade):sets an image for detection(隐藏的cascade(hidden cascade)指定图像);
82. CascadeClassifier::runAt(cvRunHaarClassifierCascade):runs the detector at the specifiedpoint(在给定位置的图像中运行cascade of boosted classifier);
83. groupRectangles:groups the object candidaterectangles;
84. split(cvSplit):divides a multi-channel array intoseveral single-channel arrays;
85. merge(cvMerge):creates one multichannel array outof several single-channel ones;
86. mixChannels(cvMixChannels):copies specified channels frominput arrays to the specified channels of output arrays;
87. setMouseCallback(cvSetMouseCallback):sets mouse handler for thespecified window;
88. bilateralFilter:applies the bilateral filter to animage(双边滤波);
89. blur(cvSmooth):blurs an image using thenormalized box filter(均值模糊);
90. medianBlur:blurs an image using the medianfilter(中值模糊);
91. boxFilter:blurs an image using the boxfilter;
92. GaussianBlur:blurs an image using a Gaussianfilter(高斯模糊);
93. getGaussianKernel:returns Gaussian filtercoefficients;
94. sepFilter2D:applies a separable linear filterto an image;
95. filter2D(cvFilter2D):convolves an image with the kernel;
96. norm(cvNorm):calculates an absolute array norm,an absolute difference norm, or a relative defference norm;
97. flip(cvFlip):filps a 2D array around vertical,horizontal, or both axes;
98. Algorithm::get:returns the algorithm parameter;
99. Algorithm::set:set the algorithm parameter;
100. Algorithm::write:stores algorithm parameters in afile storage;
101. Algorithm::read:reads algorithm parameters from afile storage;
102. Algorithm::getList:returns the list of registeredalgorithms;
103. Algorithm::create:creates algorithm instance by name;
104. FaceRecognizer::train:trains a FaceRecognizer with givendata and associated labels;
105. FaceRecognizer::update:updates a FaceRecognizer withgiven data and associated labels;
106. FaceRecognizer::predict:predicts a label and associatedconfidence(e.g. distance) for a given input image;
107. FaceRecognizer::save:saves a FaceRecognizer and itsmodel state;
108. FaceRecognizer::load:loads a FaceRecognizer and itsmodel state;
109. createEigenFaceRecognizer:;
110. createFisherFaceRecognizer:;
111. createBPHFaceRecognizer:;
112. getTextSize(cvGetTextSize):calculates the width and height ofa textstring;
113. putText(cvPutText):draws a text string;
114. getStructuringElement(cvCreateStructingElementEx):returns a structuring element ofthe specified size and shape for morphological operations;
115. morphologyEx(cvMorphologyEx):performs advanced morphologicaltransformations;
116. findContours(cvFindContours):finds contours in a binary image;
117. drawContours(cvDrawContours):draw contours outlines or filledcontours;
119. floodFill(cvFloodFill):fills a connected component withthe given color;
120. getRectSubPix(cvGetRectSubPix):retrieves a pixel rectangle froman image with sub-pixel accuracy;
121. CvSVM::CvSVM:default and training constructors;
122. CvSVM::train:trains an SVM;
123. CvSVM::train_auto:trains an SVM with optimalparameters;
124. CvSVM::predict:predicts the response for inputsample(s);
125. CvSVM::get_default_grid:generates a grid for SVMparameters;
126. CvSVM::get_params:returns the current SVM parameters;
127. CvSVM::get_support_vector:retrieves a number of supportvectors and the particular vector;
128. CvSVM::get_var_count:returns thenumber of used features(variables count);
129. CvANN_MLP(multi-layerperceptrons)::CvANN_MLP:the constructors;
130. CvANN_MLP::create:constructs MLP with the specifiedtopology;
131. CvANN_MLP::train:trains/updates MLP;
132. CvANN_MLP::predict:predicts responses for inputsamples;
133. CvANN_MLP::get_layer_count:returns the number fo layers inthe MLP;
134. CvANN_MLP::get_layer_size:returns numbers of neurons in eachlayer of the MLP;
135. CvANN_MLP::get_weights:returns neurons weights of theparticular layer;
136. CvKNearest::CvKNearest:default and training constructors;
137. CvKNearest::train:trains the model;
138. CvKNearest::find_nearest:finds the neighbors and predictsresponses for input vectors;
139. CvKNearest::get_max_k:returns the number of maximumneighbors that may be passed to the method CvKNearest::find_nearest();
140. CvKNearest::get_var_count:returns the number of usedfeatures(variables count);
141. CvKNearest::get_sample_count:returns the total number of trainsamples;
142. CvKNearest::is_regression:returns type of the problem(truefor regression and false for classification);
143. HoughLines(cvHoughLines):finds lines in a binary imageusing the standard Hough transform;
144. HoughLinesP:finds line segments in a binaryimage using the probabilistic Hough transform;
145. HoughCircles(cvHoughCircles):finds circles in a grayscale imageusing the Hough transform;
146. line(cvLine):draws a line segment connectingtwo points;
147. fitLine(cvFitLine):fits a line to a 2D or 3D pointset;
148. fitEllipse(cvFitEllipse2):fits an ellipse around a set of 2Dpoints;
149. ellipse(cvEllipse、cvEllipseBox):draws a simple or thick ellipticarc or fills an ellipse sector;
150. boundingRect(cvBoundingRect):calculatesthe up-right bounding rectangle of a point set;
151. rectangle(cvRectangle):draws a simple, thick, or filledup-right rectangle;
152. minEnclosingCircle(cvMinEnclosingCircle):finds acircle of the minimum area enclosing a 2D point set;
153. circle(cvCircle):draw a circle;
154. fillPoly:fills the area bounded by one ormore polygons;
155. approxPolyDP(cvApproxPoly):approximates a polygonal curve(s)with the specified precision;
156. pointPolygonTest(cvPointPolygonTest):performs a point-in-contour test(判断点在多边形中的位置);
157. convexHull(cvConvexHull2):finds the convex hull of a pointset;
158. transpose(cvTranspose):transposes a matrix;
159. invert(cvInvert):finds the inverse orpseudo-inverse of a matrix;
160. getStructuringElement(cvCreateStructuringElementEx):returns a structuring element ofthe specified size and shape for morphological operations;
161. absdiff(cvAbsDiff):calculates the per-elementabsolute difference between two arrays or between an array and a scalar;
162. subtract(cvSub):calculates the per-elementdifference between two arrays or array and a scalar;
163. multiply(cvMul):calculates the per-element scaledproduct fo two arrays;
164. divide(cvDiv):performs per-element division oftwo arrays or a scalar by an array;
165. bitwise_or(cvOr):calculates the per-elementbit-wise disjunction of two arrays or an array and a scalar;
166. bitwise_and(cvAnd):calculates the per-elementbit-wise conjunction of two arrays or an array and a scalar;
167. bitwise_not(cvNot):inverts every bit of an array;
168. bitwise_xor(cvXor):calculates the per-elementbit-wise “exclusive of” operation on two arrays or an array and a scalar;
169. erode(cvErode):erodes an image by using a specificstructuring element;
170. dilate(cvDilate):dilates an image by using aspecific structuring element;
171. min(cvMin):calculates per-element minimum oftwo arrays or an array and a scalar;
172. max(cvMax):calculates per-element maximum oftwo arrays or an array and a scalar;
173. add(cvAdd):calculates the per-element sum oftwo arrays or an array and a scalar;
174. addWeighted(cvAddWeighted):calculates the weighted sum of twoarrays;
175. scaleAdd(cvScaleAdd):calculats the sum of a scaledarray and another array;
176. saturate_cast():template function for accurateconversion from one primitive type to another;
177. sqrt(cvSqrt):calculates a square root of arrayelements;
178. pow(cvPow):raises every array element to apower;
179. abs:calculates an absolute value ofeach matrix element;
180. convertScaleAbs(cvConvertScaleAbs):scales, calculates absolutevalues, and converts the result to 8-bit;
181. cuberoot(cvCbrt):computes the cube root of anargument;
182. exp(cvExp):calculates the exponent of everyarray element;
183. log(cvLog):calculates the natural logarithmof every array element;
184. Canny(cvCanny):finds edges in an image using theCanny algorithm;
185. Sobel(cvSobel):calculates the first, second,third, or mixed image derivatives using an extended Sobel operator;
186. Scharr:Calculates the first x – or y –image derivative using Scharr operator(Scharr 滤波器);
187. Laplacian(cvLaplace):calculates the Laplacian of animage;
188. getDerivKernels:returns filter coefficients forcomputing spatial image derivatives;
189. contourArea(cvContourArea):calculates a contour area;
190. LUT(cvLUT):performs a look-up table transformof an array;
191. calcBackProject(cvCalcBackProject):calculates the back projection ofa histogram(反向投影);
192. arcLength(cvArcLength):calculates a contour perimeter ora curve length;
193. meanShift(cvMeanShift):finds an object on a backprojection image;
194. CamShift(cvCamShift):finds an object center, size, andorientation;
195. TermCriteria:template class definingtermination criteria for iterative algorithms;
196. createTrackbar(cvCreateTrackbar):creates a trackbar and attaches itto the specified window;
197. watershed(cvWatershed):performs a marker-based imagesegmentation using the watershed algorithm;
198. grabCut:runs the GrabCut algorithm;
199. compare(cvCmp):performs the per-elementcomparison of two arrays or an array and scalar value;
200. mean(cvAvg):calculates an average(mean) ofarray elements;
201. meanStdDev(cvAvgSdv):calculates a mean and standarddeviation of array elements;
202. cartToPolar(cvCartToPolar):calculates the magnitude and angleof 2D vectors;
203. moments(cvMoments):calculates all of the moments upto the third order of a polygon or rasterized shape;
204. matchShapes(cvMatchShapes):compares two shapes;
205. cornerHarris(cvCornerHarris):Harris edge detector;
206. goodFeaturesToTrack(cvGoodFeaturesToTrack):determines strong corners on an image;
207. classFeatureDetector:abstract base class for 2D imagefeature detectors;
208. classFastFeatureDetector:wrapping class for featuredetection using the FAST() method;
209. classSURF(SurfFeatureDetector、SurfDescriptorExtractor):extracting Speeded Up Robust Featuresfrom an image;
210. classSIFT(SiftFeatureDetector):extracting keypoints and computingdescriptors using the Scale Invariant Feature Transform(SIFT) algorithm;
211. SURF::operator(cvExtractSURF):detects keypoints and computesSURF descriptors for them;
212. drawKeypoints:draw keypoints;
213. drawMatches:draws the found matches ofkeypoints from two images;
214. classDescriptorMatcher:abstract base class for matchingkeypoint descriptors. It has two groups of match methods,for matchingdescriptors of an image with another image or with an image set;
215. findChessboardCorners(cvFindChessboardCorners):finds the positions of internalcorners of the chessboard;
216. drawChessboardCorners(cvDrawChessboardCorners):renders the detected chessboardcorners;
217. calibrateCamera(cvCalibrateCamera2):finds the camera intrinsic andextrinsic parameters from several view of a calibration pattern;
218. initUndistortRectifyMap(cvInitUndistortMap、cvInitUndistortRectifyMap):computes the undistortion andrectification transformation map;
219. remap(cvRemap):applies a generic geometricaltransformation to an image;
220. calibrationMatrixValues:computes useful cameracharacteristics from the camera matrix;
221. findFundamentalMat(cvFindFundamentalMat):calculates a fundamental matrixfrom the corresponding points in two images;
222. computeCorrespondEpilines(cvComputeCorrespondEpilines):for points in an image of a stereopair, computes the corresponding epilines in the other image;
223. findHomography(cvFindHomography):finds a perspective transformationbetween two planes;
224. warpPerspective(cvWarpPerspective):applies a perspectivetransformation to an image;
225. getPerspectiveTransform(cvGetPerspectiveTransform):calculates a perspective transformfrom four pairs of the corresponding points;
226. cornerSubPix(cvFindCornerSubPix):refines the corner locations;
227. calcOpticalFlowPyrLK(cvCalcOpticalFlowPyrLK):calculates an optical flow for asparse feature set using the iterative Lucas-Kanade method with pyramids;
228. swap:swaps two matrices;
229. accumulateWeighted(cvRunningAvg):updates a running average;
230. classBackgroundSubtractorMOG:gaussian mixture-basedbackground/foreground segmentation algorithm;
231. randu:generates a singleuniformly-distributed(均匀分布) random number or an array ofrandom numbers;
232. randn:fills the array with normallydistributed(正态分布) random numbers;
233. getTickCount:returns the number of ticks;
234. getTickFrequency:returns the number of ticks persecond(使用getTickCount和getTickFrequency两个函数可以计算执行某个算法所用时间);
235. CV_Assert:checks a condition at runtime andthrows exception if it fails;
236. saturate_cast:template function for accurateconversion from one primitive type to another;
237. classRNG:random number generator;
238. RNG::next:returns the next random number;
239. RNG::operatorT:returns the next random number ofthe specified type;
240. RNG::operator():returns the next random number;
241. RNG::uniform:returns the next random numbersampled from the uniform distribution;
242. RNG::gaussian:returns the next random numbersampled from the Gaussian distribution;
243. RNG::fill:fills arrays with random numbers;
244. getOptimalDFTSize(cvGetOptimalDFTSize):returns the optimal DFT size for agiven vector size;
245. copyMakeBorder(cvCopyMakeBorder):forms a border around an image;
246. dft(cvDFT):performs a forward or inverseDiscrete Fourier transform of a 1D or 2D floating-point array;
247. magnitude:calculates the magnitude(幅度) of 2D vectors;
248. classFileStorage:XML/YAML file storage class thanencapsulates all the information necessary for writing or reading data to/froma file;
249. FileStorage::open:open a file;
250. FileStorage::isOpened:checks whether the file is opened;
251. FileStorage::release:closes the file and releases allthe memory buffers;
252. FileStorage::releaseAndGetString:closes the file and releases allthe memory buffers;
253. FileStorage::getFirstTopLevelNode:returns the first element of thetop-level mapping;
254. FileStorage::root:returns the top-level mapping;
255. FileStorage::operator[]:returns the specified element ofthe top-level mapping;
256. FileStorage::operator*:returns the obsolete C FileStorage structure;
257. FileStorage::writeRaw:writes multiple numbers;
258. FileStorage::writeObj:writes the registered C structure(CvMat、CvMatND、CvSeq);
259. FileStorage::getDefaultObjectName:returns the normalized object name for thespecified name of a file;
260. getAffineTransform(cvGetAffineTransform):calculates an affine transformfrom three pairs of the corresponding points;
261. getRotationMatrix2D(cv2DRotationmatrix):calculates an affine matrix of 2Drotation;
262. warpAffine(cvWarpAffine):applies an affine transformationto an image;
263. matchTemplate(cvMatchTemplate):compares a template against overlapped imageregions;相关文章:

基于GAN的图像水印去除器,效果堪比PS高手
作者 | 李翔转载自视说AI(ID:techtalkai)简介:李翔,国内某互联网大厂AI民工,前携程酒店图像技术负责人,计算机视觉和深度学习重度爱好者,在ICCV和CVPR等会议上发表论文十余篇。写在前面当前互联…

Flink最锋利的武器:Flink SQL入门和实战 | 附完整实现代码
作者 | 机智的王知无转载自大数据技术与架构(ID: import_bigdata)一、Flink SQL 背景Flink SQL 是 Flink 实时计算为简化计算模型,降低用户使用实时计算门槛而设计的一套符合标准 SQL 语义的开发语言。自 2015 年开始,阿里巴巴开始…

SQL SERVER中ROLLUP的用法
cube操作符 要使用cube,首先要了解group by 其实cube和rollup区别不太大,只是在基于group by 子句创建和汇总分组的可能的组合上有一定差别, cube将返回的更多的可能组合。如果在 group by 子句中有n个列或者是有n个表达式的话, s…

Mybait缓存机制
MyBatis同大多数ORM框架一样,提供了一级缓存和二级缓存的支持。 一级缓存:其作用域为session范围内,当session执行flush或close方法后,一级缓存会被清空。 二级缓存:二级缓存和一级缓存机制相同,但是可以自…

vs2008常用操作汇总
1、OpenCV2.1环境配置: (1)、Tools-->Options-->Projects and Solutions-->VCDrectories: Show directories for选择include files,加入目录 D:/Program Files/OpenCV2.1/include/opencv ;Show directories for选择libra…

深度学习已至“瓶颈”?英特尔:数据处理是一剂良药
【导读】霍金弟子Alan Yuille在前不久发表言论称,至少在计算机视觉领域,深度学习的瓶颈已至。然而,人工智能与大数据的发展相辅相成,数据将会推动人工智能的发展,促进更多技术应用落地,将人工智能带入一个新…

WIN32 C++ 遍历文件夹
转自:http://blog.csdn.net/lizhigang770/archive/2010/11/30/6045242.aspx 一、先介绍一个结构 WIN32_FIND_DATA typedef struct _WIN32_FIND_DATA { DWORD dwFileAttributes; // 文件属性 FILETIME ftCreationTime; // 文件创建时间 FILETIME ft…

UIView淡入淡出动画
小小原创,转载请注明出处:http://iphone.xiaoxiaostudio.net 如果你觉得为某个UIView 加载一个全新的View在这个UIView上面时,想要隐藏时setHidden显得太突兀了,我们可以给它增加一些动画,iOS上默认提供了一些动画&…

sass的继承,混合宏,占位符的用法总结
SCSS中混合宏使用 mixin mt($var){ margin-top: $var; }.block { include mt(5px);span { display:block; include mt(5px); } }extend如何工作 .icon {transition: background-color ease .2s;margin: 0 .5em;}.error-icon {extend .icon;/*错误图标指定的样式... */}.info-i…

js中cookie的使用详细分析
2019独角兽企业重金招聘Python工程师标准>>> JavaScript中的另一个机制:cookie,则可以达到真正全局变量的要求。 cookie是浏览器 提供的一种机制,它将document 对象的cookie属性提供给JavaScript。可以由JavaScript对其进行控制&a…

从事JAVA 20年最终却败给了Python,哭了!
之前遇到一个老师,他从事Java行业20年了,在Python兴起的时候,他周围的其他同行们都在纷纷学习Python方面的知识,连他的学生也问他“老师,你为什么不学Python呢?”。当这位听到学生这个问题的时候࿰…

c++删除文件夹
转自:http://blog.csdn.net/sshhbb/archive/2010/12/07/6061029.aspx c语言本身是不能删除文件或文件夹的,他们是windows操作系统里的东西,所以得借助其api函数。 其一:使用shell 接口: void FileDelete(CString di…

解决bootstrap下的图片自适应问题
.img-responsive {display: block; height: auto; max-width: 100%; }转载于:https://www.cnblogs.com/qjuly/p/9809910.html

边缘检测、Hough变换、轮廓提取、种子填充、轮廓跟踪
转自:http://blog.sina.com.cn/s/blog_6c083cdd0100nm4s.html 7.1 边沿检测 我们给出一个模板 和一幅图象 。不难发现原图中左边暗,右边亮,中间存在着一条明显的边界。进行模板操作后的结果如下: 。 可以看出,第3…

JS Array 中 shift 和 pop 的妙用
在 JS Array 中支持两个方法,shift() 和 pop(),分别是指从一个数据中的最前面和最后面删除一个值,并返删除值。看一个示例就明白了: var arr [s,o,f,i,s,h]; arr.shift(); // 返回 s arr; // 目前是 [o,f,i,s,h…

当今主流分割网络有哪些?12篇文章一次带你看完
作者 | 孙叔桥来源 | 转载自有三AI(ID: yanyousan_ai)本文的12篇文章总结了当前主流的分割网络及其结构,涵盖从编解码结构到解码器设计;从感受野到多尺度融合;从CNN到RNN与CRF;从2D分割到3D分割;…

正确生成浮点型的方法,解决sqlachemy Float浮点型的坑,生成float类型时,长度和精度均为0,导致查询不到结果!...
问题描述 在使用flask_sqlachemy时,给price字段选择了Float类型,数据库用的mysql,生成数据库表后,发现 from sqlalchemy import Float,Column price Column(Float,default0.00) 虽然能存储float类型,结果如下 但是查询…

图像轮廓的提取和绘制
转自:http://blog.csdn.net/gnuhpc/archive/2009/06/18/4278105.aspx <>var ultimaFecha ; <>document.write(ultimaFecha); #include "highgui.h" #include "cv.h" #include <iostream> #include <iomanip> using …

上海交大张拳石:神经网络的可解释性,从经验主义到数学建模
作者 | 张拳石来源 | 转载自知乎Qs.Zhang张拳石本来想把题目取为“从炼丹到化学”,但是这样的题目太言过其实,远不是近期可以做到的,学术研究需要严谨。但是,寻找适当的数学工具去建模深度神经网络表达能力和训练能力,…
计算机网络模型到底是七层?五层?四层?
1.Introduction 本篇文章的初衷是在做Android网络开发时经常接触各种协议,比如HTTP、XMPP、HLS、RTSP、TCP等协议,对网络的模型和层次有个直观的了解可以做到心中有数。OSI参考模型是七层,TCP/IP模型是四层,计算机网络(…

【推荐】使用Ultrapico Expresso学习正则表达式
推荐理由Ultrapico Expresso是我工作中经常使用的一个非常强大的正则表达式构建、测试以及代码生成工具。它能够对你构建的正则表达式进行解析、验证,并输出解析结果,提供性能测试工具,支持C#、VB等代码生成,最重要的是࿰…

OpenCV中常用到的轮廓处理函数汇总
转自:http://fsa.ia.ac.cn/opencv-doc-cn/opencv-doc-cn-0.9.7/ref/opencvref_cv.cn.htm ApproxChains 用多边形曲线逼近 Freeman 链 CvSeq* cvApproxChains( CvSeq* src_seq, CvMemStorage* storage,int methodCV_CHAIN_APPROX_SIMPLE,double parameter0, int mi…

《Linux内核原理与分析》第二周作业
反汇编一个简单的C程序 1、实验要求 使用: gcc –S –o test.s test.c -m32 命令编译成汇编代码,对汇编代码进行分析总结。其中test.c的具体内容如下: int g(int x) {return x 3; }int f(int x) {return g(x); }int main(void) {return f(8)…

首次!腾讯全面公开整体开源路线图
6月25日,由Cloud Native Computing Foundation (CNCF) 主办的云原生技术大会在上海举办,腾讯开源联盟主席、腾讯开源管理办公室委员、Apache Member堵俊平首次公开了腾讯整体的开源战略路线图。 堵俊平表示:“腾讯开源提倡‘开放、共享、合力…

201771010111李瑞红《面向对象的程序设计》第八周实验总结
实验八接口的定义与使用 实验时间 2018-10 理论部分 6.1 接口:用interface声明,是抽象方法和常量值定义的集 合。从本质上讲,接口是一种特殊的抽象类。 在Java程序设计语言中,接口不是类,而是对类 的一组需求描述,由常…

崛起的Python,真的影响了76万人?
随着AI的兴起,Python彻底火了。据Stack Overflow调研报告:Python的月活用户已超越了Java、成为第一,全民Python已为“大势所趋”。那么,程序员有必要学Python吗?如何高效掌握Python?程序员为啥要学Python&a…

OpenCV查找轮廓
转自:http://westice.javaeye.com/blog/721225 主要函数是 cvFindContours(tour_buf,storage,&contour,sizeof(CvContour), CV_RETR_EXTERNAL, CV_CHAIN_APPROX_SIMPLE); tour_buf 是需要查找轮廓…

非阻塞socket的连接
引用自:http://blog.csdn.net/cccallen/article/details/6619994 连接套接字,阻塞的套接字超时时间很长无法接受,而是用非阻塞套接字时使用的方案也有多种。后者是个比较好的方法 方案1:不断重试,直到连接上或者超时&a…

OpenCV下车牌定位算法实现代码
转自:http://blog.csdn.net/heihei723/archive/2006/05/14/728046.aspx#FeedBack 车牌定位算法在车牌识别技术中占有很重要地位,一个车牌识别系统的识别率往往取决于车牌定位的成功率及准确度。 车牌定位有很多种算法,从最简单的来࿰…

2018-2019-1 20165310 20165315 20165226 实验一 开发环境的熟悉
2018-2019-1 20165226 20165310 20165315 实验一 开发环境的熟悉 目录 一、实验目的 二、实验步骤 三、实验过程中遇到的问题及解决 四、实验感想 一、实验目的 熟悉Linux开发环境并学会Linux开发环境的配置和使用,熟悉arm箱的使用,熟悉以下知识点&#…