Skip to content
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

relatively low performance of draw.polygon #5471

Open
grlee77 opened this issue Jul 12, 2021 · 2 comments
Open

relatively low performance of draw.polygon #5471

grlee77 opened this issue Jul 12, 2021 · 2 comments

Comments

@grlee77
Copy link
Contributor

grlee77 commented Jul 12, 2021

Description

@c-arthurs measured much poorer performance of polygon drawing in scikit-image as compared to PIL

The draw module has not gotten much attention lately, but just wanted to note this here for those interested in potentially updating it in the future (and/or modifying the existing docs to point out alternatives!).

One change that can lead to a substantial improvement with relatively small changes to existing routines that grow Python lists of coordinates is refactoring the Cython code to use std::vector<Py_ssize_t> instead. I tried this locally just on the existing draw.polygon function and it does help, but I still don't think it is going to be competitive with the PIL implementation.

@grlee77
Copy link
Contributor Author

grlee77 commented Jul 12, 2021

There was also a function to draw a polyong into a pre-existing array proposed in #5453 that was faster than our existing routines, but also not competitive with PIL.

@rfezzani
Copy link
Member

Link to #5969

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants