BiCubic Interpolation does not match any known filter!

Questions and postings pertaining to the development of ImageMagick, feature enhancements, and ImageMagick internals. ImageMagick source code and algorithms are discussed here. Usage questions which are too arcane for the normal user list should also be posted here.
NicolasRobidoux
Posts: 1944
Joined: 2010-08-28T11:16:00-07:00
Authentication code: 8675308
Location: Montreal, Canada

Re: BiCubic Interpolation does not match any known filter!

Post by NicolasRobidoux »

anthony wrote:ImageWorsener
...
Very nice page about bi-cubic interpolators...
and many other things.
Jason Summers: I really like your Things I wish I’d known better when I started this discussions.
User avatar
anthony
Posts: 8883
Joined: 2004-05-31T19:27:03-07:00
Authentication code: 8675308
Location: Brisbane, Australia

Re: BiCubic Interpolation does not match any known filter!

Post by anthony »

NicolasRobidoux wrote:
magick wrote: We have
  • #define MagickEpsilon ((MagickRealType) 1.0e-16)
    #define MagickHuge ((MagickRealType) 1.0/MagickEpsilon)
These are fine. (My reciprocal comment was definitely "out there". Apologies.)
However, if an important use is to limit how much work distort does near horizons and like singularities, something like
  • #define MagickEpsilon ((MagickRealType) 1.0e-7)
    #define MagickHuge ((MagickRealType) 1.0/MagickEpsilon)
may be good. Anthony should be the best judge of this.

It may be that its use in near horizon distortions should be a different variable. I added MgaickHuge originally for this, but perhaps that usage should be separate. Until I again do some timing tests for 'viewing distant horizons', I won't know. I do remember it did make big difference with onbe or two pixels chewing up all the time of the distortion.

Basically if the square of the rough ellipse area is larger than this, it just uses the 'calculated virtual pixel average color' for that image.

See my test case in. Area Sampling vs Super Sampling
http://www.imagemagick.org/Usage/distor ... a_vs_super
and again in the main area for that example
Viewing Distant Horizons
http://www.imagemagick.org/Usage/distorts/#horizon

You can typically just make out the 'switch' as a solid colored line very close to the horizon, though I probably had it too small for my liking in the examples currently shown (some some time ago).

However enough of this - it is getting a little off topic. Lets return to 'cubic interpolators'...
If their is anything more to say that is ;-)
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
NicolasRobidoux
Posts: 1944
Joined: 2010-08-28T11:16:00-07:00
Authentication code: 8675308
Location: Montreal, Canada

Re: BiCubic Interpolation does not match any known filter!

Post by NicolasRobidoux »

Anthony: Which filters, in addition to the already done Catmull-Rom, do you want me to (re)-program?

Earlier, I proposed making Spline be quadratic B-spline smoothing, adding Mitchell.

I could also put (Sinc-) Lanczos on the list, once I've done my updated minimax computation.

Or I could simply refactor the cubic B-spline computation, and leave it at that (or leave if for later).
NicolasRobidoux
Posts: 1944
Joined: 2010-08-28T11:16:00-07:00
Authentication code: 8675308
Location: Montreal, Canada

Re: BiCubic Interpolation does not match any known filter!

Post by NicolasRobidoux »

Just seeing if I can optimize the cubic B-spline smoothing "interpolator" would seem like enough for now.
User avatar
anthony
Posts: 8883
Joined: 2004-05-31T19:27:03-07:00
Authentication code: 8675308
Location: Brisbane, Australia

Re: BiCubic Interpolation does not match any known filter!

Post by anthony »

I think the only ones missing is Hermite, and Mitchell.

Hermite should be simplier as it has a smaller support. I do not believe it has weightings from beyond the nearest neighbours.

But this is not urgent. Replacing the 'deep ringing' 'Cardinal' with Catrom was the thing that was the real problem.

I have gotten the Averages into IMv7 (which for some reason has 3-versions of the interpolators!!!) Blend is working for some operators, and Background for others. But not all (fall back to bilinear). I'm working on it when I get time.

After that I have to get back to handling Escapes when no images are present (needed for full global use of percent escapes). I'm going to have it give a warning when you try to use a 'image properity' when no images are present. I may even be able to get 'FX escapes' to work without actually needing an image! (for basic math output).
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
NicolasRobidoux
Posts: 1944
Joined: 2010-08-28T11:16:00-07:00
Authentication code: 8675308
Location: Montreal, Canada

Re: BiCubic Interpolation does not match any known filter!

Post by NicolasRobidoux »

