Image Component Library (ICL)
|
The ImageRectification class can be use to rectify an image quadrangle (IPP accellerated) More...
#include <ImageRectification.h>
Public Member Functions | |
ImageRectification (bool validateAndSortPoints=true) | |
create an ImageRectification instance with given value for validateAndSortPoints More... | |
const core::Img< T > & | apply (const utils::Point32f ps[4], const core::Img< T > &src, const utils::Size &resultSize, math::FixedMatrix< float, 3, 3 > *hom=0, math::FixedMatrix< float, 2, 2 > *Q=0, math::FixedMatrix< float, 2, 2 > *R=0, float maxTilt=0, bool advanedAlgorithm=true, const utils::Rect *resultROI=0, const core::scalemode eScaleMode=core::interpolateLIN) |
applies the image rectification from given source image quadrangle into a rectangular image More... | |
Private Attributes | |
core::Img< T > | buffer |
internal image buffer More... | |
bool | validateAndSortPoints |
internal flag More... | |
The ImageRectification class can be use to rectify an image quadrangle (IPP accellerated)
The ImageRectification can be set up for automatic sorting of the given points (which is default). If this behaviour is disabled, the given points are not checked for their correct order.
It is not implemented as a UnaryOp, because we see no straight forward way to apply source image ROI handling
TODO this could still be implemented as a UnaryOp instance
|
inline |
create an ImageRectification instance with given value for validateAndSortPoints
const core::Img<T>& icl::filter::ImageRectification< T >::apply | ( | const utils::Point32f | ps[4], |
const core::Img< T > & | src, | ||
const utils::Size & | resultSize, | ||
math::FixedMatrix< float, 3, 3 > * | hom = 0 , |
||
math::FixedMatrix< float, 2, 2 > * | Q = 0 , |
||
math::FixedMatrix< float, 2, 2 > * | R = 0 , |
||
float | maxTilt = 0 , |
||
bool | advanedAlgorithm = true , |
||
const utils::Rect * | resultROI = 0 , |
||
const core::scalemode | eScaleMode = core::interpolateLIN |
||
) |
applies the image rectification from given source image quadrangle into a rectangular image
ps | source image points (must define a linestrip around the source image quadrangular regions that needs to be rectified) |
src | source image |
resultSize | resulting rectified image size |
hom | optionally, you can pass a matrix here, that is filled with the homography matrix that is used to transform the pixels |
Q | this can optionally be filled with the Q part of the QR-decomposition of hom The Q part (which is an othogonal matrix) usually contains the homographies rotation |
R | this can optionally be filled with the R part of the QR-decomposition of hom The R part (which is an upper right triangluar matrix) usually contains the homographies scale and shear information) |
maxTilt | can optionally be given. If it is greater than zero, it is used as maximum ratio between R's diagonal elements. |
advanedAlgorithm | selects the algorithm that is used for the creation of the homography internally ( |
resultROI | if this parameter is given, the final homography is only evaluated within the resulting images ROI |
|
private |
internal image buffer
|
private |
internal flag