ClassesClassesClassesClasses | | | | Operators

split_skeleton_linesT_split_skeleton_linesSplitSkeletonLinessplit_skeleton_linesSplitSkeletonLinesSplitSkeletonLines (Operator)

Name

split_skeleton_linesT_split_skeleton_linesSplitSkeletonLinessplit_skeleton_linesSplitSkeletonLinesSplitSkeletonLines — Split lines represented by one pixel wide, non-branching lines.

Signature

split_skeleton_lines(SkeletonRegion : : MaxDistance : BeginRow, BeginCol, EndRow, EndCol)

Herror T_split_skeleton_lines(const Hobject SkeletonRegion, const Htuple MaxDistance, Htuple* BeginRow, Htuple* BeginCol, Htuple* EndRow, Htuple* EndCol)

Herror split_skeleton_lines(Hobject SkeletonRegion, const HTuple& MaxDistance, HTuple* BeginRow, HTuple* BeginCol, HTuple* EndRow, HTuple* EndCol)

HTuple HRegionArray::SplitSkeletonLines(const HTuple& MaxDistance, HTuple* BeginCol, HTuple* EndRow, HTuple* EndCol) const

void SplitSkeletonLines(const HObject& SkeletonRegion, const HTuple& MaxDistance, HTuple* BeginRow, HTuple* BeginCol, HTuple* EndRow, HTuple* EndCol)

void HRegion::SplitSkeletonLines(Hlong MaxDistance, HTuple* BeginRow, HTuple* BeginCol, HTuple* EndRow, HTuple* EndCol) const

void HOperatorSetX.SplitSkeletonLines(
[in] IHUntypedObjectX* SkeletonRegion, [in] VARIANT MaxDistance, [out] VARIANT* BeginRow, [out] VARIANT* BeginCol, [out] VARIANT* EndRow, [out] VARIANT* EndCol)

VARIANT HRegionX.SplitSkeletonLines(
[in] Hlong MaxDistance, [out] VARIANT* BeginCol, [out] VARIANT* EndRow, [out] VARIANT* EndCol)

static void HOperatorSet.SplitSkeletonLines(HObject skeletonRegion, HTuple maxDistance, out HTuple beginRow, out HTuple beginCol, out HTuple endRow, out HTuple endCol)

void HRegion.SplitSkeletonLines(int maxDistance, out HTuple beginRow, out HTuple beginCol, out HTuple endRow, out HTuple endCol)

Description

split_skeleton_linessplit_skeleton_linesSplitSkeletonLinessplit_skeleton_linesSplitSkeletonLinesSplitSkeletonLines splits lines represented by one pixel wide, non-branching regions into shorter lines based on their curvature. A line is split if the maximum distance of a point on the line to the line segment connecting its end points is larger than MaxDistanceMaxDistanceMaxDistanceMaxDistanceMaxDistancemaxDistance (split & merge algorithm). The start and end points of the approximating line segments are returned in BeginRowBeginRowBeginRowBeginRowBeginRowbeginRow, BeginColBeginColBeginColBeginColBeginColbeginCol, EndRowEndRowEndRowEndRowEndRowendRow, and EndColEndColEndColEndColEndColendCol.

Attention

The input regions must represent non-branching lines, that is single branches of the skeleton.

Parallelization

Parameters

SkeletonRegionSkeletonRegionSkeletonRegionSkeletonRegionSkeletonRegionskeletonRegion (input_object)  region-array objectHRegionHRegionHRegionArrayHRegionXHobject

Input lines (represented by 1 pixel wide, non-branching regions).

MaxDistanceMaxDistanceMaxDistanceMaxDistanceMaxDistancemaxDistance (input_control)  integer HTupleHTupleHTupleVARIANTHtuple (integer) (int / long) (Hlong) (Hlong) (Hlong) (Hlong)

Maximum distance of the line points to the line segment connecting both end points.

Default value: 3

