apply_texture_inspection_modelT_apply_texture_inspection_modelApplyTextureInspectionModelApplyTextureInspectionModelapply_texture_inspection_model (Operator)

Name

apply_texture_inspection_modelT_apply_texture_inspection_modelApplyTextureInspectionModelApplyTextureInspectionModelapply_texture_inspection_model — 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)

def apply_texture_inspection_model(image: HObject, texture_inspection_model: HHandle) -> Tuple[HObject, HHandle]

Beschreibung

Der Operator apply_texture_inspection_modelapply_texture_inspection_modelApplyTextureInspectionModelApplyTextureInspectionModelApplyTextureInspectionModelapply_texture_inspection_model vergleicht die Textur in einem Bild ImageImageImageImageimageimage mit dem trainierten Texturinspektionsmodell TextureInspectionModelTextureInspectionModelTextureInspectionModelTextureInspectionModeltextureInspectionModeltexture_inspection_model. ImageImageImageImageimageimage kann ein einzelnes oder ein Tupel von Bildern sein. Dabei ist es möglich Grauwertbilder oder Mehrkanalbilder zu übergeben. Der Operator erwartet, dass die übergebenen Bilder in ImageImageImageImageimageimage die gleiche Anzahl von Kanälen haben, wie die Bilder mit denen das Modell trainiert wurde. Die Laufzeit von apply_texture_inspection_modelapply_texture_inspection_modelApplyTextureInspectionModelApplyTextureInspectionModelApplyTextureInspectionModelapply_texture_inspection_model skaliert etwa linear mit der Anzahl der Bildkanäle. Modelle, die farbige Bilder verwenden, sind jedoch im Allgemeinen besser in der Lage, farbige Texturdefekte zu erkennen.

Regionen im Bild die nicht zum Texturinspektionsmodell passen, werden in der Fehlerregion NoveltyRegionNoveltyRegionNoveltyRegionNoveltyRegionnoveltyRegionnovelty_region 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_paramSetTextureInspectionModelParamSetTextureInspectionModelParamSetTextureInspectionModelParamset_texture_inspection_model_param auf 'true'"true""true""true""true""true" gesetzt wurde, im Handle TextureInspectionResultIDTextureInspectionResultIDTextureInspectionResultIDTextureInspectionResultIDtextureInspectionResultIDtexture_inspection_result_id 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 TextureInspectionResultIDTextureInspectionResultIDTextureInspectionResultIDTextureInspectionResultIDtextureInspectionResultIDtexture_inspection_result_id 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 NoveltyRegionNoveltyRegionNoveltyRegionNoveltyRegionnoveltyRegionnovelty_region 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_paramSetTextureInspectionModelParamSetTextureInspectionModelParamSetTextureInspectionModelParamset_texture_inspection_model_param auf 'true'"true""true""true""true""true" gesetzt worden, enthält TextureInspectionResultIDTextureInspectionResultIDTextureInspectionResultIDTextureInspectionResultIDtextureInspectionResultIDtexture_inspection_result_id 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_objectGetTextureInspectionResultObjectGetTextureInspectionResultObjectGetTextureInspectionResultObjectget_texture_inspection_result_object 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

ImageImageImageImageimageimage (input_object)  (multichannel-)image-array objectHImageHObjectHImageHobject (byte / uint2 / real)

Bild(er) der zu inspizierenden Textur.

NoveltyRegionNoveltyRegionNoveltyRegionNoveltyRegionnoveltyRegionnovelty_region (output_object)  region-array objectHRegionHObjectHRegionHobject *

Detektierte Fehlerregion.

TextureInspectionModelTextureInspectionModelTextureInspectionModelTextureInspectionModeltextureInspectionModeltexture_inspection_model (input_control)  texture_inspection_model HTextureInspectionModel, HTupleHHandleHTupleHtuple (handle) (IntPtr) (HHandle) (handle)

Handle des Texturinspektionsmodells.

TextureInspectionResultIDTextureInspectionResultIDTextureInspectionResultIDTextureInspectionResultIDtextureInspectionResultIDtexture_inspection_result_id (output_control, Zustand wird modifiziert)  texture_inspection_result HTextureInspectionResult, HTupleHHandleHTupleHtuple (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_modelApplyTextureInspectionModelApplyTextureInspectionModelApplyTextureInspectionModelapply_texture_inspection_model gibt TRUE zurück, sofern alle Parameter korrekt sind. Andernfalls wird eine Fehlerbehandlung ausgelöst.

Vorgänger

train_texture_inspection_modeltrain_texture_inspection_modelTrainTextureInspectionModelTrainTextureInspectionModelTrainTextureInspectionModeltrain_texture_inspection_model

Nachfolger

get_texture_inspection_result_objectget_texture_inspection_result_objectGetTextureInspectionResultObjectGetTextureInspectionResultObjectGetTextureInspectionResultObjectget_texture_inspection_result_object, get_texture_inspection_model_paramget_texture_inspection_model_paramGetTextureInspectionModelParamGetTextureInspectionModelParamGetTextureInspectionModelParamget_texture_inspection_model_param, clear_texture_inspection_resultclear_texture_inspection_resultClearTextureInspectionResultClearTextureInspectionResultClearTextureInspectionResultclear_texture_inspection_result, clear_texture_inspection_modelclear_texture_inspection_modelClearTextureInspectionModelClearTextureInspectionModelClearTextureInspectionModelclear_texture_inspection_model

Modul

Matching