MorphoMetriX

MorphoMetriX: a photogrammetric measurement GUI for morphometric analysis of megafauna - Published in JOSS (2020)

https://github.com/wingtorres/morphometrix

Science Score: 95.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
    Found 9 DOI reference(s) in README and JOSS metadata
  • Academic publication links
    Links to: joss.theoj.org, zenodo.org
  • Committers with academic emails
    2 of 4 committers (50.0%) from academic institutions
  • Institutional organization owner
  • JOSS paper metadata
    Published in Journal of Open Source Software
Last synced: 6 months ago · JSON representation

Repository

A PyQt5 Gui for photogrammetry and morphometry

Basic Info
  • Host: GitHub
  • Owner: wingtorres
  • License: mit
  • Language: Python
  • Default Branch: master
  • Homepage:
  • Size: 10.7 MB
Statistics
  • Stars: 19
  • Watchers: 3
  • Forks: 7
  • Open Issues: 1
  • Releases: 2
Created over 6 years ago · Last pushed about 2 years ago
Metadata Files
Readme Contributing License Code of conduct

README.md

MorphoMetriX

DOI DOI

Please visit the up-to-date git repo (Morphometrix V2), linked below. This repo exists for archival purposes only and is not actively supported.

https://github.com/ZappyMan/MorphoMetriX-V2/

Let MorphoMetriX1 streamline the often tedious process of making photogrammetric measurements for you, offering a quick intuitive GUI to calculate piecewise/arc lengths and width profiles along segments/curves and areas for polygons.

Also check out CollatriX2, a GUI to collate multiple MorphoMetriX outputs into a single datafile with add-on functions for correcting altitude error from UAS (drone) flights and calculating animal body condition.

  1. Torres, W.I., and Bierlich, K.C (2020). MorphoMetriX: a photogrammetric measurement GUI for morphometric analysis of megafauna.. Journal of Open Source Software, 4(44), 1825. https://doi.org/10.21105/joss.01825
  2. Bird, C.N., and Bierlich, K.C. (2020). CollatriX: A GUI to collate MorphoMetriX outputs. Journal of Open Source Software, 5(51), 2328. https://doi:10.21105/joss.02328

Installation

The best way to use the up-to-date version of MorphoMetriX is to download directly from github with

git clone https://github.com/wingtorres/morphometrix.git

You will then need to activate a python environment with the following dependencies installed via pip

pip install PyQt6 PyQt6-WebEngine numpy scipy

After which you can open the program with python -m morphometrix if you are in the morphometrix directory. You might consider adding the morphometrix location to your $PATH environment variable so you can run it from anywhere.

Note: a conda package version of morphometrix exists but is no longer recommended due to install issues and some bugs.

Apple M1 Users: the version on GitHub should work with the new M1 chip, but we recommend installing installing python using the OS X arm64 mambaforge distribution.

Running MorphoMetriX

After activating the appropriate environment, you can open the GUI with the command

python -m morphometrix

In the input frame on the left, enter image details, camera specifications, altitude, number of width segments desired, and any notes (see Figure 1-3 in our JOSS article for examples).

image 1

Select “New Image” to import an image (.jpg) for photogrammetric analysis.

Measuring

Once an image has been imported, you can begin making measurements by selecting “Measure Length”, “Measure Area” or “Measure Angle”. The user can label each measurement with a unique name (i.e. “Total Length”). Widths can be measured by selecting “Measure Widths” following any length measurement. The number of width segments desired can be specified in “# Width Segments” in the input frame. Examples below.

Quick tips

  • Zoom in/out - Scroll
  • Pan - ⇧ Shift + scroll
  • Place a point - Single click
  • Complete a length measurement - Double click
  • Replace last point - Select “Undo”

Measure Length

Select “Measure Length”. A box will appear for the user to create a unique measurement name, i.e. “Total Length”, “Fluke Span”, etc. Decide if you want a “Bezier fit" applied to the length measurement. This is especially useful if the animal is curved, as it will apply a smooth fitting curve to the points selected in the measurement. Make single clicks to make a measurement and double click to finish.

image 3

Measuring Widths

After a length measurement is complete, widths segments perpendicular to the length measurement can be applied by selecting “Measure Widths”. The picture below has 20 width segments, or in 5% increments of total length. Each successive width is highlighted to guide the selection of points along the width segment.

image 4

Zoom in and select a point along the highlighted width line, which in this case is the edge of the whale. A red dot will mark the point selected and the next width segment will be highlighted. If the user accidentally selects a point adjacent to the highlighted line, the red dot will snap to the closest point on the highlighted line and record that point.

