27#include <hugin_config.h>
81 vigra::Diff2D(
dest.getWidth(),
dest.getHeight()),
83 dest.getProjectionParameters(),
116 dest.getProjection(),
117 dest.getProjectionParameters(),
131 vars.insert(
make_pair(std::string(
"d"),
Variable(
"d",
src.getRadialDistortionCenterShift().x)));
132 vars.insert(
make_pair(std::string(
"e"),
Variable(
"e",
src.getRadialDistortionCenterShift().y)));
151 dest.getProjection(),
152 dest.getProjectionParameters(),
199 vigra::Diff2D(
dest.getWidth(),
dest.getHeight()),
200 dest.getProjection(),
201 dest.getProjectionParameters(),
289 for (
int i = 0;
i <
gl.numIm;
i++) {
323 for (
int i = 0;
i <
gl.numPts;
i++) {
327 result.push_back(
pnt);
341 image.width = size.x;
342 image.height = size.y;
343 image.bytesPerLine = image.width*3;
344 image.bitsPerPixel = 24;
345 image.dataSize = image.height * image.bytesPerLine;
354 image.format =
projd.internalFormat;
359 image.formatParamCount =
projd.numberOfParameters;
361 for (
int i=0;
i <
projd.numberOfParameters;
i++) {
363 DEBUG_DEBUG(
"projection parameter " <<
i <<
": " << image.formatParam[
i]);
378 if (a != 0.0 || b != 0.0 || c != 0) {
380 p.radial_params[0][3] = p.radial_params[1][3] = p.radial_params[2][3] = a;
381 p.radial_params[0][2] = p.radial_params[1][2] = p.radial_params[2][2] = b;
382 p.radial_params[0][1] = p.radial_params[1][1] = p.radial_params[2][1] = c;
383 double d = 1.0 - (a+b+c);
384 p.radial_params[0][0] = p.radial_params[1][0] = p.radial_params[2][0] =
d;
392 p.vertical_params[0] = p.vertical_params[1] = p.vertical_params[2] = val;
395 p.vertical_params[0] = p.vertical_params[1] = p.vertical_params[2] = 0;
401 p.horizontal_params[0] = p.horizontal_params[1] = p.horizontal_params[2] = val;
403 p.horizontal =
FALSE;
404 p.horizontal_params[0] = p.horizontal_params[1] = p.horizontal_params[2] = 0;
410 if (p.trans_x != 0 || p.trans_y != 0 || p.trans_z != 0)
427 if (
val2 != 0.0 || val != 0.0) {
450 image.width = size.x;
451 image.height = size.y;
452 image.bytesPerLine = image.width*3;
453 image.bitsPerPixel = 24;
454 image.dataSize = image.height * image.bytesPerLine;
458 image.data = (
unsigned char**)
malloc(
sizeof(
unsigned char*) );
459 if(image.data ==
NULL) {
467 image.dataformat =
_RGB;
509 image.selection.top = 0;
510 image.selection.left = 0;
511 image.selection.right = image.width;
512 image.selection.bottom = image.height;
522 trf.src = (Image *)
malloc(
sizeof(Image));
524 trf.dest = (Image *)
malloc(
sizeof(Image));
Somewhere to specify what variables belong to what.
represents a control point
OptimizeMode
minimize x,y or both.
virtual const VariableMap getImageVariables(unsigned int imgNr) const =0
get variables of an image
virtual const SrcPanoImage & getImage(std::size_t nr) const =0
get a panorama image, counting starts with 0
ProjectionFormat
Projection of final panorama.
All variables of a source image.
int getWidth() const
Get the width of the image in pixels.
int getHeight() const
Get the height of the image in pixels.
a variable has a value and a name.
mainly consists of wrapper around the pano tools library, to assist in ressource management and to pr...
std::vector< VariableMap > VariableMapVector
std::vector< ControlPoint > CPVector
std::map< std::string, Variable > VariableMap
Map::mapped_type & map_get(Map &m, const typename Map::key_type &key)
get a map element.
const Map::mapped_type & const_map_get(const Map &m, const typename Map::key_type &key)
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.