KlassenKlassenKlassenKlassen | | | | Operatoren

find_uncalib_descriptor_modelT_find_uncalib_descriptor_modelFindUncalibDescriptorModelfind_uncalib_descriptor_modelFindUncalibDescriptorModelFindUncalibDescriptorModel (Operator)

Name

find_uncalib_descriptor_modelT_find_uncalib_descriptor_modelFindUncalibDescriptorModelfind_uncalib_descriptor_modelFindUncalibDescriptorModelFindUncalibDescriptorModel — Suchen die besten Matches eines Deskriptormodells in einem Suchbild.

Signatur

find_uncalib_descriptor_model(Image : : ModelID, DetectorParamName, DetectorParamValue, DescriptorParamName, DescriptorParamValue, MinScore, NumMatches, ScoreType : HomMat2D, Score)

Herror T_find_uncalib_descriptor_model(const Hobject Image, const Htuple ModelID, const Htuple DetectorParamName, const Htuple DetectorParamValue, const Htuple DescriptorParamName, const Htuple DescriptorParamValue, const Htuple MinScore, const Htuple NumMatches, const Htuple ScoreType, Htuple* HomMat2D, Htuple* Score)

Herror find_uncalib_descriptor_model(Hobject Image, const HTuple& ModelID, const HTuple& DetectorParamName, const HTuple& DetectorParamValue, const HTuple& DescriptorParamName, const HTuple& DescriptorParamValue, const HTuple& MinScore, const HTuple& NumMatches, const HTuple& ScoreType, HTuple* HomMat2D, HTuple* Score)

HTuple HImage::FindUncalibDescriptorModel(const HDescriptorModel& ModelID, const HTuple& DetectorParamName, const HTuple& DetectorParamValue, const HTuple& DescriptorParamName, const HTuple& DescriptorParamValue, const HTuple& MinScore, const HTuple& NumMatches, const HTuple& ScoreType, HTuple* Score) const

HTuple HDescriptorModel::FindUncalibDescriptorModel(const HImage& Image, const HTuple& DetectorParamName, const HTuple& DetectorParamValue, const HTuple& DescriptorParamName, const HTuple& DescriptorParamValue, const HTuple& MinScore, const HTuple& NumMatches, const HTuple& ScoreType, HTuple* Score) const

void FindUncalibDescriptorModel(const HObject& Image, const HTuple& ModelID, const HTuple& DetectorParamName, const HTuple& DetectorParamValue, const HTuple& DescriptorParamName, const HTuple& DescriptorParamValue, const HTuple& MinScore, const HTuple& NumMatches, const HTuple& ScoreType, HTuple* HomMat2D, HTuple* Score)

HHomMat2DArray HDescriptorModel::FindUncalibDescriptorModel(const HImage& Image, const HTuple& DetectorParamName, const HTuple& DetectorParamValue, const HTuple& DescriptorParamName, const HTuple& DescriptorParamValue, const HTuple& MinScore, Hlong NumMatches, const HTuple& ScoreType, HTuple* Score) const

HHomMat2D HDescriptorModel::FindUncalibDescriptorModel(const HImage& Image, const HTuple& DetectorParamName, const HTuple& DetectorParamValue, const HTuple& DescriptorParamName, const HTuple& DescriptorParamValue, double MinScore, Hlong NumMatches, const HString& ScoreType, double* Score) const

HHomMat2D HDescriptorModel::FindUncalibDescriptorModel(const HImage& Image, const HTuple& DetectorParamName, const HTuple& DetectorParamValue, const HTuple& DescriptorParamName, const HTuple& DescriptorParamValue, double MinScore, Hlong NumMatches, const char* ScoreType, double* Score) const

HHomMat2DArray HImage::FindUncalibDescriptorModel(const HDescriptorModel& ModelID, const HTuple& DetectorParamName, const HTuple& DetectorParamValue, const HTuple& DescriptorParamName, const HTuple& DescriptorParamValue, const HTuple& MinScore, Hlong NumMatches, const HTuple& ScoreType, HTuple* Score) const

