local_maxlocal_maxLocalMaxLocalMaxlocal_max (Operator)
Name
local_maxlocal_maxLocalMaxLocalMaxlocal_max — Detektieren aller Punkte, deren Grauwerte die lokale Maxima sind.
Signatur
def local_max(image: HObject) -> HObject
Beschreibung
local_maxlocal_maxLocalMaxLocalMaxLocalMaxlocal_max wählt all die Punkte aus ImageImageImageImageimageimage aus, deren
Grauwert größer ist als die Grauwerte aller benachbarten Pixel, und gibt
sie in LocalMaximaLocalMaximaLocalMaximaLocalMaximalocalMaximalocal_maxima zurück. Die zu berücksichtigende Umgebung
kann mit set_system(::'neighborhood',<4/8>)set_system("neighborhood",<4/8>)SetSystem("neighborhood",<4/8>)SetSystem("neighborhood",<4/8>)SetSystem("neighborhood",<4/8>)set_system("neighborhood",<4/8>) eingestellt werden.
Ausführungsinformationen
- Multithreading-Typ: reentrant (läuft parallel zu nicht-exklusiven Operatoren).
- Multithreading-Bereich: global (kann von jedem Thread aufgerufen werden).
- Automatisch parallelisiert auf Tupelebene.
Parameter
ImageImageImageImageimageimage (input_object) singlechannelimage(-array) → objectHImageHObjectHImageHobject (byte / direction / cyclic / int1 / int2 / uint2 / int4 / int8 / real)
Eingabebild.
LocalMaximaLocalMaximaLocalMaximaLocalMaximalocalMaximalocal_maxima (output_object) region(-array) → objectHRegionHObjectHRegionHobject *
Gefundene lokale Maxima als Region.
Parameteranzahl: LocalMaxima == Image
Beispiel (C++)
#include "HIOStream.h"
#if !defined(USE_IOSTREAM_H)
using namespace std;
#endif
#include "HalconCpp.h"
using namespace Halcon;
int main (int argc, char *argv[])
{
using namespace Halcon;
if (argc != 2)
{
cout << "Usage : " << argv[0] << " <name of image>" << endl;
return (-1);
}
HImage image (argv[1]);
HWindow win;
image.Display (win);
HImage cres = image.CornerResponse (5, 0.04);
HRegionArray maxi = cres.LocalMax ();
win.SetColored (12);
maxi.Display (win);
win.Click ();
return (0);
}
Beispiel (C)
read_image(&Image,"fabrik");
corner_responce(Image,&CornerResp,5,0.04);
local_max(CornerResp,&Maxima);
set_colored(WindowHandle,12);
disp_region(Maxima,WindowHandle);
T_get_region_points(Maxima,&Row,&Col);
Beispiel (C++)
#include "HIOStream.h"
#if !defined(USE_IOSTREAM_H)
using namespace std;
#endif
#include "HalconCpp.h"
using namespace Halcon;
int main (int argc, char *argv[])
{
using namespace Halcon;
if (argc != 2)
{
cout << "Usage : " << argv[0] << " <name of image>" << endl;
return (-1);
}
HImage image (argv[1]);
HWindow win;
image.Display (win);
HImage cres = image.CornerResponse (5, 0.04);
HRegionArray maxi = cres.LocalMax ();
win.SetColored (12);
maxi.Display (win);
win.Click ();
return (0);
}
Beispiel (C++)
#include "HIOStream.h"
#if !defined(USE_IOSTREAM_H)
using namespace std;
#endif
#include "HalconCpp.h"
using namespace Halcon;
int main (int argc, char *argv[])
{
using namespace Halcon;
if (argc != 2)
{
cout << "Usage : " << argv[0] << " <name of image>" << endl;
return (-1);
}
HImage image (argv[1]);
HWindow win;
image.Display (win);
HImage cres = image.CornerResponse (5, 0.04);
HRegionArray maxi = cres.LocalMax ();
win.SetColored (12);
maxi.Display (win);
win.Click ();
return (0);
}
Beispiel (C++)
#include "HIOStream.h"
#if !defined(USE_IOSTREAM_H)
using namespace std;
#endif
#include "HalconCpp.h"
using namespace Halcon;
int main (int argc, char *argv[])
{
using namespace Halcon;
if (argc != 2)
{
cout << "Usage : " << argv[0] << " <name of image>" << endl;
return (-1);
}
HImage image (argv[1]);
HWindow win;
image.Display (win);
HImage cres = image.CornerResponse (5, 0.04);
HRegionArray maxi = cres.LocalMax ();
win.SetColored (12);
maxi.Display (win);
win.Click ();
return (0);
}
Vorgänger
binomial_filterbinomial_filterBinomialFilterBinomialFilterBinomialFilterbinomial_filter,
gauss_filtergauss_filterGaussFilterGaussFilterGaussFiltergauss_filter,
smooth_imagesmooth_imageSmoothImageSmoothImageSmoothImagesmooth_image
Nachfolger
get_region_pointsget_region_pointsGetRegionPointsGetRegionPointsGetRegionPointsget_region_points,
connectionconnectionConnectionConnectionConnectionconnection
Alternativen
nonmax_suppression_ampnonmax_suppression_ampNonmaxSuppressionAmpNonmaxSuppressionAmpNonmaxSuppressionAmpnonmax_suppression_amp,
plateausplateausPlateausPlateausPlateausplateaus,
plateaus_centerplateaus_centerPlateausCenterPlateausCenterPlateausCenterplateaus_center
Siehe auch
monotonymonotonyMonotonyMonotonyMonotonymonotony,
topographic_sketchtopographic_sketchTopographicSketchTopographicSketchTopographicSketchtopographic_sketch,
corner_responsecorner_responseCornerResponseCornerResponseCornerResponsecorner_response,
texture_lawstexture_lawsTextureLawsTextureLawsTextureLawstexture_laws
Modul
Foundation