Dealing with data using OpenCV and Python

The world of data is full of various kinds of data types. This, at times, makes it very difficult for users to distinguish between the data type to use for a particular value. Here, we will try to keep it simple by treating everything as an array, except the scalar values, which will retain their standard data types. So, images will become 2D arrays because they have width and height. A 1D array could be a sound clip with intensity varying over time. 

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. A case in point is the Numerical Python (NumPy) package, around which most scientific computing tools are built.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.145.73.207