lsd

package module
v0.0.0-...-f6db4f0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 19, 2019 License: AGPL-3.0 Imports: 3 Imported by: 0

README

lsd-go

A Go implementation of the Line Segment Detector algorithm

This is a straight port of https://github.com/theWorldCreator/LSD to Go. At this point is very non idiomatic Go (again, it's a straight port of the original C module) but it will be cleaned up over time.

Documentation

Index

Constants

View Source
const (
	/** Label for pixels with undefined gradient. */
	NOTDEF = -1024.0

	/** 3/2 pi */
	M_3_2_PI = math.Pi * 3.0 / 2.0

	/** 2 pi */
	M_2__PI = math.Pi * 2

	/** Doubles relative error factor */
	RELATIVE_ERROR_FACTOR = 100.0

	DBL_MIN = math.SmallestNonzeroFloat64
	DBL_MAX = math.MaxFloat64
)

Variables

View Source
var (
	DBL_EPSILON = math.Nextafter(1.0, 1.1) - 1.0
)

Functions

func LSD

func LSD(img []float64, X, Y int) ([]float64, int)

---------------------------------------------------------------------------- * LSD Simple Interface.

func LSD_scale

func LSD_scale(img []float64, X, Y int, scale float64) ([]float64, int)

---------------------------------------------------------------------------- * LSD Simple Interface with Scale.

func LSD_scale_region

func LSD_scale_region(img []float64, X, Y int, scale float64,
	reg_img *[]int, reg_x, reg_y *int) ([]float64, int)

---------------------------------------------------------------------------- * LSD Simple Interface with Scale and Region output.

func LineSegmentDetection

func LineSegmentDetection(img []float64, X, Y int,
	scale, sigma_scale, quant, ang_th, log_eps, density_th, union_ang_th float64,
	union_use_NFA bool, union_log_eps float64,
	n_bins int, need_to_union bool,
	reg_img *[]int, reg_x, reg_y *int,
	length_threshold, dist_threshold float64) ([]float64, int)

---------------------------------------------------------------------------- * LSD full interface.

Types

This section is empty.

Directories

Path Synopsis
cmd
lsd

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL