Python cv2 Module
This page shows the popular functions and classes defined in the
cv2 module.
The items are ordered by their popularity in 40,000 open source Python projects.
If you can not find a good example below, you can try
the search function
to search modules.
-
1. resize()Used in 1944 projects
-
2. imread()Used in 1920 projects
-
3. cvtColor()Used in 1548 projects
-
4. imwrite()Used in 1423 projects
-
5. imshow()Used in 1277 projects
-
6. waitKey()Used in 1265 projects
-
7. rectangle()Used in 927 projects
-
8. putText()Used in 848 projects
-
Used in 835 projects
-
Used in 684 projects
-
11. COLOR_BGR2GRAYUsed in 656 projects
-
12. COLOR_BGR2RGBUsed in 644 projects
-
13. INTER_LINEARUsed in 602 projects
-
Used in 569 projects
-
15. circle()Used in 489 projects
-
16. warpAffine()Used in 435 projects
-
17. INTER_CUBICUsed in 419 projects
-
18. line()Used in 409 projects
-
19. INTER_AREAUsed in 365 projects
-
20. IMREAD_COLORUsed in 354 projects
-
21. INTER_NEARESTUsed in 348 projects
-
22. namedWindow()Used in 342 projects
-
23. findContours()Used in 341 projects
-
24. LINE_AAUsed in 340 projects
-
25. GaussianBlur()Used in 329 projects
-
26. flip()Used in 317 projects
-
27. VideoWriter()Used in 295 projects
-
28. threshold()Used in 284 projects
-
29. COLOR_RGB2BGRUsed in 283 projects
-
Used in 278 projects
-
31. BORDER_CONSTANTUsed in 269 projects
-
Used in 256 projects
-
33. imdecode()Used in 253 projects
-
34. THRESH_BINARYUsed in 250 projects
-
35. COLOR_BGR2HSVUsed in 247 projects
-
Used in 229 projects
-
37. COLOR_RGB2GRAYUsed in 227 projects
-
38. IMREAD_GRAYSCALEUsed in 221 projects
-
39. dilate()Used in 215 projects
-
40. addWeighted()Used in 211 projects
-
41. drawContours()Used in 209 projects
-
Used in 208 projects
-
Used in 208 projects
-
44. copyMakeBorder()Used in 205 projects
-
45. contourArea()Used in 195 projects
-
46. boundingRect()Used in 179 projects
-
47. getTextSize()Used in 176 projects
-
Used in 163 projects
-
49. RETR_EXTERNALUsed in 162 projects
-
50. CAP_PROP_FPSUsed in 158 projects
-
51. COLOR_GRAY2BGRUsed in 154 projects
-
52. RETR_TREEUsed in 151 projects
-
53. applyColorMap()Used in 149 projects
-
54. imencode()Used in 148 projects
-
55. COLOR_HSV2BGRUsed in 146 projects
-
Used in 142 projects
-
57. erode()Used in 139 projects
-
58. WINDOW_NORMALUsed in 138 projects
-
59. morphologyEx()Used in 138 projects
-
60. Canny()Used in 138 projects
-
Used in 135 projects
-
Used in 132 projects
-
63. polylines()Used in 126 projects
-
64. COLORMAP_JETUsed in 126 projects
-
65. split()Used in 126 projects
-
66. bitwise_and()Used in 121 projects
-
Used in 116 projects
-
68. inRange()Used in 115 projects
-
Used in 115 projects
-
70. merge()Used in 109 projects
-
71. IMREAD_UNCHANGEDUsed in 106 projects
-
72. COLOR_GRAY2RGBUsed in 98 projects
-
73. medianBlur()Used in 98 projects
-
Used in 98 projects
-
75. blur()Used in 97 projects
-
76. fillPoly()Used in 97 projects
-
Used in 96 projects
-
78. MORPH_CLOSEUsed in 96 projects
-
79. BORDER_REPLICATEUsed in 94 projects
-
Used in 91 projects
-
81. INTER_LANCZOS4Used in 91 projects
-
82. normalize()Used in 91 projects
-
83. filter2D()Used in 87 projects
-
84. convexHull()Used in 85 projects
-
Used in 83 projects
-
86. MORPH_OPENUsed in 83 projects
-
87. THRESH_OTSUUsed in 83 projects
-
88. NORM_MINMAXUsed in 82 projects
-
Used in 81 projects
-
90. minAreaRect()Used in 80 projects
-
91. equalizeHist()Used in 79 projects
-
92. moments()Used in 79 projects
-
Used in 77 projects
-
94. destroyWindow()Used in 76 projects
-
95. FILLEDUsed in 76 projects
-
Used in 75 projects
-
97. minMaxLoc()Used in 74 projects
-
98. fillConvexPoly()Used in 74 projects
-
Used in 73 projects
-
100. EVENT_LBUTTONDOWNUsed in 70 projects
-
101. matchTemplate()Used in 70 projects
-
102. remap()Used in 70 projects
-
103. approxPolyDP()Used in 70 projects
-
104. bitwise_not()Used in 69 projects
-
105. boxPoints()Used in 68 projects
-
106. arcLength()Used in 67 projects
-
107. FONT_HERSHEY_DUPLEXUsed in 66 projects
-
108. resizeWindow()Used in 65 projects
-
109. calcHist()Used in 61 projects
-
110. COLOR_HSV2RGBUsed in 61 projects
-
111. CAP_PROP_POS_FRAMESUsed in 61 projects
-
112. Sobel()Used in 61 projects
-
113. bilateralFilter()Used in 61 projects
-
114. BORDER_REFLECT_101Used in 61 projects
-
115. add()Used in 60 projects
-
116. Rodrigues()Used in 60 projects
-
117. __version__()Used in 59 projects
-
118. EVENT_LBUTTONUPUsed in 56 projects
-
119. COLOR_RGB2HSVUsed in 56 projects
-
120. findHomography()Used in 55 projects
-
121. RETR_LISTUsed in 53 projects
-
122. setNumThreads()Used in 53 projects
-
123. TM_CCOEFF_NORMEDUsed in 52 projects
-
124. createCLAHE()Used in 52 projects
-
Used in 51 projects
-
126. moveWindow()Used in 50 projects
-
127. RETR_CCOMPUsed in 49 projects
-
128. CV_64FUsed in 49 projects
-
129. absdiff()Used in 49 projects
-
130. getTickFrequency()Used in 49 projects
-
131. ellipse()Used in 47 projects
-
132. TERM_CRITERIA_COUNTUsed in 46 projects
-
133. Laplacian()Used in 46 projects
-
134. LUTUsed in 46 projects
-
135. RANSACUsed in 45 projects
-
136. WINDOW_AUTOSIZEUsed in 45 projects
-
137. BFMatcher()Used in 45 projects
-
Used in 44 projects
-
139. convertScaleAbs()Used in 44 projects
-
140. WARP_INVERSE_MAPUsed in 41 projects
-
141. BORDER_REFLECTUsed in 41 projects
-
142. CV_32FUsed in 40 projects
-
143. getTickCount()Used in 40 projects
-
144. minEnclosingCircle()Used in 40 projects
-
145. projectPoints()Used in 39 projects
-
146. ORB_create()Used in 38 projects
-
147. EVENT_MOUSEMOVEUsed in 37 projects
-
Used in 36 projects
-
149. error()Used in 36 projects
-
150. createTrackbar()Used in 35 projects
-
151. subtract()Used in 35 projects
-
152. bitwise_or()Used in 35 projects
-
153. drawKeypoints()Used in 34 projects
-
Used in 34 projects
-
155. COLOR_BGR2LABUsed in 34 projects
-
156. solvePnP()Used in 34 projects
-
157. CASCADE_SCALE_IMAGEUsed in 33 projects
-
158. cornerSubPix()Used in 33 projects
-
Used in 33 projects
-
160. cartToPolar()Used in 32 projects
-
Used in 32 projects
-
Used in 31 projects
-
Used in 31 projects
-
164. calibrateCamera()Used in 31 projects
-
Used in 31 projects
-
Used in 31 projects
-
167. CAP_PROP_FOURCCUsed in 31 projects
-
168. undistort()Used in 30 projects
-
169. countNonZero()Used in 30 projects
-
170. FlannBasedMatcher()Used in 30 projects
-
171. KeyPoint()Used in 29 projects
-
Used in 29 projects
-
173. drawMatches()Used in 29 projects
-
174. distanceTransform()Used in 28 projects
-
175. transpose()Used in 28 projects
-
176. CV_AAUsed in 26 projects
-
177. BORDER_WRAPUsed in 26 projects
-
Used in 26 projects
-
179. DIST_L2Used in 25 projects
-
180. HoughLinesP()Used in 25 projects
-
181. mean()Used in 25 projects
-
182. HoughCircles()Used in 24 projects
-
183. BORDER_TRANSPARENTUsed in 23 projects
-
Used in 23 projects
-
185. CV_8UUsed in 23 projects
-
186. kmeans()Used in 22 projects
-
187. getWindowProperty()Used in 22 projects
-
Used in 21 projects
-
189. COLOR_LAB2BGRUsed in 21 projects
-
190. floodFill()Used in 21 projects
-
191. solvePnPRansac()Used in 21 projects
-
192. arrowedLine()Used in 21 projects
-
193. IMREAD_ANYDEPTHUsed in 21 projects
-
194. getTrackbarPos()Used in 20 projects
-
195. HOUGH_GRADIENTUsed in 20 projects
-
196. HOGDescriptor()Used in 20 projects
-
197. inpaint()Used in 20 projects
-
Used in 20 projects
-
199. pointPolygonTest()Used in 20 projects
-
200. calcBackProject()Used in 19 projects
-
201. THRESH_TOZEROUsed in 19 projects
-
202. CV_LOAD_IMAGE_COLORUsed in 19 projects
-
203. pyrDown()Used in 19 projects
-
204. FONT_HERSHEY_TRIPLEXUsed in 19 projects
-
205. startWindowThread()Used in 19 projects
-
206. WND_PROP_FULLSCREENUsed in 18 projects
-
Used in 18 projects
-
Used in 18 projects
-
209. cv()Used in 18 projects
-
210. CAP_PROP_POS_MSECUsed in 18 projects
-
211. norm()Used in 18 projects
-
212. COLOR_BGR2YUVUsed in 18 projects
-
213. NORM_L2Used in 17 projects
-
214. TM_SQDIFFUsed in 17 projects
-
215. COLOR_BGR2HLSUsed in 17 projects
-
216. EVENT_FLAG_LBUTTONUsed in 16 projects
-
217. SIFTUsed in 16 projects
-
218. EVENT_RBUTTONDOWNUsed in 16 projects
-
219. HoughLines()Used in 16 projects
-
Used in 16 projects
-
Used in 16 projects
-
222. getGaussianKernel()Used in 16 projects
-
223. setWindowProperty()Used in 16 projects
-
Used in 16 projects
-
225. TM_SQDIFF_NORMEDUsed in 15 projects
-
226. COLOR_RGB2LABUsed in 15 projects
-
227. cornerHarris()Used in 15 projects
-
228. fitEllipse()Used in 15 projects
-
229. ellipse2Poly()Used in 15 projects
-
230. transform()Used in 15 projects
-
231. EVENT_RBUTTONUPUsed in 14 projects
-
232. meanStdDev()Used in 14 projects
-
233. UMat()Used in 14 projects
-
234. compareHist()Used in 13 projects
-
235. CV_16SUsed in 13 projects
-
236. INPAINT_TELEAUsed in 13 projects
-
237. accumulateWeighted()Used in 13 projects
-
Used in 13 projects
-
239. COLOR_BGR2YCR_CBUsed in 13 projects
-
240. IMREAD_ANYCOLORUsed in 13 projects
-
Used in 13 projects
-
242. selectROI()Used in 13 projects
-
243. WINDOW_FULLSCREENUsed in 13 projects
-
244. COLOR_RGB2HLSUsed in 12 projects
-
245. findFundamentalMat()Used in 12 projects
-
246. pyrUp()Used in 12 projects
-
247. drawMatchesKnn()Used in 12 projects
-
248. SVDecomp()Used in 12 projects
-
249. randn()Used in 12 projects
-
Used in 12 projects
-
251. BORDER_DEFAULTUsed in 12 projects
-
252. isContourConvex()Used in 12 projects
-
253. multiply()Used in 12 projects
-
254. CV_16SC2Used in 12 projects
-
255. watershed()Used in 11 projects
-
256. TM_CCORR_NORMEDUsed in 11 projects
-
Used in 11 projects
-
Used in 11 projects
-
259. KalmanFilter()Used in 11 projects
-
260. StereoSGBM_create()Used in 11 projects
-
261. getRectSubPix()Used in 11 projects
-
262. rotate()Used in 11 projects
-
263. WINDOW_KEEPRATIOUsed in 11 projects
-
264. INPAINT_NSUsed in 11 projects
-
265. COLOR_YUV2BGRUsed in 11 projects
-
266. seamlessClone()Used in 11 projects
-
267. COLOR_BGR2BGRAUsed in 11 projects
-
Used in 10 projects
-
Used in 10 projects
-
270. FONT_ITALICUsed in 10 projects
-
Used in 10 projects
-
272. hconcat()Used in 10 projects
-
273. dft()Used in 10 projects
-
274. DFT_COMPLEX_OUTPUTUsed in 10 projects
-
275. WND_PROP_VISIBLEUsed in 10 projects
-
276. SOLVEPNP_ITERATIVEUsed in 10 projects
-
277. MORPH_ELLIPSEUsed in 10 projects
-
278. COLOR_BGRA2RGBAUsed in 10 projects
-
279. NORMAL_CLONEUsed in 10 projects
-
280. LINE_8Used in 10 projects
-
281. EVENT_LBUTTONDBLCLKUsed in 9 projects
-
282. SURFUsed in 9 projects
-
283. undistortPoints()Used in 9 projects
-
284. grabCut()Used in 9 projects
-
285. CV_32FC1Used in 9 projects
-
286. THRESH_TRUNCUsed in 9 projects
-
287. CamShift()Used in 9 projects
-
288. COLOR_RGBA2BGRAUsed in 9 projects
-
289. NORM_HAMMINGUsed in 9 projects
-
290. WARP_FILL_OUTLIERSUsed in 9 projects
-
291. COLOR_BGRA2BGRUsed in 9 projects
-
292. COLOR_LAB2RGBUsed in 9 projects
-
293. CAP_PROP_BUFFERSIZEUsed in 9 projects
-
294. Rect()Used in 9 projects
-
295. pow()Used in 9 projects
-
296. CHAIN_APPROX_TC89_L1Used in 9 projects
-
297. COLOR_BGR2Lab()Used in 9 projects
-
298. CV_8UC3Used in 8 projects
-
Used in 8 projects
-
300. ORBUsed in 8 projects
-
301. MORPH_GRADIENTUsed in 8 projects
-
Used in 8 projects
-
303. stereoCalibrate()Used in 8 projects
-
304. MORPH_TOPHATUsed in 8 projects
-
305. THRESH_TOZERO_INVUsed in 8 projects
-
Used in 8 projects
-
307. convexityDefects()Used in 8 projects
-
Used in 8 projects
-
Used in 8 projects
-
310. HuMoments()Used in 8 projects
-
311. TrackerKCF_create()Used in 8 projects
-
312. fitLine()Used in 8 projects
-
313. COLOR_HLS2RGBUsed in 8 projects
-
314. CV_32SUsed in 8 projects
-
315. MORPH_RECTUsed in 8 projects
-
316. setTrackbarPos()Used in 7 projects
-
317. StereoBM_create()Used in 7 projects
-
Used in 7 projects
-
319. TM_CCOEFFUsed in 7 projects
-
320. COLOR_BGR2YCrCb()Used in 7 projects
-
321. COLOR_RGB2YUVUsed in 7 projects
-
Used in 7 projects
-
Used in 7 projects
-
324. COLORMAP_HSVUsed in 7 projects
-
325. COLOR_BGR2LUVUsed in 7 projects
-
326. drawMarker()Used in 7 projects
-
327. CAP_GSTREAMERUsed in 7 projects
-
Used in 7 projects
-
329. COLOR_RGB2YCR_CBUsed in 7 projects
-
330. COLOR_HLS2BGRUsed in 7 projects
-
331. MORPH_DILATEUsed in 7 projects
-
Used in 7 projects
-
333. idft()Used in 7 projects
-
334. EVENT_MBUTTONDOWNUsed in 7 projects
-
335. ROTATE_90_CLOCKWISEUsed in 7 projects
-
336. setWindowTitle()Used in 7 projects
-
337. TrackerCSRT_create()Used in 7 projects
-
338. COLORMAP_BONEUsed in 7 projects
-
339. GC_INIT_WITH_RECTUsed in 6 projects
-
340. MORPH_BLACKHATUsed in 6 projects
-
341. stereoRectify()Used in 6 projects
-
342. matchShapes()Used in 6 projects
-
343. Subdiv2D()Used in 6 projects
-
344. boxFilter()Used in 6 projects
-
Used in 6 projects
-
346. Scharr()Used in 6 projects
-
Used in 6 projects
-
348. aruco()Used in 6 projects
-
349. triangulatePoints()Used in 6 projects
-
350. recoverPose()Used in 6 projects
-
351. BRISK_create()Used in 6 projects
-
Used in 6 projects
-
Used in 6 projects
-
354. NORM_L1Used in 6 projects
-
Used in 6 projects
-
Used in 6 projects
-
357. FileStorage()Used in 6 projects
-
358. COLOR_Lab2BGR()Used in 6 projects
-
359. WINDOW_GUI_NORMALUsed in 6 projects
-
360. mulSpectrums()Used in 6 projects
-
Used in 6 projects
-
362. DFT_SCALEUsed in 6 projects
-
363. COLORMAP_RAINBOWUsed in 6 projects
-
364. findEssentialMat()Used in 6 projects
-
365. KMEANS_PP_CENTERSUsed in 6 projects
-
366. DMatch()Used in 6 projects
-
367. BORDER_REFLECT101Used in 6 projects
-
368. CC_STAT_AREAUsed in 6 projects
-
369. dct()Used in 6 projects
-
370. KNearest()Used in 5 projects
-
371. GC_INIT_WITH_MASKUsed in 5 projects
-
Used in 5 projects
-
373. CV_8UC1Used in 5 projects
-
374. SimpleBlobDetector()Used in 5 projects
-
375. bitwise_xor()Used in 5 projects
-
376. COLOR_YCR_CB2BGRUsed in 5 projects
-
377. meanShift()Used in 5 projects
-
Used in 5 projects
-
379. findCirclesGrid()Used in 5 projects
-
380. CC_STAT_LEFTUsed in 5 projects
-
381. CC_STAT_TOPUsed in 5 projects
-
382. COLOR_GRAY2BGRAUsed in 5 projects
-
383. CC_STAT_WIDTHUsed in 5 projects
-
384. groupRectangles()Used in 5 projects
-
385. sqrt()Used in 5 projects
-
386. CALIB_CB_FAST_CHECKUsed in 5 projects
-
387. max()Used in 5 projects
-
388. convertMaps()Used in 5 projects
-
389. reprojectImageTo3D()Used in 5 projects
-
390. magnitude()Used in 5 projects
-
391. COLORMAP_HOTUsed in 5 projects
-
392. CC_STAT_HEIGHTUsed in 5 projects
-
393. COLOR_HSV2GRAYUsed in 5 projects
-
394. waitKeyEx()Used in 5 projects
-
395. vconcat()Used in 5 projects
-
396. COLOR_RGB2Lab()Used in 5 projects
-
Used in 5 projects
-
398. COLOR_BGR2RGBAUsed in 5 projects
-
399. imresize()Used in 5 projects
-
Used in 5 projects