KlassenKlassenKlassenKlassen | | | | Operatoren

gen_measure_rectangle2gen_measure_rectangle2GenMeasureRectangle2gen_measure_rectangle2GenMeasureRectangle2GenMeasureRectangle2 (Operator)

Name

gen_measure_rectangle2gen_measure_rectangle2GenMeasureRectangle2gen_measure_rectangle2GenMeasureRectangle2GenMeasureRectangle2 — Vorbereitung der Extraktion geradliniger Kanten senkrecht zu einem Rechteck.

Signatur

gen_measure_rectangle2( : : Row, Column, Phi, Length1, Length2, Width, Height, Interpolation : MeasureHandle)

Herror gen_measure_rectangle2(double Row, double Column, double Phi, double Length1, double Length2, const Hlong Width, const Hlong Height, const char* Interpolation, Hlong* MeasureHandle)

Herror T_gen_measure_rectangle2(const Htuple Row, const Htuple Column, const Htuple Phi, const Htuple Length1, const Htuple Length2, const Htuple Width, const Htuple Height, const Htuple Interpolation, Htuple* MeasureHandle)

Herror gen_measure_rectangle2(const HTuple& Row, const HTuple& Column, const HTuple& Phi, const HTuple& Length1, const HTuple& Length2, const HTuple& Width, const HTuple& Height, const HTuple& Interpolation, Hlong* MeasureHandle)

void HMeasure::GenMeasureRectangle2(const HTuple& Row, const HTuple& Column, const HTuple& Phi, const HTuple& Length1, const HTuple& Length2, const HTuple& Width, const HTuple& Height, const HTuple& Interpolation)

void GenMeasureRectangle2(const HTuple& Row, const HTuple& Column, const HTuple& Phi, const HTuple& Length1, const HTuple& Length2, const HTuple& Width, const HTuple& Height, const HTuple& Interpolation, HTuple* MeasureHandle)

void HMeasure::HMeasure(const HTuple& Row, const HTuple& Column, const HTuple& Phi, const HTuple& Length1, const HTuple& Length2, Hlong Width, Hlong Height, const HString& Interpolation)

void HMeasure::HMeasure(double Row, double Column, double Phi, double Length1, double Length2, Hlong Width, Hlong Height, const HString& Interpolation)

void HMeasure::HMeasure(double Row, double Column, double Phi, double Length1, double Length2, Hlong Width, Hlong Height, const char* Interpolation)

void HMeasure::GenMeasureRectangle2(const HTuple& Row, const HTuple& Column, const HTuple& Phi, const HTuple& Length1, const HTuple& Length2, Hlong Width, Hlong Height, const HString& Interpolation)

void HMeasure::GenMeasureRectangle2(double Row, double Column, double Phi, double Length1, double Length2, Hlong Width, Hlong Height, const HString& Interpolation)

void HMeasure::GenMeasureRectangle2(double Row, double Column, double Phi, double Length1, double Length2, Hlong Width, Hlong Height, const char* Interpolation)

void HOperatorSetX.GenMeasureRectangle2(
[in] VARIANT Row, [in] VARIANT Column, [in] VARIANT Phi, [in] VARIANT Length1, [in] VARIANT Length2, [in] VARIANT Width, [in] VARIANT Height, [in] VARIANT Interpolation, [out] VARIANT* MeasureHandle)

void HMeasureX.GenMeasureRectangle2(
[in] VARIANT Row, [in] VARIANT Column, [in] VARIANT Phi, [in] VARIANT Length1, [in] VARIANT Length2, [in] Hlong Width, [in] Hlong Height, [in] BSTR Interpolation)

static void HOperatorSet.GenMeasureRectangle2(HTuple row, HTuple column, HTuple phi, HTuple length1, HTuple length2, HTuple width, HTuple height, HTuple interpolation, out HTuple measureHandle)

public HMeasure(HTuple row, HTuple column, HTuple phi, HTuple length1, HTuple length2, int width, int height, string interpolation)

public HMeasure(double row, double column, double phi, double length1, double length2, int width, int height, string interpolation)

