81 bool all_left =
true, all_right =
true,
82 all_above =
true, all_below =
true;
83 for (
unsigned short int x = 0; x < 2; x++)
85 for (
unsigned short int y = 0; y < 2; y++)
87 unsigned int xt = x_f + x, yt = y_f + y;
89 if (
map[xt][yt].x <
crop_x2) all_right =
false;
90 if (
map[xt][yt].y >
crop_y1) all_above =
false;
91 if (
map[xt][yt].y <
crop_y2) all_below =
false;
98 if (!(all_left || all_right || all_above || all_below))
break;
104 for (
unsigned short int x = 0; x < 2; x++)
106 for (
unsigned short int y = 0; y < 2; y++)
108 unsigned int xt = x_f + x, yt = y_f + y;
109 result->
tex_c[x][y][0] =
map[xt][yt].x;
110 result->
tex_c[x][y][1] =
map[xt][yt].y;
162 start_x = (double) visible_area.left() - 0.5;
163 start_y = (double) visible_area.top() - 0.5;
164 end_x = (double) visible_area.right() - 0.5;
165 end_y = (double) visible_area.bottom() - 0.5;
189 for (
unsigned int column = 0; column <
divisions_x; column++)
bool GiveClipFaceResult(Coords *result)
Get a face that was produced by ClipFace.
double vertex_coords[2][2][2]
An abstract base class for objects that calculate an approximate remap specified by quadrilatrials...
TexCoordRemapper(HuginBase::Panorama *m_pano, HuginBase::SrcPanoImage *image, VisualizationState *visualization_state)
A class for exchanging pointers to coordinates.
HuginBase::SrcPanoImage * image
include file for the hugin project
double(* tex_c)[2][2]
The coordinate in the source image ranging from 0 to 1.
bool isInside(vigra::Point2D p, bool ignoreMasks=false) const
check if a coordinate is inside the source image
VisualizationState * visualization_state
void ClipFace(Coords *face)
Crop a face to the source image, return true if there is anything left.
std::vector< std::vector< hugin_utils::FDiff2D > > map
const double mesh_frequency
void SetCrop()
Fill the crop values of the MeshRemapper from the source image.
vigra::Rect2D GetVisibleArea()
double height
The sizes of the input images in pixels.
float scale
The number number of units between vertex coorinates that gives a pixel in the display.
unsigned int number_of_faces
HuginBase::PTools::Transform transform
A transform to use to remap the images.
include file for the hugin project
virtual HuginBase::PanoramaOptions * GetOptions()
virtual bool GetNextFaceCoordinates(Coords *result)
Get the texture and vertex coordinates for the next face.
virtual void UpdateAndResetIndex()
double(* vertex_c)[2][2]
The coordinate in the panorama, in its pixel space.
All variables of a source image.
double texture_coords[2][2][2]