Suggested values: 1, 2, 3, 4, 5, 6, 7, 8, 9, 10

Typical range of values: 1 ≤ MaxDistance MaxDistance MaxDistance MaxDistance MaxDistance maxDistance ≤ 500 (lin)

Minimum increment: 1

Recommended increment: 1

BeginRowBeginRowBeginRowBeginRowBeginRowbeginRow (output_control)  line.begin.y-array HTupleHTupleHTupleVARIANTHtuple (integer) (int / long) (Hlong) (Hlong) (Hlong) (Hlong)

Row coordinates of the start points of the output lines.

BeginColBeginColBeginColBeginColBeginColbeginCol (output_control)  line.begin.x-array HTupleHTupleHTupleVARIANTHtuple (integer) (int / long) (Hlong) (Hlong) (Hlong) (Hlong)

Column coordinates of the start points of the output lines.

EndRowEndRowEndRowEndRowEndRowendRow (output_control)  line.end.y-array HTupleHTupleHTupleVARIANTHtuple (integer) (int / long) (Hlong) (Hlong) (Hlong) (Hlong)

Row coordinates of the end points of the output lines.

EndColEndColEndColEndColEndColendCol (output_control)  line.end.x-array HTupleHTupleHTupleVARIANTHtuple (integer) (int / long) (Hlong) (Hlong) (Hlong) (Hlong)

Column coordinates of the end points of the output lines.

Example (HDevelop)

read_image(Image,'fabrik')
edges_image (Image, ImaAmp, ImaDir, 'lanser2', 0.5, 'nms', 8, 16)
threshold (ImaAmp, RawEdges, 8, 255)
skeleton (RawEdges, Skeleton)
junctions_skeleton (Skeleton, EndPoints, JuncPoints)
difference (Skeleton, JuncPoints, SkelWithoutJunc)
connection (SkelWithoutJunc, SingleBranches)
select_shape (SingleBranches, SelectedBranches, 'area', 'and', 16, 99999)
split_skeleton_lines (SelectedBranches, 3, BeginRow, BeginCol, EndRow, \
                      EndCol)

Example (C)

read_image(&Image,"fabrik");
edges_image (Image, &ImaAmp, &ImaDir, "lanser2", 0.5, "nms", 8, 16);
threshold (ImaAmp, &RawEdges, 8, 255);
skeleton (RawEdges, &Skeleton);
junctions_skeleton (Skeleton, &EndPoints, &JuncPoints);
difference (Skeleton, JuncPoints, &SkelWithoutJunc);
connection (SkelWithoutJunc, &SingleBranches);
select_shape (SingleBranches, &SelectedBranches, "area", "and", 16, 99999);
split_skeleton_lines (SelectedBranches, 3, &BeginRow, &BeginCol, &EndRow,
                      &EndCol);

Example (HDevelop)

read_image(Image,'fabrik')
edges_image (Image, ImaAmp, ImaDir, 'lanser2', 0.5, 'nms', 8, 16)
threshold (ImaAmp, RawEdges, 8, 255)
skeleton (RawEdges, Skeleton)
junctions_skeleton (Skeleton, EndPoints, JuncPoints)
difference (Skeleton, JuncPoints, SkelWithoutJunc)
connection (SkelWithoutJunc, SingleBranches)
select_shape (SingleBranches, SelectedBranches, 'area', 'and', 16, 99999)
split_skeleton_lines (SelectedBranches, 3, BeginRow, BeginCol, EndRow, \
                      EndCol)

Example (HDevelop)

read_image(Image,'fabrik')
edges_image (Image, ImaAmp, ImaDir, 'lanser2', 0.5, 'nms', 8, 16)
threshold (ImaAmp, RawEdges, 8, 255)
skeleton (RawEdges, Skeleton)
junctions_skeleton (Skeleton, EndPoints, JuncPoints)
difference (Skeleton, JuncPoints, SkelWithoutJunc)
connection (SkelWithoutJunc, SingleBranches)
select_shape (SingleBranches, SelectedBranches, 'area', 'and', 16, 99999)
split_skeleton_lines (SelectedBranches, 3, BeginRow, BeginCol, EndRow, \
                      EndCol)

