unibas-gravis / scalismo-faces

Scalable Image Analysis and Shape Modelling: Module to work with 2d images, with a focus on face images
Apache License 2.0
118 stars 27 forks source link

Fixes #106 - Proper handling of extracting a texture where parts of the face is outside of the image #107

Closed Andreas-Forster closed 6 years ago

Andreas-Forster commented 6 years ago

This PR fixes #106 (see for discussion). For this, it simply treats the case where the color should be extracted outside of the image the same as invisible pixels. They return a None. When passing an image with a proper AccessMode this behavior can be changed.

andreas-schneider commented 6 years ago

Why not do a bounds check instead of the Try? Wouldn't it be more readable?

Andreas-Forster commented 6 years ago

The checks would include querying the access mode so that we still can change the behaviour from the outside. I think this would not be more readable. But to further discuss that you can give it a try if you want to.

On Tue, Apr 24, 2018 at 2:24 PM, andreas-schneider <notifications@github.com

wrote:

Why not do a bounds check instead of the Try? Wouldn't it be more readable?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/unibas-gravis/scalismo-faces/pull/107#issuecomment-383911075, or mute the thread https://github.com/notifications/unsubscribe-auth/AEv_Zt8PaDsCeEbE1T5pMu58CycF_ENjks5trxmTgaJpZM4ThkPg .

--


Dr. Andreas Morel-Forster Departement Mathematik und Informatik Spiegelgasse 1 CH-4051 Basel PHONE: +41 61 207 05 52 MAIL: Andreas.Forster@u Forster.Andreas@gmail.comnibas.ch