void HMeasure.GenMeasureRectangle2(HTuple row, HTuple column, HTuple phi, HTuple length1, HTuple length2, int width, int height, string interpolation)

void HMeasure.GenMeasureRectangle2(double row, double column, double phi, double length1, double length2, int width, int height, string interpolation)

Beschreibung

gen_measure_rectangle2gen_measure_rectangle2GenMeasureRectangle2gen_measure_rectangle2GenMeasureRectangle2GenMeasureRectangle2 bereitet die Extraktion geradliniger Kanten, die senkrecht zur Hauptachse eines Rechtecks liegen, vor. Der Mittelpunkt des Rechtecks wird in den Parametern RowRowRowRowRowrow und ColumnColumnColumnColumnColumncolumn übergeben, die Richtung der Hauptachse in PhiPhiPhiPhiPhiphi und die Längen der beiden Achsen, d.h. die halben Durchmesser des Rechtecks, in Length1Length1Length1Length1Length1length1 und Length2Length2Length2Length2Length2length2.

Der Algorithmus zur Kantenextraktion ist bei measure_posmeasure_posMeasurePosmeasure_posMeasurePosMeasurePos beschrieben. Wie dort beschrieben, können verschiedene Arten der Interpolation zur Berechnung des Grauwertprofils verwendet werden. Mit InterpolationInterpolationInterpolationInterpolationInterpolationinterpolation = 'nearest_neighbor'"nearest_neighbor""nearest_neighbor""nearest_neighbor""nearest_neighbor""nearest_neighbor" werden die Grauwerte bei der Messung durch den Grauwert des nächstgelegenen Pixels, d.h. durch konstante Interpolation, bestimmt. Für InterpolationInterpolationInterpolationInterpolationInterpolationinterpolation = 'bilinear'"bilinear""bilinear""bilinear""bilinear""bilinear" wird bilineare Interpolation verwendet und für InterpolationInterpolationInterpolationInterpolationInterpolationinterpolation = 'bicubic'"bicubic""bicubic""bicubic""bicubic""bicubic" bikubische Interpolation.

Um die eigentlichen Messungen möglichst schnell ausführen zu können, werden alle Berechnungen, die für mehrere Messungen verwendet werden können, schon im Operator gen_measure_rectangle2gen_measure_rectangle2GenMeasureRectangle2gen_measure_rectangle2GenMeasureRectangle2GenMeasureRectangle2 ausgeführt. Hierzu wird eine optimierte Datenstruktur, ein sogenanntes Messobjekt, aufgebaut, das in MeasureHandleMeasureHandleMeasureHandleMeasureHandleMeasureHandlemeasureHandle zurückgegeben wird. Die später bei der Messung verwendete Bildgröße muss in den Parametern WidthWidthWidthWidthWidthwidth und HeightHeightHeightHeightHeightheight angegeben werden.

Der Systemparameter 'int_zooming'"int_zooming""int_zooming""int_zooming""int_zooming""int_zooming" (siehe set_systemset_systemSetSystemset_systemSetSystemSetSystem) beeinflusst die Genauigkeit und Geschwindigkeit der Berechnung des Messobjekts. Falls 'int_zooming'"int_zooming""int_zooming""int_zooming""int_zooming""int_zooming" auf 'true'"true""true""true""true""true" gesetzt wird, werden die internen Berechnungen in Festkommaarithmetik durchgeführt, was zu wesentlich kürzeren Laufzeiten führt. Allerdings ist hier die geometrische Genauigkeit etwas geringer. Falls 'int_zooming'"int_zooming""int_zooming""int_zooming""int_zooming""int_zooming" auf 'false'"false""false""false""false""false" gesetzt wird, werden die internen Berechnungen in Gleitkommaarithmetik durchgeführt, was zur bestmöglichen geometrischen Genauigkeit führt, die Laufzeit allerdings signifikant erhöht.

Achtung

