43static void usage(
const char* name)
45 std::cout << name <<
": transform pixel coordinates" << std::endl
48 <<
"Usage: " << name <<
" input.pto [ image_nr ]" << std::endl
50 <<
"pano_trafo reads pixel coordinates from standard input and" << std::endl
51 <<
"prints the transformed coordinates to standard output." << std::endl
52 <<
"If you pass an image number on the command line," << std::endl
53 <<
"it reads pairs of coordinates and transforms them." << std::endl
54 <<
"If you don't pass an image number, it will read triplets" << std::endl
55 <<
"of the form <image number> <x coordinate> <y coordinate>" << std::endl
56 <<
"and output the transformed coordinates." << std::endl
58 <<
" -r|--recursive Transform from panorama to image coordinates" << std::endl
59 <<
" -h|--help Shows help" << std::endl
79 std::cerr <<
"not enough memory" ;
83 for ( image = 0 ; image < images ; image++ )
99 while ( std::cin >> image >>
xin >>
yin )
103 std::cerr <<
"no image " << image <<
" in pano" << std::endl ;
107 std::cout <<
xout <<
" " <<
yout << std::endl ;
161 std::cout.setf ( std::ios::fixed ) ;
162 std::cout.precision ( 6 ) ;
178 std::cerr <<
"Not enough images in panorama" << std::endl;
197 while ( std::cin >>
xin >>
yin )
200 std::cout <<
xout <<
" " <<
yout << std::endl ;
const PanoramaOptions & getOptions() const
returns the options for this panorama
bool ReadPTOFile(const std::string &filename, const std::string &prefix="")
read pto file from the given filename into Panorama object it does some checks on the file and issues...
SrcPanoImage getSrcImage(unsigned imgNr) const
get a description of a source image
std::size_t getNrOfImages() const
number of images.
std::string GetHuginVersion()
return a string with version numbers
std::string stripPath(const std::string &filename)
remove the path of a filename (mainly useful for gui display of filenames)
std::string getPathPrefix(const std::string &filename)
Get the path to a filename.
int main(int argc, char *argv[])
void work_on_triplets(const HuginBase::Panorama &pano, bool reverse)
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.