HHomMat2D HImage::FindUncalibDescriptorModel(const HDescriptorModel& ModelID, const HTuple& DetectorParamName, const HTuple& DetectorParamValue, const HTuple& DescriptorParamName, const HTuple& DescriptorParamValue, double MinScore, Hlong NumMatches, const HString& ScoreType, double* Score) const

HHomMat2D HImage::FindUncalibDescriptorModel(const HDescriptorModel& ModelID, const HTuple& DetectorParamName, const HTuple& DetectorParamValue, const HTuple& DescriptorParamName, const HTuple& DescriptorParamValue, double MinScore, Hlong NumMatches, const char* ScoreType, double* Score) const

void HOperatorSetX.FindUncalibDescriptorModel(
[in] IHUntypedObjectX* Image, [in] VARIANT ModelID, [in] VARIANT DetectorParamName, [in] VARIANT DetectorParamValue, [in] VARIANT DescriptorParamName, [in] VARIANT DescriptorParamValue, [in] VARIANT MinScore, [in] VARIANT NumMatches, [in] VARIANT ScoreType, [out] VARIANT* HomMat2d, [out] VARIANT* Score)

IHHomMat2DX* HDescriptorModelX.FindUncalibDescriptorModel(
[in] IHImageX* Image, [in] VARIANT DetectorParamName, [in] VARIANT DetectorParamValue, [in] VARIANT DescriptorParamName, [in] VARIANT DescriptorParamValue, [in] VARIANT MinScore, [in] Hlong NumMatches, [in] VARIANT ScoreType, [out] VARIANT* Score)

IHHomMat2DX* HImageX.FindUncalibDescriptorModel(
[in] IHDescriptorModelX* ModelID, [in] VARIANT DetectorParamName, [in] VARIANT DetectorParamValue, [in] VARIANT DescriptorParamName, [in] VARIANT DescriptorParamValue, [in] VARIANT MinScore, [in] Hlong NumMatches, [in] VARIANT ScoreType, [out] VARIANT* Score)

static void HOperatorSet.FindUncalibDescriptorModel(HObject image, HTuple modelID, HTuple detectorParamName, HTuple detectorParamValue, HTuple descriptorParamName, HTuple descriptorParamValue, HTuple minScore, HTuple numMatches, HTuple scoreType, out HTuple homMat2D, out HTuple score)

HHomMat2D[] HDescriptorModel.FindUncalibDescriptorModel(HImage image, HTuple detectorParamName, HTuple detectorParamValue, HTuple descriptorParamName, HTuple descriptorParamValue, HTuple minScore, int numMatches, HTuple scoreType, out HTuple score)

HHomMat2D HDescriptorModel.FindUncalibDescriptorModel(HImage image, HTuple detectorParamName, HTuple detectorParamValue, HTuple descriptorParamName, HTuple descriptorParamValue, double minScore, int numMatches, string scoreType, out double score)

HHomMat2D[] HImage.FindUncalibDescriptorModel(HDescriptorModel modelID, HTuple detectorParamName, HTuple detectorParamValue, HTuple descriptorParamName, HTuple descriptorParamValue, HTuple minScore, int numMatches, HTuple scoreType, out HTuple score)

HHomMat2D HImage.FindUncalibDescriptorModel(HDescriptorModel modelID, HTuple detectorParamName, HTuple detectorParamValue, HTuple descriptorParamName, HTuple descriptorParamValue, double minScore, int numMatches, string scoreType, out double score)

Beschreibung

Der Operator find_uncalib_descriptor_modelfind_uncalib_descriptor_modelFindUncalibDescriptorModelfind_uncalib_descriptor_modelFindUncalibDescriptorModelFindUncalibDescriptorModel sucht den besten Match eines Deskriptormodells ModelIDModelIDModelIDModelIDModelIDmodelID in einem Suchbild ImageImageImageImageImageimage. Ein Deskriptormodell beinhaltet Beschreibungen von Merkmalspunkten und muss zuvor durch create_uncalib_descriptor_modelcreate_uncalib_descriptor_modelCreateUncalibDescriptorModelcreate_uncalib_descriptor_modelCreateUncalibDescriptorModelCreateUncalibDescriptorModel bzw. create_calib_descriptor_modelcreate_calib_descriptor_modelCreateCalibDescriptorModelcreate_calib_descriptor_modelCreateCalibDescriptorModelCreateCalibDescriptorModel erzeugt oder mit read_descriptor_modelread_descriptor_modelReadDescriptorModelread_descriptor_modelReadDescriptorModelReadDescriptorModel eingelesen worden sein.

