fuzzy_measure_pairsT_fuzzy_measure_pairsFuzzyMeasurePairsFuzzyMeasurePairs (Operator)
Name
fuzzy_measure_pairsT_fuzzy_measure_pairsFuzzyMeasurePairsFuzzyMeasurePairs
— Extraktion geradliniger Kantenpaare senkrecht zu einem Rechteck oder
Kreisringsegment.
Signatur
fuzzy_measure_pairs(Image : : MeasureHandle, Sigma, AmpThresh, FuzzyThresh, Transition : RowEdgeFirst, ColumnEdgeFirst, AmplitudeFirst, RowEdgeSecond, ColumnEdgeSecond, AmplitudeSecond, RowEdgeCenter, ColumnEdgeCenter, FuzzyScore, IntraDistance, InterDistance)
Herror T_fuzzy_measure_pairs(const Hobject Image, const Htuple MeasureHandle, const Htuple Sigma, const Htuple AmpThresh, const Htuple FuzzyThresh, const Htuple Transition, Htuple* RowEdgeFirst, Htuple* ColumnEdgeFirst, Htuple* AmplitudeFirst, Htuple* RowEdgeSecond, Htuple* ColumnEdgeSecond, Htuple* AmplitudeSecond, Htuple* RowEdgeCenter, Htuple* ColumnEdgeCenter, Htuple* FuzzyScore, Htuple* IntraDistance, Htuple* InterDistance)
void FuzzyMeasurePairs(const HObject& Image, const HTuple& MeasureHandle, const HTuple& Sigma, const HTuple& AmpThresh, const HTuple& FuzzyThresh, const HTuple& Transition, HTuple* RowEdgeFirst, HTuple* ColumnEdgeFirst, HTuple* AmplitudeFirst, HTuple* RowEdgeSecond, HTuple* ColumnEdgeSecond, HTuple* AmplitudeSecond, HTuple* RowEdgeCenter, HTuple* ColumnEdgeCenter, HTuple* FuzzyScore, HTuple* IntraDistance, HTuple* InterDistance)
void HMeasure::FuzzyMeasurePairs(const HImage& Image, double Sigma, double AmpThresh, double FuzzyThresh, const HString& Transition, HTuple* RowEdgeFirst, HTuple* ColumnEdgeFirst, HTuple* AmplitudeFirst, HTuple* RowEdgeSecond, HTuple* ColumnEdgeSecond, HTuple* AmplitudeSecond, HTuple* RowEdgeCenter, HTuple* ColumnEdgeCenter, HTuple* FuzzyScore, HTuple* IntraDistance, HTuple* InterDistance) const
void HMeasure::FuzzyMeasurePairs(const HImage& Image, double Sigma, double AmpThresh, double FuzzyThresh, const char* Transition, HTuple* RowEdgeFirst, HTuple* ColumnEdgeFirst, HTuple* AmplitudeFirst, HTuple* RowEdgeSecond, HTuple* ColumnEdgeSecond, HTuple* AmplitudeSecond, HTuple* RowEdgeCenter, HTuple* ColumnEdgeCenter, HTuple* FuzzyScore, HTuple* IntraDistance, HTuple* InterDistance) const
void HMeasure::FuzzyMeasurePairs(const HImage& Image, double Sigma, double AmpThresh, double FuzzyThresh, const wchar_t* Transition, HTuple* RowEdgeFirst, HTuple* ColumnEdgeFirst, HTuple* AmplitudeFirst, HTuple* RowEdgeSecond, HTuple* ColumnEdgeSecond, HTuple* AmplitudeSecond, HTuple* RowEdgeCenter, HTuple* ColumnEdgeCenter, HTuple* FuzzyScore, HTuple* IntraDistance, HTuple* InterDistance) const
(Nur Windows)
void HImage::FuzzyMeasurePairs(const HMeasure& MeasureHandle, double Sigma, double AmpThresh, double FuzzyThresh, const HString& Transition, HTuple* RowEdgeFirst, HTuple* ColumnEdgeFirst, HTuple* AmplitudeFirst, HTuple* RowEdgeSecond, HTuple* ColumnEdgeSecond, HTuple* AmplitudeSecond, HTuple* RowEdgeCenter, HTuple* ColumnEdgeCenter, HTuple* FuzzyScore, HTuple* IntraDistance, HTuple* InterDistance) const
void HImage::FuzzyMeasurePairs(const HMeasure& MeasureHandle, double Sigma, double AmpThresh, double FuzzyThresh, const char* Transition, HTuple* RowEdgeFirst, HTuple* ColumnEdgeFirst, HTuple* AmplitudeFirst, HTuple* RowEdgeSecond, HTuple* ColumnEdgeSecond, HTuple* AmplitudeSecond, HTuple* RowEdgeCenter, HTuple* ColumnEdgeCenter, HTuple* FuzzyScore, HTuple* IntraDistance, HTuple* InterDistance) const
void HImage::FuzzyMeasurePairs(const HMeasure& MeasureHandle, double Sigma, double AmpThresh, double FuzzyThresh, const wchar_t* Transition, HTuple* RowEdgeFirst, HTuple* ColumnEdgeFirst, HTuple* AmplitudeFirst, HTuple* RowEdgeSecond, HTuple* ColumnEdgeSecond, HTuple* AmplitudeSecond, HTuple* RowEdgeCenter, HTuple* ColumnEdgeCenter, HTuple* FuzzyScore, HTuple* IntraDistance, HTuple* InterDistance) const
(Nur Windows)
static void HOperatorSet.FuzzyMeasurePairs(HObject image, HTuple measureHandle, HTuple sigma, HTuple ampThresh, HTuple fuzzyThresh, HTuple transition, out HTuple rowEdgeFirst, out HTuple columnEdgeFirst, out HTuple amplitudeFirst, out HTuple rowEdgeSecond, out HTuple columnEdgeSecond, out HTuple amplitudeSecond, out HTuple rowEdgeCenter, out HTuple columnEdgeCenter, out HTuple fuzzyScore, out HTuple intraDistance, out HTuple interDistance)
void HMeasure.FuzzyMeasurePairs(HImage image, double sigma, double ampThresh, double fuzzyThresh, string transition, out HTuple rowEdgeFirst, out HTuple columnEdgeFirst, out HTuple amplitudeFirst, out HTuple rowEdgeSecond, out HTuple columnEdgeSecond, out HTuple amplitudeSecond, out HTuple rowEdgeCenter, out HTuple columnEdgeCenter, out HTuple fuzzyScore, out HTuple intraDistance, out HTuple interDistance)
void HImage.FuzzyMeasurePairs(HMeasure measureHandle, double sigma, double ampThresh, double fuzzyThresh, string transition, out HTuple rowEdgeFirst, out HTuple columnEdgeFirst, out HTuple amplitudeFirst, out HTuple rowEdgeSecond, out HTuple columnEdgeSecond, out HTuple amplitudeSecond, out HTuple rowEdgeCenter, out HTuple columnEdgeCenter, out HTuple fuzzyScore, out HTuple intraDistance, out HTuple interDistance)
Beschreibung
fuzzy_measure_pairsfuzzy_measure_pairsFuzzyMeasurePairsFuzzyMeasurePairsFuzzyMeasurePairs
dient zur Extraktion von geradlinigen
Kantenpaaren, die senkrecht zur Hauptachse eines Rechtecks
oder zu einem Kreisringsegment liegen.
Im Unterschied zu measure_pairsmeasure_pairsMeasurePairsMeasurePairsMeasurePairs
können die Kantenpaare zusätzlich mit Hilfe von Fuzzy-Funktionen
bewertet und ausgewählt werden.
Das Konzept der 1D-Vermessung ist bei der Einleitung
zu Kapitel 1D-Vermessung beschrieben.
Der Algorithmus von fuzzy_measure_pairsfuzzy_measure_pairsFuzzyMeasurePairsFuzzyMeasurePairsFuzzyMeasurePairs
arbeitet analog zu fuzzy_measure_posfuzzy_measure_posFuzzyMeasurePosFuzzyMeasurePosFuzzyMeasurePos
. Benachbarte
Kanten werden jedoch zu Paaren mit unterschiedlichen Kantenübergängen
(Vorzeichen) zusammengefasst. Um sich überlappende oder einschließende
Kantenpaare zu extrahieren, verwenden Sie bitte
fuzzy_measure_pairingfuzzy_measure_pairingFuzzyMeasurePairingFuzzyMeasurePairingFuzzyMeasurePairing
.
Falls TransitionTransitionTransitionTransitiontransition
= 'positive'"positive""positive""positive""positive" werden in
RowEdgeFirstRowEdgeFirstRowEdgeFirstRowEdgeFirstrowEdgeFirst
und ColumnEdgeFirstColumnEdgeFirstColumnEdgeFirstColumnEdgeFirstcolumnEdgeFirst
Kantenpunkte mit Übergang
von Dunkel nach Hell und in RowEdgeSecondRowEdgeSecondRowEdgeSecondRowEdgeSecondrowEdgeSecond
und
ColumnEdgeSecondColumnEdgeSecondColumnEdgeSecondColumnEdgeSecondcolumnEdgeSecond
mit Übergang von Hell nach Dunkel übergeben. Im
Modus 'negative'"negative""negative""negative""negative" ist dies genau umgekehrt. Im Modus 'all'"all""all""all""all"
bestimmt die erste gefunde Kante die Art der Paarbildung. D.h., je nach Lage
des Messobjekts werden entweder hell-dunkel-hell Übergänge oder
dunkel-hell-dunkel Übergänge gefunden. Dieses Vorgehen ist dann nützlich,
wenn z.B. Objekte vermessen werden, die unterschiedliche Helligkeiten in
Relation zum Hintergrund aufweisen.
Sind die subpixelgenauen Positionen der Kanten ermittelt, werden sie
zu Paaren gruppiert. Dabei werden die Kanten derart zu Paaren sortiert,
dass Überschneidungen und Einschlüsse der Paaren untereinander
verhindert werden.
Die Merkmale der Kantenpaare werden mit Hilfe einer
zugehörigen Fuzzy-Funktion bewertet, welche mit set_fuzzy_measureset_fuzzy_measureSetFuzzyMeasureSetFuzzyMeasureSetFuzzyMeasure
b.z.w. set_fuzzy_measure_norm_pairset_fuzzy_measure_norm_pairSetFuzzyMeasureNormPairSetFuzzyMeasureNormPairSetFuzzyMeasureNormPair
gesetzt werden kann.
Welche Kantenpaare ausgewählt werden wird mit dem Parameter
FuzzyThreshFuzzyThreshFuzzyThreshFuzzyThreshfuzzyThresh
beeinflusst, welcher eine Schwelle über die Bewertung
aller Fuzzy-Sets angibt, d.h. über den geometrischen Mittelwert
der einzelnen Gewichtungen der Sets.
Die extrahierten Kanten werden als einzelne Punkte, die auf der
Hauptachse des Rechtecks oder dem mittleren Bogen des
Kreisringsegments liegen, zurückgegeben. Die zugehörigen
Kantenamplituden werden in AmplitudeFirstAmplitudeFirstAmplitudeFirstAmplitudeFirstamplitudeFirst
und
AmplitudeSecondAmplitudeSecondAmplitudeSecondAmplitudeSecondamplitudeSecond
, die Fuzzy-Bewertungen in FuzzyScoreFuzzyScoreFuzzyScoreFuzzyScorefuzzyScore
zurückgeliefert. Zusätzlich wird noch
der Abstand innerhalb eines Kantenpaares in IntraDistanceIntraDistanceIntraDistanceIntraDistanceintraDistance
und der Abstand von aufeinanderfolgenden Kantenpaaren in
InterDistanceInterDistanceInterDistanceInterDistanceinterDistance
zurückgeliefert. Dabei entspricht
IntraDistance[i] dem Abstand von EdgeFirst[i] und EdgeSecond[i],
während InterDistance[i] dem Abstand von EdgeSecond[i] und
EdgeFirst[i+1] entspricht. D.h., das Tupel InterDistanceInterDistanceInterDistanceInterDistanceinterDistance
enthält ein Element weniger als die Tupel der Kantenpaare.
Achtung
fuzzy_measure_pairsfuzzy_measure_pairsFuzzyMeasurePairsFuzzyMeasurePairsFuzzyMeasurePairs
liefert nur dann brauchbare Ergebnisse,
falls die Annahme, dass die Kanten gerade und senkrecht zur
Hauptachse des Rechtecks oder zum Kreisringsegment sind, erfüllt ist.
fuzzy_measure_pairsfuzzy_measure_pairsFuzzyMeasurePairsFuzzyMeasurePairsFuzzyMeasurePairs
sollte daher z.B. nicht dazu verwendet
werden, Kanten von gekrümmten Objekten zu extrahieren. Weiterhin
sollte der Benutzer darauf achten, dass das Rechteck / das
Kreisringsegment
möglichst senkrecht zu den Bildkanten liegt. Außerdem darf
SigmaSigmaSigmaSigmasigma
nicht größer als ca. 0.5 * Length1
(siehe gen_measure_rectangle2gen_measure_rectangle2GenMeasureRectangle2GenMeasureRectangle2GenMeasureRectangle2
für Length1) sein.
Es ist zu beachten, dass fuzzy_measure_pairsfuzzy_measure_pairsFuzzyMeasurePairsFuzzyMeasurePairsFuzzyMeasurePairs
den
Definitionsbereich von ImageImageImageImageimage
aus Geschwindigkeitsgründen
ignoriert. Falls bestimmte Bildbereiche von der Messung
ausgeschlossen werden sollen, sollte ein neues Messobjekt mit
entsprechend angepassten Parametern erzeugt werden.
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
ImageImageImageImageimage
(input_object) singlechannelimage →
objectHImageHImageHobject (byte / uint2 / real)
Eingabebild.
MeasureHandleMeasureHandleMeasureHandleMeasureHandlemeasureHandle
(input_control) measure →
HMeasure, HTupleHTupleHtuple (handle) (IntPtr) (HHandle) (handle)
Handle des Messobjekts.
SigmaSigmaSigmaSigmasigma
(input_control) number →
HTupleHTupleHtuple (real) (double) (double) (double)
Sigma der Gaußglättung.
Defaultwert: 1.0
Wertevorschläge: 0.4, 0.6, 0.8, 1.0, 1.5, 2.0, 3.0, 4.0, 5.0, 7.0, 10.0
Typischer Wertebereich: 0.4
≤
Sigma
Sigma
Sigma
Sigma
sigma
≤
100
(lin)
Minimale Schrittweite: 0.01
Empfohlene Schrittweite: 0.1
Restriktion: Sigma >= 0.4
AmpThreshAmpThreshAmpThreshAmpThreshampThresh
(input_control) number →
HTupleHTupleHtuple (real) (double) (double) (double)
Minimale Amplitude einer Kante.
Defaultwert: 30.0
Wertevorschläge: 5.0, 10.0, 20.0, 30.0, 40.0, 50.0, 60.0, 70.0, 90.0, 110.0
Typischer Wertebereich: 1
≤
AmpThresh
AmpThresh
AmpThresh
AmpThresh
ampThresh
≤
255
(lin)
Minimale Schrittweite: 0.5
Empfohlene Schrittweite: 2
FuzzyThreshFuzzyThreshFuzzyThreshFuzzyThreshfuzzyThresh
(input_control) number →
HTupleHTupleHtuple (real) (double) (double) (double)
Minimale Fuzzy-Bewertung.
Defaultwert: 0.5
Wertevorschläge: 0.1, 0.3, 0.5, 0.7, 0.9
Typischer Wertebereich: 0.0
≤
FuzzyThresh
FuzzyThresh
FuzzyThresh
FuzzyThresh
fuzzyThresh
≤
1.0
(lin)
Empfohlene Schrittweite: 0.1
TransitionTransitionTransitionTransitiontransition
(input_control) string →
HTupleHTupleHtuple (string) (string) (HString) (char*)
Auswahl des ersten Grauwertüberganges der Kantenpaare.
Defaultwert:
'all'
"all"
"all"
"all"
"all"
Werteliste: 'all'"all""all""all""all", 'negative'"negative""negative""negative""negative", 'positive'"positive""positive""positive""positive"
RowEdgeFirstRowEdgeFirstRowEdgeFirstRowEdgeFirstrowEdgeFirst
(output_control) point.y-array →
HTupleHTupleHtuple (real) (double) (double) (double)
Zeilenkoordinate der ersten Kante.
ColumnEdgeFirstColumnEdgeFirstColumnEdgeFirstColumnEdgeFirstcolumnEdgeFirst
(output_control) point.x-array →
HTupleHTupleHtuple (real) (double) (double) (double)
Spaltenkoordinate der ersten Kante.
AmplitudeFirstAmplitudeFirstAmplitudeFirstAmplitudeFirstamplitudeFirst
(output_control) real-array →
HTupleHTupleHtuple (real) (double) (double) (double)
Kantenamplitude der ersten Kante (mit Vorzeichen).
RowEdgeSecondRowEdgeSecondRowEdgeSecondRowEdgeSecondrowEdgeSecond
(output_control) point.y-array →
HTupleHTupleHtuple (real) (double) (double) (double)
Zeilenkoordinate der zweiten Kante.
ColumnEdgeSecondColumnEdgeSecondColumnEdgeSecondColumnEdgeSecondcolumnEdgeSecond
(output_control) point.x-array →
HTupleHTupleHtuple (real) (double) (double) (double)
Spaltenkoordinate des Mittelpunktes der Kante.
AmplitudeSecondAmplitudeSecondAmplitudeSecondAmplitudeSecondamplitudeSecond
(output_control) real-array →
HTupleHTupleHtuple (real) (double) (double) (double)
Kantenamplitude der zweiten Kante (mit Vorzeichen).
RowEdgeCenterRowEdgeCenterRowEdgeCenterRowEdgeCenterrowEdgeCenter
(output_control) point.y-array →
HTupleHTupleHtuple (real) (double) (double) (double)
Zeilenkoordinate des Mittelpunktes des Kantenpaares.
ColumnEdgeCenterColumnEdgeCenterColumnEdgeCenterColumnEdgeCentercolumnEdgeCenter
(output_control) point.x-array →
HTupleHTupleHtuple (real) (double) (double) (double)
Spaltenkoordinate des Mittelpunktes des Kantenpaares.
FuzzyScoreFuzzyScoreFuzzyScoreFuzzyScorefuzzyScore
(output_control) real-array →
HTupleHTupleHtuple (real) (double) (double) (double)
Fuzzy-Bewertung des Kantenpaares.
IntraDistanceIntraDistanceIntraDistanceIntraDistanceintraDistance
(output_control) real-array →
HTupleHTupleHtuple (real) (double) (double) (double)
Abstand zwischen Kanten eines Kantenpaars.
InterDistanceInterDistanceInterDistanceInterDistanceinterDistance
(output_control) real-array →
HTupleHTupleHtuple (real) (double) (double) (double)
Abstand zwischen aufeinanderfolgenden Kantenpaaren.
Ergebnis
Sind die Parameterwerte korrekt, dann liefert
fuzzy_measure_pairsfuzzy_measure_pairsFuzzyMeasurePairsFuzzyMeasurePairsFuzzyMeasurePairs
den Wert 2 (H_MSG_TRUE). Andernfalls wird eine
Fehlerbehandlung durchgeführt.
Vorgänger
gen_measure_rectangle2gen_measure_rectangle2GenMeasureRectangle2GenMeasureRectangle2GenMeasureRectangle2
,
gen_measure_arcgen_measure_arcGenMeasureArcGenMeasureArcGenMeasureArc
,
set_fuzzy_measureset_fuzzy_measureSetFuzzyMeasureSetFuzzyMeasureSetFuzzyMeasure
Nachfolger
close_measureclose_measureCloseMeasureCloseMeasureCloseMeasure
Alternativen
edges_sub_pixedges_sub_pixEdgesSubPixEdgesSubPixEdgesSubPix
,
fuzzy_measure_pairingfuzzy_measure_pairingFuzzyMeasurePairingFuzzyMeasurePairingFuzzyMeasurePairing
,
measure_pairsmeasure_pairsMeasurePairsMeasurePairsMeasurePairs
Siehe auch
fuzzy_measure_posfuzzy_measure_posFuzzyMeasurePosFuzzyMeasurePosFuzzyMeasurePos
,
measure_posmeasure_posMeasurePosMeasurePosMeasurePos
Modul
1D Metrology