public class SkeletonAnalysisHelper extends Object
The methods in this class assume skeletons strictly enforcing 8-neighborhood among their pixels. In particular this implies that each endpoint has exactly (!) one neighbor, each junction point has at least three neighbors, and all others points of the skeleton have exactly (!) two neigbors.
Constructor and Description |
---|
SkeletonAnalysisHelper() |
Modifier and Type | Method and Description |
---|---|
static int |
numberOfNeighbors(MTBImage img,
int x,
int y)
Counts the number of neighboring skeleton pixels.
|
static Vector<Point2D.Double> |
traceBranch(MTBImage img,
int x,
int y)
Traces a skeleton branch and returns the list of its pixels.
|
public static Vector<Point2D.Double> traceBranch(MTBImage img, int x, int y)
The tracing starts at the given position and ends at the next branch point, i.e., the next pixel having more than one neighbor.
img
- Skeleton image.x
- x-coordinate where to start.y
- y-coordinate where to start.public static int numberOfNeighbors(MTBImage img, int x, int y)
The 8-neighborhood is considered here.
img
- Skeleton image.x
- x-coordinate of pixel to examine.y
- y-coordinate of pixel to examine.Copyright © 2010–2020 Martin Luther University Halle-Wittenberg, Institute of Computer Science, Pattern Recognition and Bioinformatics. All rights reserved.