Ein Match wird akzeptiert, wenn er eine bessere Bewertung als MinScoreMinScoreMinScoreMinScoreMinScoreminScore hat. Dieses Kriterium basiert auf der 'inlier_ratio' Bewertung, die weiter unten erklärt wird. Hauptergebnis des Operators find_uncalib_descriptor_modelfind_uncalib_descriptor_modelFindUncalibDescriptorModelfind_uncalib_descriptor_modelFindUncalibDescriptorModelFindUncalibDescriptorModel ist die 3x3 Matrix HomMat2DHomMat2DHomMat2DHomMat2DHomMat2DhomMat2D, die eine projektive 2D Transformation von Modellpunkten zu Suchbildpunkten darstellt. Die Matrix ist durch ihre zeilenweise gegebenen 9 Elementen dargestellt. Tritt das gesuchte Objekt (Template) mehrfach in ImageImageImageImageImageimage auf und erfüllt es das Kriterium MinScoreMinScoreMinScoreMinScoreMinScoreminScore, werden die resultierenden Homographien aneinandergehängt. Die Anzahl der letztendlich gefundenen Objekte lässt sich durch NumObjects = |HomMat2DHomMat2DHomMat2DHomMat2DHomMat2DhomMat2D| / 9 berechnen.

Der Suchprozess ist in drei Phasen unterteilt. Als erstes werden Merkmalspunkte aus dem Suchbild (aber nur innerhalb des Definitionsbereiches des Suchbildes) extrahiert. Dies erfolgt mit dem Punktoperator, der bei der Modellerstellung ausgewählten wurde. Während der Modellerstellung werden auch die Parameter des Punktoperators gesetzt. Sie können allerdings mittels DetectorParamNameDetectorParamNameDetectorParamNameDetectorParamNameDetectorParamNamedetectorParamName und DetectorParamValueDetectorParamValueDetectorParamValueDetectorParamValueDetectorParamValuedetectorParamValue auch zusätzlich angepasst werden. Hierdurch können dieser Parameter insbesondere an Beleuchtungsschwankungen zwischen Modellerzeugung und Suchbild angepasst werden. Es wird jedoch empfohlen, die Werte des Modells zu verwenden (Übergabe eines leeren Tupels).

In der zweiten Phase der Suche werden Korrespondenzen zwischen Modellpunkten und extrahierten Punkten des Suchbildes erstellt. Die Parameter des Deskriptors werden in DescriptorParamNameDescriptorParamNameDescriptorParamNameDescriptorParamNameDescriptorParamNamedescriptorParamName und DescriptorParamValueDescriptorParamValueDescriptorParamValueDescriptorParamValueDescriptorParamValuedescriptorParamValue gesetzt:

'min_score_descr'"min_score_descr""min_score_descr""min_score_descr""min_score_descr""min_score_descr":

Die minimale Klassifikatorbewertung eines Punktes, damit er als potentieller Match betrachtet wird. Diese Bewertungsfunktion hat einen Wertebereich von 0.0 bis 1.0. Sinnvolle Werte liegen jedoch zwischen 0.0 und 0.1. Es ist zu beachten, dass 'min_score_descr'"min_score_descr""min_score_descr""min_score_descr""min_score_descr""min_score_descr" u.U. eine negative Auswirkung auf die Robustheit des Erkennungsprozesses hat. Zumindest dann, wenn wenige Merkmalspunkte auf dem Objekt gefunden werden können. Typische Werte sind [0.0 .. 0.1], Defaultwert ist 0.0.

'guided_matching'"guided_matching""guided_matching""guided_matching""guided_matching""guided_matching":

