====== Tiepoint Transform ====== Download zip file with example files: {{:documentation:transform.zip|:Tiepoint Transform}} ===== Visual Studio 2008 Redistributable ===== There is a bug in the Visual Studio compiler (still) and the program may not run - you may need the [[http://www.microsoft.com/downloads/details.aspx?familyid=bd2a6171-e2d6-4230-b809-9a8d7548c1b6&displaylang=en|Visual Studio 2008 Redistributable Package]] (also included in the zip) ===== Transform Executable ===== There are two versions of the transform: the batch version, where images are processed The transform is run from the command line with only one parameter - the name of the configuration file. If no parameter/configuration file specified, the executable will assume the configuration file is named **config.ini**. Use the command prompt to navigate to the directory where the executable is located and type in the name of the executable followed by the configuration file name, for example: **Transform_v0.93_x64_non-export.exe config.ini** The program will read 3 paths from the configuration file: - **Image map** file, containing the names of images and IDs associated with them. See [[documentation:how_to_run_tiepoint_code#sample_image_map_file | a sample image map file]] - **Seed point** file, containing the mapped pixel values of the laser beams. See [[documentation:how_to_run_tiepoint_code#sample_seed_point_file | a sample seed point file]] - Image directory, where the source images defined in the image map file are located. ===== Sample Configuration File ===== [FILES] ; List of images with image IDs: img1.jpg 1 ; Default value assumed by program: "imagelist.txt" IMAGE_LIST = imagelist.txt ; List of seed points in x y format: 100 200 SEED_LIST = winrock_5_beam.txt ; Directory where the images are located - this could be either a direct path to the directory, such as "C:/Documents And Settings/images" ; or a folder that is in the same location as the tiepoint executable, such as "images". Note the absence of backslash (/) at the end IMAGES_DIR = images ; Solution file SOLUTION_FILE = AFFINE_SOLUTION.txt ; ERDAS solution file ERDAS_SOLUTION = ERDAS_SOLUTION.txt [SETTINGS] ; Number of CPU cores available for multithreaded support ; Word of warning - make sure you have enough RAM to support multiple images being open CPU_CORES = 2 ; Size of batches in which images are processed as to not use up all the memory - do not change this unless you're experiencing problems BATCH_SIZE = 10 ; If you only need to recompute the affine and have the matches stored on disk ; (from a previous run of the program), then set RECOMPUTE_MATCHES to 0 RECOMPUTE_MATCHES = 1 ; If you only need to recompute the affine & the matches and have the features stored on disk ; (from a previous run of the program), then set RECOMPUTE_FEATURES to 0 RECOMPUTE_FEATURES = 1 ; Number of neighbors around each seed to be used in the computation of the affine ; transformation - less points will result in a less accurate answer, more points ; will result in a better answer - the trade off is that as the number of points ; increases, the chance that the points do not lie on the same plane also increases ; If points don't lie on the same plane, the answer will be less accurate. ; Value of 20 works well. 6 is minimum (program will make sure) NUM_NEIGHBORS = 20 ; Number of iterations for the least squares algorithm for each image. Typically, ; you won't have to changes this. Larger number may provide more accuracy but may take ; a long time NUM_LM_ITERATIONS = 150 ; Tolerance for the least squares approximation of the residuals. Algorithm quits whenever ; this or NUM_LM_ITERATIONS is achieved RESIDUAL_TOLERANCE = 0.0001 ===== Sample Image Map File ===== Kingston 447.jpg 001 Kingston 448.jpg 002 Kingston 449.jpg 003 Kingston 450.jpg 004 Kingston 451.jpg 005 ===== Sample Seed Point File ===== 558 554 940 542 1366 569 768 537 1151 534 ===== Sample Solution File ===== 0 558 554 0 images\158.tif 0 0 940 542 0 images\158.tif 0 0 1366 569 0 images\158.tif 0 0 768 537 0 images\158.tif 0 0 1151 534 0 images\158.tif 0 1 348.786 544.245 2.06931 images\158.tif 0 1 738.093 528.984 2.0815 images\158.tif 0 1 1167.87 555.561 2.10245 images\158.tif 0 1 562.296 525.771 2.12172 images\158.tif 0 1 951.247 519.57 2.06795 images\158.tif 0 0 766.11 564.724 1.46684 images\159.tif 1 0 1148.72 554.365 1.45945 images\159.tif 1 0 1574.22 582.372 1.45771 images\159.tif 1 0 976.764 548.604 1.45743 images\159.tif 1 0 1360.24 547.096 1.45789 images\159.tif 1 1 558 554 0 images\159.tif 1 1 940 542 0 images\159.tif 1 1 1366 569 0 images\159.tif 1 1 768 537 0 images\159.tif 1 1 1151 534 0 images\159.tif 1 2 357.366 548.797 1.69782 images\159.tif 1 2 738.431 531.113 1.69601 images\159.tif 1 2 1168.99 551.029 1.73057 images\159.tif 1 2 566.26 528.584 1.69835 images\159.tif 1 2 947.677 521.777 1.7119 images\159.tif 1 1 764.09 562.681 1.20763 images\160.tif 2 1 1161.19 556.457 1.20387 images\160.tif 2 1 1604.14 591.153 1.21085 images\160.tif 2 1 983.322 548.571 1.20905 images\160.tif 2 1 1381.25 552.041 1.20444 images\160.tif 2 2 558 554 0 images\160.tif 2 2 940 542 0 images\160.tif 2 2 1366 569 0 images\160.tif 2 2 768 537 0 images\160.tif 2 2 1151 534 0 images\160.tif 2 3 344.303 558.671 1.58824 images\160.tif 2 3 713.044 544.282 1.58429 images\160.tif 2 3 1125.63 571.903 1.58253 images\160.tif 2 3 547.523 539.707 1.60561 images\160.tif 2 3 917.442 533.338 1.56034 images\160.tif 2 2 772.66 551.581 1.30877 images\161.tif 3 2 1155.74 545.038 1.30232 images\161.tif 3 2 1578.62 578.174 1.29186 images\161.tif 3 2 983.265 537.495 1.298 images\161.tif 3 2 1366.13 540.175 1.29371 images\161.tif 3 3 558 554 0 images\161.tif 3