I've been doing some image processing and i noticed that when i call a Mathematica function like GaussianFilter it returns an image of type "Real" even though the image i passed was of type "Byte" which causes a huge increase in memory usage.
I'm aware i can change the type of the image after the call using Image[img,"Byte"] but that is just tedious and processing overhead.
So is there a way to tell Mathematica开发者_Python百科 not to change the type?
If Mma does not change the image type, you may get unexpected results. Consider (as a limit case) the binarized image of Lena:
BTW, anyone who used Lena as an example should read these two articles:
http://www.ecogito.net/articles/lena.html
http://www-2.cs.cmu.edu/~chuck/lennapg/lenna_visit.html
And optionally this one, of historical interest (not much to read, though):
(NSFW)http://www.lenna.org/full/len_full.html
精彩评论