GRASS GIS 7 Programmer's Manual  7.5.svn(2017)-r71785
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
findzc.c File Reference

Zero Crossing functions. More...

#include <stdio.h>
#include <math.h>
Include dependency graph for findzc.c:

Go to the source code of this file.

Macros

#define TINY   1.0e-3
 

Functions

int G_math_findzc (double conv[], int size, double zc[], double thresh, int num_orients)
 Finds locations and orientations of zero crossings. More...
 

Detailed Description

Zero Crossing functions.

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA

Author
GRASS GIS Development Team
Brad Douglas - rez at touchofmadness com
Date
2006

Definition in file findzc.c.

Macro Definition Documentation

#define TINY   1.0e-3

Definition at line 32 of file findzc.c.

Referenced by G_math_findzc().

Function Documentation

int G_math_findzc ( double  conv[],
int  size,
double  zc[],
double  thresh,
int  num_orients 
)

Finds locations and orientations of zero crossings.

Finds the locations and orientations of zero crossings in the input array conv, which is the result of the convolution of the Marr-Hildreth operator with the image. The output array is zc, which is non-zero only at zero crossing pixels. At those pixels, the value is 1 + (orientation), where orientation is a value from 0 to num_orients.

Parameters
[in]convinput
[in]sizesize of largest matrix column or row
[out]zcoutput
[in]threshmagnitude threshold
[in]num_orients
Returns
int always returns 0

Definition at line 56 of file findzc.c.

References M_PI, M_PI_2, and TINY.