POV-Ray : Newsgroups : povray.binaries.images : cubic interpolation for image_maps (2 jpegs - 63kb) : Re: cubic interpolation for image_maps (2 jpegs - 63kb) Server Time
3 Aug 2024 02:23:05 EDT (-0400)
  Re: cubic interpolation for image_maps (2 jpegs - 63kb)  
From: Bruno Cabasson
Date: 9 Mar 2007 09:00:00
Message: <web.45f1680c625f00b5f5fba6ef0@news.povray.org>
There is an interpolation method, based on signal-processing techniques,
known as 'Whittaker interpolation' that can be extended at 2 dimensions,
and therefore applies to 2-D data (diagrams, images or whatsoever that can
be expressed as f(u, v)). This method makes good interpolations and gives
good results.

The formula (seen in a book!) is:

Being given E(ui, vj), with i in [1..N], j in [1..M} the grid value of the
data in question, and with steps du in u and dv in v, the value of E in a
point (u, v) is given by:

        N    M
       ---- ----
                      sin(PI*(u-u1)/du - i*PI) sin(PI*(v-v1)/dv - j*PI)
E(u,v)=/    /   E(ui,vj)------------------------ ------------------------
       ---  ---           PI*(u-u1)/du - i*PI     PI*(v-v1)/dv - j*PI
         i=1  j=1

OK it is quite a complicated formula, and I apologize, but perhaps POV-team
members who have implemented math-related features in POV can understand
and give an opinion.

However, there must be somewhere well-known image-processing techniques to
perform interpolations. If some of you are fresh engineers ...


    Bruno


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.