create_bead_inspection_modelT_create_bead_inspection_modelCreateBeadInspectionModelCreateBeadInspectionModel (Operator)
Name
create_bead_inspection_modelT_create_bead_inspection_modelCreateBeadInspectionModelCreateBeadInspectionModel
— Erzeugen eines Modells zur Inspektion von Kleberaupen.
Signatur
void CreateBeadInspectionModel(const HObject& BeadContour, const HTuple& TargetThickness, const HTuple& ThicknessTolerance, const HTuple& PositionTolerance, const HTuple& Polarity, const HTuple& GenParamName, const HTuple& GenParamValue, HTuple* BeadInspectionModel)
void HBeadInspectionModel::HBeadInspectionModel(const HXLD& BeadContour, const HTuple& TargetThickness, const HTuple& ThicknessTolerance, const HTuple& PositionTolerance, const HString& Polarity, const HTuple& GenParamName, const HTuple& GenParamValue)
void HBeadInspectionModel::HBeadInspectionModel(const HXLD& BeadContour, Hlong TargetThickness, Hlong ThicknessTolerance, Hlong PositionTolerance, const HString& Polarity, const HString& GenParamName, Hlong GenParamValue)
void HBeadInspectionModel::HBeadInspectionModel(const HXLD& BeadContour, Hlong TargetThickness, Hlong ThicknessTolerance, Hlong PositionTolerance, const char* Polarity, const char* GenParamName, Hlong GenParamValue)
void HBeadInspectionModel::HBeadInspectionModel(const HXLD& BeadContour, Hlong TargetThickness, Hlong ThicknessTolerance, Hlong PositionTolerance, const wchar_t* Polarity, const wchar_t* GenParamName, Hlong GenParamValue)
(Nur Windows)
void HBeadInspectionModel::CreateBeadInspectionModel(const HXLD& BeadContour, const HTuple& TargetThickness, const HTuple& ThicknessTolerance, const HTuple& PositionTolerance, const HString& Polarity, const HTuple& GenParamName, const HTuple& GenParamValue)
void HBeadInspectionModel::CreateBeadInspectionModel(const HXLD& BeadContour, Hlong TargetThickness, Hlong ThicknessTolerance, Hlong PositionTolerance, const HString& Polarity, const HString& GenParamName, Hlong GenParamValue)
void HBeadInspectionModel::CreateBeadInspectionModel(const HXLD& BeadContour, Hlong TargetThickness, Hlong ThicknessTolerance, Hlong PositionTolerance, const char* Polarity, const char* GenParamName, Hlong GenParamValue)
void HBeadInspectionModel::CreateBeadInspectionModel(const HXLD& BeadContour, Hlong TargetThickness, Hlong ThicknessTolerance, Hlong PositionTolerance, const wchar_t* Polarity, const wchar_t* GenParamName, Hlong GenParamValue)
(Nur Windows)
static void HOperatorSet.CreateBeadInspectionModel(HObject beadContour, HTuple targetThickness, HTuple thicknessTolerance, HTuple positionTolerance, HTuple polarity, HTuple genParamName, HTuple genParamValue, out HTuple beadInspectionModel)
public HBeadInspectionModel(HXLD beadContour, HTuple targetThickness, HTuple thicknessTolerance, HTuple positionTolerance, string polarity, HTuple genParamName, HTuple genParamValue)
public HBeadInspectionModel(HXLD beadContour, int targetThickness, int thicknessTolerance, int positionTolerance, string polarity, string genParamName, int genParamValue)
void HBeadInspectionModel.CreateBeadInspectionModel(HXLD beadContour, HTuple targetThickness, HTuple thicknessTolerance, HTuple positionTolerance, string polarity, HTuple genParamName, HTuple genParamValue)
void HBeadInspectionModel.CreateBeadInspectionModel(HXLD beadContour, int targetThickness, int thicknessTolerance, int positionTolerance, string polarity, string genParamName, int genParamValue)
Beschreibung
create_bead_inspection_modelcreate_bead_inspection_modelCreateBeadInspectionModelCreateBeadInspectionModelCreateBeadInspectionModel
erzeugt ein neues Modell zur Inspektion
von Kleberauben.
Grundprinzip der Inspektion von Kleberaupen
Die Operatoren zur Kleberaupeninspektion erlauben es eine Referenzkontur
festzulegen, die die Position und Form einer Kleberaupe repräsentiert.
In Aufnahmen entsprechender Kleberaupen kann damit verifiziert werden,
ob sich eine Kleberaupe an den von der Refernzkontur festgelegten
Positionen befindet und ob sie von akzeptabler Breite ist. Diese Bilder
müssen bereits zur Modelkontur ausgerichtet sein.
Der Operator create_bead_inspection_modelcreate_bead_inspection_modelCreateBeadInspectionModelCreateBeadInspectionModelCreateBeadInspectionModel
gibt einen Handle auf das
Modell in BeadInspectionModelBeadInspectionModelBeadInspectionModelBeadInspectionModelbeadInspectionModel
zurück, welcher später benutzt werden
kann um weitere Operationen damit durchzuführen. Das beinhaltet das Setzen
von Parametern und das Druchführen der Inspektion.
Modellkontur
Um Kleberaupen inspizieren zu können, wird eine Kontur
in BeadContourBeadContourBeadContourBeadContourbeadContour
benötigt, die als Modell dient.
So eine Kontur kann beispielsweise mit den Operatoren
gen_contour_polygon_xldgen_contour_polygon_xldGenContourPolygonXldGenContourPolygonXldGenContourPolygonXld
oder gen_contour_nurbs_xldgen_contour_nurbs_xldGenContourNurbsXldGenContourNurbsXldGenContourNurbsXld
erzeugt werden. Mit draw_polygondraw_polygonDrawPolygonDrawPolygonDrawPolygon
oder draw_nurbsdraw_nurbsDrawNurbsDrawNurbsDrawNurbs
kann sie im Grafikfenster direkt über ein Referenzbild gezeichnet werden.
Bestehen die zu inspizierenden Kleberaupen aus mehreren Teilen, müssen
mehrere Modelle erzeugt werden.
Basisparameter
Die folgenden Parameter werden bei der Erzeugung des Modells benötigt:
- TargetThicknessTargetThicknessTargetThicknessTargetThicknesstargetThickness
: bestimmt die optimale Breite
der Kleberaupe in Pixeln.
- ThicknessToleranceThicknessToleranceThicknessToleranceThicknessTolerancethicknessTolerance
: bestimmt die Toleranz
bezüglich der Breite der Kleberaupe. Ein Teil einer Kleberaupe wird
als korrekt identifiziert, wenn seine Breite innerhalb des folgenden
Intervals liegt:
[TargetThicknessTargetThicknessTargetThicknessTargetThicknesstargetThickness
-ThicknessToleranceThicknessToleranceThicknessToleranceThicknessTolerancethicknessTolerance
,
TargetThicknessTargetThicknessTargetThicknessTargetThicknesstargetThickness
+ThicknessToleranceThicknessToleranceThicknessToleranceThicknessTolerancethicknessTolerance
]
- PositionTolerancePositionTolerancePositionTolerancePositionTolerancepositionTolerance
: bestimmt die Toleranz
bezüglich der Position der Kleberaupe in Pixeln. Die Position ist das
Zentrum der gefundenen Kleberaupe. Ein Teil einer Kleberaupe wird
als korrekt identifiziert, wenn die Abweichung dieser Position zur
entsprechenden Position auf der Modellkontur kleiner als
PositionTolerancePositionTolerancePositionTolerancePositionTolerancepositionTolerance
ist.
- PolarityPolarityPolarityPolaritypolarity
: bestimmt die Polarität der Kleberaupe
in den zu inspizierenden Bildern. 'light'"light""light""light""light" wenn die Kleberaupe
heller im Bild erscheint als ihr Hintergrund, ansonsten 'dark'"dark""dark""dark""dark".
Parameter für die Kantenextraktion
Die Inspektion von Kleberaupen verwendet Kantenextraktion um die Position
der Kleberaupe im Bild zu bestimmen. Eine korrekte Wahl der Parameter
für die Kantenextraktion führt zu besseren Ergebnissen. Die folgenden
beiden Paramter können über die generischen Parameter gesetzt werden
(siehe auch measure_posmeasure_posMeasurePosMeasurePosMeasurePos
):
- 'sigma'"sigma""sigma""sigma""sigma":
-
Wie in measure_posmeasure_posMeasurePosMeasurePosMeasurePos
ist 'sigma'"sigma""sigma""sigma""sigma" die Standardabweichung
der zur Glättung verwendeten Gaussmaske. Die Wahl von
'sigma'"sigma""sigma""sigma""sigma" hängt von der Bildqualität ab, hauptsächlich vom
Rauschanteil. Der Standard für 'sigma'"sigma""sigma""sigma""sigma" ist 2.0.
- 'threshold'"threshold""threshold""threshold""threshold":
-
Wie in measure_posmeasure_posMeasurePosMeasurePosMeasurePos
ist 'threshold'"threshold""threshold""threshold""threshold" die Schwelle für
die Amplitude der extrahierten Kanten. Ein höherer Wert für
'threshold'"threshold""threshold""threshold""threshold" verringert die Extraktion von Kanten im
Bildrauschen.
'threshold'"threshold""threshold""threshold""threshold" muss mindesten 1 betragen, der Standardwert ist 30.
Der Measure-Assistent kann verwendet werden um geeignete Werte für diese
beiden Parameter zu bestimmen.
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.
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.
Dieser Operator modifiziert den Zustand des folgenden Eingabeparameters:
Während der Ausführung dieses Operators muss der Zugriff auf den Wert dieses Parameters synchronisiert werden, wenn er über mehrere Threads hinweg verwendet wird.
Parameter
BeadContourBeadContourBeadContourBeadContourbeadContour
(input_object) xld →
objectHXLDHXLDHobject
XLD Kontur zur Festlegung der Position und Form der
Kleberaupe.
TargetThicknessTargetThicknessTargetThicknessTargetThicknesstargetThickness
(input_control) integer →
HTupleHTupleHtuple (integer / real) (int / long / double) (Hlong / double) (Hlong / double)
Optimale Breite der Kleberaupe.
Defaultwert: 50
Typischer Wertebereich: 5
≤
TargetThickness
TargetThickness
TargetThickness
TargetThickness
targetThickness
ThicknessToleranceThicknessToleranceThicknessToleranceThicknessTolerancethicknessTolerance
(input_control) integer →
HTupleHTupleHtuple (integer / real) (int / long / double) (Hlong / double) (Hlong / double)
Toleranz bezüglich der Breite der Kleberaupe.
Defaultwert: 15
Typischer Wertebereich: 0
≤
ThicknessTolerance
ThicknessTolerance
ThicknessTolerance
ThicknessTolerance
thicknessTolerance
PositionTolerancePositionTolerancePositionTolerancePositionTolerancepositionTolerance
(input_control) integer →
HTupleHTupleHtuple (integer / real) (int / long / double) (Hlong / double) (Hlong / double)
Toleranz bezüglich der Position der Kleberaupe.
Defaultwert: 15
Typischer Wertebereich: 0
≤
PositionTolerance
PositionTolerance
PositionTolerance
PositionTolerance
positionTolerance
PolarityPolarityPolarityPolaritypolarity
(input_control) string →
HTupleHTupleHtuple (string) (string) (HString) (char*)
Polarität der Kleberaupe.
Defaultwert:
'light'
"light"
"light"
"light"
"light"
Werteliste: 'dark'"dark""dark""dark""dark", 'light'"light""light""light""light"
GenParamNameGenParamNameGenParamNameGenParamNamegenParamName
(input_control) attribute.name(-array) →
HTupleHTupleHtuple (string) (string) (HString) (char*)
Namen der generischen Parameter.
Defaultwert: []
Werteliste: 'sigma'"sigma""sigma""sigma""sigma", 'threshold'"threshold""threshold""threshold""threshold"
GenParamValueGenParamValueGenParamValueGenParamValuegenParamValue
(input_control) attribute.value(-array) →
HTupleHTupleHtuple (integer / real / string) (int / long / double / string) (Hlong / double / HString) (Hlong / double / char*)
Werte der generischen Parameter.
Defaultwert: []
Wertevorschläge: 0.6, 1.0, 4.0, 5.0, 10.0, 50.0
BeadInspectionModelBeadInspectionModelBeadInspectionModelBeadInspectionModelbeadInspectionModel
(output_control, Zustand wird modifiziert) bead_inspection_model →
HBeadInspectionModel, HTupleHTupleHtuple (handle) (IntPtr) (HHandle) (handle)
Handle für das neu erzeugte Modell.
Beispiel (HDevelop)
* Read the image of the bead to be inspected.
read_image (Image, 'bead/adhesive_bead_01')
* Define the reference path of the adhesive beads.
gen_contour_nurbs_xld (ContourRef, \
[610.974,533.443,461.763,393.009,330.106,287.683, \
270.129,265.74,265.74,300.849,331.569,376.917, \
438.357,489.557,539.294], \
[418.581,424.27,439.441,473.574,526.67,574.078, \
644.241,708.715,765.604,818.7,866.107,915.411, \
966.611,998.848,993.159], \
'auto', \
[15,15,15,15,15,15,15,15,15,15,15,15,15,15,15], \
3, 1, 5)
*
* Create the bead inspection model, identifying the bead's parameters
create_bead_inspection_model (ContourRef, 14, 7, 30, 'dark', [], [], \
BeadInspectionModel)
*
* Apply the bead inspection model to the image
apply_bead_inspection_model (Image, LeftContour, RightContour, \
ErrorSegment, BeadInspectionModel, \
ErrorType)
Ergebnis
Der Operator create_bead_inspection_modelcreate_bead_inspection_modelCreateBeadInspectionModelCreateBeadInspectionModelCreateBeadInspectionModel
gibt 2 (H_MSG_TRUE) zurück, sofern
alle Parameter korrekt sind. Andernfalls wird eine Fehlerbehandlung
ausgelöst.
Vorgänger
gen_contour_nurbs_xldgen_contour_nurbs_xldGenContourNurbsXldGenContourNurbsXldGenContourNurbsXld
,
gen_contour_polygon_xldgen_contour_polygon_xldGenContourPolygonXldGenContourPolygonXldGenContourPolygonXld
Nachfolger
apply_bead_inspection_modelapply_bead_inspection_modelApplyBeadInspectionModelApplyBeadInspectionModelApplyBeadInspectionModel
,
set_bead_inspection_paramset_bead_inspection_paramSetBeadInspectionParamSetBeadInspectionParamSetBeadInspectionParam
Siehe auch
clear_bead_inspection_modelclear_bead_inspection_modelClearBeadInspectionModelClearBeadInspectionModelClearBeadInspectionModel
Modul
2D Metrology