Closed pxl-th closed 3 years ago
Also maybe we should expose the API?
I'm okay to this. Previously we were concerned about the naming issues because the name imresize
happens to be identical to MATLAB. But since the Google vs Oracle java API lawsuit ended I have good reason to believe this won't be an issue at all.
Merging #150 (c3eb09e) into master (284bb1e) will increase coverage by
0.13%
. The diff coverage is100.00%
.
@@ Coverage Diff @@
## master #150 +/- ##
==========================================
+ Coverage 90.14% 90.27% +0.13%
==========================================
Files 8 8
Lines 213 216 +3
==========================================
+ Hits 192 195 +3
Misses 21 21
Impacted Files | Coverage Δ | |
---|---|---|
src/ImageTransformations.jl | 83.33% <ø> (ø) |
|
src/resizing.jl | 100.00% <100.00%> (ø) |
Continue to review full report at Codecov.
Legend - Click here to learn more
Δ = absolute <relative> (impact)
,ø = not affected
,? = missing data
Powered by Codecov. Last update 284bb1e...c3eb09e. Read the comment docs.
Great! Can you add some test to ensure that it's working equivalently to
imresize
?
Added
Just sent you an invitation in case you want to commit more changes
Just sent you an invitation in case you want to commit more changes
Thanks!
If I'm not mistaking anything, BSpline interpolations do not modify the original array?
Not for Constant
and Linear
, but they do for Quadratic
and Cubic
. I don't think you can use interpolate!
with Cubic
, but you can for quadratic, search https://juliamath.github.io/Interpolations.jl/latest/control/ for "destroys".
We might need a fix for the quadratic case pronto.
I'll make a PR asap and add tests to ensure the original image is not changed (should've done this in this PR).
This PR avoids allocations for the
BSpline
types of interpolations when doing in-place resizing. If I'm not mistaking anything,BSpline
interpolations do not modify the original array?The benefits are considerable. Also maybe we should expose the API?
Code to benchmark: