pdf-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[pdf-devel] PDF sampled functions and interpolation


From: jemarch
Subject: [pdf-devel] PDF sampled functions and interpolation
Date: Thu, 13 Sep 2007 21:56:57 +0200
User-agent: Wanderlust/2.14.0 (Africa) SEMI/1.14.6 (Maruoka) FLIM/1.14.8 (Shijō) APEL/10.6 Emacs/22.1.50 (powerpc-unknown-linux-gnu) MULE/5.0 (SAKAKI)

   Am Donnerstag, 13. September 2007 14:13 schrieben Sie:
   > Then checkout a copy of the sources from the CVS repository.
   Done. 

Thanks.

   I am browsing through pdf_function.h and 
   pdf_reference_1-7.pdf,section 3.9
   Some questions:
   How will sample tables be stored and accessed?
   Will we keep a bit representation or convert to fp early on?
   Lazy initialization and caching ?

Since there may be a really big number of samples in the data stream,
I was thinking in caching groups of used points. The stream used to
create the function object should exist for the whole lifetime of the
function object, so to left the sample tables in the stream should not
be a problem.

   Cubic splines can be made to work without fp, 
   this is rather unusual and I don't have a reference at hand.

The PDF reference recommends to work using single precision fp. It is
a general hint regarding PDF real numbers. What would be the benefits
of implementing the splines interpolation without using
fp?

   The spec talks about 2D interpolation with little detail.
   Do they intend do do a sequence of 1D interpolation steps?
   This depends on the ordering of the grid array, not on the data 
   alone, and it would defy precalculation of spline coefficients.
   Bicubic interpolation is not mentioned in this section.

In fact I am still trying to understand that point of the spec. It is
complex and not well explained. 

My understanding is that the input samples are organized in a
conceptual m*n-dimensional structure, where `m' is the number of
inputs for the sampled function and `n' the number of outputs. So for
a function with one input and one output, the abstract structure will
be an array, for a function with two inputs and one output, the
abstract structure will be a table, and so on...

I am trying to understand how exactly the samples are structured in
the stream in the case of several output functions (the several-input
and one-output case is clear, since there is an example in page 171 of
the spec).

About the interpolation peformed after the encoding of input values,
the only details in the spec are:

  "Interpolation is used to determine output values from the nearest
  surrounding values in the sample table"

and

  "Using bilinear interpolation between sample points" (in the context
  of the two-input one-output function example in page 172 of the
  spec).

and

  "If Size is less than 4, cubic spline interpolation is not possible
  and Order 3 will be ignored if specified".

I think that the sample values are organized in a way such as when
performing linear or cubic spline interpolation between two
consecutive points in the stream, the effect is the same as if
performing n-dimensional linear or cubic spline interpolation. Does
this make sense, in your opinion?


   >We need a number of mathematics functions
   What about gsl ? You mentioned it in  
   http://lists.gnu.org/archive/html/pdf-devel/2007-09/msg00024.html

Brian Cough (maintainer of gsl) is worried about the efficiency of the
gsl functions for a software such as the pdf library. I disagree with
him. I think the gsl would fit our needs quite well.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]