KlassenKlassenKlassenKlassen | | | | Operatoren

apply_texture_inspection_modelapply_texture_inspection_modelApplyTextureInspectionModelapply_texture_inspection_modelApplyTextureInspectionModelApplyTextureInspectionModel (Operator)

Name

apply_texture_inspection_modelapply_texture_inspection_modelApplyTextureInspectionModelapply_texture_inspection_modelApplyTextureInspectionModelApplyTextureInspectionModel — Inspizieren der Textur in einem Bild.

Signatur

apply_texture_inspection_model(Image : NoveltyRegion : TextureInspectionModel : TextureInspectionResultID)

Herror apply_texture_inspection_model(const Hobject Image, Hobject* NoveltyRegion, const Hlong TextureInspectionModel, Hlong* TextureInspectionResultID)

Herror T_apply_texture_inspection_model(const Hobject Image, Hobject* NoveltyRegion, const Htuple TextureInspectionModel, Htuple* TextureInspectionResultID)

Herror apply_texture_inspection_model(Hobject Image, Hobject* NoveltyRegion, const HTuple& TextureInspectionModel, Hlong* TextureInspectionResultID)

HRegionArray HImageArray::ApplyTextureInspectionModel(const HTextureInspectionModel& TextureInspectionModel, HTextureInspectionResult* TextureInspectionResultID) const

HRegionArray HTextureInspectionModel::ApplyTextureInspectionModel(const HImageArray& Image, HTextureInspectionResult* TextureInspectionResultID) const

HRegionArray HTextureInspectionResult::ApplyTextureInspectionModel(const HImageArray& Image, const HTextureInspectionModel& TextureInspectionModel)

void ApplyTextureInspectionModel(const HObject& Image, HObject* NoveltyRegion, const HTuple& TextureInspectionModel, HTuple* TextureInspectionResultID)

HRegion HImage::ApplyTextureInspectionModel(const HTextureInspectionModel& TextureInspectionModel, HTextureInspectionResult* TextureInspectionResultID) const

HRegion HTextureInspectionModel::ApplyTextureInspectionModel(const HImage& Image, HTextureInspectionResult* TextureInspectionResultID) const

void HTextureInspectionResult::HTextureInspectionResult(const HImage& Image, HRegion* NoveltyRegion, const HTextureInspectionModel& TextureInspectionModel)

HRegion HTextureInspectionResult::ApplyTextureInspectionModel(const HImage& Image, const HTextureInspectionModel& TextureInspectionModel)

void HOperatorSetX.ApplyTextureInspectionModel(
[in] IHUntypedObjectX* Image, [out] IHUntypedObjectX*NoveltyRegion, [in] VARIANT TextureInspectionModel, [out] VARIANT* TextureInspectionResultID)

IHRegionX* HImageX.ApplyTextureInspectionModel(
[in] IHTextureInspectionModelX* TextureInspectionModel, [out] IHTextureInspectionResultX*TextureInspectionResultID)

IHRegionX* HTextureInspectionModelX.ApplyTextureInspectionModel(
[in] IHImageX* Image, [out] IHTextureInspectionResultX*TextureInspectionResultID)

IHRegionX* HTextureInspectionResultX.ApplyTextureInspectionModel(
[in] IHImageX* Image, [in] IHTextureInspectionModelX* TextureInspectionModel)

static void HOperatorSet.ApplyTextureInspectionModel(HObject image, out HObject noveltyRegion, HTuple textureInspectionModel, out HTuple textureInspectionResultID)

HRegion HImage.ApplyTextureInspectionModel(HTextureInspectionModel textureInspectionModel, out HTextureInspectionResult textureInspectionResultID)

HRegion HTextureInspectionModel.ApplyTextureInspectionModel(HImage image, out HTextureInspectionResult textureInspectionResultID)

public HTextureInspectionResult(HImage image, out HRegion noveltyRegion, HTextureInspectionModel textureInspectionModel)

HRegion HTextureInspectionResult.ApplyTextureInspectionModel(HImage image, HTextureInspectionModel textureInspectionModel)

Beschreibung