image 4

Once a point has been selected on each highlighted width line, the width measurements are complete.

image 5

Measure Area

To create a custom area measurement, select “Measure Area”. A box will appear for the user to create a unique label, i.e. “Fluke Area” or “Diatom Patch”. Once a label is created, click points to draw a polygon around the desired area. A blue dot will denote the final connecting point of the polygon and the area measured will be shaded.

image 6

Measure Angle

To create a custom angle measurement, select “Measure Angle”. A box will appear for the user to create a unique label, i.e. “Sweep Angle” or “Fluke-Leading Edge”. Draw the first vector, click to create a vertex, then draw the second vector. The angle will be calculated between the two vectors.

Additional measurements

To make other measurement on the same image, such as “Fluke Span”, “Rostrum-Blowhole”, etc., simply select one of the options (Measure Length/Area/Angle) and follow the relevant steps previously mentioned. Repeat to your heart's content.

Exporting Measurements

Once measurements are complete, select “Export Measurements” and select a folder to save a .csv containing all the measurements (in meters) and their labels and a .png image of the measurement lines drawn on the image.

Open Next Image

To measure a new animal/image select “New Image”, enter updated parameters in the left input window (if any), and begin measuring.

Demo

For a demonstration of MorphoMetriX used to measure a Minke whale, please refer to the demo directory.

Attribution

If you make use of this code, you should cite the following paper:

Torres, W.I., and Bierlich, K.C (2020). MorphoMetriX: a photogrammetric measurement GUI for morphometric analysis of megafauna.. Journal of Open Source Software, 4(44), 1825. https://doi.org/10.21105/joss.01825

Contributing

We would love for you to contribute to MorphoMetriX! Please read our contributing guidelines.

Code of Conduct

See CODEOFCONDUCT

License

Anaconda-Server Badge

Copyright (C) 2018-2019 Walter Torres, KC Bierlich

MorphoMetriX is free software made available under the MIT License. For details see the the LICENSE file.

Contributors

Walter I. Torres and KC Bierlich are the developers of this software.

Owner

  • Name: Walter Torres
  • Login: wingtorres
  • Kind: user

Postdoctoral Scholar at Applied Physics Laboratory at University of Washington. Specialty in shallow water physical oceanography, wave-driven flows.

JOSS Publication

MorphoMetriX: a photogrammetric measurement GUI for morphometric analysis of megafauna
Published
January 16, 2020
Volume 5, Issue 45, Page 1825
Authors
Walter I. Torres
Nicholas School of the Environment, Duke University Marine Laboratory
Kc Bierlich
Nicholas School of the Environment, Duke University Marine Laboratory
Editor
Kevin M. Moerman ORCID
Tags
GUI Photogrammetry Morphometry Drones Remote sensing

GitHub Events

Total
  • Watch event: 2
Last Year
  • Watch event: 2

Committers

Last synced: 7 months ago

All Time
  • Total Commits: 77
  • Total Committers: 4
  • Avg Commits per committer: 19.25
  • Development Distribution Score (DDS): 0.065
Past Year
  • Commits: 0
  • Committers: 0
  • Avg Commits per committer: 0.0
  • Development Distribution Score (DDS): 0.0
Top Committers
Name Email Commits
wingtorres w****s@d****u 72
cbirdferrer c****r@g****m 3
Walter Torres w****s@u****u 1
Walter Torres w****t@W****l 1
Committer Domains (Top 20 + Academic)

Issues and Pull Requests

Last synced: 6 months ago

All Time
  • Total issues: 15
  • Total pull requests: 4
  • Average time to close issues: about 1 year
  • Average time to close pull requests: 3 days
  • Total issue authors: 12
  • Total pull request authors: 3
  • Average comments per issue: 3.13
  • Average comments per pull request: 0.25
  • Merged pull requests: 2
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 0
  • Pull requests: 0
  • Average time to close issues: N/A
  • Average time to close pull requests: N/A
  • Issue authors: 0
  • Pull request authors: 0
  • Average comments per issue: 0
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • eihwood (2)
  • dasweeney4423 (2)
  • RiccardoCicciarella (2)
  • agc-coding (1)
  • agatheserres (1)
  • wingtorres (1)
  • isaacvandor (1)
  • mcsherrill (1)
  • KCBierlich (1)
  • bw4sz (1)
  • ashleyblawas (1)
  • CharlotteBahamas2017 (1)
Pull Request Authors
  • cbirdferrer (2)
  • wingtorres (1)
  • WilliamCarlos (1)
Top Labels
Issue Labels
Pull Request Labels