Example (HDevelop)

read_image(Image,'fabrik')
edges_image (Image, ImaAmp, ImaDir, 'lanser2', 0.5, 'nms', 8, 16)
threshold (ImaAmp, RawEdges, 8, 255)
skeleton (RawEdges, Skeleton)
junctions_skeleton (Skeleton, EndPoints, JuncPoints)
difference (Skeleton, JuncPoints, SkelWithoutJunc)
connection (SkelWithoutJunc, SingleBranches)
select_shape (SingleBranches, SelectedBranches, 'area', 'and', 16, 99999)
split_skeleton_lines (SelectedBranches, 3, BeginRow, BeginCol, EndRow, \
                      EndCol)

Example (HDevelop)

read_image(Image,'fabrik')
edges_image (Image, ImaAmp, ImaDir, 'lanser2', 0.5, 'nms', 8, 16)
threshold (ImaAmp, RawEdges, 8, 255)
skeleton (RawEdges, Skeleton)
junctions_skeleton (Skeleton, EndPoints, JuncPoints)
difference (Skeleton, JuncPoints, SkelWithoutJunc)
connection (SkelWithoutJunc, SingleBranches)
select_shape (SingleBranches, SelectedBranches, 'area', 'and', 16, 99999)
split_skeleton_lines (SelectedBranches, 3, BeginRow, BeginCol, EndRow, \
                      EndCol)

Result

split_skeleton_linessplit_skeleton_linesSplitSkeletonLinessplit_skeleton_linesSplitSkeletonLinesSplitSkeletonLines always returns the value 2 (H_MSG_TRUE). The behavior in case of empty input (no regions given) can be set via set_system('no_object_result',<Result>)set_system("no_object_result",<Result>)SetSystem("no_object_result",<Result>)set_system("no_object_result",<Result>)SetSystem("no_object_result",<Result>)SetSystem("no_object_result",<Result>), the behavior in case of an empty input region via set_system('empty_region_result',<Result>)set_system("empty_region_result",<Result>)SetSystem("empty_region_result",<Result>)set_system("empty_region_result",<Result>)SetSystem("empty_region_result",<Result>)SetSystem("empty_region_result",<Result>), and the behavior in case of an empty result region via set_system('store_empty_region',<'true'/'false'>)set_system("store_empty_region",<"true"/"false">)SetSystem("store_empty_region",<"true"/"false">)set_system("store_empty_region",<"true"/"false">)SetSystem("store_empty_region",<"true"/"false">)SetSystem("store_empty_region",<"true"/"false">). If necessary, an exception is raised.

Possible Predecessors

connectionconnectionConnectionconnectionConnectionConnection, select_shapeselect_shapeSelectShapeselect_shapeSelectShapeSelectShape, skeletonskeletonSkeletonskeletonSkeletonSkeleton, junctions_skeletonjunctions_skeletonJunctionsSkeletonjunctions_skeletonJunctionsSkeletonJunctionsSkeleton, differencedifferenceDifferencedifferenceDifferenceDifference

Possible Successors

select_linesselect_linesSelectLinesselect_linesSelectLinesSelectLines, partition_linespartition_linesPartitionLinespartition_linesPartitionLinesPartitionLines, disp_linedisp_lineDispLinedisp_lineDispLineDispLine

See also

split_skeleton_regionsplit_skeleton_regionSplitSkeletonRegionsplit_skeleton_regionSplitSkeletonRegionSplitSkeletonRegion, detect_edge_segmentsdetect_edge_segmentsDetectEdgeSegmentsdetect_edge_segmentsDetectEdgeSegmentsDetectEdgeSegments

Module

Foundation


ClassesClassesClassesClasses | | | | Operators