C# Class Forensics.Chamfer

Show file Open project: Algorithmix/Papyrus

Public Methods

Method Description
Measure ( double convolution ) : int[]

Calculates the chamfer from a convolution

NormalizedSimilarity ( int chamfer1, int chamfer2 ) : double
ScaleChamfer ( int input, int size ) : int[]
ScanSimilarity ( int chamfer1, int chamfer2 ) : double[]

Scan Similarity calculates the similarity for possible alignments of two chamfers such that the smaller edge is always bound by the larger edge

Similarity ( int smaller, int larger, int start ) : double

Calculates how similar two chamfers are 'i.e' opposite of the chamfer distance Does so by taking the dot product of the two chamfer vectors normalized by the max( dot product of either of the chamfers).

Sparsity ( int chamfer ) : long

Indicates the sparsity of the chamfer by sum(integrating) the chamfer vector

Method Details

Measure() public static method

Calculates the chamfer from a convolution
public static Measure ( double convolution ) : int[]
convolution double An array of doubles, where 0 indicates no feature and non zero indicates a feature
return int[]

NormalizedSimilarity() public static method

public static NormalizedSimilarity ( int chamfer1, int chamfer2 ) : double
chamfer1 int
chamfer2 int
return double

ScaleChamfer() public static method

public static ScaleChamfer ( int input, int size ) : int[]
input int
size int
return int[]

ScanSimilarity() public static method

Scan Similarity calculates the similarity for possible alignments of two chamfers such that the smaller edge is always bound by the larger edge
public static ScanSimilarity ( int chamfer1, int chamfer2 ) : double[]
chamfer1 int Chamfer vector
chamfer2 int Other shreds Chamfer vector
return double[]

Similarity() public static method

Calculates how similar two chamfers are 'i.e' opposite of the chamfer distance Does so by taking the dot product of the two chamfer vectors normalized by the max( dot product of either of the chamfers).
public static Similarity ( int smaller, int larger, int start ) : double
smaller int Smaller Chamfer Vector
larger int Larger Chamfer vector
start int Starting offset
return double

Sparsity() public static method

Indicates the sparsity of the chamfer by sum(integrating) the chamfer vector
public static Sparsity ( int chamfer ) : long
chamfer int chamfer vector
return long