In two demension. Spline2 (Spline16), Lanczos2, Bi-cubic are all 4x4. Spline3 (Spline36) and Lanczos3 are 6x6.
High tap count Spline filters? (Spline36/64/100/144/196/256)
Re: High tap count Spline filters? (Spline36/64/100/144/196/256)
Re: High tap count Spline filters? (Spline36/64/100/144/196/256)
Akira, what is your preference? -define filter:lobes={2,3,4} or -define:support={2,3,4}?
Re: High tap count Spline filters? (Spline36/64/100/144/196/256)
-define filter:lobes={2,3,4} should be righter if you use filter:lobes={2,3,4} for Lanczos2,3,4
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: High tap count Spline filters? (Spline36/64/100/144/196/256)
Makes sense to me to use whatever notation is consistent with the current notation for lanczos for example.
Correct me if I am wrong, but Anthony uses lobes for the number of lobes and support for how many lobes the filter truncates it to.
Correct me if I am wrong, but Anthony uses lobes for the number of lobes and support for how many lobes the filter truncates it to.
Re: High tap count Spline filters? (Spline36/64/100/144/196/256)
IMv7 Beta is ready for testing. Use CubicSpline and define filter:lobes={2,3,4}.
Re: High tap count Spline filters? (Spline36/64/100/144/196/256)
That's why I think filter:lobes is more appropriate than filter:support.Makes sense to me to use whatever notation is consistent with the current notation for lanczos for example.
Correct me if I am wrong, but Anthony uses lobes for the number of lobes and support for how many lobes the filter truncates it to.
Support of Spline16,36,64 are 2, 3, 4 because the lobes of them are 2,3,4, so the filter doesn't truncate it within the lobe. If you use filter:suppor for selecting spline16/36/64, you can't use the custom filter support option for them.
http://svn.int64.org/viewvc/int64/resam ... rnels.html
Samples in 3.0-4.0 area in Spline64 almost don't affect the final result, so 4-lobed Spline (Spline64) and the support size of 3 might be effective for example.
Re: High tap count Spline filters? (Spline36/64/100/144/196/256)
Thanks! It works beautifully!
This might be not a good test image. I can't tell any difference between Lanczos one and Spline36 one (or 16/64). Apparently, this NASA image just tries to tell us why we need to resize a picture in the linear light space.
https://visibleearth.nasa.gov/view.php?id=55167
https://eoimages.gsfc.nasa.gov/images/i ... _16384.tif
Spline36 - gamma space
Code: Select all
magick land_lights_16384.tif -filter CubicSpline -define filter:lobes=3 -resize 512 land_lights_spline36_gamma.png
Lanczos3 - gamma space
Code: Select all
magick land_lights_16384.tif -filter Lanczos -resize 512 land_lights_lanczos_gamma.png
Spline36 - linear space
Code: Select all
magick land_lights_16384.tif -colorspace RGB -filter CubicSpline -define filter:lobes=3 -resize 512 -colorspace sRGB land_lights_spline36_linear.png
Lanczos3 - linear space
Code: Select all
magick land_lights_16384.tif -colorspace RGB -filter Lanczos -resize 512 -colorspace sRGB land_lights_lanczos_linear.png
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: High tap count Spline filters? (Spline36/64/100/144/196/256)
Here are my results for the new beta. The filter values now have no long list of zeros and seem reasonable. The verbose data seems to indicate the correct filter name and support.
Code: Select all
magick logo128.png -colorspace RGB -define filter:verbose=true -define filter:lobes=2 -filter cubicspline -resize 400% -colorspace sRGB logo128_spline16.png
magick logo128.png -colorspace RGB -define filter:verbose=true -define filter:lobes=3 -filter cubicspline -resize 400% -colorspace sRGB logo128_spline36.png
magick logo128.png -colorspace RGB -define filter:verbose=true -define filter:lobes=4 -filter cubicspline -resize 400% -colorspace sRGB logo128_spline64.png
magick logo128.png -colorspace RGB -define filter:verbose=true -filter lanczos -resize 400% -colorspace sRGB logo128_lanczos.png
magick logo128.png -colorspace RGB -define filter:verbose=true -filter catrom -resize 400% -colorspace sRGB logo128_catrom.png
magick logo128.png -colorspace RGB -define filter:verbose=true -filter triangle -resize 400% -colorspace sRGB logo128_triangle.png
Code: Select all
magick compare -metric rmse logo128_lanczos.png logo128_spline16.png -format "\n" null:
1711.18 (0.0261109)
magick compare -metric rmse logo128_lanczos.png logo128_spline36.png -format "\n" null:
562.698 (0.00858621)
magick compare -metric rmse logo128_lanczos.png logo128_spline64.png -format "\n" null:
628.19 (0.00958556)
magick compare -metric rmse logo128_catrom.png logo128_spline16.png -format "\n" null:
609.158 (0.00929516)
magick compare -metric rmse logo128_catrom.png logo128_spline36.png -format "\n" null:
1541.94 (0.0235285)
magick compare -metric rmse logo128_catrom.png logo128_spline64.png -format "\n" null:
1686.94 (0.025741)
Re: High tap count Spline filters? (Spline36/64/100/144/196/256)
SSIM indexes:fmw42 wrote: ↑2017-08-15T18:01:36-07:00Code: Select all
magick compare -metric rmse logo128_lanczos.png logo128_spline16.png -format "\n" null: 1711.18 (0.0261109) magick compare -metric rmse logo128_lanczos.png logo128_spline36.png -format "\n" null: 562.698 (0.00858621) magick compare -metric rmse logo128_lanczos.png logo128_spline64.png -format "\n" null: 628.19 (0.00958556) magick compare -metric rmse logo128_catrom.png logo128_spline16.png -format "\n" null: 609.158 (0.00929516) magick compare -metric rmse logo128_catrom.png logo128_spline36.png -format "\n" null: 1541.94 (0.0235285) magick compare -metric rmse logo128_catrom.png logo128_spline64.png -format "\n" null: 1686.94 (0.025741)
Code: Select all
ffmpeg -i logo128_lanczos.png -i logo128_spline16.png -filter_complex ssim -an -f null -
SSIM R:0.946036 (12.678943) G:0.957871 (13.754209) B:0.970681 (15.328484) All:0.958196 (13.787820)
ffmpeg -i logo128_lanczos.png -logo128_spline36.png -filter_complex ssim -an -f null -
SSIM R:0.994943 (22.961192) G:0.995593 (23.558111) B:0.997249 (25.605576) All:0.995928 (23.902356)
ffmpeg -i logo128_lanczos.png -i logo128_spline64.png -filter_complex ssim -an -f null -
SSIM R:0.989257 (19.688591) G:0.991401 (20.655318) B:0.995461 (23.430614) All:0.992040 (20.990597)