- 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.
推薦閱讀
- INSTANT Mock Testing with PowerMock
- MongoDB for Java Developers
- 編程珠璣(續)
- 數據結構與算法JavaScript描述
- HTML5游戲開發案例教程
- Java加密與解密的藝術
- Python數據結構與算法(視頻教學版)
- Python從入門到精通
- Oracle GoldenGate 12c Implementer's Guide
- Java 從入門到項目實踐(超值版)
- WebStorm Essentials
- Python網絡爬蟲實例教程(視頻講解版)
- Elasticsearch搜索引擎構建入門與實戰
- Tkinter GUI Application Development Blueprints
- Learning Behavior:driven Development with JavaScript