![]() |
IPSDK
4_1_0_2
IPSDK : Image Processing Software Development Kit
|
Basic image manipulation with IPSDK. More...
Functions | |
| IPSDKIMAGE_API BoolResult | ipsdk::image::createImage (const BaseImage &originalImage, ImagePtr &pOutImg) |
| function allowing to create an image from an existing other image More... | |
| IPSDKIMAGE_API ImagePtr | ipsdk::image::createImage (const BaseImage &originalImage) |
| function allowing to create an image from an existing other image More... | |
| IPSDKIMAGE_API BoolResult | ipsdk::image::createImage (const BaseImage &originalImage, const eImageBufferType &outImageBufferType, ImagePtr &pOutImg) |
| function allowing to create an image from an existing other image More... | |
| IPSDKIMAGE_API ImagePtr | ipsdk::image::createImage (const BaseImage &originalImage, const eImageBufferType &outImageBufferType) |
| function allowing to create an image from an existing other image More... | |
| PYIPSDKBASE_API PythonImagePtr | ipsdk::python::createImage (const image::eImageBufferType &imageBufferType, const ipUInt64 sizeX, const ipUInt64 sizeY) |
| function allowing to create a new python 2d image More... | |
| PYIPSDKBASE_API PythonImagePtr | ipsdk::python::createImageRgb (const image::eImageBufferType &imageBufferType, const ipUInt64 sizeX, const ipUInt64 sizeY) |
| function allowing to create a new python rgb 2d image More... | |
| PYIPSDKBASE_API PythonImagePtr | ipsdk::python::createImageSeq (const image::eImageBufferType &imageBufferType, const ipUInt64 sizeX, const ipUInt64 sizeY, const ipUInt64 sizeT) |
| function allowing to create a new python sequence 2d image More... | |
| PYIPSDKBASE_API PythonImagePtr | ipsdk::python::createImage (const image::eImageBufferType &imageBufferType, const ipUInt64 sizeX, const ipUInt64 sizeY, const ipUInt64 sizeZ) |
| function allowing to create a new python 3d image More... | |
| PYIPSDKBASE_API PythonImagePtr | ipsdk::python::createImage (const image::BaseImageGeometry &geometry) |
| function allowing to create a new python image from an existing geometry More... | |
Basic image manipulation with IPSDK.
The main image structure is ipsdk::image::BaseImage. The easiest way to create an IPSDK image is to define a geometry and initialize a ipsdk::image::MemoryImage, a class inheriting the ipsdk::image::BaseImage class, with this geometry.
Typically, it is possible to initialize a 2d RGB image, with float data type, in C++ with the following lines :
Where sizeX and sizeY are the image dimensions respectively along the x and y axis.
In Python, several wrappers allow to create an image, giving the image dimensions and the buffer type. Typically, the equivalent code in Python of the C++ sample above is :
Wrappers are available so that images with simple and frequently used geometry can be directly created :
Less usual geometries can be specified by passing it directly as input parameter of the function createImage. For instance, the example given in C++ can also be translated in Python by the command :
Please, see Image geometry concepts in IPSDK for more details about the image geometry.
PyIPSDK has to be imported.It is possible to retrieve the geometry from an existing image. In this way, we can get the geometry component (color, temporal or volume geometry) or directly the geometry information : the size along the x, y or z axis, the number of channels, the number of frames and the image buffer type.
Here are two examples of information extraction in C++ :
The equivalent in Python is :
IPSDK images can be associated to a geometric calibration. This object allows to define :
The user can check whether an image has been associated to a geometric calibration using the method ipsdk::image::BaseImage::hasGeometricCalibration() const. Image geometric calibration can be retrieved using the method ipsdk::image::BaseImage::getGeometricCalibration() const and updated using the method ipsdk::image::BaseImage::setGeometricCalibration(). For more informations on geometric calibration please see Image calibration concepts in IPSDK.
| IPSDKIMAGE_API BoolResult ipsdk::image::createImage | ( | const BaseImage & | originalImage, |
| ImagePtr & | pOutImg | ||
| ) |
function allowing to create an image from an existing other image
| ipsdk::image::IPSDKImageException | if originalImage.isInit() == false |
| IPSDKIMAGE_API ImagePtr ipsdk::image::createImage | ( | const BaseImage & | originalImage | ) |
function allowing to create an image from an existing other image
| ipsdk::image::IPSDKImageException | if originalImage.isInit() == false |
| ipsdk::image::IPSDKImageException | if on failure |
| IPSDKIMAGE_API BoolResult ipsdk::image::createImage | ( | const BaseImage & | originalImage, |
| const eImageBufferType & | outImageBufferType, | ||
| ImagePtr & | pOutImg | ||
| ) |
function allowing to create an image from an existing other image
| ipsdk::image::IPSDKImageException | if originalImage.isInit() == false |
| ipsdk::image::IPSDKImageException | if outImageBufferType == eImageBufferType::eIBT_None |
| IPSDKIMAGE_API ImagePtr ipsdk::image::createImage | ( | const BaseImage & | originalImage, |
| const eImageBufferType & | outImageBufferType | ||
| ) |
function allowing to create an image from an existing other image
| ipsdk::image::IPSDKImageException | if originalImage.isInit() == false |
| ipsdk::image::IPSDKImageException | if outImageBufferType == eImageBufferType::eIBT_None |
| ipsdk::image::IPSDKImageException | if on failure |
| PYIPSDKBASE_API PythonImagePtr ipsdk::python::createImage | ( | const image::eImageBufferType & | imageBufferType, |
| const ipUInt64 | sizeX, | ||
| const ipUInt64 | sizeY | ||
| ) |
function allowing to create a new python 2d image
| ipsdk::python::PyIPSDKBaseException | on failure |
| PYIPSDKBASE_API PythonImagePtr ipsdk::python::createImageRgb | ( | const image::eImageBufferType & | imageBufferType, |
| const ipUInt64 | sizeX, | ||
| const ipUInt64 | sizeY | ||
| ) |
function allowing to create a new python rgb 2d image
| ipsdk::python::PyIPSDKBaseException | on failure |
| PYIPSDKBASE_API PythonImagePtr ipsdk::python::createImageSeq | ( | const image::eImageBufferType & | imageBufferType, |
| const ipUInt64 | sizeX, | ||
| const ipUInt64 | sizeY, | ||
| const ipUInt64 | sizeT | ||
| ) |
function allowing to create a new python sequence 2d image
| ipsdk::python::PyIPSDKBaseException | on failure |
| PYIPSDKBASE_API PythonImagePtr ipsdk::python::createImage | ( | const image::eImageBufferType & | imageBufferType, |
| const ipUInt64 | sizeX, | ||
| const ipUInt64 | sizeY, | ||
| const ipUInt64 | sizeZ | ||
| ) |
function allowing to create a new python 3d image
| ipsdk::python::PyIPSDKBaseException | on failure |
| PYIPSDKBASE_API PythonImagePtr ipsdk::python::createImage | ( | const image::BaseImageGeometry & | geometry | ) |
function allowing to create a new python image from an existing geometry
| ipsdk::python::PyIPSDKBaseException | on failure |
1.8.14