Issue with images and procrustes analysis in geomorph

209 views
Skip to first unread message

Marco Crotti

unread,
Dec 22, 2017, 5:40:17 AM12/22/17
to geomorph R package
Hello everyone,

I'm having some issues with geomorph, in particuler with procrustes analysis. I have attached the working files and the figures to understand the issue a bit better. So, months ago I did some morphometrics using the attached file out.tps, and everything worked fine. When I use the gpagen function and then plotAllspecimens using this file I get the out.tps_procrustes.png image. Now I took more photos and I remade a new tps file, whitefish_no_missing2.tps (as I changed the number and position of landmarks) using the new photos plus the photos I used in out.tps. This is where the issue starts: when I use gpagen and plotAllspecimens I don't get a proper result, with some individuals being completely distorted (see whitefish_no_missing_procrustes.png). I can't figure out the issue, I tried the unbend function in tpsutil but it doesn't seem to work. Also, when I load the whitefish_no_missing.TPS in MorphoJ this issue doesnt appear at all.

Has any of you encountered something similar before? I appreciate the help so close to the holidays.

Best wishes,

Marco
out.tps
out.tps_procrustes.png
whitefish_no_missing_procrustes.png
whitefish_no_missing2.TPS

Mike Collyer

unread,
Dec 22, 2017, 12:21:09 PM12/22/17
to geomorph R package
Dear Marco,

This is appears to be both an issue with readland.tps and your data, or at least, how they are working together.  readland.tps expects that you have 456 specimens but somehow is only recognizing 455 instances of points = 7 in your second curves.  At some point, the 7 curve points are read from the data from the next specimen, and then the problem cascades from specimen to specimen.

We will try to dig some more and see if this is purely a programming error, a quality control error (the function not catching some missing data), or something else, but unfortunately, your email catches all of us on holiday, so it might take a while to sort this out.  One thing you could do in the interim - if you want a quick solution - is remove all lines for curves and points from your tps file, and change LM=25 to LM=47 (the total of fixed landmarks and sliders) and try again.  For geomorph, the curves and points codes do not mean anything and the readland.tps function just turns these points into regular landmarks; curves are defined separately.  

Sorry for the delay, but happy holidays! 

Mike

--
You received this message because you are subscribed to the Google Groups "geomorph R package" group.
To unsubscribe from this group and stop receiving emails from it, send an email to geomorph-r-pack...@googlegroups.com.
To post to this group, send email to geomorph-...@googlegroups.com.
Visit this group at https://groups.google.com/group/geomorph-r-package.
To view this discussion on the web, visit https://groups.google.com/d/msgid/geomorph-r-package/49101604-a635-4cae-96e0-c4198f736bad%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
<out.tps><out.tps_procrustes.png><whitefish_no_missing_procrustes.png><whitefish_no_missing2.TPS>

Marco Crotti

unread,
Dec 22, 2017, 12:35:58 PM12/22/17
to geomorph R package
Hi Mike,

Thanks a lot for the quick reply. I don't know why I didn't try this earlier, for the time being I used tpsutil to remove the curves and used only the 25 fixed landmarks, and it works fine now, maybe I made some mistake while digitizing the sliding landmarks in tpsdig, I'll have a look.

Thank you again for your help so close to the holidays, I really appreciate it.

Best,

Marco


On Friday, December 22, 2017 at 6:21:09 PM UTC+1, Michael Collyer wrote:
Dear Marco,

This is appears to be both an issue with readland.tps and your data, or at least, how they are working together.  readland.tps expects that you have 456 specimens but somehow is only recognizing 455 instances of points = 7 in your second curves.  At some point, the 7 curve points are read from the data from the next specimen, and then the problem cascades from specimen to specimen.

We will try to dig some more and see if this is purely a programming error, a quality control error (the function not catching some missing data), or something else, but unfortunately, your email catches all of us on holiday, so it might take a while to sort this out.  One thing you could do in the interim - if you want a quick solution - is remove all lines for curves and points from your tps file, and change LM=25 to LM=47 (the total of fixed landmarks and sliders) and try again.  For geomorph, the curves and points codes do not mean anything and the readland.tps function just turns these points into regular landmarks; curves are defined separately.  

Sorry for the delay, but happy holidays! 

Mike

On Dec 22, 2017, at 5:40 AM, Marco Crotti <marco....@gmail.com> wrote:

Hello everyone,

I'm having some issues with geomorph, in particuler with procrustes analysis. I have attached the working files and the figures to understand the issue a bit better. So, months ago I did some morphometrics using the attached file out.tps, and everything worked fine. When I use the gpagen function and then plotAllspecimens using this file I get the out.tps_procrustes.png image. Now I took more photos and I remade a new tps file, whitefish_no_missing2.tps (as I changed the number and position of landmarks) using the new photos plus the photos I used in out.tps. This is where the issue starts: when I use gpagen and plotAllspecimens I don't get a proper result, with some individuals being completely distorted (see whitefish_no_missing_procrustes.png). I can't figure out the issue, I tried the unbend function in tpsutil but it doesn't seem to work. Also, when I load the whitefish_no_missing.TPS in MorphoJ this issue doesnt appear at all.

Has any of you encountered something similar before? I appreciate the help so close to the holidays.

Best wishes,

Marco

--
You received this message because you are subscribed to the Google Groups "geomorph R package" group.
To unsubscribe from this group and stop receiving emails from it, send an email to geomorph-r-package+unsub...@googlegroups.com.

Mike Collyer

unread,
Dec 22, 2017, 12:38:00 PM12/22/17
to geomorph-...@googlegroups.com
Marco,

I’m glad that solution worked!  Regardless, we are thankful to know that we might have an issue reading curves that we need to investigate… after the holidays.

Best,
Mike

To unsubscribe from this group and stop receiving emails from it, send an email to geomorph-r-pack...@googlegroups.com.

To post to this group, send email to geomorph-...@googlegroups.com.
Visit this group at https://groups.google.com/group/geomorph-r-package.
Reply all
Reply to author
Forward
0 new messages