apply_texture_inspection_modelT_apply_texture_inspection_modelApplyTextureInspectionModelApplyTextureInspectionModel (Operator)

Name

apply_texture_inspection_modelT_apply_texture_inspection_modelApplyTextureInspectionModelApplyTextureInspectionModel — Inspizieren der Textur in einem Bild.

Signatur

apply_texture_inspection_model(Image : NoveltyRegion : TextureInspectionModel : TextureInspectionResultID)

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

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)

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_modelApplyTextureInspectionModelApplyTextureInspectionModelApplyTextureInspectionModel vergleicht die Textur in einem Bild ImageImageImageImageimage mit dem trainierten Texturinspektionsmodell TextureInspectionModelTextureInspectionModelTextureInspectionModelTextureInspectionModeltextureInspectionModel. ImageImageImageImageimage kann ein einzelnes Grauwertbild oder ein Tuple mit Grauwertbildern sein. Pixel, die nicht zum Texturinspektionsmodell passen, werden in der Fehlerregion NoveltyRegionNoveltyRegionNoveltyRegionNoveltyRegionnoveltyRegion zurückgegeben. Außerdem gibt der Operator, falls 'gen_result_handle'"gen_result_handle""gen_result_handle""gen_result_handle""gen_result_handle" mit set_texture_inspection_model_paramset_texture_inspection_model_paramSetTextureInspectionModelParamSetTextureInspectionModelParamSetTextureInspectionModelParam auf 'true'"true""true""true""true" gesetzt wurde, im Handle TextureInspectionResultIDTextureInspectionResultIDTextureInspectionResultIDTextureInspectionResultIDtextureInspectionResultID detailliertere Informationen zur Texturklassifikation zurück. Ist 'gen_result_handle'"gen_result_handle""gen_result_handle""gen_result_handle""gen_result_handle" auf 'false'"false""false""false""false" gesetzt, bleibt TextureInspectionResultIDTextureInspectionResultIDTextureInspectionResultIDTextureInspectionResultIDtextureInspectionResultID 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") wird mit der Fehlerschwelle ('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 NoveltyRegionNoveltyRegionNoveltyRegionNoveltyRegionnoveltyRegion 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" 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" hinzugefügt. Setzt man zum Beispiel '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" zurückgegeben.

Ist 'gen_result_handle'"gen_result_handle""gen_result_handle""gen_result_handle""gen_result_handle" mit set_texture_inspection_model_paramset_texture_inspection_model_paramSetTextureInspectionModelParamSetTextureInspectionModelParamSetTextureInspectionModelParam auf 'true'"true""true""true""true" gesetzt worden, enthält TextureInspectionResultIDTextureInspectionResultIDTextureInspectionResultIDTextureInspectionResultIDtextureInspectionResultID 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_objectGetTextureInspectionResultObjectGetTextureInspectionResultObjectGetTextureInspectionResultObject abgefragt.

Ausführungsinformationen

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

ImageImageImageImageimage (input_object)  singlechannelimage-array objectHImageHImageHobject (byte / uint2)

Bild(er) der zu inspizierenden Textur.

NoveltyRegionNoveltyRegionNoveltyRegionNoveltyRegionnoveltyRegion (output_object)  region-array objectHRegionHRegionHobject *

Detektierte Fehlerregion.

TextureInspectionModelTextureInspectionModelTextureInspectionModelTextureInspectionModeltextureInspectionModel (input_control)  texture_inspection_model HTextureInspectionModel, HTupleHTupleHtuple (handle) (IntPtr) (HHandle) (handle)

Handle des Texturinspektionsmodells.

TextureInspectionResultIDTextureInspectionResultIDTextureInspectionResultIDTextureInspectionResultIDtextureInspectionResultID (output_control, Zustand wird modifiziert)  texture_inspection_result HTextureInspectionResult, HTupleHTupleHtuple (handle) (IntPtr) (HHandle) (handle)

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)

Ergebnis

Der Operator apply_texture_inspection_modelapply_texture_inspection_modelApplyTextureInspectionModelApplyTextureInspectionModelApplyTextureInspectionModel 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_modelTrainTextureInspectionModelTrainTextureInspectionModelTrainTextureInspectionModel

Nachfolger

get_texture_inspection_result_objectget_texture_inspection_result_objectGetTextureInspectionResultObjectGetTextureInspectionResultObjectGetTextureInspectionResultObject, get_texture_inspection_model_paramget_texture_inspection_model_paramGetTextureInspectionModelParamGetTextureInspectionModelParamGetTextureInspectionModelParam, clear_texture_inspection_resultclear_texture_inspection_resultClearTextureInspectionResultClearTextureInspectionResultClearTextureInspectionResult, clear_texture_inspection_modelclear_texture_inspection_modelClearTextureInspectionModelClearTextureInspectionModelClearTextureInspectionModel

Modul

Matching