MomX / Momocs

:dove: Morphometrics using R
http://momx.github.io/Momocs/
51 stars 18 forks source link

outlines randomly modified #235

Open raynernunez opened 1 week ago

raynernunez commented 1 week ago

Hi, I'm trying to compare these outlines, Lepidoptera genitalia, but for some reason momocs gets wrong, and randomly, some of the images. I removed part of the structure in some samples to compare and the outlines were captured fine, look at the two marked samples. I ran it several times, each time different outlines were modified. Maybe these shapes are too complex? Any help would be great. Thanks.

complete body only

vbonhomme commented 1 week ago

Hi there,

I don't think that's a matter of shape complexity but how the masks were done. The current algorithm is only fully reproducible when the masks are on the middle point of the jpg. If not, the algo will try to find a black pixel, randomly, on the jpg. Also when single pixels are isolated on the diagonal eg the top right 'x' below:

x o x
x x o
x o o

outline extract may/will fail

hope this helps, if not, send me the masks that produce different outlines and I gonna have a look,

all the best,

v

Le lun. 24 juin 2024 à 10:59, raynernunez @.***> a écrit :

Hi, I'm trying to compare these outlines, Lepidoptera genitalia, but for some reason momocs gets wrong, and randomly, some of the images. I removed part of the structure in some samples to compare and the outlines were captured fine, look at the two marked samples. Maybe these shapes are too complex? Any help would be great. Thanks. body.only.jpg (view on web) https://github.com/MomX/Momocs/assets/97603334/4b832afb-f285-4f95-8d5a-a32cda647f05 complete.jpg (view on web) https://github.com/MomX/Momocs/assets/97603334/3180c57e-fa30-4361-b741-f319a4fb6b1e

— Reply to this email directly, view it on GitHub https://github.com/MomX/Momocs/issues/235, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABECQFQBOQES4IJODZZFOG3ZI7NX3AVCNFSM6AAAAABJZMNB4KVHI2DSMVQWIX3LMV43ASLTON2WKOZSGM3DSNRVGMZDIMQ . You are receiving this because you are subscribed to this thread.Message ID: @.***>

-- vincentbonhomme.fr http://www.vincentbonhomme.fr cevennette.fr https://www.cevennette.fr 🌱

raynernunez commented 1 week ago

I'll check that, thank you very much

raynernunez commented 1 week ago

Hi, when I created the mask I cropped them at the same size and tried them to be at the center. Now I tried adding a bit more white background around the shapes but it is still happening and each time I run it gets erroneous outlines for different samples (attached 2 examples).

Here are the masks so you can try to figure out how to make it work.

Many thanks again

Cheers

Rayner [image: run2.jpg] [image: run1.jpg] Dr. Rayner Núñez

Postdoc, Lepidoptera & Trichoptera Section

Centre for Taxonomy and Morphology @., @. @.***>

On Mon, 24 Jun 2024 at 11:14, Vincent Bonhomme @.***> wrote:

Hi there,

I don't think that's a matter of shape complexity but how the masks were done. The current algorithm is only fully reproducible when the masks are on the middle point of the jpg. If not, the algo will try to find a black pixel, randomly, on the jpg. Also when single pixels are isolated on the diagonal eg the top right 'x' below:

x o x
x x o
x o o

outline extract may/will fail

hope this helps, if not, send me the masks that produce different outlines and I gonna have a look,

all the best,

v

Le lun. 24 juin 2024 à 10:59, raynernunez @.***> a écrit :

Hi, I'm trying to compare these outlines, Lepidoptera genitalia, but for some reason momocs gets wrong, and randomly, some of the images. I removed part of the structure in some samples to compare and the outlines were captured fine, look at the two marked samples. Maybe these shapes are too complex? Any help would be great. Thanks. body.only.jpg (view on web) < https://github.com/MomX/Momocs/assets/97603334/4b832afb-f285-4f95-8d5a-a32cda647f05>

complete.jpg (view on web) < https://github.com/MomX/Momocs/assets/97603334/3180c57e-fa30-4361-b741-f319a4fb6b1e>

