Hough transform: Gwyddion Library Reference Manual

## Hough transform Hough transform — Hough transform |

## Functions

void | gwy_field_hough_line ()
void | gwy_field_hough_circle ()
void | gwy_field_hough_line_strenghten ()
void | gwy_field_hough_circle_strenghten ()
gint | gwy_field_get_local_maxima_list ()
gint | gwy_field_get_local_minima_list ()
void | gwy_field_hough_polar_line_to_field ()
void | gwy_field_hough_field_line_to_polar ()

## Includes

    #include <libgwyddion/gwyddion.h>

## Description

## Functions

### gwy_field_hough_line()

    void
    gwy_field_hough_line (GwyField *dfield,
                          GwyField *x_gradient,
                          GwyField *y_gradient,
                          GwyField *result,
                          gint hwidth,
                          gboolean overlapping);

### gwy_field_hough_circle()

    void
    gwy_field_hough_circle (GwyField *dfield,
                            GwyField *x_gradient,
                            GwyField *y_gradient,
                            GwyField *result,
                            gdouble radius);

### gwy_field_hough_line_strenghten()

    void
    gwy_field_hough_line_strenghten (GwyField *dfield,
                                     GwyField *x_gradient,
                                     GwyField *y_gradient,
                                     gint hwidth,
                                     gdouble threshold);

### gwy_field_hough_circle_strenghten()

    void
    gwy_field_hough_circle_strenghten (GwyField *dfield,
                                       GwyField *x_gradient,
                                       GwyField *y_gradient,
                                       gdouble radius,
                                       gdouble threshold);

### gwy_field_get_local_maxima_list()

    gint
    gwy_field_get_local_maxima_list (GwyField *dfield,
                                     gdouble *xdata,
                                     gdouble *ydata,
                                     gdouble *zdata,
                                     gint ndata,
                                     gint skip,
                                     gdouble threshold,
                                     gboolean subpixel);

Locates local maxima in a data field.

At most `ndata` maxima are located (with the largest values).

#### Parameters

dfield | A two-dimensional data field. |
xdata | Array of `ndata` elements where the columns should be stored. | [array length=ndata]
ydata | Array of `ndata` elements where the rows should be stored. | [array length=ndata]
zdata | Array of `ndata` elements where the values should be stored. | [array length=ndata]
ndata | Number of items in `xdata` , `ydata` and `zdata` . |
skip | Minimum pixel distance between maxima. |
threshold | Minimum value to be considered a maximum. |
subpixel | `TRUE` for subpixel refinement. |

#### Returns

The actual number of maxima found.

### gwy_field_get_local_minima_list()

    gint
    gwy_field_get_local_minima_list (GwyField *dfield,
                                     gdouble *xdata,
                                     gdouble *ydata,
                                     gdouble *zdata,
                                     gint ndata,
                                     gint skip,
                                     gdouble threshold,
                                     gboolean subpixel);

Locates local minima in a data field.

At most `ndata` minima are located (with the smallest values).

#### Parameters

dfield | A two-dimensional data field. |
xdata | Array of `ndata` elements where the columns should be stored. | [array length=ndata]
ydata | Array of `ndata` elements where the rows should be stored. | [array length=ndata]
zdata | Array of `ndata` elements where the values should be stored. | [array length=ndata]
ndata | Number of items in `xdata` , `ydata` and `zdata` . |
skip | Minimum pixel distance between minima. |
threshold | Maximum value to be considered a minimum. |
subpixel | `TRUE` for subpixel refinement. |

#### Returns

The actual number of minima found.

### gwy_field_hough_polar_line_to_field()

    void
    gwy_field_hough_polar_line_to_field (GwyField *dfield,
                                         gdouble rho,
                                         gdouble theta,
                                         gint *px1,
                                         gint *px2,
                                         gint *py1,
                                         gint *py2);

### gwy_field_hough_field_line_to_polar()

    void
    gwy_field_hough_field_line_to_polar (gint px1,
                                         gint px2,
                                         gint py1,
                                         gint py2,
                                         gdouble *rho,
                                         gdouble *theta);