Skip to content

local_maxLocalMaxLocalMaxlocal_maxlocal_max🔗

説明🔗

local_maxLocalMaxLocalMaxlocal_maxlocal_max — 画像内の全ての局所最大値を検出する。

書式🔗

local_max( image Image, out region LocalMaxima )void LocalMax( const HObject& Image, HObject* LocalMaxima )static void HOperatorSet.LocalMax( HObject image, out HObject localMaxima )def local_max( image: HObject ) -> HObject

Herror local_max( const Hobject Image, Hobject* LocalMaxima )

Herror T_local_max( const Hobject Image, Hobject* LocalMaxima )

HRegion HImage::LocalMax( ) const

HRegion HImage.LocalMax( )

説明🔗

local_maxLocalMax はすべての隣接グレイ値よりも大きいグレイ値を持つ 点を Imageimageimage からすべて抽出し、結果を LocalMaximalocalMaximalocal_maxima に返します。使用される近傍は、 set_system(::'neighborhood',<4/8>) によって設定できます。

実行情報🔗

実行情報
  • マルチスレッドタイプ: リエントラント(非排他なオペレーターと並列に動作)

  • マルチスレッドスコープ: グローバル(他のスレッドから呼び出される可能性あり)

  • tupleレベルで自動的に並列演算処理を実施

パラメーター🔗

Imageimageimage (input_object) singlechannelimage(-array) → object (byte / direction / cyclic / int1 / int2 / uint2 / int4 / int8 / real)HObject (byte / direction / cyclic / int1 / int2 / uint2 / int4 / int8 / real)HImage (byte / direction / cyclic / int1 / int2 / uint2 / int4 / int8 / real)HObject (byte / direction / cyclic / int1 / int2 / uint2 / int4 / int8 / real)Hobject (byte / direction / cyclic / int1 / int2 / uint2 / int4 / int8 / real)

入力画像

LocalMaximalocalMaximalocal_maxima (output_object) region(-array) → objectHObjectHRegionHObjectHobject *

抽出された局所最大値領域

要素数: LocalMaxima == Image

例🔗

(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)\;
(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)\;
}

他のオペレーターとの組み合わせ🔗

組み合わせ

前処理の候補

binomial_filterBinomialFilter, gauss_filterGaussFilter, smooth_imageSmoothImage

後処理の候補

get_region_pointsGetRegionPoints, connectionConnection

他の選択候補

nonmax_suppression_ampNonmaxSuppressionAmp, plateausPlateaus, plateaus_centerPlateausCenter

関連項目

monotonyMonotony, topographic_sketchTopographicSketch, corner_responseCornerResponse, texture_lawsTextureLaws

モジュール🔗

Foundation