Erhöht die Genauigkeit der Objekterkennung. Das 'guided matching'"guided matching""guided matching""guided matching""guided matching""guided matching" kann allerdings in manchen Fällen auch die Rechenzeit um bis zu 10% erhöhen. Mögliche Werte sind ['on'"on""on""on""on""on", 'off'"off""off""off""off""off"], Defaultwert ist 'on'"on""on""on""on""on".

Der letzte Schritt ist die Schätzung der Homographie, die die Punktkorrespondenzen beschreibt. Die resultierende Homographie ist eine 2D Projektion, die eine Transformation von Modellpunkten zu Punkten in ImageImageImageImageImageimage beschreibt. Hierfür werden Natural 3D Markers (N3Ms) verwendet, um die Punktkorrespondenz zu bestimmen (siehe Literatur).

Zusätzlich zu der geschätzten Homographie HomMat2DHomMat2DHomMat2DHomMat2DHomMat2DhomMat2D liefert der Operator eine oder mehrere ScoreScoreScoreScoreScorescore Bewertungen für jede gefundene Objektinstanz, je nachdem, was der Benutzer in ScoreTypeScoreTypeScoreTypeScoreTypeScoreTypescoreType eingegeben hat. Derzeit sind die folgenden Werte für ScoreTypeScoreTypeScoreTypeScoreTypeScoreTypescoreType unterstützt:

'num_points'"num_points""num_points""num_points""num_points""num_points":

Anzahl der Punktkorrespondenzen je Instanz. Wurde eine Homographie mit weniger als 10 Korrespondenzen gefunden, so kann sie nicht als gut angenommen werden, da im Extremfall beliebige 4 Punkte eine mathematisch gültige Homographie beschreiben.

'inlier_ratio'"inlier_ratio""inlier_ratio""inlier_ratio""inlier_ratio""inlier_ratio":

Anteil von Punktkorrespondenzen an der Anzahl der Modellpunkte. Obwohl diese Bewertung einen Wertebereich von 0.0 bis 1.0 hat, ist es eher untypisch, dass sie einen Wert von 1.0 erreicht. Instanzen mit einem Bewertungwert kleiner als 0.1 sollten nicht berücksichtigt werden.

Falls im Suchbild mehrere Objektinstanzen gefunden werden, werden die resultierenden ScoreScoreScoreScoreScorescore Bewertungen für die einzelnen Instanzen aneinandergehängt, sodass |ScoreScoreScoreScoreScorescore| = NumObjects * |ScoreTypeScoreTypeScoreTypeScoreTypeScoreTypescoreType|.

Die gefundenen Punktkorrespondenzen einzelner Instanzen können mit Hilfe des Operators get_descriptor_model_pointsget_descriptor_model_pointsGetDescriptorModelPointsget_descriptor_model_pointsGetDescriptorModelPointsGetDescriptorModelPoints abgefragt werden.

Achtung

Der Definitionsbereich des Suchbildes sollte das gesamte gesuchte Objekt enthalten, da die Merkmalspunkte nur innerhalb des Definitionsbereiches des Suchbildes extrahiert werden. Das bedeutet, dass der resultierende ScoreScoreScoreScoreScorescore entsprechend kleiner wird, wenn der Definitionsbereich nicht das gesamte gesuchte Objekt enthält. Des Weiteren ist zu beachten, dass Matches auch dann zurück gegeben werden, wenn der Referenzpunkt des Modells außerhalb des Definitionsbereiches des Suchbildes liegt. Die beiden hier geschilderten Auswirkungen des Definitionsbereiches des Suchbildes unterscheiden sich grundsätzlich von der Auswirkung des Definitionsbereiches beim formbasierten Matching, wo der Definitionsbereich den Suchraum für den Referenzpunkt des Modells darstellt.

Parallelisierung

Parameter

ImageImageImageImageImageimage (input_object)  singlechannelimage objectHImageHImageHImageHImageXHobject (byte / uint2)

Das Suchbild.

