30#ifndef _NONA_SPACETRANSFORM_H
31#define _NONA_SPACETRANSFORM_H
33#include <vigra/diff2d.hxx>
118 void InitRadialCorrect(
const vigra::Size2D &
sz,
const std::vector<double> &
radDist,
133 void createTransform(
const PanoramaData & pano,
unsigned int imgNr,
135 vigra::Diff2D
srcSize=vigra::Diff2D(0,0));
138 void createInvTransform(
const PanoramaData & pano,
unsigned int imgNr,
140 vigra::Diff2D
srcSize=vigra::Diff2D(0,0));
142 void createTransform(
const vigra::Diff2D &
srcSize,
150 void createInvTransform(
const vigra::Diff2D &
srcSize,
179 return m_Stack.empty();
185 void AddTransform( trfn
function_name,
double var0,
double var1 = 0.0f,
double var2 = 0.0f,
double var3 = 0.0f,
double var4=0.0f,
double var5=0.0f,
double var6=0.0f,
double var7=0.0f );
212template <
class VECTOR>
221template <
class TRANSFORM>
225 vigra::Rect2D & boundingBox);
257template <
class VECTOR>
260 double d3 = p[3]*p[3]*p[3];
261 c[0] = (3*
q[1]*p[3]*p[3]*p[2]+
q[3]*p[0]+
q[2]*(2*p[3]*p[1]+p[2]*p[2])+
q[0]*
d3*p[3]);
262 c[1] = (2*
q[2]*p[3]*p[2]+
q[1]*
d3+
q[3]*p[1]);
263 c[2] = (
q[3]*p[2]+
q[2]*p[3]*p[3]);
280template <
class TRANSFORM>
283 boundingBox = vigra::Rect2D();
297 for (y=0; y <
sz.y; y++) {
304 for (y=0; y <
sz.y; y++) {
311 for (x=0; x <
sz.x; x++) {
318 for (x=0; x <
sz.x; x++) {
323 inside.setUpperLeft(vigra::Point2D(left, top));
324 inside.setLowerRight(vigra::Point2D(right, bottom));
ProjectionFormat
Projection of final panorama.
All variables of a source image.
general : Matrix3 is a class for handling 3x3 Matrix manipulation.
struct HuginBase::Nona::_fDesc fDescription
Function descriptor to be executed by exec_function.
double estRadialScaleCrop(const std::vector< double > &coeff, int width, int height)
Calculate effective scaling factor.
double estScaleFactorForFullFrame(const SrcPanoImage &src)
Calculate effective scaling factor for a given source image.
void traceImageOutline(vigra::Size2D sz, TRANSFORM &transf, vigra::Rect2D &inside, vigra::Rect2D &boundingBox)
Internal function to estimate the image scaling required to avoid black stripes at the image borders.
void(* trfn)(double x_dest, double y_dest, double *x_src, double *y_src, const _FuncParams ¶ms)
Transformation function type.
void combinePolynom4(const VECTOR &p, const VECTOR &q, VECTOR &c)
combine 4rd degree polynomials
mainly consists of wrapper around the pano tools library, to assist in ressource management and to pr...
std::map< std::string, Variable > VariableMap
Parameters for transformation calls Can be just one double, two double, 4 double, a matrix,...
Function descriptor to be executed by exec_function.
std::vector< deghosting::BImagePtr > threshold(const std::vector< deghosting::FImagePtr > &inputImages, const double threshold, const uint16_t flags)
Threshold function used for creating alpha masks for images.