approx_chain_simpleT_approx_chain_simpleApproxChainSimpleApproxChainSimpleapprox_chain_simple (Operator)

Name

approx_chain_simpleT_approx_chain_simpleApproxChainSimpleApproxChainSimpleapprox_chain_simple — Approximation einer Kontur durch Bögen und Linien.

Warnung

approx_chain_simpleapprox_chain_simpleApproxChainSimpleApproxChainSimpleApproxChainSimpleapprox_chain_simple ist veraltet und wird nur aus Gründen der Rückwärtskompatibilität zur Verfügung gestellt.

Signatur

approx_chain_simple( : : Row, Column : ArcCenterRow, ArcCenterCol, ArcAngle, ArcBeginRow, ArcBeginCol, LineBeginRow, LineBeginCol, LineEndRow, LineEndCol, Order)

Herror T_approx_chain_simple(const Htuple Row, const Htuple Column, Htuple* ArcCenterRow, Htuple* ArcCenterCol, Htuple* ArcAngle, Htuple* ArcBeginRow, Htuple* ArcBeginCol, Htuple* LineBeginRow, Htuple* LineBeginCol, Htuple* LineEndRow, Htuple* LineEndCol, Htuple* Order)

void ApproxChainSimple(const HTuple& Row, const HTuple& Column, HTuple* ArcCenterRow, HTuple* ArcCenterCol, HTuple* ArcAngle, HTuple* ArcBeginRow, HTuple* ArcBeginCol, HTuple* LineBeginRow, HTuple* LineBeginCol, HTuple* LineEndRow, HTuple* LineEndCol, HTuple* Order)

static void HMisc::ApproxChainSimple(const HTuple& Row, const HTuple& Column, HTuple* ArcCenterRow, HTuple* ArcCenterCol, HTuple* ArcAngle, HTuple* ArcBeginRow, HTuple* ArcBeginCol, HTuple* LineBeginRow, HTuple* LineBeginCol, HTuple* LineEndRow, HTuple* LineEndCol, HTuple* Order)

static void HOperatorSet.ApproxChainSimple(HTuple row, HTuple column, out HTuple arcCenterRow, out HTuple arcCenterCol, out HTuple arcAngle, out HTuple arcBeginRow, out HTuple arcBeginCol, out HTuple lineBeginRow, out HTuple lineBeginCol, out HTuple lineEndRow, out HTuple lineEndCol, out HTuple order)

static void HMisc.ApproxChainSimple(HTuple row, HTuple column, out HTuple arcCenterRow, out HTuple arcCenterCol, out HTuple arcAngle, out HTuple arcBeginRow, out HTuple arcBeginCol, out HTuple lineBeginRow, out HTuple lineBeginCol, out HTuple lineEndRow, out HTuple lineEndCol, out HTuple order)

def approx_chain_simple(row: Sequence[int], column: Sequence[int]) -> Tuple[Sequence[int], Sequence[int], Sequence[float], Sequence[int], Sequence[int], Sequence[int], Sequence[int], Sequence[int], Sequence[int], Sequence[int]]

Beschreibung

Die Koordinaten einer Kurve werden durch eine Folge von Linien und Kreisbögen approximiert.

Das Ergebnis des Verfahren wird getrennt nach Bögen und Linien zurückgegeben. Ist man an der Reihenfolge der Segmente interessiert, so können die einzelnen Ergebniselemente sukzessive aus den Ergebnistupeln ausgelesen werden, wobei dem Rückgabeparameter Order die Reihenfolge entnommen werden kann (0: nächstes Element ist nächstes Liniensegment, 1: nächstes Element ist nächstes Bogensegment).

approx_chain_simpleapprox_chain_simpleApproxChainSimpleApproxChainSimpleApproxChainSimpleapprox_chain_simple verhält sich ähnlich wie approx_chainapprox_chainApproxChainApproxChainApproxChainapprox_chain nur bei approx_chain_simpleapprox_chain_simpleApproxChainSimpleApproxChainSimpleApproxChainSimpleapprox_chain_simple sind die fehlende Parameter intern wie folgt belegt: MinWidthCoord = 1.0, MaxWidthCoord = 3.0, ThreshStart = 0.5, ThreshEnd = 0.9, ThreshStep = 0.3, MinWidthSmooth = 1.0, MaxWidthSmooth = 3.0, MinWidthCurve = 2, MaxWidthCurve = 9, Weight1 = 1.0, Weight2 = 1.0, Weight3 = 1.0.

Ausführungsinformationen

Parameter

RowRowRowRowrowrow (input_control)  point.y-array HTupleSequence[int]HTupleHtuple (integer) (int / long) (Hlong) (Hlong)

Zeilenwert der Kontur.

Defaultwert: 32

ColumnColumnColumnColumncolumncolumn (input_control)  point.x-array HTupleSequence[int]HTupleHtuple (integer) (int / long) (Hlong) (Hlong)

Spaltenwert der Kontur.

Defaultwert: 32

ArcCenterRowArcCenterRowArcCenterRowArcCenterRowarcCenterRowarc_center_row (output_control)  arc.center.y-array HTupleSequence[int]HTupleHtuple (integer) (int / long) (Hlong) (Hlong)