Der Operator apply_texture_inspection_modelapply_texture_inspection_modelApplyTextureInspectionModelapply_texture_inspection_modelApplyTextureInspectionModelApplyTextureInspectionModel vergleicht die Textur in einem Bild ImageImageImageImageImageimage mit dem trainierten Texturinspektionsmodell TextureInspectionModelTextureInspectionModelTextureInspectionModelTextureInspectionModelTextureInspectionModeltextureInspectionModel. ImageImageImageImageImageimage kann ein einzelnes Grauwertbild oder ein Tuple mit Grauwertbildern sein. Pixel, die nicht zum Texturinspektionsmodell passen, werden in der Fehlerregion NoveltyRegionNoveltyRegionNoveltyRegionNoveltyRegionNoveltyRegionnoveltyRegion zurückgegeben. Außerdem gibt der Operator, falls 'gen_result_handle'"gen_result_handle""gen_result_handle""gen_result_handle""gen_result_handle""gen_result_handle" mit set_texture_inspection_model_paramset_texture_inspection_model_paramSetTextureInspectionModelParamset_texture_inspection_model_paramSetTextureInspectionModelParamSetTextureInspectionModelParam auf 'true'"true""true""true""true""true" gesetzt wurde, im Handle TextureInspectionResultIDTextureInspectionResultIDTextureInspectionResultIDTextureInspectionResultIDTextureInspectionResultIDtextureInspectionResultID detailliertere Informationen zur Texturklassifikation zurück. Ist 'gen_result_handle'"gen_result_handle""gen_result_handle""gen_result_handle""gen_result_handle""gen_result_handle" auf 'false'"false""false""false""false""false" gesetzt, bleibt TextureInspectionResultIDTextureInspectionResultIDTextureInspectionResultIDTextureInspectionResultIDTextureInspectionResultIDtextureInspectionResultID leer.

Das Konzept der Texturinspektion ist bei der Einleitung zum Kapitel Inspektion / Texturinspektion beschrieben.

Für jede Pyramidenstufe werden Texturmerkmale extrahiert und mit dem entsprechenden GMM-Klassifikator klassifiziert. Der sich ergebende Neuheitswert ('novelty_score'"novelty_score""novelty_score""novelty_score""novelty_score""novelty_score") wird mit der Fehlerschwelle ('novelty_threshold'"novelty_threshold""novelty_threshold""novelty_threshold""novelty_threshold""novelty_threshold") dieser Pyramidenstufe verglichen und als fehlerhaft oder fehlerfrei klassifiziert. Die fehlerhaften Pixel werden zunächst in einer Fehlerregion für jede Pyramidenstufe gesammelt und anschließend zu der endgültigen Fehlerregion kombiniert, die in NoveltyRegionNoveltyRegionNoveltyRegionNoveltyRegionNoveltyRegionnoveltyRegion zurückgegeben wird. Dabei werden die Fehlerregionen von benachbarten Skalen miteinander geschnitten. Dadurch wird die Robustheit gegenüber Rauschen erhöht. Die so entstandenen Schnittflächen werden in der 'novelty_region'"novelty_region""novelty_region""novelty_region""novelty_region""novelty_region" vereinigt. Falls es keine benachbarte Level gibt, wird die Fehlerregion der entsprechenden Level direkt zu der 'novelty_region'"novelty_region""novelty_region""novelty_region""novelty_region""novelty_region" hinzugefügt. Setzt man zum Beispiel 'num_levels'"num_levels""num_levels""num_levels""num_levels""num_levels" auf 1, so gibt es keine benachbarten Skalen und die Fehlerregion vom ersten Level wird in 'novelty_region'"novelty_region""novelty_region""novelty_region""novelty_region""novelty_region" zurückgegeben.

Ist 'gen_result_handle'"gen_result_handle""gen_result_handle""gen_result_handle""gen_result_handle""gen_result_handle" mit set_texture_inspection_model_paramset_texture_inspection_model_paramSetTextureInspectionModelParamset_texture_inspection_model_paramSetTextureInspectionModelParamSetTextureInspectionModelParam auf 'true'"true""true""true""true""true" gesetzt worden, enthält TextureInspectionResultIDTextureInspectionResultIDTextureInspectionResultIDTextureInspectionResultIDTextureInspectionResultIDtextureInspectionResultID Novelty-Score-Bilder und die daraus resultierenden Fehlerregionen für jede Pyramidenstufe.

Diese Informationen können beim Debuggen und beim Anpassen der Modellparameter (z.B. der Fehlerschwellen) helfen und werden mit get_texture_inspection_result_objectget_texture_inspection_result_objectGetTextureInspectionResultObjectget_texture_inspection_result_objectGetTextureInspectionResultObjectGetTextureInspectionResultObject abgefragt.

