官术网_书友最值得收藏!

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.
主站蜘蛛池模板: 敦煌市| 青田县| 井冈山市| 漯河市| 乐清市| 岚皋县| 蕲春县| 灌云县| 丹巴县| 屏东县| 古浪县| 汝州市| 三亚市| 蒲城县| 沁水县| 余干县| 民勤县| 南投市| 同江市| 华安县| 车险| 资阳市| 伊宁市| 景洪市| 邵阳县| 浦北县| 金阳县| 双流县| 达尔| 毕节市| 大田县| 泰顺县| 无极县| 板桥市| 安化县| 马龙县| 如皋市| 安西县| 开封县| 贺兰县| 永泰县|