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

Dealing with data using OpenCV and Python

Although raw data can come from a variety of sources and in a wide range of formats, it will help us to think of all data fundamentally as arrays of numbers. For example, images can be thought of as simply 2D arrays of numbers representing pixel brightness across an area. Sound clips can be thought of 1D arrays of intensity over time. For this reason, efficient storage and manipulation of numerical arrays is absolutely fundamental to machine learning.

If you have mostly been using OpenCV's C++ application programming interface (API) and plan on continuing to do so, you might find that dealing with data in C++ can be a bit of a pain. Not only will you have to deal with the syntactic overhead of the C++ language, but you will also have to wrestle with different data types and cross-platform compatibility issues.

This process is radically simplified if you use OpenCV's Python API because you automatically get access to a large number of open-source packages from the Scientific Python (SciPy) community. Case in point is the Numerical Python (NumPy) package, around which most scientific computing tools are built.

主站蜘蛛池模板: 华池县| 新闻| 巴彦淖尔市| 射阳县| 湖口县| 鸡西市| 河西区| 武鸣县| 塔河县| 班戈县| 玉环县| 彰化县| 仪陇县| 运城市| 普宁市| 永安市| 张掖市| 渭南市| 逊克县| 龙陵县| 肇州县| 唐河县| 紫阳县| 三河市| 祁东县| 阿拉善盟| 宁陵县| 临澧县| 中江县| 庆城县| 元阳县| 太保市| 蓬莱市| 万安县| 萍乡市| 定襄县| 西畴县| 肥城市| 郴州市| 勃利县| 长白|