-
Notifications
You must be signed in to change notification settings - Fork 84
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Rasterize 2D Landmarks Method #670
Rasterize 2D Landmarks Method #670
Conversation
This is because scatter does some weird things with the axes and makes it really impossible to generate a tight layout, whereas plot seems to behave properly. From what I can see the output is identical.
This method allows rasterizing of landmark groups onto an image. Multiple landmark groups can be rasterized onto the same image for efficiency. Currently two backends are provided, pillow and matplotlib. The matplotlib backend is far more feature complete, but slow! The pillow backend is much simpler but an order of magnitude faster than the matplotlib backend.
That looks great @patricksnape !! |
Change gaussian ellipse code to use plot as well to make the behaviour consistent.
+1 |
@jabooth Want to check this too? |
Works well! Only comment is that I think a fairly likely that users may wish to render all landmarks out, and atm that would require something like: img.rasterize_landmarks_2d(group=img.landmarks.keys()) Saying that, in such cases you would need to know what order the keys are in to choose different colours etc for the landmarks. The API chosen here is consistent with what we have elsewhere in menpo, so let's get this in. +1 |
Rasterize 2D Landmarks Method
This method allows rasterizing of landmark groups onto an image.
Multiple landmark groups can be rasterized onto the same
image for efficiency. Currently two backends are provided, pillow
and matplotlib. The matplotlib backend is far more feature
complete, but slow! The pillow backend is much simpler but
an order of magnitude faster than the matplotlib backend.
@nontas check this out - it should be something you will like 😄