-define filter:blur=value with lanczossharp/lanczos2sharp

Post any defects you find in the released or beta versions of the ImageMagick software here. Include the ImageMagick version, OS, and any command-line required to reproduce the problem. Got a patch for a bug? Post it here.
NicolasRobidoux
Posts: 1944
Joined: 2010-08-28T11:16:00-07:00
Authentication code: 8675308
Location: Montreal, Canada

Re: -define filter:blur=value with lanczossharp/lanczos2shar

Post by NicolasRobidoux »

anthony wrote:Fair enough. My own view is that the no-op case having the most minimal filter effect is most important.
Then, when you have a minute, can you have a look at

Code: Select all

convert image.whatever -define filter:blur=.838 -filter lanczos -distort Resize ... 
or even

Code: Select all

convert image.whatever -define filter:blur=.81967213114754 -filter lanczos -distort Resize ... 
?

These are not fully optimized, but in terms of sharpness, I think they are just about as close to as sharp one can reasonably make Jinc Lanczos 3 be. (The first blur is close to the one which minimizes the worst case possible over/undershoot when enlarging, the second minimizes the worst possible deviation from the original under no-op.)

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

Re: -define filter:blur=value with lanczossharp/lanczos2shar

Post by NicolasRobidoux »

Actually Anthony: wait before you try anything: I'm still experimenting.
NicolasRobidoux
Posts: 1944
Joined: 2010-08-28T11:16:00-07:00
Authentication code: 8675308
Location: Montreal, Canada

Re: -define filter:blur=value with lanczossharp/lanczos2shar

Post by NicolasRobidoux »

Anthony:

I remember that you did not like Jinc Lanczos or Jinc LanczosSharp as default cylindrical filters because you felt they are too blurry (as measured by a hash pattern no-op).

It appears that to me that blur = 1/1.194 = 0.83752093802345062 (this is an optimized value for which I only have an approximation) and blur = 1/r1 = 0.81989397882208981 may give results which someone who values sharpness above antialiasing would like.

When you have a minute, give them a try. They are very sharp. (I've not tried them on a hash pattern, and I have not used a hash pattern to find these "optimal" values.)

Maybe one of them should replace the current blur that defines distort LanczosSharp?

I am far from certain that one of them will ever be favorites for upsampling (this goes for Robidoux too) but maybe one of them will get a following for image reduction? (I'm still researching all this...)
Post Reply