Name
create_bead_inspection_modelcreate_bead_inspection_modelCreateBeadInspectionModelcreate_bead_inspection_modelCreateBeadInspectionModelCreateBeadInspectionModel — Erzeugen eines Modells zur Inspektion von Kleberaupen.
Herror create_bead_inspection_model(const Hobject BeadContour, const Hlong TargetThickness, const Hlong ThicknessTolerance, const Hlong PositionTolerance, const char* Polarity, const char* GenParamName, const Hlong GenParamValue, Hlong* BeadInspectionModel)
Herror T_create_bead_inspection_model(const Hobject BeadContour, const Htuple TargetThickness, const Htuple ThicknessTolerance, const Htuple PositionTolerance, const Htuple Polarity, const Htuple GenParamName, const Htuple GenParamValue, Htuple* BeadInspectionModel)
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::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 HOperatorSetX.CreateBeadInspectionModel(
[in] IHUntypedObjectX* BeadContour, [in] VARIANT TargetThickness, [in] VARIANT ThicknessTolerance, [in] VARIANT PositionTolerance, [in] VARIANT Polarity, [in] VARIANT GenParamName, [in] VARIANT GenParamValue, [out] VARIANT* BeadInspectionModel)
void HBeadInspectionModelX.CreateBeadInspectionModel(
[in] IHXLDX* BeadContour, [in] VARIANT TargetThickness, [in] VARIANT ThicknessTolerance, [in] VARIANT PositionTolerance, [in] BSTR Polarity, [in] VARIANT GenParamName, [in] VARIANT GenParamValue)
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)
create_bead_inspection_modelcreate_bead_inspection_modelCreateBeadInspectionModelcreate_bead_inspection_modelCreateBeadInspectionModelCreateBeadInspectionModel 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_modelCreateBeadInspectionModelcreate_bead_inspection_modelCreateBeadInspectionModelCreateBeadInspectionModel gibt einen Handle auf das
Modell in BeadInspectionModelBeadInspectionModelBeadInspectionModelBeadInspectionModelBeadInspectionModelbeadInspectionModel 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 BeadContourBeadContourBeadContourBeadContourBeadContourbeadContour benötigt, die als Modell dient.
So eine Kontur kann beispielsweise mit den Operatoren
gen_contour_polygon_xldgen_contour_polygon_xldGenContourPolygonXldgen_contour_polygon_xldGenContourPolygonXldGenContourPolygonXld oder gen_contour_nurbs_xldgen_contour_nurbs_xldGenContourNurbsXldgen_contour_nurbs_xldGenContourNurbsXldGenContourNurbsXld
erzeugt werden. Mit draw_polygondraw_polygonDrawPolygondraw_polygonDrawPolygonDrawPolygon oder draw_nurbsdraw_nurbsDrawNurbsdraw_nurbsDrawNurbsDrawNurbs
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:
- TargetThicknessTargetThicknessTargetThicknessTargetThicknessTargetThicknesstargetThickness: bestimmt die optimale Breite
der Kleberaupe in Pixeln.
- ThicknessToleranceThicknessToleranceThicknessToleranceThicknessToleranceThicknessTolerancethicknessTolerance: 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:
[TargetThicknessTargetThicknessTargetThicknessTargetThicknessTargetThicknesstargetThickness-ThicknessToleranceThicknessToleranceThicknessToleranceThicknessToleranceThicknessTolerancethicknessTolerance,
TargetThicknessTargetThicknessTargetThicknessTargetThicknessTargetThicknesstargetThickness+ThicknessToleranceThicknessToleranceThicknessToleranceThicknessToleranceThicknessTolerancethicknessTolerance]
- PositionTolerancePositionTolerancePositionTolerancePositionTolerancePositionTolerancepositionTolerance: 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
PositionTolerancePositionTolerancePositionTolerancePositionTolerancePositionTolerancepositionTolerance ist.
- PolarityPolarityPolarityPolarityPolaritypolarity: bestimmt die Polarität der Kleberaupe
in den zu inspizierenden Bildern. 'light'"light""light""light""light""light" wenn die Kleberaupe
heller im Bild erscheint als ihr Hintergrund, ansonsten 'dark'"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_posMeasurePosmeasure_posMeasurePosMeasurePos):
- 'sigma'"sigma""sigma""sigma""sigma""sigma":
-
Wie in measure_posmeasure_posMeasurePosmeasure_posMeasurePosMeasurePos ist 'sigma'"sigma""sigma""sigma""sigma""sigma" die Standardabweichung
der zur Glättung verwendeten Gaussmaske. Die Wahl von
'sigma'"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""sigma" ist 2.0.
- 'threshold'"threshold""threshold""threshold""threshold""threshold":
-
Wie in measure_posmeasure_posMeasurePosmeasure_posMeasurePosMeasurePos ist 'threshold'"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""threshold" verringert die Extraktion von Kanten im
Bildrauschen.
'threshold'"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.
Freigabe des Modells
Da für das Modell Speicher allokiert wird (von
create_bead_inspection_modelcreate_bead_inspection_modelCreateBeadInspectionModelcreate_bead_inspection_modelCreateBeadInspectionModelCreateBeadInspectionModel und von
apply_bead_inspection_modelapply_bead_inspection_modelApplyBeadInspectionModelapply_bead_inspection_modelApplyBeadInspectionModelApplyBeadInspectionModel), sollte das Modell mit
clear_bead_inspection_modelclear_bead_inspection_modelClearBeadInspectionModelclear_bead_inspection_modelClearBeadInspectionModelClearBeadInspectionModel freigegeben werden, sobald es nicht mehr
benötigt wird.
- 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:
Der Wert dieses Parameters darf nicht über mehrere Threads verwendet werden.
XLD Kontur zur Festlegung der Position und Form der
Kleberaupe.
Optimale Breite der Kleberaupe.
Defaultwert: 50
Typischer Wertebereich: 5
≤
TargetThickness
TargetThickness
TargetThickness
TargetThickness
TargetThickness
targetThickness
Toleranz bezüglich der Breite der Kleberaupe.
Defaultwert: 15
Typischer Wertebereich: 0
≤
ThicknessTolerance
ThicknessTolerance
ThicknessTolerance
ThicknessTolerance
ThicknessTolerance
thicknessTolerance
Toleranz bezüglich der Position der Kleberaupe.
Defaultwert: 15
Typischer Wertebereich: 0
≤
PositionTolerance
PositionTolerance
PositionTolerance
PositionTolerance
PositionTolerance
positionTolerance
Polarität der Kleberaupe.
Defaultwert:
'light'
"light"
"light"
"light"
"light"
"light"
Werteliste: 'dark'"dark""dark""dark""dark""dark", 'light'"light""light""light""light""light"
Namen der generischen Parameter.
Defaultwert: []
Werteliste: 'sigma'"sigma""sigma""sigma""sigma""sigma", 'threshold'"threshold""threshold""threshold""threshold""threshold"
Werte der generischen Parameter.
Defaultwert: []
Wertevorschläge: 0.6, 1.0, 4.0, 5.0, 10.0, 50.0
Handle für das neu erzeugte Modell.
* 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)
Der Operator create_bead_inspection_modelcreate_bead_inspection_modelCreateBeadInspectionModelcreate_bead_inspection_modelCreateBeadInspectionModelCreateBeadInspectionModel gibt 2 (H_MSG_TRUE) zurück, sofern
alle Parameter korrekt sind. Andernfalls wird eine Fehlerbehandlung
ausgelöst.
gen_contour_nurbs_xldgen_contour_nurbs_xldGenContourNurbsXldgen_contour_nurbs_xldGenContourNurbsXldGenContourNurbsXld,
gen_contour_polygon_xldgen_contour_polygon_xldGenContourPolygonXldgen_contour_polygon_xldGenContourPolygonXldGenContourPolygonXld
apply_bead_inspection_modelapply_bead_inspection_modelApplyBeadInspectionModelapply_bead_inspection_modelApplyBeadInspectionModelApplyBeadInspectionModel,
set_bead_inspection_paramset_bead_inspection_paramSetBeadInspectionParamset_bead_inspection_paramSetBeadInspectionParamSetBeadInspectionParam
clear_bead_inspection_modelclear_bead_inspection_modelClearBeadInspectionModelclear_bead_inspection_modelClearBeadInspectionModelClearBeadInspectionModel
2D Metrology