Hi Stefan.
Accuracy is definitely #1. That's why the suggestion is that algorithms choose for themselves. Sometimes it makes sense to return the same type as the input, sometimes it doesn't. What is important is that images remain scaled, and can again be interpreted by the next function in the pipeline. Where possible, we do not want to make copies in memory. So, in rgb2gray's case, e.g., the conversion gives floating point numbers by default. We do not need to convert those numbers to uint for the user and, actually, we shouldn't--because that would destroy accuracy.
Thanks. That definitely answers my question.
I'll whip up the conversion functions and offer them as a PR. This is probably important, since it will influence the code written for 0.4 a lot.
Thanks for tanking my concern seriously. Sounds great :) Cheers, Andy
On Mon, Sep 26, 2011 at 11:07 AM, Andreas Mueller <amueller@ais.uni-bonn.de> wrote:
I'll whip up the conversion functions and offer them as a PR. This is probably important, since it will influence the code written for 0.4 a lot.
Thanks for tanking my concern seriously. Sounds great :)
Here we go: https://github.com/scikits-image/scikits.image/pull/34 Regards Stéfan
participants (2)
-
Andreas Mueller
-
Stéfan van der Walt