Documentation ¶
Index ¶
Constants ¶
View Source
const ( HORIZONTAL = 1 VERTICAL = 2 )
Variables ¶
This section is empty.
Functions ¶
func PolylinesToSvg ¶
func PrintPolyline ¶
func PrintPolyline(q *polyline_t)
func PrintPolylines ¶
func PrintPolylines(q *polyline_t)
func ThinningZS ¶
func TraceSkeleton ¶
func TraceSkeleton(im []uint8, W int, H int, x int, y int, w int, h int, chunkSize int, maxIter int) *polyline_t
*Trace skeleton from thinning result.
- Algorithm:
- 1. if chunk size is small enough, reach recursive bottom and turn it into segments
- 2. attempt to split the chunk into 2 smaller chunks, either horizontall or vertically;
- find the best "seam" to carve along, and avoid possible degenerate cases
- 3. recurse on each chunk, and merge their segments *
- @param x left of chunk
- @param y top of chunk
- @param w width of chunk
- @param h height of chunk
- @param iter current iteration
- @return an array of polylines
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.