Skip to content

createtrainingmrcstack tile configuration file

Chris Churas edited this page Jun 6, 2017 · 13 revisions

createtrainingmrcstack.py when run also generates what is known as a tile configuration file. This file contains the locations where the tiles were extracted from the parent images.

Format of configuration file. Values in capital letters and in <BLAH BLAH> are labels described later:

[DEFAULT]
imagedir = <PATH TO DIRECTORY WHERE IMAGES RESIDE> 

[<IMAGE FILE NAME>]
<NUMBER IE 1> = <LEFT>,<UPPER>,<RIGHT>,<LOWER>
<NUMBER IE 2> = <LEFT>,<UPPER>,<RIGHT>,<LOWER>

[<ANOTHER IMAGE FILE NAME>]
<NUMBER IE 3> = <LEFT>,<UPPER>,<RIGHT>,<LOWER>
<NUMBER IE 4> = <LEFT>,<UPPER>,<RIGHT>,<LOWER>
Descriptions of <BLAH BLAH> values above:
  • <PATH TO DIRECTORY WHERE IMAGES RESIDE> -- This is the full path to the directory where the images are located. It is assumed all images are same size. Example: (/tmp/images or /home/bob/images)

  • <IMAGE FILE NAME> and <ANOTHER IMAGE FILE NAME> are the names of the image files and denote sections in the configuration file. All <NUMBER IE #> below pertain to this image. Example: (foo.png)

  • <LEFT>,<UPPER>,<RIGHT>,<LOWER> Pixel coordinates of the tile in the parent image representing a box.

figure showing how tile box coordinates work

Example:

[DEFAULT]
imagedir = /foo/x

[foo2.png]
1 = 1246,674,1758,1186
2 = 9291,4666,9803,5178
3 = 515,4432,1027,4944
4 = 25,759,537,1271
5 = 6452,1678,6964,2190
6 = 3423,5681,3935,6193
8 = 6238,1100,6750,1612
10 = 92,3259,604,3771
12 = 5928,357,6440,869
13 = 4093,5322,4605,5834
14 = 3928,1228,4440,1740
16 = 4069,2744,4581,3256

[foo.png]
7 = 6267,4940,6779,5452
9 = 326,367,838,879
11 = 3173,5209,3685,5721
15 = 3557,3825,4069,4337