From: Daniel H. <dh...@gm...> - 2011-11-11 00:22:20
|
On this topic, I have a patch that tells BboxImage whether or not to always apply interpolation (as is the desire when doing data analysis) or to apply interpolation only when the image is at a non-native resolution (as is the desire when using an image to annotate something). The pull request is here: Since we cannot attach files on github, I've attached the test script, image file that I was using, and the before/after here. And can the max post size be increased on matplotlib-users, so that when even smallish images are attached, the messages don't go into moderation? On Thu, Oct 13, 2011 at 11:40 AM, Daniel Hyams <dh...@gm...> wrote: > Ah yes, I forget :/ I was focused on images as being "pure" things that > should be displayed, and forgot about the image processing angle. > So would the solution be a keyword argument that tells imshow/BboxImage and > friends not to interpolate when at native resolution, which is set to the > current behavior as default? > If that's not an acceptable solution, I can just leave the patch in my own > personal code and not worry about any further...I thought that I was fixing > a bug there :) > > I guess the main difference is whether the image is treated as sacred and > should be displayed perfectly when possible, versus the ability to modify > the picture on purpose via the interpolations, for whatever reason the user > wants. Understandably, matplotlib has taken the latter approach, because > the context has always been (as far as I can tell from the examples) > displaying the pixels for a scientific purpose. However, when you want to > display an image for a annotational type purpose, the former approach should > be taken, in my opinion. > > > On Thu, Oct 13, 2011 at 11:13 AM, John Hunter <jd...@gm...> wrote: >> >> On Thu, Oct 13, 2011 at 10:06 AM, Daniel Hyams <dh...@gm...> wrote: >> >> > Isn't the purpose of interpolation to handle situations where the image >> > is >> > being displayed at a different size than its native resolution? It >> > seems >> >> Not solely, it can also be used to do local average of noisy images to >> get a smoother view, eg bilinear or bicubic averaging of neighboring >> pixels. > > > > -- > Daniel Hyams > dh...@gm... > -- Daniel Hyams dh...@gm... |