I think I've found a good filter this time

Discuss digital image processing techniques and algorithms. We encourage its application to ImageMagick but you can discuss any software solutions here.
Post Reply
BryantMoore
Posts: 56
Joined: 2011-04-23T22:21:52-07:00
Authentication code: 8675308

I think I've found a good filter this time

Post by BryantMoore »

Triangle

Image

Code: Select all

$ magick rose: -filter triangle -resize 1000% rose_triangle.png
Lanczos EWA

Image

Code: Select all

$ magick rose: -filter lanczos -distort resize 1000% rose_lanczos_ewa.png
Catrom windowed Jinc EWA - Linear RGB and Sigmoidal Contrast

Image

Code: Select all

$ magick rose: -colorspace rgb +sigmoidal-contrast 8 -define filter:window=catrom -define filter:filter=jinc -distort resize 1000% -sigmoidal-contrast 8 -colorspace srgb rose_jinc-catrom_ewa_rgb-sig8.png

Triangle
http://puu.sh/1dbUi

Lanczos EWA
http://puu.sh/1dbUr

Catrom Jinc EWA
http://puu.sh/1dbUw

User avatar
anthony
Posts: 8883
Joined: 2004-05-31T19:27:03-07:00
Authentication code: 8675308
Location: Brisbane, Australia

Re: I think I've found a good filter this time

Post by anthony »

Catrom-Jinc!
Another weird one. a negative multiplier (windowing function) to a Jinc function.

Typically window functions are meant to modulate (mute) the weighting function (jinc). As such they typically do not have negatives. But if you say it works... then it perhaps deserves a closer look...

Hmmm...
As this is only used the first lobe of the catrom filter (no negatives), my concern is invalid.

The result is almost identical to a Cylindrical Lanczos (Jinc-Jinc) filter. (except for the sigmoidal aspect).
The images above seem to bear this out.

Try a Sigmoidal Cylindrical Lanczos filter, and you'll probably be hard pressed to see a difference.
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/

BryantMoore
Posts: 56
Joined: 2011-04-23T22:21:52-07:00
Authentication code: 8675308

Re: I think I've found a good filter this time

Post by BryantMoore »

I should really learn to check for that before I play with the windowing functions. :P

NicolasRobidoux
Posts: 1944
Joined: 2010-08-28T11:16:00-07:00
Authentication code: 8675308
Location: Montreal, Canada

Re: I think I've found a good filter this time

Post by NicolasRobidoux »

It makes sense that using the first lobe of Catmull-Rom as a window function would give something reasonable, which one has no reason to think would be better or worse than Welch, a priori. Welch itself is kind of an arbitrary but reasonable (and "cheap" if one does not use a LUT) way of windowing.
Again, the proof would be in the pudding. One sigmoidized rose enlargement falls more than a bit short of "proof".

Post Reply