![]() |
IPSDK
4_1_0_2
IPSDK : Image Processing Software Development Kit
|
Image geometry concepts in IPSDK. More...
Classes | |
| class | ipsdk::image::BaseImageGeometry |
| Base class for image geometry. More... | |
| class | ipsdk::image::ColorGeometry |
| Class encapsulating color geometryThis class allows to define geometry color size and type (grey, rgb, ...) More... | |
| class | ipsdk::image::TemporalGeometry |
| Class encapsulating temporal geometryThis class allows to define geometry temporal size and type (single or sequence) More... | |
| class | ipsdk::image::VolumeGeometry |
| Class encapsulating volume geometryThis class allows to define geometry volume size and type (2d or 3d) More... | |
| class | ipsdk::image::HeterogeneousImageGeometry |
| Image geometry associated to heterogeneous image buffer types through image plans (sequence case) More... | |
| class | ipsdk::image::HomogeneousImageGeometry |
| Image geometry associated to constant image buffer types through image plans. More... | |
Typedefs | |
| typedef boost::shared_ptr< BaseImageGeometry > | ipsdk::image::ImageGeometryPtr |
| shared pointer to image geometry | |
| typedef boost::shared_ptr< const BaseImageGeometry > | ipsdk::image::ImageGeometryConstPtr |
| shared pointer to const image geometry | |
| typedef std::vector< eImageBufferType > | ipsdk::image::ImageBufferTypeVector |
| collection of buffer types | |
Functions | |
| IPSDKIMAGE_API ipUInt32 | ipsdk::image::getColorGeometrySize (const eColorGeometryType &colorGeometryType) |
| retrieve size (number of plans) of a color geometry More... | |
| IPSDKIMAGE_API bool | ipsdk::image::hasLinearTransform (const eColorGeometryType &sourceColorSpace, const eColorGeometryType &targetColorSpace) |
| check whether a linear transformation is available between two color spaces | |
| IPSDKIMAGE_API ipsdk::math::Matrix | ipsdk::image::getLinearTransform (const eColorGeometryType &sourceColorSpace, const eColorGeometryType &targetColorSpace, const eImageBufferType &sourceImageBufferType=eImageBufferType::eIBT_None, const eImageBufferType &targetImageBufferType=eImageBufferType::eIBT_None) |
| retrieve linear transformation associated to a given color space conversion operation More... | |
| IPSDKIMAGE_API ImageGeometryPtr | ipsdk::image::geometry (const eImageBufferType &imageBufferType, const ipUInt64 sizeX, const ipUInt64 sizeY, const VolumeGeometry &volumeGeometry, const ColorGeometry &colorGeometry, const TemporalGeometry &temporalGeometry) |
| create an image geometry | |
| IPSDKIMAGE_API ImageGeometryPtr | ipsdk::image::geometry2d (const eImageBufferType &imageBufferType, const ipUInt64 sizeX, const ipUInt64 sizeY) |
| create a 2d image geometry | |
| IPSDKIMAGE_API ImageGeometryPtr | ipsdk::image::geometry3d (const eImageBufferType &imageBufferType, const ipUInt64 sizeX, const ipUInt64 sizeY, const ipUInt64 sizeZ) |
| create a 3d image geometry | |
| IPSDKIMAGE_API ImageGeometryPtr | ipsdk::image::geometryRgb2d (const eImageBufferType &imageBufferType, const ipUInt64 sizeX, const ipUInt64 sizeY) |
| create a rgb 2d image geometry | |
| IPSDKIMAGE_API ImageGeometryPtr | ipsdk::image::geometryRgb3d (const eImageBufferType &imageBufferType, const ipUInt64 sizeX, const ipUInt64 sizeY, const ipUInt64 sizeZ) |
| create a rgb 3d image geometry | |
| IPSDKIMAGE_API ImageGeometryPtr | ipsdk::image::geometry2d (const eImageBufferType &imageBufferType, const ipUInt64 sizeX, const ipUInt64 sizeY, const eColorGeometryType &colorGeometryType) |
| create a color 2d image geometry More... | |
| IPSDKIMAGE_API ImageGeometryPtr | ipsdk::image::geometry3d (const eImageBufferType &imageBufferType, const ipUInt64 sizeX, const ipUInt64 sizeY, const ipUInt64 sizeZ, const eColorGeometryType &colorGeometryType) |
| create a color 3d image geometry More... | |
| IPSDKIMAGE_API ImageGeometryPtr | ipsdk::image::geometrySeq2d (const eImageBufferType &imageBufferType, const ipUInt64 sizeX, const ipUInt64 sizeY, const ipUInt64 sizeT) |
| create a sequence of 2d images geometry | |
| IPSDKIMAGE_API ImageGeometryPtr | ipsdk::image::geometrySeq3d (const eImageBufferType &imageBufferType, const ipUInt64 sizeX, const ipUInt64 sizeY, const ipUInt64 sizeZ, const ipUInt64 sizeT) |
| create a sequence of 3d images geometry | |
| IPSDKIMAGE_API bool | ipsdk::image::haveSameSize (const BaseImageGeometry &geometry1, const BaseImageGeometry &geometry2) |
| compare two image geometry size More... | |
| IPSDKIMAGE_API bool | ipsdk::image::isEqual (const BaseImageGeometry &geometry1, const BaseImageGeometry &geometry2) |
| compare two image geometry More... | |
| IPSDKIMAGE_API ImageGeometryPtr | ipsdk::image::createBoundingGeometry (const BaseImageGeometry &geometry1, const BaseImageGeometry &geometry2, const eImageBufferType &outputBufferType) |
| function allowing to create a bounding geometry for two input images geometries and a target output buffer More... | |
| IPSDKIMAGE_API ImagePtr | ipsdk::image::reinterpretVolumeSequence (BaseImage &img) |
| reinterpret an image geometry Volume <-> Sequence | |
| IPSDKIMAGE_API ImagePtr | ipsdk::image::reinterpretVolumeSequence (ImagePtr &pImg) |
| reinterpret an image geometry Volume <-> Sequence | |
| IPSDKIMAGE_API ImagePtr | ipsdk::image::reinterpretVolumeToSequence (BaseImage &img) |
| reinterpret an image geometry Volume <-> Sequence | |
| IPSDKIMAGE_API ImagePtr | ipsdk::image::reinterpretVolumeToSequence (ImagePtr &pImg) |
| reinterpret an image geometry Volume <-> Sequence | |
| IPSDKIMAGE_API ImagePtr | ipsdk::image::reinterpretSequenceToVolume (BaseImage &img) |
| reinterpret an image geometry Volume <-> Sequence | |
| IPSDKIMAGE_API ImagePtr | ipsdk::image::reinterpretSequenceToVolume (ImagePtr &pImg) |
| reinterpret an image geometry Volume <-> Sequence | |
| IPSDKIMAGE_API ImagePtr | ipsdk::image::reinterpretVolumeMultiChannel (BaseImage &img) |
| reinterpret an image geometry Volume <-> MultiChannel | |
| IPSDKIMAGE_API ImagePtr | ipsdk::image::reinterpretVolumeMultiChannel (ImagePtr &pImg) |
| reinterpret an image geometry Volume <-> MultiChannel | |
| IPSDKIMAGE_API ImagePtr | ipsdk::image::reinterpretSequenceMultiChannel (BaseImage &img) |
| reinterpret an image geometry Sequence <-> MultiChannel | |
| IPSDKIMAGE_API ImagePtr | ipsdk::image::reinterpretSequenceMultiChannel (ImagePtr &pImg) |
| reinterpret an image geometry Sequence <-> MultiChannel | |
Image geometry concepts in IPSDK.
The geometry characterizes the image properties, carrying :
The available buffer types are :
Binary images are unsigned 8-bits data used as logical mask images and its possible values are 0 or 1. As for Label8, Label16 and Label32 images, they have unsigned 8, 16 or 32-bits data type and are used to identify objects in the image by an integer value.
The figure below shows an input image (left), its thresholded and segmented binary version (middle) and the labelled image assigning a label (represented by a color in the image) to the pixels of a blob.
See ipsdk::image::eImageBufferType for more details.
Several functions allow to create a geometry, specifying the required information. Here is the list of these functions :
It is possible to reinterpret an image geometry without creating a new image. For instance, a 3D image can instantly become a multi-channel or a sequence image. The conversion are availeble through the following functions:
Please, note that the input image must have 3 dimensions. This means that:
We can distinguish three kinds of geometry :
The RGB color model is associated to the three primary colors :
The RGB color model is associated to the three primary colors :
with an additional Alpha channel which can be used for example to handle transparency.
The CIE system is based on the description of color as a luminance component Y, as described above, and two additional components X and Z.
It is defined such that all visible colours (physiologically perceived colors in human color vision) can be defined using only positive values, and, the Y value is luminance. We use the CIE XYZ color space as defined by ITU-R BT.709-6 Recommendation with D65 white point.
The standardized transformation settled upon by the CIE special commission was as follows:
The inverse matrix is then given by :
The YCbCr color model defines a color space where :
YCbCr is sometimes abbreviated to YCC and is used in case of digital signal. YPbPr, sometimes called Yuv, is used in case of analog signal.
YCbCr and YPbPr are then closely related since color spaces are linked by following equations :
where
stands for the number of the bit length of the quantized signal. Note that
normalization term is only added in case of unsigned int data type.
The standardized transformation settled upon by the CIE special commission, as defined by ITU-R BT.709-6 Recommendation with D65 white point, is given by :
The inverse matrix is then given by :
This color space were defined by the International Commission on Illumination (CIE) in 1976.
Its three components stand for :
These values can be obtained from XYZ Rec 709 color models as follow :
where :
and :
The reverse transformation is then given by :
where :
This color space were adopted by the International Commission on Illumination (CIE) in 1976
Its three components stand for :
These values can be obtained from XYZ Rec 709 color models as follow :
where :
and :
The reverse transformation is then given by :
and then :
HLS color space stands for Hue, Lightness and Saturation color space where :
Transformation from a RGB color model is given by :
On output these components take value in :
for saturation and lightness
for hueReverse transformation is then given by :
HSV color space stands for Hue, Saturation and Value color space where :
Transformation from a RGB color model is given by :
On output these components take value in :
for saturation and value
for hueReverse transformation is then given by :
Color geometry type.
Image geometry type.
| IPSDKIMAGE_API ipUInt32 ipsdk::image::getColorGeometrySize | ( | const eColorGeometryType & | colorGeometryType | ) |
retrieve size (number of plans) of a color geometry
| IPSDKIMAGE_API ipsdk::math::Matrix ipsdk::image::getLinearTransform | ( | const eColorGeometryType & | sourceColorSpace, |
| const eColorGeometryType & | targetColorSpace, | ||
| const eImageBufferType & | sourceImageBufferType = eImageBufferType::eIBT_None, |
||
| const eImageBufferType & | targetImageBufferType = eImageBufferType::eIBT_None |
||
| ) |
retrieve linear transformation associated to a given color space conversion operation
If input and output color spaces are associated to sizes :
| ipsdk::image::IPSDKImageException | if hasLinearTransform(sourceColorSpace, targetColorSpace) == false |
| IPSDKIMAGE_API ImageGeometryPtr ipsdk::image::geometry2d | ( | const eImageBufferType & | imageBufferType, |
| const ipUInt64 | sizeX, | ||
| const ipUInt64 | sizeY, | ||
| const eColorGeometryType & | colorGeometryType | ||
| ) |
create a color 2d image geometry
| ipsdk::image::IPSDKImageException | if getColorGeometrySize(colorGeometryType) == 0 |
| IPSDKIMAGE_API ImageGeometryPtr ipsdk::image::geometry3d | ( | const eImageBufferType & | imageBufferType, |
| const ipUInt64 | sizeX, | ||
| const ipUInt64 | sizeY, | ||
| const ipUInt64 | sizeZ, | ||
| const eColorGeometryType & | colorGeometryType | ||
| ) |
create a color 3d image geometry
| ipsdk::image::IPSDKImageException | if getColorGeometrySize(colorGeometryType) == 0 |
| IPSDKIMAGE_API bool ipsdk::image::haveSameSize | ( | const BaseImageGeometry & | geometry1, |
| const BaseImageGeometry & | geometry2 | ||
| ) |
compare two image geometry size
| ipsdk::image::IPSDKImageException | if geometry1.isInit() == false |
| ipsdk::image::IPSDKImageException | if geometry2.isInit() == false |
| IPSDKIMAGE_API bool ipsdk::image::isEqual | ( | const BaseImageGeometry & | geometry1, |
| const BaseImageGeometry & | geometry2 | ||
| ) |
compare two image geometry
| ipsdk::image::IPSDKImageException | if geometry1.isInit() == false |
| ipsdk::image::IPSDKImageException | if geometry2.isInit() == false |
| IPSDKIMAGE_API ImageGeometryPtr ipsdk::image::createBoundingGeometry | ( | const BaseImageGeometry & | geometry1, |
| const BaseImageGeometry & | geometry2, | ||
| const eImageBufferType & | outputBufferType | ||
| ) |
function allowing to create a bounding geometry for two input images geometries and a target output buffer
| ipsdk::image::IPSDKImageException | if geometry1.isInit() == false |
| ipsdk::image::IPSDKImageException | if geometry2.isInit() == false |
1.8.14