lmlib.utils.beta.edge_detection#

lmlib.utils.beta.edge_detection(y, ab, g)#

Performs edge detection applying joint line models

Uses a two-line model to detect edges, according to example: sphx_glr_generated_examples_11-lssm-costs-detection_example-ex110.0-edge-detection.py

Parameters
  • y (array_like of shape=(K,) of floats) – observation vector

  • ab (tuple (a,b)) –

    • a (int, >0): left-sided window length (>0)

    • b (int, >0): right-sided window length (>0)

  • g (tuple (g_a, g_b) of float) –

    Effective number of samples under the left-sided and right-sided window, see CostSegment.
    • g_a (float, >0): left-sided window length (>0)

    • g_b (float, >0): right-sided window length (>0)

  • g_a (float) – Effective number of samples under the right-sided window, see CostSegment.

Returns

  • lcr (ndarray of shape(K,) of floats) – log-likelihood ratio for a detected edge

  • y0 (ndarray of shape(K,) of floats) – position estimate of edge on y-axis

  • a0 (ndarray of shape(K,) of floats) – line slope of left-sided model

  • a1 (ndarray of shape(K,) of floats) – line slope of right-sided model