— Reply to this email directly, view it on GitHub https://github.com/MomX/Momocs/issues/235, or unsubscribe < https://github.com/notifications/unsubscribe-auth/ABECQFQBOQES4IJODZZFOG3ZI7NX3AVCNFSM6AAAAABJZMNB4KVHI2DSMVQWIX3LMV43ASLTON2WKOZSGM3DSNRVGMZDIMQ>

. You are receiving this because you are subscribed to this thread.Message ID: @.***>

-- vincentbonhomme.fr http://www.vincentbonhomme.fr cevennette.fr https://www.cevennette.fr 🌱

— Reply to this email directly, view it on GitHub https://github.com/MomX/Momocs/issues/235#issuecomment-2186189457, or unsubscribe https://github.com/notifications/unsubscribe-auth/AXIU6BVCNIWGMJCZW73XXJ3ZI7WQ7AVCNFSM6AAAAABJZMNB4KVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCOBWGE4DSNBVG4 . You are receiving this because you authored the thread.Message ID: @.***>

vbonhomme commented 1 week ago

cant see the images, could you please email them to me? @.***

Le lun. 24 juin 2024 à 13:00, raynernunez @.***> a écrit :

Hi, when I created the mask I cropped them at the same size and tried them to be at the center. Now I tried adding a bit more white background around the shapes but it is still happening and each time I run it gets erroneous outlines for different samples (attached 2 examples).

Here are the masks so you can try to figure out how to make it work.

Many thanks again

Cheers

Rayner [image: run2.jpg] [image: run1.jpg] Dr. Rayner Núñez

Postdoc, Lepidoptera & Trichoptera Section

Centre for Taxonomy and Morphology @., @. @.***>

On Mon, 24 Jun 2024 at 11:14, Vincent Bonhomme @.***> wrote:

Hi there,

I don't think that's a matter of shape complexity but how the masks were done. The current algorithm is only fully reproducible when the masks are on the middle point of the jpg. If not, the algo will try to find a black pixel, randomly, on the jpg. Also when single pixels are isolated on the diagonal eg the top right 'x' below:

x o x
x x o
x o o

outline extract may/will fail

hope this helps, if not, send me the masks that produce different outlines and I gonna have a look,

all the best,

v

Le lun. 24 juin 2024 à 10:59, raynernunez @.***> a écrit :

Hi, I'm trying to compare these outlines, Lepidoptera genitalia, but for some reason momocs gets wrong, and randomly, some of the images. I removed part of the structure in some samples to compare and the outlines were captured fine, look at the two marked samples. Maybe these shapes are too complex? Any help would be great. Thanks. body.only.jpg (view on web) <

https://github.com/MomX/Momocs/assets/97603334/4b832afb-f285-4f95-8d5a-a32cda647f05>

complete.jpg (view on web) <

https://github.com/MomX/Momocs/assets/97603334/3180c57e-fa30-4361-b741-f319a4fb6b1e>

— Reply to this email directly, view it on GitHub https://github.com/MomX/Momocs/issues/235, or unsubscribe <

https://github.com/notifications/unsubscribe-auth/ABECQFQBOQES4IJODZZFOG3ZI7NX3AVCNFSM6AAAAABJZMNB4KVHI2DSMVQWIX3LMV43ASLTON2WKOZSGM3DSNRVGMZDIMQ>

. You are receiving this because you are subscribed to this thread.Message ID: @.***>

-- vincentbonhomme.fr http://www.vincentbonhomme.fr cevennette.fr https://www.cevennette.fr 🌱

— Reply to this email directly, view it on GitHub https://github.com/MomX/Momocs/issues/235#issuecomment-2186189457, or unsubscribe < https://github.com/notifications/unsubscribe-auth/AXIU6BVCNIWGMJCZW73XXJ3ZI7WQ7AVCNFSM6AAAAABJZMNB4KVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCOBWGE4DSNBVG4>

. You are receiving this because you authored the thread.Message ID: @.***>

— Reply to this email directly, view it on GitHub https://github.com/MomX/Momocs/issues/235#issuecomment-2186291970, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABECQFU4IKA75WESSOWUFA3ZI736LAVCNFSM6AAAAABJZMNB4KVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCOBWGI4TCOJXGA . You are receiving this because you commented.Message ID: @.***>

-- vincentbonhomme.fr http://www.vincentbonhomme.fr cevennette.fr https://www.cevennette.fr 🌱

raynernunez commented 1 week ago

Hi, thanks, just did

Dr. Rayner Núñez

Postdoc, Lepidoptera & Trichoptera Section

Centre for Taxonomy and Morphology @., @. @.***>

On Mon, 24 Jun 2024 at 12:12, Vincent Bonhomme @.***> wrote:

cant see the images, could you please email them to me? @.***

Le lun. 24 juin 2024 à 13:00, raynernunez @.***> a écrit :

Hi, when I created the mask I cropped them at the same size and tried them to be at the center. Now I tried adding a bit more white background around the shapes but it is still happening and each time I run it gets erroneous outlines for different samples (attached 2 examples).

Here are the masks so you can try to figure out how to make it work.

Many thanks again

Cheers

Rayner [image: run2.jpg] [image: run1.jpg] Dr. Rayner Núñez

Postdoc, Lepidoptera & Trichoptera Section

Centre for Taxonomy and Morphology @., @. @.***>

On Mon, 24 Jun 2024 at 11:14, Vincent Bonhomme @.***> wrote:

Hi there,

I don't think that's a matter of shape complexity but how the masks were done. The current algorithm is only fully reproducible when the masks are on the middle point of the jpg. If not, the algo will try to find a black pixel, randomly, on the jpg. Also when single pixels are isolated on the diagonal eg the top right 'x' below:

x o x
x x o
x o o

outline extract may/will fail

hope this helps, if not, send me the masks that produce different outlines and I gonna have a look,

all the best,

v

Le lun. 24 juin 2024 à 10:59, raynernunez @.***> a écrit :

Hi, I'm trying to compare these outlines, Lepidoptera genitalia, but for some reason momocs gets wrong, and randomly, some of the images. I removed part of the structure in some samples to compare and the outlines were captured fine, look at the two marked samples. Maybe these shapes are too complex? Any help would be great. Thanks. body.only.jpg (view on web) <

https://github.com/MomX/Momocs/assets/97603334/4b832afb-f285-4f95-8d5a-a32cda647f05>

complete.jpg (view on web) <

https://github.com/MomX/Momocs/assets/97603334/3180c57e-fa30-4361-b741-f319a4fb6b1e>

— Reply to this email directly, view it on GitHub https://github.com/MomX/Momocs/issues/235, or unsubscribe <

https://github.com/notifications/unsubscribe-auth/ABECQFQBOQES4IJODZZFOG3ZI7NX3AVCNFSM6AAAAABJZMNB4KVHI2DSMVQWIX3LMV43ASLTON2WKOZSGM3DSNRVGMZDIMQ>

. You are receiving this because you are subscribed to this thread.Message ID: @.***>

-- vincentbonhomme.fr http://www.vincentbonhomme.fr cevennette.fr https://www.cevennette.fr 🌱

— Reply to this email directly, view it on GitHub https://github.com/MomX/Momocs/issues/235#issuecomment-2186189457, or unsubscribe <

https://github.com/notifications/unsubscribe-auth/AXIU6BVCNIWGMJCZW73XXJ3ZI7WQ7AVCNFSM6AAAAABJZMNB4KVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCOBWGE4DSNBVG4>

. You are receiving this because you authored the thread.Message ID: @.***>

— Reply to this email directly, view it on GitHub https://github.com/MomX/Momocs/issues/235#issuecomment-2186291970, or unsubscribe < https://github.com/notifications/unsubscribe-auth/ABECQFU4IKA75WESSOWUFA3ZI736LAVCNFSM6AAAAABJZMNB4KVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCOBWGI4TCOJXGA>

. You are receiving this because you commented.Message ID: @.***>

-- vincentbonhomme.fr http://www.vincentbonhomme.fr cevennette.fr https://www.cevennette.fr 🌱

— Reply to this email directly, view it on GitHub https://github.com/MomX/Momocs/issues/235#issuecomment-2186321143, or unsubscribe https://github.com/notifications/unsubscribe-auth/AXIU6BVFZVV7HTRHQWFATDLZI75KLAVCNFSM6AAAAABJZMNB4KVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCOBWGMZDCMJUGM . You are receiving this because you authored the thread.Message ID: @.***>