Functions | |
| cpl_1dfunction * | cpl_1dfunction_new (int n) |
| Create a new cpl_1dfunction. More... | |
| cpl_1dfunction * | cpl_1dfunction_duplicate (cpl_1dfunction *in) |
| Duplicate a cpl_1dfunction. More... | |
| void | cpl_1dfunction_delete (cpl_1dfunction *f) |
| Delete a cpl_1dfunction. More... | |
| void | cpl_1dfunction_dump (cpl_1dfunction *f, FILE *out) |
| Dump a cpl_1dfunction in a file or stdout. More... | |
| cpl_1dfunction * | cpl_1dfunction_read (char *filename) |
| Read a list of points from an ASCII file, create cpl_1dfunction. More... | |
| int | cpl_1dfunction_size (cpl_1dfunction *in) |
| Get the size of the function. More... | |
| cpl_vector * | cpl_1dfunction_get_x (cpl_1dfunction *in) |
| Get a pointer to the x vector of the function. More... | |
| cpl_vector * | cpl_1dfunction_get_y (cpl_1dfunction *in) |
| Get a pointer to the y vector of the function. More... | |
| double * | cpl_1dfunction_get_x_data (cpl_1dfunction *in) |
| Get a pointer to the x data part of the function. More... | |
| double * | cpl_1dfunction_get_y_data (cpl_1dfunction *in) |
| Get a pointer to the y data part of the function. More... | |
| double | cpl_1dfunction_centroid (cpl_1dfunction *f) |
| Find out a function centroid to subpixel precision. More... | |
| double | cpl_1dfunction_locmax (cpl_1dfunction *f, int where, int hs) |
| Find out a local maximum in a function around a position. More... | |
| cpl_error_code | cpl_1dfunction_interpolate_linear (cpl_1dfunction *f1, cpl_1dfunction *f2) |
| Linear functions interpolation. More... | |
| cpl_error_code | cpl_1dfunction_natural_spline (cpl_1dfunction *f1, cpl_1dfunction *f2) |
| Interpolate a function along new abscissas. More... | |
| double | cpl_1dfunction_xcorrelate (cpl_1dfunction *f1, cpl_1dfunction *f2, int half_search, double *delta) |
| Cross-correlation of two functions. More... | |
| cpl_1dfunction * | cpl_1dfunction_gen_rect_poisson (const int *r, const int np, const int homog) |
| Generate points with a Poisson scattering property in a rectangle. More... | |
A cpl_1dfunction is composed of two vectors of the same size, the first one containing the x-coordinates and the second ond the y-coordinates of the signal (or function). This module provides the possibility to compute a local maximum, to cross-correlate two signals, etc... The cpl_1dfunction can also be used to store lists of offsets (in x and y) or any list of points positions in an image.
#include "cpl_1dfunction.h"
|
|
Value: do if (random_initialized==0) \
{ \
srand48((long)(getenv("CPL_SRAND_CONST") != NULL ? 1 : getpid())) ; \
random_initialized = 1 ; \
} while (0) |
|
|
Find out a function centroid to subpixel precision.
In case of error, the _cpl_error_code_ code is set, and the returned double is undefined. Possible _cpl_error_code_ set in this function:
|
|
|
Delete a cpl_1dfunction.
|
|
||||||||||||
|
Dump a cpl_1dfunction in a file or stdout.
stdout or stderr. |
|
|
Duplicate a cpl_1dfunction.
Possible _cpl_error_code_ set in this function:
|
|
||||||||||||||||
|
Generate points with a Poisson scattering property in a rectangle.
POISSON POINT GENERATION Without homogeneity factor, the idea is to generate a set of np points within a given rectangle defined by (xmin xmax ymin ymax). All these points obey a Poisson law, i.e. no couple of points is closer to each other than a minimal distance. This minimal distance is defined as a function of the input requested rectangle and the requested number of points to generate. We apply the following formula:
Where W and H stand for the rectangle width and height. Notice that the system in which the rectangle vertices are given is completely left unspecified, generated points will have coordinates in the specified x and y ranges. With a specified homogeneity factor h (0 < h <= np), the generation algorithm is different. the Poisson law applies for any h consecutive points in the final output, but not for the whole point set. This enables us to generate groups of points which statisfy the Poisson law, without constraining the whole set. This actually is equivalent to dividing the rectangle in h regions of equal surface, and generate points randomly in each of these regions, changing region at each point. Possible _cpl_error_code_ set in this function:
|
|
|
Get a pointer to the x vector of the function.
Possible _cpl_error_code_ set in this function:
|
|
|
Get a pointer to the x data part of the function.
Possible _cpl_error_code_ set in this function:
|
|
|
Get a pointer to the y vector of the function.
Possible _cpl_error_code_ set in this function:
|
|
|
Get a pointer to the y data part of the function.
Possible _cpl_error_code_ set in this function:
|
|
||||||||||||
|
Linear functions interpolation.
Possible _cpl_error_code_ set in this function:
|
|
||||||||||||||||
|
Find out a local maximum in a function around a position.
Possible _cpl_error_code_ set in this function:
|
|
||||||||||||
|
Interpolate a function along new abscissas.
Provide in input a complete function, and a function with only x positions. The y values are computed by interpolation. Possible _cpl_error_code_ set in this function:
|
|
|
Create a new cpl_1dfunction.
Possible _cpl_error_code_ set in this function:
|
|
|
Read a list of points from an ASCII file, create cpl_1dfunction.
Possible _cpl_error_code_ set in this function:
|
|
|
Get the size of the function.
|
|
||||||||||||||||||||
|
Cross-correlation of two functions.
Possible _cpl_error_code_ set in this function:
|
1.2.14 written by Dimitri van Heesch,
© 1997-2002