- Machine Learning for OpenCV
- Michael Beyeler
- 126字
- 2021-07-02 19:47:16
Getting a glimpse of OpenCV's ML module
Starting with OpenCV 3.1, all machine learning-related functions in OpenCV have been grouped into the ml module. This has been the case for the C++ API for quite some time. You can get a glimpse of what's to come by displaying all functions in the ml module:
In [4]: dir(cv2.ml)
Out[4]: ['ANN_MLP_BACKPROP',
'ANN_MLP_GAUSSIAN',
'ANN_MLP_IDENTITY',
'ANN_MLP_NO_INPUT_SCALE',
'ANN_MLP_NO_OUTPUT_SCALE',
...
'__spec__']
If you have installed an older version of OpenCV, the ml module might not be present. For example, the k-nearest neighbor algorithm (which we will talk about in Chapter 3, First Steps in Supervised Learning) used to be called cv2.KNearest() but is now called cv2.ml.KNearest_create(). In order to avoid confusion throughout the book, I therefore recommend using at least OpenCV 3.1.
推薦閱讀
- Deploying Node.js
- JavaScript+jQuery網(wǎng)頁(yè)特效設(shè)計(jì)任務(wù)驅(qū)動(dòng)教程(第2版)
- OpenCV for Secret Agents
- Java加密與解密的藝術(shù)
- HTML5 and CSS3 Transition,Transformation,and Animation
- Hands-On RESTful Web Services with Go
- Access 2016數(shù)據(jù)庫(kù)管
- 學(xué)Python也可以這么有趣
- 名師講壇:Spring實(shí)戰(zhàn)開(kāi)發(fā)(Redis+SpringDataJPA+SpringMVC+SpringSecurity)
- RISC-V體系結(jié)構(gòu)編程與實(shí)踐(第2版)
- Managing Microsoft Hybrid Clouds
- Practical GIS
- Python Automation Cookbook
- 深入淺出 HTTPS:從原理到實(shí)戰(zhàn)
- Blender 3D Cookbook