Today's svn:
MagickCore/option.c:1095:19: error: 'Average9InterpolatePixel' undeclared here (not in a function)
MagickCore/option.c:1096:20: error: 'Average16InterpolatePixel' undeclared here (not in a function)
MagickCore/option.c:1097:21: error: 'BackgroundInterpolatePixel' undeclared here (not in a function)
MagickCore/option.c:1099:16: error: 'BlendInterpolatePixel' undeclared here (not in a function)
MagickCore/option.c:1100:17: error: 'CatromInterpolatePixel' undeclared here (not in a function)
MagickCore/option.c:1103:18: error: 'NearestInterpolatePixel' undeclared here (not in a function)
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: BiCubic Interpolation does not match any known filter!

Post by magick »

Try a svn update. We're not getting any compiler errors when we update / compile.
NicolasRobidoux
Posts: 1944
Joined: 2010-08-28T11:16:00-07:00
Authentication code: 8675308
Location: Montreal, Canada

Re: BiCubic Interpolation does not match any known filter!

Post by NicolasRobidoux »

I'm going to recreate the svn from scratch: I also get
svn: Checksum mismatch for 'MagickCore/version.h'; expected: 'f4c8f1148b74894d6d9d624de8eae38c', actual: '6ee1b525e9e9e4d7e7af059a2dc0c9ee'
which I've never seen.
NicolasRobidoux
Posts: 1944
Joined: 2010-08-28T11:16:00-07:00
Authentication code: 8675308
Location: Montreal, Canada

Re: BiCubic Interpolation does not match any known filter!

Post by NicolasRobidoux »

Forgot to mention this was IM7 on up to date Linux Mint 12.
uname -a
Linux e3 3.0.0-12-generic #20-Ubuntu SMP Fri Oct 7 14:56:25 UTC 2011 x86_64 x86_64 x86_64 GNU/Linux
svn co https://www.imagemagick.org/subversion/ ... gick-7.0.0 ImageMagick
cd ImageMagick/
cd src/
make clean && ./configure --prefix=/home/nicolas/ImageMagick && make
...
CC MagickCore/MagickCore_libMagickCore_la-option.lo
MagickCore/option.c:1095:19: error: 'Average9InterpolatePixel' undeclared here (not in a function)
MagickCore/option.c:1096:20: error: 'Average16InterpolatePixel' undeclared here (not in a function)
MagickCore/option.c:1097:21: error: 'BackgroundInterpolatePixel' undeclared here (not in a function)
MagickCore/option.c:1099:16: error: 'BlendInterpolatePixel' undeclared here (not in a function)
MagickCore/option.c:1100:17: error: 'CatromInterpolatePixel' undeclared here (not in a function)
MagickCore/option.c:1103:18: error: 'NearestInterpolatePixel' undeclared here (not in a function)
make[1]: *** [MagickCore/MagickCore_libMagickCore_la-option.lo] Error 1
NicolasRobidoux
Posts: 1944
Joined: 2010-08-28T11:16:00-07:00
Authentication code: 8675308
Location: Montreal, Canada

Re: BiCubic Interpolation does not match any known filter!

Post by NicolasRobidoux »

BTW:
svn: Checksum mismatch for 'MagickCore/version.h'; expected: 'f4c8f1148b74894d6d9d624de8eae38c', actual: '6ee1b525e9e9e4d7e7af059a2dc0c9ee'
also with the trunk svn.
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: BiCubic Interpolation does not match any known filter!

Post by magick »

We restarted the httpd daemon. Its possible a software update was causing problems otherwise we're clueless 'cause all is well when we checkout / update from the Subversion trunk.
NicolasRobidoux
Posts: 1944
Joined: 2010-08-28T11:16:00-07:00
Authentication code: 8675308
Location: Montreal, Canada

Re: BiCubic Interpolation does not match any known filter!

Post by NicolasRobidoux »

Maybe it's the make clean?
NicolasRobidoux
Posts: 1944
Joined: 2010-08-28T11:16:00-07:00
Authentication code: 8675308
Location: Montreal, Canada

Re: BiCubic Interpolation does not match any known filter!

Post by NicolasRobidoux »

No problem with svn trunk.
NicolasRobidoux
Posts: 1944
Joined: 2010-08-28T11:16:00-07:00
Authentication code: 8675308
Location: Montreal, Canada

Re: BiCubic Interpolation does not match any known filter!

Post by NicolasRobidoux »

svn trunk and IM7 make fine without the --enable-hdri.
NicolasRobidoux
Posts: 1944
Joined: 2010-08-28T11:16:00-07:00
Authentication code: 8675308
Location: Montreal, Canada

Re: BiCubic Interpolation does not match any known filter!

Post by NicolasRobidoux »

No clue: Having just recreated the svn with svn co (again), I can do things just like before, and now it goes through without error.
magick: Thank you for looking into this.
Post Reply