On 2013-06-28 7:03 PM, Tony S Yu wrote:
>
> In skimage/novice/novice.py:
>
> > @@ -0,0 +1,390 @@
> > +import os, skimage, numpy as np, imghdr
>
> @stefanv <https://github.com/stefanv> and I just spoke at SciPy 2013 
> and we're in agreement that using float 0..1 instead of uint8 0..255 
> is preferable. The pain of uint8 (e.g., underflow/overflow) and 
> advantages of 0..1 (e.g., intensity translates to percentage) are 
> tipping points for us.
>
> Counter arguments?
>
The novice module is intended for use in teaching, and using floats 
instead of ints hides a lot of details that are actually useful 
lessons.  For example, we can use "why 255?" to motivate discussion of 
binary numbers and bytes, while "average these two images" becomes a lot 
more interesting (pedagogically) if students have to deal with "what's 
the average of 120 and 121?" themselves, rather than it being hidden 
behind a floating point interface that magically makes the decision for 
them. 
http://www.amazon.com/Introduction-Computing-Programming-Multimedia-Approach/dp/0136060234/ 
(an "intro to CS" book with sound pedagogical foundations based on over 
a decade of research) walks through these issues.
Long story short, that "pain" is all teachable moments :-)
Cheers,
Greg