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

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.

主站蜘蛛池模板: 林甸县| 马边| 广水市| 临沂市| 云南省| 丹寨县| 黄平县| 洪湖市| 东平县| 冀州市| 桓仁| 海盐县| 阳江市| 永胜县| 中卫市| 沧州市| 清流县| 洛宁县| 垫江县| 遂川县| 临邑县| 常德市| 辰溪县| 阿拉善盟| 凤城市| 合阳县| 宜兴市| 凌海市| 阿坝县| 喀喇沁旗| 满城县| 兰考县| 龙里县| 汕头市| 大同县| 鄂托克旗| 胶南市| 桂平市| 冕宁县| 嵩明县| 平潭县|