Wenn das Ergebnismodell nicht mehr benötigt wird, muss es mit clear_texture_inspection_resultclear_texture_inspection_resultClearTextureInspectionResultclear_texture_inspection_resultClearTextureInspectionResultClearTextureInspectionResult wieder freigegeben 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.

Dieser Operator modifiziert den Zustand des folgenden Eingabeparameters:

Der Wert dieses Parameters darf nicht über mehrere Threads verwendet werden.

Parameter

ImageImageImageImageImageimage (input_object)  singlechannelimage-array objectHImageHImageHImageArrayHImageXHobject (byte / uint2)

Bild(er) der zu inspizierenden Textur.

NoveltyRegionNoveltyRegionNoveltyRegionNoveltyRegionNoveltyRegionnoveltyRegion (output_object)  region-array objectHRegionHRegionHRegionArrayHRegionXHobject *

Detektierte Fehlerregion.

TextureInspectionModelTextureInspectionModelTextureInspectionModelTextureInspectionModelTextureInspectionModeltextureInspectionModel (input_control)  texture_inspection_model HTextureInspectionModel, HTupleHTupleHTextureInspectionModel, HTupleHTextureInspectionModelX, VARIANTHtuple (integer) (IntPtr) (Hlong) (Hlong) (Hlong) (Hlong)

Handle des Texturinspektionsmodells.

TextureInspectionResultIDTextureInspectionResultIDTextureInspectionResultIDTextureInspectionResultIDTextureInspectionResultIDtextureInspectionResultID (output_control, Zustand wird modifiziert)  texture_inspection_result HTextureInspectionResult, HTupleHTupleHTextureInspectionResult, HTupleHTextureInspectionResultX, VARIANTHtuple (integer) (IntPtr) (Hlong) (Hlong) (Hlong) (Hlong)

Handle des Inspektionsergebnisses.

Beispiel (HDevelop)

* Create texture inspection model
create_texture_inspection_model ('basic', TextureInspectionModel)
* Set parameters
set_texture_inspection_model_param (TextureInspectionModel, \
                                    'gen_result_handle', 'true')
* Make this short example fast:
set_texture_inspection_model_param (TextureInspectionModel, \
                                    'gmm_em_max_iter', 1)
* Read and add training images
read_image (TrainImage, 'carpet/carpet_01')
add_texture_inspection_model_image (TrainImage, TextureInspectionModel, \
                                    Indices)
* Train the model
train_texture_inspection_model (TextureInspectionModel)
* Read and apply a test image
read_image (TestImage, 'carpet/carpet_02')
apply_texture_inspection_model (TestImage, DefectCandidates, \
                                TextureInspectionModel, \
                                TextureInspectionResultID)
* Clean up
clear_texture_inspection_model (TextureInspectionModel)
clear_texture_inspection_result (TextureInspectionResultID)

Ergebnis

Der Operator apply_texture_inspection_modelapply_texture_inspection_modelApplyTextureInspectionModelapply_texture_inspection_modelApplyTextureInspectionModelApplyTextureInspectionModel gibt 2 (H_MSG_TRUE) zurück, sofern alle Parameter korrekt sind. Andernfalls wird eine Fehlerbehandlung ausgelöst.

Vorgänger

train_texture_inspection_modeltrain_texture_inspection_modelTrainTextureInspectionModeltrain_texture_inspection_modelTrainTextureInspectionModelTrainTextureInspectionModel

Nachfolger

get_texture_inspection_result_objectget_texture_inspection_result_objectGetTextureInspectionResultObjectget_texture_inspection_result_objectGetTextureInspectionResultObjectGetTextureInspectionResultObject, get_texture_inspection_model_paramget_texture_inspection_model_paramGetTextureInspectionModelParamget_texture_inspection_model_paramGetTextureInspectionModelParamGetTextureInspectionModelParam, clear_texture_inspection_resultclear_texture_inspection_resultClearTextureInspectionResultclear_texture_inspection_resultClearTextureInspectionResultClearTextureInspectionResult, clear_texture_inspection_modelclear_texture_inspection_modelClearTextureInspectionModelclear_texture_inspection_modelClearTextureInspectionModelClearTextureInspectionModel

Modul

Matching


KlassenKlassenKlassenKlassen | | | | Operatoren