Zeile des Mittelpunkts eines Bogens.

ArcCenterColArcCenterColArcCenterColArcCenterColarcCenterColarc_center_col (output_control)  arc.center.x-array HTupleSequence[int]HTupleHtuple (integer) (int / long) (Hlong) (Hlong)

Spalte des Mittelpunkts eines Bogens.

ArcAngleArcAngleArcAngleArcAnglearcAnglearc_angle (output_control)  arc.angle.rad-array HTupleSequence[float]HTupleHtuple (real) (double) (double) (double)

Winkel eines Bogens.

ArcBeginRowArcBeginRowArcBeginRowArcBeginRowarcBeginRowarc_begin_row (output_control)  arc.begin.y-array HTupleSequence[int]HTupleHtuple (integer) (int / long) (Hlong) (Hlong)

Zeile des Startpunkts eines Bogens.

ArcBeginColArcBeginColArcBeginColArcBeginColarcBeginColarc_begin_col (output_control)  arc.begin.x-array HTupleSequence[int]HTupleHtuple (integer) (int / long) (Hlong) (Hlong)

Spalte des Startpunkts eines Bogens.

LineBeginRowLineBeginRowLineBeginRowLineBeginRowlineBeginRowline_begin_row (output_control)  line.begin.y-array HTupleSequence[int]HTupleHtuple (integer) (int / long) (Hlong) (Hlong)

Zeile des Startpunkts einer Linie.

LineBeginColLineBeginColLineBeginColLineBeginCollineBeginColline_begin_col (output_control)  line.begin.x-array HTupleSequence[int]HTupleHtuple (integer) (int / long) (Hlong) (Hlong)

Spalte des Startpunkts einer Linie.

LineEndRowLineEndRowLineEndRowLineEndRowlineEndRowline_end_row (output_control)  line.end.y-array HTupleSequence[int]HTupleHtuple (integer) (int / long) (Hlong) (Hlong)

Zeile des Endpunkts einer Linie.

LineEndColLineEndColLineEndColLineEndCollineEndColline_end_col (output_control)  line.end.x-array HTupleSequence[int]HTupleHtuple (integer) (int / long) (Hlong) (Hlong)

Spalte des Endpunkts einer Linie.

OrderOrderOrderOrderorderorder (output_control)  integer-array HTupleSequence[int]HTupleHtuple (integer) (int / long) (Hlong) (Hlong)

Reihenfolge von Linien- (Wert 0) und Bogensegmenten (Wert1).

Beispiel (C)

/* read edge image */
read_image(&Image,"fig1_kan");
/* construct edge region */
hysteresis_threshold(Image,&RK1,64,255,40,1);
connection(RK1,&Rand);
/* fetch chain code */
T_get_region_contour(Rand,&Rows,&Columns);
firstline = get_i(Tline,0);
firstcol = get_i(Tcol,0);
/* approximation with lines and circular arcs */
T_approx_chain_simple(Rows,Columns,
                &Bzl,&Bzc,&Br,&Bwl,&Bwc,&Ll0,&Lc0,&Ll1,&Lc1,&order);
nob = length_tuple(Bzl);
nol = length_tuple(Ll0);
/* draw lines and arcs */
set_i(WindowHandleTuple,WindowHandle,0);
set_line_width(WindowHandle,4);
if (nob>0) T_disp_arc(Bzl,Bzc,Br,Bwl,Bwc);
set_line_width(WindowHandle,1);
if (nol>0) T_disp_line(WindowHandleTuple,Ll0,Lc0,Ll1,Lc1);

Ergebnis

approx_chain_simpleapprox_chain_simpleApproxChainSimpleApproxChainSimpleApproxChainSimpleapprox_chain_simple liefert den Wert 2 (H_MSG_TRUE), falls die Parameter korrekt sind. Ansonsten wird eine Fehlerbehandlung durchgeführt.

Vorgänger

sobel_ampsobel_ampSobelAmpSobelAmpSobelAmpsobel_amp, edges_imageedges_imageEdgesImageEdgesImageEdgesImageedges_image, get_region_contourget_region_contourGetRegionContourGetRegionContourGetRegionContourget_region_contour, thresholdthresholdThresholdThresholdThresholdthreshold, hysteresis_thresholdhysteresis_thresholdHysteresisThresholdHysteresisThresholdHysteresisThresholdhysteresis_threshold

Nachfolger

set_line_widthset_line_widthSetLineWidthSetLineWidthSetLineWidthset_line_width, disp_arcdisp_arcDispArcDispArcDispArcdisp_arc, disp_linedisp_lineDispLineDispLineDispLinedisp_line

Alternativen

get_region_polygonget_region_polygonGetRegionPolygonGetRegionPolygonGetRegionPolygonget_region_polygon, approx_chainapprox_chainApproxChainApproxChainApproxChainapprox_chain

Siehe auch

get_region_chainget_region_chainGetRegionChainGetRegionChainGetRegionChainget_region_chain, smallest_circlesmallest_circleSmallestCircleSmallestCircleSmallestCirclesmallest_circle, disp_circledisp_circleDispCircleDispCircleDispCircledisp_circle, disp_linedisp_lineDispLineDispLineDispLinedisp_line

Modul

Foundation