84 bool all_left =
true, all_right =
true,
85 all_above =
true, all_below =
true;
86 for (
unsigned short int x = 0; x < 2; x++)
88 for (
unsigned short int y = 0; y < 2; y++)
90 unsigned int xt = x_f + x, yt = y_f + y;
92 if (
map[xt][yt].x <
crop_x2) all_right =
false;
93 if (
map[xt][yt].y >
crop_y1) all_above =
false;
94 if (
map[xt][yt].y <
crop_y2) all_below =
false;
101 if (!(all_left || all_right || all_above || all_below))
break;
107 for (
unsigned short int x = 0; x < 2; x++)
109 for (
unsigned short int y = 0; y < 2; y++)
111 unsigned int xt = x_f + x, yt = y_f + y;
112 result->
tex_c[x][y][0] =
map[xt][yt].x;
113 result->
tex_c[x][y][1] =
map[xt][yt].y;
165 start_x = (double) visible_area.left() - 0.5;
166 start_y = (double) visible_area.top() - 0.5;
167 end_x = (double) visible_area.right() - 0.5;
168 end_y = (double) visible_area.bottom() - 0.5;
192 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]