Main content

Home

Menu

Loading wiki pages...

View
Wiki Version:
**Convert landmark templates from Webmorph to .tps format for shape analyses** Note: only works on macOS; assumes faces were delineated with default FRL template (189 points) **Steps** - Create an empty temporary directory - Copy `_TEM_to_TPS.command` file into that directory - **COPY** your `.tem` files into that same directory - Double-click `TEM_to_TPS.command` - A `_DATA.tps` file will be created The template files used to generate the .tps file will be overwritten/deleted during this process, so make sure not to use your only copies! NOTE: if the file won't execute, you might have to open Terminal (under Applications > Utilities) and run the following command: `chmod u+x /path/to/_TEM_to_TPS.command` **How does it work?** This is a simple executable text file that can be edited/opened with any text editor. It works by removing unwanted landmarks as well as curve information, flipping the coordinates upside-down and compiling the individual files into one .tps file. **Adapting the script to your needs** - Set the correct image height For the coordinate flipping to work correctly, the correct image height needs to be specified on line 8 of the script. If your images are, e.g., 1000 px tall, you have to change the following bit of code on line 8 from `'{print $1, 2848-$2}'` to `'{print $1, 1000-$2}'` - Decide which landmarks you want to include Currently, 132 landmarks are being retained. The following points are being excluded: - EYE BAGS: 44-49 - LOWER LIP: 99-103 - EARS: 115-124 - HALO: 145-157 - SMILE LINES: 158-163 - CHEEKS: 164-169 - PHILTRUM: 170-173 - CHIN: 174-178 - NECK: 183-184 If you decide to include/exclude different landmarks, you can do so by editing lines 4 and 9. - Edit **line 4** to change which points you want to retain E.g., if you wanted to only keep iris/pupil (LMs 0-17) and eyebrow points (LMs 71-86), you would use `'2,19p;73,88p'` to keep the lines 2 to 19, and 73 to 88 - Edit **line 9** to adjust the number of landmarks you are using. E.g., if you were to keep only the landmarks mentioned above, `"LM=132"` would have to be changed to `"LM=34"`
OSF does not support the use of Internet Explorer. For optimal performance, please switch to another browser.
Accept
This website relies on cookies to help provide a better user experience. By clicking Accept or continuing to use the site, you agree. For more information, see our Privacy Policy and information on cookie use.
Accept
×

Start managing your projects on the OSF today.

Free and easy to use, the Open Science Framework supports the entire research lifecycle: planning, execution, reporting, archiving, and discovery.