Es ist zu beachten, dass bei Verwendung von bilinearer oder bikubischer Interpolation nicht nur das Messrechteck ins Bild passen muss, sondern auch ein Rand um das Messrechteck. Die Breite des Randes (in alle vier Richtungen) muss mindestens ein Pixel für bilineare Interpolation und mindestens zwei Pixel für bikubische Interpolation sein. Für Projektionslinien, die diese Bedingung nicht erfüllen, wird kein Grauwert berechnet. Somit kann an diesen Stellen auch keine Kante extrahiert werden.

Parallelisierung

Dieser Operator liefert ein Handle zurück. Es ist zu beachten, dass der Zustand einer Instanz dieses Handletyps durch bestimmte Operatoren geändert werden kann, obwohl das Handle als Eingabeparameter in diesen Operatoren verwendet wird.

Parameter

RowRowRowRowRowrow (input_control)  rectangle2.center.y HTupleHTupleHTupleVARIANTHtuple (real / integer) (double / int / long) (double / Hlong) (double / Hlong) (double / Hlong) (double / Hlong)

Zeilenkoordinate des Mittelpunktes des Rechtecks.

Defaultwert: 300.0

Wertevorschläge: 10.0, 20.0, 50.0, 100.0, 200.0, 300.0, 400.0, 500.0

Typischer Wertebereich: 0.0 ≤ Row Row Row Row Row row ≤ 511.0 (lin)

Minimale Schrittweite: 1.0

Empfohlene Schrittweite: 10.0

ColumnColumnColumnColumnColumncolumn (input_control)  rectangle2.center.x HTupleHTupleHTupleVARIANTHtuple (real / integer) (double / int / long) (double / Hlong) (double / Hlong) (double / Hlong) (double / Hlong)

Spaltenkoordinate des Mittelpunktes des Rechtecks.

Defaultwert: 200.0

Wertevorschläge: 10.0, 20.0, 50.0, 100.0, 200.0, 300.0, 400.0, 500.0

Typischer Wertebereich: 0.0 ≤ Column Column Column Column Column column ≤ 511.0 (lin)

Minimale Schrittweite: 1.0

Empfohlene Schrittweite: 10.0

PhiPhiPhiPhiPhiphi (input_control)  rectangle2.angle.rad HTupleHTupleHTupleVARIANTHtuple (real / integer) (double / int / long) (double / Hlong) (double / Hlong) (double / Hlong) (double / Hlong)

Winkel der Längsachse des Rechtecks zur Horizontalen (Bogenmaß).

Defaultwert: 0.0

Wertevorschläge: -1.178097, -0.785398, -0.392699, 0.0, 0.392699, 0.785398, 1.178097

Typischer Wertebereich: -1.178097 ≤ Phi Phi Phi Phi Phi phi ≤ 1.178097 (lin)

Minimale Schrittweite: 0.001

Empfohlene Schrittweite: 0.1

Restriktion: - pi < Phi && Phi <= pi

Length1Length1Length1Length1Length1length1 (input_control)  rectangle2.hwidth HTupleHTupleHTupleVARIANTHtuple (real / integer) (double / int / long) (double / Hlong) (double / Hlong) (double / Hlong) (double / Hlong)

Halbe Breite des Rechtecks.

Defaultwert: 100.0

Wertevorschläge: 3.0, 5.0, 10.0, 15.0, 20.0, 50.0, 100.0, 200.0, 300.0, 500.0

Typischer Wertebereich: 1.0 ≤ Length1 Length1 Length1 Length1 Length1 length1 ≤ 511.0 (lin)

Minimale Schrittweite: 1.0

Empfohlene Schrittweite: 10.0

Restriktion: Length1 >= 1.0

Length2Length2Length2Length2Length2length2 (input_control)  rectangle2.hheight HTupleHTupleHTupleVARIANTHtuple (real / integer) (double / int / long) (double / Hlong) (double / Hlong) (double / Hlong) (double / Hlong)

Halbe Höhe des Rechtecks.

Defaultwert: 20.0

Wertevorschläge: 1.0, 2.0, 3.0, 5.0, 10.0, 15.0, 20.0, 50.0, 100.0, 200.0

Typischer Wertebereich: 0.0 ≤ Length2 Length2 Length2 Length2 Length2 length2 ≤ 511.0 (lin)

