This commit is contained in:
John Cupitt 2009-09-09 16:09:21 +00:00
parent 6026a0282d
commit 21ec53fda9
4 changed files with 53 additions and 27 deletions

5
TODO
View File

@ -1,6 +1,3 @@
- im_maxpos_vec(), im_minpos_vec(), im_linreg() need gtkdoc
@ -12,8 +9,6 @@
>
> pngcrush -c 0 -bit_depth 1 *.png
- rename vipsCC in SWIG as pyvips?

View File

@ -45,7 +45,7 @@
/**
* SECTION: arithmetic
* @short_description: operations which perform pixel arithmetic, trig, log,
* stats
* statistics
*
* @see_also: <link linkend="VIPS-iofuncs">iofuncs</link>
* @stability: Stable
@ -62,6 +62,16 @@
* one-band image by joining n copies of the one-band image together, and then
* the two n-band images are operated upon.
*
* In the same way, for operations that take a constant, such as
* im_remainderconst_vec(), the constant can either a vector with a single
* element (in which case the same constant is used for all image bands) or a
* vector with the same number of elements as there are bandsin the image (in
* which case one element is used for each band).
*
* im_lintra_vec() supports an additional mode where you can use a
* many-element vector with a single-band image to generate a multi-band
* image. No other operations support this yet.
*
* Arithmetic operations try to preserve precision by increasing the number of
* bits in the output image when necessary. Generally, this follows the ANSI C
* conventions for type promotion, so multiplying two

View File

@ -142,7 +142,8 @@ SKIP_ALL_DECL( double );
/** EXPORTED FUNCTION DEFINITION **/
/** im_linreg:
/**
* im_linreg:
* @ins: NULL-terminated array of input images
* @out: results of analysis
* @xs: X position of each image (pixel value is Y)

View File

@ -1,23 +1,4 @@
/* @(#) Find the coordinates and values of the n maxima of an image.
* @(#)
* @(#) int im_maxpos_vec(
* @(#) IMAGE *im,
* @(#) int *xpos,
* @(#) int *ypos,
* @(#) double *maxima,
* @(#) int n
* @(#) );
* @(#)
* @(#) Find the coordinates and values of the n minima of an image.
* @(#)
* @(#) int im_minpos_vec(
* @(#) IMAGE *im,
* @(#) int *xpos,
* @(#) int *ypos,
* @(#) double *minima,
* @(#) int n
* @(#) );
* @(#)
/* im_maxpos_vec.c
*
* Copyright: 2006, The Nottingham Trent University
* Copyright: 2006, Tom Vajzovic
@ -25,6 +6,9 @@
* Author: Tom Vajzovic
*
* Written on: 2006-09-01
*
* 9/9/09
* - gtkdoc comments
*/
/*
@ -103,6 +87,24 @@ static int minpos_vec_stop( void *seq, void *, void * );
/** EXPORTED FUNCTIONS **/
/**
* im_maxpos_vec:
* @im: image to scan
* @xpos: array to return x positions
* @ypos: array to return y positions
* @maxima: array to return values
* @n: number of maxima to search for
*
* Find the coordinates and values of the n maxima of an image.
*
* For 8 and 16-bit images, it's much faster to find the histogram and then
* calculate a threshold from that. See im_mpercent().
*
* See also: im_minpos(), im_min(), im_stats(), im_maxpos_avg().
*
* Returns: 0 on success, -1 on error
*/
int im_maxpos_vec( IMAGE *im, int *xpos, int *ypos, double *maxima, int n ){
#define FUNCTION_NAME "im_maxpos_vec"
/* number of sequences used is beyond my control at this level, but I note that */
@ -149,6 +151,24 @@ int im_maxpos_vec( IMAGE *im, int *xpos, int *ypos, double *maxima, int n ){
}
/**
* im_minpos_vec:
* @im: image to scan
* @xpos: array to return x positions
* @ypos: array to return y positions
* @maxima: array to return values
* @n: number of minima to search for
*
* Find the coordinates and values of the n minima of an image.
*
* For 8 and 16-bit images, it's much faster to find the histogram and then
* calculate a threshold from that. See im_mpercent().
*
* See also: im_minpos(), im_min(), im_stats(), im_maxpos_avg().
*
* Returns: 0 on success, -1 on error
*/
int im_minpos_vec( IMAGE *im, int *xpos, int *ypos, double *minima, int n ){
#define FUNCTION_NAME "im_minpos_vec"
/* number of sequences used is beyond my control at this level, but I note that */