segment_contour_attrib_xld segment_contour_attrib_xld SegmentContourAttribXld SegmentContourAttribXld segment_contour_attrib_xld (Operator)
Name
segment_contour_attrib_xld segment_contour_attrib_xld SegmentContourAttribXld SegmentContourAttribXld segment_contour_attrib_xld — 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 )
def segment_contour_attrib_xld (contour : HObject, attribute : MaybeSequence[str], operation : str, min : MaybeSequence[Union[int, float, str]], max : MaybeSequence[Union[int, float, str]]) -> HObject
Beschreibung
segment_contour_attrib_xld segment_contour_attrib_xld SegmentContourAttribXld SegmentContourAttribXld SegmentContourAttribXld segment_contour_attrib_xld segmentiert die Eingabekontur
Contour Contour Contour Contour contour contour in Kontursegmente ContourPart ContourPart ContourPart ContourPart contourPart contour_part . Die Segmentierung
der Kontur ist von den Werten der Konturattribute Attribute Attribute Attribute Attribute attribute attribute
abhängig (siehe unten für mögliche Werte von Attribute Attribute Attribute Attribute attribute attribute ).
Der Operator prüft welche Attributwerte innerhalb der vorgegebenen Grenzen
(Min Min Min Min min min , Max Max Max Max max max ) liegen und liefert die entsprechenden
Kontursegmente zusammen mit ihren Attributen in ContourPart ContourPart ContourPart ContourPart contourPart contour_part zurück.
Ist Operation Operation Operation Operation operation operation auf 'and' "and" "and" "and" "and" "and" gesetzt, muss jedes der angegebenen
Attribute innerhalb der vorgegebenen Grenzen liegen. Ist Operation Operation Operation Operation operation operation
auf 'or' "or" "or" "or" "or" "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" "min" beziehungsweise 'max' "max" "max" "max" "max" "max"
für Min Min Min Min min min und Max Max Max Max max max gesetzt werden.
Die Attribute werden in der
Reihenfolge abgearbeitet, in der sie in Attribute Attribute Attribute Attribute attribute attribute aufgeführt sind.
Wird nur ein Merkmal (Attribute Attribute Attribute Attribute attribute attribute ) verwendet, wird der Wert von
Operation 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" "width_right" und 'width_left' "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 lines_gauss erzeugt wurde. Ebenso ist das Attribut
'distance' "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 distance_contours_xld oder apply_distance_transform_xld apply_distance_transform_xld ApplyDistanceTransformXld ApplyDistanceTransformXld ApplyDistanceTransformXld apply_distance_transform_xld
berechnet wurde.
Bedingung:
Mögliche Werte für Attribute 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 get_contour_attrib_xld .
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 contour (input_object) xld_cont(-array) → object HXLDCont HObject HXLDCont Hobject
Zu segmentierende Kontur.
ContourPart ContourPart ContourPart ContourPart contourPart contour_part (output_object) xld_cont-array → object HXLDCont HObject HXLDCont Hobject *
Kontursegmente.
Attribute Attribute Attribute Attribute attribute attribute (input_control) string(-array) → HTuple MaybeSequence[str] HTuple Htuple (string) (string ) (HString ) (char* )
Konturattribute, die geprüft werden.
Defaultwert:
'distance'
"distance"
"distance"
"distance"
"distance"
"distance"
Werteliste: 'angle' "angle" "angle" "angle" "angle" "angle" , 'asymmetry' "asymmetry" "asymmetry" "asymmetry" "asymmetry" "asymmetry" , 'contrast' "contrast" "contrast" "contrast" "contrast" "contrast" , 'distance' "distance" "distance" "distance" "distance" "distance" , 'edge_direction' "edge_direction" "edge_direction" "edge_direction" "edge_direction" "edge_direction" , 'response' "response" "response" "response" "response" "response" , 'width_left' "width_left" "width_left" "width_left" "width_left" "width_left" , 'width_right' "width_right" "width_right" "width_right" "width_right" "width_right"
Operation Operation Operation Operation operation operation (input_control) string → HTuple str HTuple Htuple (string) (string ) (HString ) (char* )
Art der Verlinkung der individuellen Attribute.
Defaultwert:
'and'
"and"
"and"
"and"
"and"
"and"
Werteliste: 'and' "and" "and" "and" "and" "and" , 'or' "or" "or" "or" "or" "or"
Min Min Min Min min min (input_control) real(-array) → HTuple MaybeSequence[Union[int, float, str]] HTuple Htuple (real / integer / string) (double / int / long / string) (double / Hlong / HString) (double / Hlong / char*)
Untere Grenze der Features.
Defaultwert: 150.0
Minimale Schrittweite: 0.001
Empfohlene Schrittweite: 1.0
Max Max Max Max max max (input_control) real(-array) → HTuple MaybeSequence[Union[int, float, str]] HTuple Htuple (real / integer / string) (double / int / long / string) (double / Hlong / HString) (double / Hlong / char*)
Obere Grenze der Features.
Defaultwert: 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 select_shape 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>) set_system("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>) set_system("empty_region_result",<Result>) bestimmt.
Gegebenenfalls wird eine Fehlerbehandlung durchgeführt.
Vorgänger
lines_gauss lines_gauss LinesGauss LinesGauss LinesGauss lines_gauss ,
edges_sub_pix edges_sub_pix EdgesSubPix EdgesSubPix EdgesSubPix edges_sub_pix ,
apply_distance_transform_xld apply_distance_transform_xld ApplyDistanceTransformXld ApplyDistanceTransformXld ApplyDistanceTransformXld apply_distance_transform_xld ,
distance_contours_xld distance_contours_xld DistanceContoursXld DistanceContoursXld DistanceContoursXld distance_contours_xld
Nachfolger
fit_line_contour_xld fit_line_contour_xld FitLineContourXld FitLineContourXld FitLineContourXld fit_line_contour_xld ,
fit_ellipse_contour_xld fit_ellipse_contour_xld FitEllipseContourXld FitEllipseContourXld FitEllipseContourXld fit_ellipse_contour_xld ,
fit_circle_contour_xld fit_circle_contour_xld FitCircleContourXld FitCircleContourXld FitCircleContourXld fit_circle_contour_xld ,
fit_rectangle2_contour_xld fit_rectangle2_contour_xld FitRectangle2ContourXld FitRectangle2ContourXld FitRectangle2ContourXld fit_rectangle2_contour_xld
Siehe auch
split_contours_xld split_contours_xld SplitContoursXld SplitContoursXld SplitContoursXld split_contours_xld ,
get_contour_global_attrib_xld get_contour_global_attrib_xld GetContourGlobalAttribXld GetContourGlobalAttribXld GetContourGlobalAttribXld get_contour_global_attrib_xld ,
query_contour_attribs_xld query_contour_attribs_xld QueryContourAttribsXld QueryContourAttribsXld QueryContourAttribsXld query_contour_attribs_xld ,
get_contour_attrib_xld get_contour_attrib_xld GetContourAttribXld GetContourAttribXld GetContourAttribXld get_contour_attrib_xld
Modul
Foundation