API Documentation¶
-
class
cliquematch.
Graph
¶ -
-
get_max_clique
()¶ Finds a maximum clique in graph within the given bounds
- Returns
the vertices in the maximum clique
- Return type
-
continue_search
()¶ Continue the clique search if the entire graph has not been searched
-
reset_search
()¶ Reset the search for maximum cliques
-
static
from_file
()¶ Constructs
Graph
instance from reading a Matrix Market file- Parameters
str – filename
- Returns
the loaded
Graph
-
static
from_edgelist
()¶ Constructs
Graph
instance from the given edge list- Param
edgelist (
numpy.ndarray
of shape(n,2)
)- Parameters
int – num_vertices
- Returns
the loaded
Graph
-
static
from_matrix
()¶ Constructs
Graph
instance from the given boolean adjacency matrix- Param
adjmat (
numpy.ndarray
,bool
square matrix)- Returns
the loaded
Graph
-
static
from_adjlist
()¶ Constructs
Graph
instance from the given adjacency list- Parameters
int – num_vertices
int – num_edges
list – edges
- Returns
the loaded
Graph
-
to_file
()¶ Exports
Graph
instance to a Matrix Market file- Parameters
str – filename
-
to_edgelist
()¶ Exports
Graph
instance to an edge list- Returns
(n,2)
numpy.ndarray
of edges
-
to_matrix
()¶ Exports
Graph
instance to a boolean matrix- Returns
square
numpy.ndarray
ofbool
s
-
-
class
cliquematch.
A2AGraph
(set1, set2, d1=None, d2=None, is_d1_symmetric=True, is_d2_symmetric=True)¶ Correspondence Graph wrapper for array-to-array mappings.
-
S1
¶ array elements are converted to
numpy.float64
- Type
-
S2
¶ array elements are converted to
numpy.float64
- Type
-
d1
¶ distance metric for elements in
S1
, defaults to Euclidean metric ifNone
.- Type
callable
(numpy.ndarray
,int
,int
) ->float
-
d2
¶ distance metric for elements in
S2
, defaults to Euclidean metric ifNone
- Type
callable
(numpy.ndarray
,int
,int
) ->float
-
build_edges
()¶ Build edges of the correspondence graph using distance metrics.
-
build_edges_with_condition
(condition_func, use_cfunc_only)¶ Build edges of the correspondence graph using a given condition function.
-
-
class
cliquematch.
L2LGraph
(set1, set2, d1=None, d2=None, is_d1_symmetric=True, is_d2_symmetric=True)¶ Correspondence Graph wrapper for list-to-list mappings.
Any
object
can be passed forS1
andS2
; the user is required to define how the elements are accessed.-
build_edges
()¶ Build edges of the correspondence graph using distance metrics.
-
build_edges_with_condition
(condition_func, use_cfunc_only)¶ Build edges of the correspondence graph using a given condition function.
-
-
class
cliquematch.
L2AGraph
(set1, set2, d1=None, d2=None, is_d1_symmetric=True, is_d2_symmetric=True)¶ Correspondence Graph wrapper for list-to-array mappings.
Any general object can be passed for
S1
; the user is required to define how elements are accessed.-
S2
¶ array elements are converted to
numpy.float64
- Type
-
d2
¶ distance metric for elements in
S2
, defaults to Euclidean metric ifNone
- Type
callable
(numpy.ndarray
,int
,int
) ->float
-
build_edges
()¶ Build edges of the correspondence graph using distance metrics.
-
build_edges_with_condition
(condition_func, use_cfunc_only)¶ Build edges of the correspondence graph using a given condition function.
-
-
class
cliquematch.
A2LGraph
(set1, set2, d1=None, d2=None, is_d1_symmetric=True, is_d2_symmetric=True)¶ Correspondence Graph wrapper for array-to-list mappings.
Any general object can be passed for
S2
; the user is required to define how elements are accessed.-
S1
¶ array elements are converted to
numpy.float64
- Type
-
d1
¶ distance metric for elements in
S1
, defaults to Euclidean metric ifNone
- Type
callable
(numpy.ndarray
,int
,int
) ->float
-
build_edges
()¶ Build edges of the correspondence graph using distance metrics.
-
build_edges_with_condition
(condition_func, use_cfunc_only)¶ Build edges of the correspondence graph using a given condition function.
-
-
class
cliquematch.
IsoGraph
(set1, set2)¶ Correspondence graph for finding subgraph isomorphisms.
-
S1
¶ - Type
-
S2
¶ - Type
-
build_edges
()¶ Build edges of the correspondence graph.
-
-
class
cliquematch.
AlignGraph
(set1, set2)¶ Correspondence graph for aligning images using obtained interest points.
Uses a mask-based filtering method as a conditon function during construction of the graph. Default Euclidean metrics are used as distance metrics.
-
S1
¶ array elements are converted to
numpy.float64
- Type
-
S2
¶ array elements are converted to
numpy.float64
- Type
-
build_edges_with_filter
(control_points, filter_mask, percentage)¶ Uses control points and a binary mask to filter out invalid mappings and construct a correspondence graph.
- Parameters
control_points (
numpy.ndarray
) – control points to use in every alignment testfilter_mask (
numpy.ndarray
) – a boolean mask showing valid regions in the target imagepercentage (
float
) – an alignment is valid if the number of control points that fall within the mask are greater than this value
-
get_correspondence
(return_indices=False)¶ Find correspondence between the sets of points
S1
andS2
.
-