ModelIDModelIDModelIDModelIDModelIDmodelID (input_control)  descriptor_model HDescriptorModel, HTupleHTupleHDescriptorModel, HTupleHDescriptorModelX, VARIANTHtuple (integer) (IntPtr) (Hlong) (Hlong) (Hlong) (Hlong)

Der Handle des Deskriptormodells.

DetectorParamNameDetectorParamNameDetectorParamNameDetectorParamNameDetectorParamNamedetectorParamName (input_control)  attribute.name-array HTupleHTupleHTupleVARIANTHtuple (string) (string) (HString) (char*) (BSTR) (char*)

Namen der Parameter des Detektors.

Defaultwert: []

Werteliste: 'alpha'"alpha""alpha""alpha""alpha""alpha", 'check_neighbor'"check_neighbor""check_neighbor""check_neighbor""check_neighbor""check_neighbor", 'mask_size_grd'"mask_size_grd""mask_size_grd""mask_size_grd""mask_size_grd""mask_size_grd", 'mask_size_smooth'"mask_size_smooth""mask_size_smooth""mask_size_smooth""mask_size_smooth""mask_size_smooth", 'min_check_neighbor_diff'"min_check_neighbor_diff""min_check_neighbor_diff""min_check_neighbor_diff""min_check_neighbor_diff""min_check_neighbor_diff", 'min_score'"min_score""min_score""min_score""min_score""min_score", 'radius'"radius""radius""radius""radius""radius", 'sigma_grad'"sigma_grad""sigma_grad""sigma_grad""sigma_grad""sigma_grad", 'sigma_smooth'"sigma_smooth""sigma_smooth""sigma_smooth""sigma_smooth""sigma_smooth", 'subpix'"subpix""subpix""subpix""subpix""subpix", 'threshold'"threshold""threshold""threshold""threshold""threshold"

DetectorParamValueDetectorParamValueDetectorParamValueDetectorParamValueDetectorParamValuedetectorParamValue (input_control)  attribute.value-array HTupleHTupleHTupleVARIANTHtuple (integer / real / string) (int / long / double / string) (Hlong / double / HString) (Hlong / double / char*) (Hlong / double / BSTR) (Hlong / double / char*)

Werte der Detektor-Parameter.

Defaultwert: []

Wertevorschläge: 0.08, 1, 1.2, 3, 15, 30, 1000, 'on'"on""on""on""on""on", 'off'"off""off""off""off""off"

DescriptorParamNameDescriptorParamNameDescriptorParamNameDescriptorParamNameDescriptorParamNamedescriptorParamName (input_control)  attribute.name-array HTupleHTupleHTupleVARIANTHtuple (string) (string) (HString) (char*) (BSTR) (char*)

Namen der Deskriptor-Parameter.

Defaultwert: []

Werteliste: 'guided_matching'"guided_matching""guided_matching""guided_matching""guided_matching""guided_matching", 'min_score_descr'"min_score_descr""min_score_descr""min_score_descr""min_score_descr""min_score_descr"

DescriptorParamValueDescriptorParamValueDescriptorParamValueDescriptorParamValueDescriptorParamValuedescriptorParamValue (input_control)  attribute.value-array HTupleHTupleHTupleVARIANTHtuple (real / integer / string) (double / int / long / string) (double / Hlong / HString) (double / Hlong / char*) (double / Hlong / BSTR) (double / Hlong / char*)

Werte der Deskriptor-Parameter.

Defaultwert: []

Wertevorschläge: 0.0, 0.001, 0.005, 0.01, 'on'"on""on""on""on""on", 'off'"off""off""off""off""off"

MinScoreMinScoreMinScoreMinScoreMinScoreminScore (input_control)  real(-array) HTupleHTupleHTupleVARIANTHtuple (real) (double) (double) (double) (double) (double)

Minimale Bewertung der zu findenden Instanzen der Modelle.

Defaultwert: 0.2

Wertevorschläge: 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1.0

Typischer Wertebereich: 0 ≤ MinScore MinScore MinScore MinScore MinScore minScore ≤ 1

