segment_contour_attrib_xld segment_contour_attrib_xld SegmentContourAttribXld SegmentContourAttribXld (Operator)
Name
segment_contour_attrib_xld segment_contour_attrib_xld SegmentContourAttribXld SegmentContourAttribXld
— Segmentieren von Konturteilen, deren Attribute vorgegebene Bedingungen
erfüllen.
Signatur
Herror segment_contour_attrib_xld (const Hobject Contour , Hobject* ContourPart , const char* Attribute , const char* Operation , double Min , double Max )
Herror T_segment_contour_attrib_xld (const Hobject Contour , Hobject* ContourPart , const Htuple Attribute , const Htuple Operation , const Htuple Min , const Htuple Max )
void SegmentContourAttribXld (const HObject& Contour , HObject* ContourPart , const HTuple& Attribute , const HTuple& Operation , const HTuple& Min , const HTuple& Max )
HXLDCont HXLDCont ::SegmentContourAttribXld (const HTuple& Attribute , const HString& Operation , const HTuple& Min , const HTuple& Max ) const
HXLDCont HXLDCont ::SegmentContourAttribXld (const HString& Attribute , const HString& Operation , double Min , double Max ) const
HXLDCont HXLDCont ::SegmentContourAttribXld (const char* Attribute , const char* Operation , double Min , double Max ) const
HXLDCont HXLDCont ::SegmentContourAttribXld (const wchar_t* Attribute , const wchar_t* Operation , double Min , double Max ) const
(Nur Windows)
static void HOperatorSet .SegmentContourAttribXld (HObject contour , out HObject contourPart , HTuple attribute , HTuple operation , HTuple min , HTuple max )
HXLDCont HXLDCont .SegmentContourAttribXld (HTuple attribute , string operation , HTuple min , HTuple max )
HXLDCont HXLDCont .SegmentContourAttribXld (string attribute , string operation , double min , double max )
Beschreibung
segment_contour_attrib_xld segment_contour_attrib_xld SegmentContourAttribXld SegmentContourAttribXld SegmentContourAttribXld
segmentiert die Eingabekontur
Contour Contour Contour Contour contour
in Kontursegmente ContourPart ContourPart ContourPart ContourPart contourPart
. Die Segmentierung
der Kontur ist von den Werten der Konturattribute Attribute Attribute Attribute Attribute attribute
abhängig (siehe unten für mögliche Werte von Attribute Attribute Attribute Attribute attribute
).
Der Operator prüft welche Attributwerte innerhalb der vorgegebenen Grenzen
(Min Min Min Min min
, Max Max Max Max max
) liegen und liefert die entsprechenden
Kontursegmente zusammen mit ihren Attributen in ContourPart ContourPart ContourPart ContourPart contourPart
zurück.
Ist Operation Operation Operation Operation operation
auf 'and' gesetzt, muss jedes der angegebenen
Attribute innerhalb
der vorgegebenen Grenzen liegen. Ist Operation Operation Operation Operation operation
auf 'or' gesetzt,
muss mindestens ein Attribut innerhalb der vorgegebenen Grenzen liegen.
Um diese Grenzen nach unten oder oben offen zu lassen, kann
statt eines Wertes auch 'min' "min" "min" "min" "min" beziehungsweise 'max' "max" "max" "max" "max"
für Min Min Min Min min
und Max Max Max Max max
gesetzt werden.
Die Attribute werden in der
Reihenfolge abgearbeitet, in der sie in Attribute Attribute Attribute Attribute attribute
aufgeführt sind.
Wird nur ein Merkmal (Attribute Attribute Attribute Attribute attribute
) verwendet, wird der Wert von
Operation Operation Operation Operation operation
ignoriert.
Es ist zu beachten, dass nicht alle Attribute in jeder Kontur
vorhanden sind. Welche Attribute für eine gegebene Kontur definiert sind,
hängt davon ab, wie die Kontur erzeugt wurde und ob bestimmte
Operationen darauf ausgeführt wurden. So sind zum Beispiel die Attribute
'width_right' "width_right" "width_right" "width_right" "width_right" und 'width_left' "width_left" "width_left" "width_left" "width_left" nur vorhanden, wenn die
Kontur mit dem
Operator lines_gauss lines_gauss LinesGauss LinesGauss LinesGauss
erzeugt wurde. Ebenso ist das Attribut
'distance' "distance" "distance" "distance" "distance" erst vorhanden, wenn zuvor der Abstand zu einer anderen
Kontur
mit distance_contours_xld distance_contours_xld DistanceContoursXld DistanceContoursXld DistanceContoursXld
oder apply_distance_transform_xld apply_distance_transform_xld ApplyDistanceTransformXld ApplyDistanceTransformXld ApplyDistanceTransformXld
berechnet wurde.
Bedingung:
Mögliche Werte für Attribute Attribute Attribute Attribute attribute
:
'edge_direction':
Kantenrichtung
'angle':
Der Winkel der Richtung senkrecht zur Linie
'response':
Die Größe der zweiten Ableitung
'width_right':
Die Linienbreite rechts von der Linie
'width_left':
Die Linienbreite links von der Linie
'contrast':
Der Kontrast des Linienpunkts
'asymmetry':
Die Asymmetrie des Linienpunkts
'distance':
Der minimale punktweise Abstand zu einer
Referenzkontur
Welche Operatoren einer Kontur die oben genannten Attribute hinzufügen und
weitere Informationen zu den Attributen finden sich in
get_contour_attrib_xld get_contour_attrib_xld GetContourAttribXld GetContourAttribXld GetContourAttribXld
.
Ausführungsinformationen
Multithreading-Typ: reentrant (läuft parallel zu nicht-exklusiven Operatoren).
Multithreading-Bereich: global (kann von jedem Thread aufgerufen werden).
Wird ohne Parallelisierung verarbeitet.
Parameter
Contour Contour Contour Contour contour
(input_object) xld_cont(-array) →
object HXLDCont HXLDCont Hobject
Zu segmentierende Kontur.
ContourPart ContourPart ContourPart ContourPart contourPart
(output_object) xld_cont-array →
object HXLDCont HXLDCont Hobject *
Kontursegmente.
Attribute Attribute Attribute Attribute attribute
(input_control) string(-array) →
HTuple HTuple Htuple (string) (string ) (HString ) (char* )
Konturattribute, die geprüft werden.
Defaultwert:
'distance'
"distance"
"distance"
"distance"
"distance"
Werteliste: 'angle' "angle" "angle" "angle" "angle" , 'asymmetry' "asymmetry" "asymmetry" "asymmetry" "asymmetry" , 'contrast' "contrast" "contrast" "contrast" "contrast" , 'distance' "distance" "distance" "distance" "distance" , 'edge_direction' "edge_direction" "edge_direction" "edge_direction" "edge_direction" , 'response' "response" "response" "response" "response" , 'width_left' "width_left" "width_left" "width_left" "width_left" , 'width_right' "width_right" "width_right" "width_right" "width_right"
Operation Operation Operation Operation operation
(input_control) string →
HTuple HTuple Htuple (string) (string ) (HString ) (char* )
Art der Verlinkung der individuellen Attribute.
Defaultwert:
'and'
"and"
"and"
"and"
"and"
Werteliste: 'and' "and" "and" "and" "and" , 'or' "or" "or" "or" "or"
Min Min Min Min min
(input_control) real(-array) →
HTuple HTuple Htuple (real / integer / string) (double / int / long / string) (double / Hlong / HString) (double / Hlong / char*)
Untere Grenze der Features.
Defaultwert: 150.0
Typischer Wertebereich: 0.0
≤
Min
Min
Min
Min
min
≤
99999.0
Minimale Schrittweite: 0.001
Empfohlene Schrittweite: 1.0
Max Max Max Max max
(input_control) real(-array) →
HTuple HTuple Htuple (real / integer / string) (double / int / long / string) (double / Hlong / HString) (double / Hlong / char*)
Obere Grenze der Features.
Defaultwert: 99999.0
Typischer Wertebereich: 0.0
≤
Max
Max
Max
Max
max
≤
99999.0
Minimale Schrittweite: 0.001
Empfohlene Schrittweite: 1.0
Restriktion: Max >= Min
Beispiel (HDevelop)
read_image (Image, 'fabrik')
edges_sub_pix (Image, Edges, 'canny', 1, 20, 40)
* select 'vertical' edges:
segment_contour_attrib_xld (Edges, ContourPart, 'edge_direction', \
'and', rad(90-20), rad(90+20))
Ergebnis
select_shape select_shape SelectShape SelectShape SelectShape
liefert den Wert 2 (H_MSG_TRUE), falls die Eingabe nicht
leer ist. Das Verhalten bei leerer Eingabe (keine Eingabeobjekte vorhanden)
lässt sich mittels set_system('no_object_result',<Result>) set_system("no_object_result",<Result>) SetSystem("no_object_result",<Result>) SetSystem("no_object_result",<Result>) SetSystem("no_object_result",<Result>)
festlegen. Das Verhalten bei einer leeren Region (Region ist die leere Menge)
wird mit set_system('empty_region_result',<Result>) set_system("empty_region_result",<Result>) SetSystem("empty_region_result",<Result>) SetSystem("empty_region_result",<Result>) SetSystem("empty_region_result",<Result>)
bestimmt.
Gegebenenfalls wird eine Fehlerbehandlung durchgeführt.
Vorgänger
lines_gauss lines_gauss LinesGauss LinesGauss LinesGauss
,
edges_sub_pix edges_sub_pix EdgesSubPix EdgesSubPix EdgesSubPix
,
apply_distance_transform_xld apply_distance_transform_xld ApplyDistanceTransformXld ApplyDistanceTransformXld ApplyDistanceTransformXld
,
distance_contours_xld distance_contours_xld DistanceContoursXld DistanceContoursXld DistanceContoursXld
Nachfolger
fit_line_contour_xld fit_line_contour_xld FitLineContourXld FitLineContourXld FitLineContourXld
,
fit_ellipse_contour_xld fit_ellipse_contour_xld FitEllipseContourXld FitEllipseContourXld FitEllipseContourXld
,
fit_circle_contour_xld fit_circle_contour_xld FitCircleContourXld FitCircleContourXld FitCircleContourXld
,
fit_rectangle2_contour_xld fit_rectangle2_contour_xld FitRectangle2ContourXld FitRectangle2ContourXld FitRectangle2ContourXld
Siehe auch
split_contours_xld split_contours_xld SplitContoursXld SplitContoursXld SplitContoursXld
,
get_contour_global_attrib_xld get_contour_global_attrib_xld GetContourGlobalAttribXld GetContourGlobalAttribXld GetContourGlobalAttribXld
,
query_contour_attribs_xld query_contour_attribs_xld QueryContourAttribsXld QueryContourAttribsXld QueryContourAttribsXld
,
get_contour_attrib_xld get_contour_attrib_xld GetContourAttribXld GetContourAttribXld GetContourAttribXld
Modul
Foundation