![]() |
IPSDK
4_1_0_2
IPSDK : Image Processing Software Development Kit
|
Modules demonstrating how to mix PyIPSDK images with Numpy array, the fundamental package for scientific computing with Python. More...
Modules demonstrating how to mix PyIPSDK images with Numpy array, the fundamental package for scientific computing with Python.
Numpy array structure, see numpy official web site, can easily be manipulated has PyIPSDK images and vice versa without memory penalty cost. There is no reallocation exchanging data from numpy array to PyIPSDK images and vice versa.
Numpy library should be installed with used Python distribution (this is already the case if you use Anaconda Python distribution).
The following script illustrates how to handle usage of numpy array with PyIPSDK library.
We start by importing all necessary libraries:
We can now create a new PyIPSDK image, manipulate it and then access to associated numpy array :
We can also create a new numpy array and use it as a PyIPSDK image :
The following functions allow to interpret various array dimensions and data type according to supported PyIPSDK image types :
1.8.14