GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | ||||||||||||||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | ||||||||||||||||||||||||||||||
GeezerVison is showing github.com — Fix image interpolation by tacaswell · Pull Request #8966 · matplotlib/matplotlib Conversation
|
|
In rotate_image.png, the edge of the image seems to follow the middle of the dashes more closely in the original version. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
👍 on the approach--interpolating before doing any other transforms makes sense to me. I'm also a little concerned about the change to rotate_image, but no clue what's going wrong.
Caught a couple typos in the comments.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
|
||
| # we are done with A_scaled now, remove from namespace to be sure! | ||
| del A_scaled | ||
| # un-scale the resampled data to approximatly the |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
approximatly -> approximate
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| self.get_filterrad() or 0.0) | ||
| # we are done with the mask, delete from namespace to be sure! | ||
| del mask | ||
| # Agg tells us a pixel has no value not setting a value into it |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
I think there's a word missing in this comment.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
a883cd2 to
2db0d6a
Compare
|
I anticipate re-writing history here before it gets merged. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
I see some failures locally that I do not understand, let see if we see them on travis. Still have to sort out those edge effects. History will get re-written at least once more before this is ready to merge. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
I am actually comfertable that the edges are the correct behavior. If you look at the zoomed in bottom 3x3 area you can see that the out of range area is against the edge, the bottom right is the highest value which is equal to vmax of the norm. It is correct, from the interpolations point of view, that the pixel past the last point (which it view as being at the center of that pixel) are of greater value (which are then correctly marked as out of range). |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
c511460 to
db19f9f
Compare
1962d84 to
1e160aa
Compare
There was an error while loading. Please reload this page.
|
Todos:
|
Sorry, something went wrong.
There was an error while loading. Please reload this page.
- interpolate raw, not normed, data - should reduce memory footprint, only 1 or 2 copies of input data - this will change many tests in small ways - down-casting input data before interpolation was causing issues with numerical precision so work in no less than the input float type - Numpy 1.7 does not support `np.nanmin` and `np.nanmax` on masked arrays (instead of returning a number it returns a MaskedIterator).
- update to mpl20 style - re-generate as needed - bump threshold on pngsuite test
- bump to mpl20 style
1e160aa to
ec43d0e
Compare
from copy import copy import matplotlib.image as mimage def interpolation_grid(data, vmin=None, vmax=None): cm = copy(plt.get_cmap('viridis')) cm.set_over('r') cm.set_under('b') cm.set_bad('k') fig, ax_grid = plt.subplots(3, 6, sharex=True, sharey=True) ret = [] for interp, ax in zip(sorted(mimage._interpd_), ax_grid.ravel()): ax.set_title(interp) im = ax.imshow(data, cmap=cm, interpolation=interp) ax.axis('off') im.set_clim(vmin, vmax) ret.append(im) return ret ims_a = interpolation_grid([[0, 1], [1, 0]], 0, 1) ims_b = interpolation_grid(np.tile([[0, 1], [1, 0]], (10, 10)), 0, 1) I am satisfied that the speckles are edge effects on the higher-order interpolators That is the smallest upper limit that shows the speckles on my system which gives us an idea of the level of the numeric instability. I don't think that it is worth playing games to stay just under it as I suspect it will vary between systems. If we do anything about this we should bump the Autoscales out a bit. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Push the stale flag down into the ScalarMappable so that it gets applied to all ScalarMappable sub-classes (ex Collections).
8186243 to
346bb1a
Compare
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.