NumMatchesNumMatchesNumMatchesNumMatchesNumMatchesnumMatches (input_control)  integer HTupleHTupleHTupleVARIANTHtuple (integer) (int / long) (Hlong) (Hlong) (Hlong) (Hlong)

Maximale Anzahl von gefundenen Instanzen.

Defaultwert: 1

Wertevorschläge: 1, 2, 3, 4

Restriktion: NumMatches >= 1

ScoreTypeScoreTypeScoreTypeScoreTypeScoreTypescoreType (input_control)  string(-array) HTupleHTupleHTupleVARIANTHtuple (string) (string) (HString) (char*) (BSTR) (char*)

Bewertungtyp berechnet in ScoreScoreScoreScoreScorescore.

Defaultwert: 'num_points' "num_points" "num_points" "num_points" "num_points" "num_points"

Werteliste: 'inlier_ratio'"inlier_ratio""inlier_ratio""inlier_ratio""inlier_ratio""inlier_ratio", 'num_points'"num_points""num_points""num_points""num_points""num_points"

HomMat2DHomMat2DHomMat2DHomMat2DHomMat2DhomMat2D (output_control)  hom_mat2d(-array) HHomMat2D, HTupleHTupleHTupleHHomMat2DX, VARIANTHtuple (real) (double) (double) (double) (double) (double)

Homographie zwischen Modell und gefundenem Objekt.

ScoreScoreScoreScoreScorescore (output_control)  number(-array) HTupleHTupleHTupleVARIANTHtuple (real / integer) (double / int / long) (double / Hlong) (double / Hlong) (double / Hlong) (double / Hlong)

Bewertung der gefundenen Instanzen gemäß ausgewählten ScoreType.

Beispiel (HDevelop)

create_uncalib_descriptor_model (ImageReduced,'harris',[],[], \
                                 [],[],42,ModelID)

get_descriptor_model_params (ModelID,DetectorType, \
                             DetectorParamName,DetectorParamValue, \
                             DescriptorParamName,DescriptorParamValue)
write_descriptor_model (ModelID,'simple_example.dsm')
clear_descriptor_model (ModelID)

read_descriptor_model ('simple_example.dsm',ModelID)
find_uncalib_descriptor_model (SearchImage,ModelID,[],[],[],[],0.2,1, \
                               ['num_points','inlier_ratio'],HomMat2D,Score)
clear_descriptor_model (ModelID)

Vorgänger

create_uncalib_descriptor_modelcreate_uncalib_descriptor_modelCreateUncalibDescriptorModelcreate_uncalib_descriptor_modelCreateUncalibDescriptorModelCreateUncalibDescriptorModel, create_calib_descriptor_modelcreate_calib_descriptor_modelCreateCalibDescriptorModelcreate_calib_descriptor_modelCreateCalibDescriptorModelCreateCalibDescriptorModel, read_descriptor_modelread_descriptor_modelReadDescriptorModelread_descriptor_modelReadDescriptorModelReadDescriptorModel

Siehe auch

create_uncalib_descriptor_modelcreate_uncalib_descriptor_modelCreateUncalibDescriptorModelcreate_uncalib_descriptor_modelCreateUncalibDescriptorModelCreateUncalibDescriptorModel, create_calib_descriptor_modelcreate_calib_descriptor_modelCreateCalibDescriptorModelcreate_calib_descriptor_modelCreateCalibDescriptorModelCreateCalibDescriptorModel, find_calib_descriptor_modelfind_calib_descriptor_modelFindCalibDescriptorModelfind_calib_descriptor_modelFindCalibDescriptorModelFindCalibDescriptorModel, get_descriptor_model_pointsget_descriptor_model_pointsGetDescriptorModelPointsget_descriptor_model_pointsGetDescriptorModelPointsGetDescriptorModelPoints

Literatur

S. Hinterstoisser, S. Benhimane, and N. Navab: „N3M: Natural 3D Markers for Real-Time Object Detection and Pose Estimation.„ IEEE 11th International Conference on Computer Vision, 2007. pp. 1-7, ICCV 2007.

Modul

Matching


KlassenKlassenKlassenKlassen | | | | Operatoren