Minimale Schrittweite: 1.0

Empfohlene Schrittweite: 10.0

Restriktion: Length2 >= 0.0

WidthWidthWidthWidthWidthwidth (input_control)  extent.x HTupleHTupleHTupleVARIANTHtuple (integer) (int / long) (Hlong) (Hlong) (Hlong) (Hlong)

Breite des später zu verarbeitenden Bildes.

Defaultwert: 512

Wertevorschläge: 128, 160, 192, 256, 320, 384, 512, 640, 768

Typischer Wertebereich: 0 ≤ Width Width Width Width Width width ≤ 1024 (lin)

Minimale Schrittweite: 1

Empfohlene Schrittweite: 16

HeightHeightHeightHeightHeightheight (input_control)  extent.y HTupleHTupleHTupleVARIANTHtuple (integer) (int / long) (Hlong) (Hlong) (Hlong) (Hlong)

Höhe des später zu verarbeitenden Bildes.

Defaultwert: 512

Wertevorschläge: 120, 128, 144, 240, 256, 288, 480, 512, 576

Typischer Wertebereich: 0 ≤ Height Height Height Height Height height ≤ 1024 (lin)

Minimale Schrittweite: 1

Empfohlene Schrittweite: 16

InterpolationInterpolationInterpolationInterpolationInterpolationinterpolation (input_control)  string HTupleHTupleHTupleVARIANTHtuple (string) (string) (HString) (char*) (BSTR) (char*)

Art der zu verwendenden Interpolation.

Defaultwert: 'nearest_neighbor' "nearest_neighbor" "nearest_neighbor" "nearest_neighbor" "nearest_neighbor" "nearest_neighbor"

Werteliste: 'bicubic'"bicubic""bicubic""bicubic""bicubic""bicubic", 'bilinear'"bilinear""bilinear""bilinear""bilinear""bilinear", 'nearest_neighbor'"nearest_neighbor""nearest_neighbor""nearest_neighbor""nearest_neighbor""nearest_neighbor"

MeasureHandleMeasureHandleMeasureHandleMeasureHandleMeasureHandlemeasureHandle (output_control)  measure_id HMeasure, HTupleHTupleHMeasure, HTupleHMeasureX, VARIANTHtuple (integer) (IntPtr) (Hlong) (Hlong) (Hlong) (Hlong)

Handle des Messobjekts.

Ergebnis

Sind die Parameterwerte korrekt, dann liefert gen_measure_rectangle2gen_measure_rectangle2GenMeasureRectangle2gen_measure_rectangle2GenMeasureRectangle2GenMeasureRectangle2 den Wert 2 (H_MSG_TRUE). Andernfalls wird eine Fehlerbehandlung durchgeführt.

Vorgänger

draw_rectangle2draw_rectangle2DrawRectangle2draw_rectangle2DrawRectangle2DrawRectangle2

Nachfolger

measure_posmeasure_posMeasurePosmeasure_posMeasurePosMeasurePos, measure_pairsmeasure_pairsMeasurePairsmeasure_pairsMeasurePairsMeasurePairs, fuzzy_measure_posfuzzy_measure_posFuzzyMeasurePosfuzzy_measure_posFuzzyMeasurePosFuzzyMeasurePos, fuzzy_measure_pairsfuzzy_measure_pairsFuzzyMeasurePairsfuzzy_measure_pairsFuzzyMeasurePairsFuzzyMeasurePairs, fuzzy_measure_pairingfuzzy_measure_pairingFuzzyMeasurePairingfuzzy_measure_pairingFuzzyMeasurePairingFuzzyMeasurePairing, measure_threshmeasure_threshMeasureThreshmeasure_threshMeasureThreshMeasureThresh

Alternativen

edges_sub_pixedges_sub_pixEdgesSubPixedges_sub_pixEdgesSubPixEdgesSubPix

Siehe auch

gen_measure_arcgen_measure_arcGenMeasureArcgen_measure_arcGenMeasureArcGenMeasureArc

Modul

1D Metrology


KlassenKlassenKlassenKlassen | | | | Operatoren