Author Topic: PJSR: Interpolation Smoothness parameter?  (Read 4090 times)

Offline mschuster

  • PTeam Member
  • PixInsight Jedi
  • *****
  • Posts: 1087
PJSR: Interpolation Smoothness parameter?
« on: 2015 January 10 09:04:05 »
I need a "classical" Mitchell Netravali Filter.

Do I turn off smoothing by setting Smoothness to one? I can't find documentation on the Smoothness parameter.

Thanks,
Mike

Offline Juan Conejero

  • PTeam Member
  • PixInsight Jedi Grand Master
  • ********
  • Posts: 7111
    • http://pixinsight.com/
Re: PJSR: Interpolation Smoothness parameter?
« Reply #1 on: 2015 January 11 05:01:31 »
There is no "classical implementation" of Mitchell-Netravali filters; the original paper describes the filter functions theoretically in the ]-2,+2[ real range.

The smoothness parameter is only used if you select the Interpolation_Auto interpolation mode for downsampling and the internal routines decide to use the Mitchell-Netravali cubic filter, based on the amount of downsampling on both axes. The smoothness parameter does not change the shape of the filter. It is just a magnification factor to define the dimensions of the rectangular interpolation neighborhood where the separable filter is evaluated.

If you select one of these filters directly (Interpolation_CatmullRomSplineFilter, Interpolation_CubicBSplineFilter or Interpolation_MitchellNetravaliFilter) the smoothness parameter will be ignored. Instead, the Image.interpolationXRadius and Image.interpolationYRadius properties will define the dimensions in pixels of the interpolation neighborhood, which will be:

interpolation width = 1 + 2*Image.interpolationXRadius
interpolation height = 1 + 2*Image.interpolationYRadius


The default radii are 2 pixels, which means that interpolation will take place on a 5x5 neighborhood by default. Note that these filters may require larger interpolation dimensions to be properly evaluated, depending on the application.
Juan Conejero
PixInsight Development Team
http://pixinsight.com/