KlassenKlassenKlassenKlassen | | | | Operatoren

binary_thresholdbinary_thresholdBinaryThresholdbinary_thresholdBinaryThresholdBinaryThreshold (Operator)

Name

binary_thresholdbinary_thresholdBinaryThresholdbinary_thresholdBinaryThresholdBinaryThreshold — Segmentieren mit verschiedenen globalen Schwellwertoperationen.

Signatur

binary_threshold(Image : Region : Method, LightDark : UsedThreshold)

Herror binary_threshold(const Hobject Image, Hobject* Region, const char* Method, const char* LightDark, Hlong* UsedThreshold)

Herror T_binary_threshold(const Hobject Image, Hobject* Region, const Htuple Method, const Htuple LightDark, Htuple* UsedThreshold)

Herror binary_threshold(Hobject Image, Hobject* Region, const HTuple& Method, const HTuple& LightDark, Hlong* UsedThreshold)

Herror binary_threshold(Hobject Image, Hobject* Region, const HTuple& Method, const HTuple& LightDark, HTuple* UsedThreshold)

HRegion HImage::BinaryThreshold(const HTuple& Method, const HTuple& LightDark, Hlong* UsedThreshold) const

HRegionArray HImageArray::BinaryThreshold(const HTuple& Method, const HTuple& LightDark, HTuple* UsedThreshold) const

void BinaryThreshold(const HObject& Image, HObject* Region, const HTuple& Method, const HTuple& LightDark, HTuple* UsedThreshold)

HRegion HImage::BinaryThreshold(const HString& Method, const HString& LightDark, HTuple* UsedThreshold) const

HRegion HImage::BinaryThreshold(const HString& Method, const HString& LightDark, Hlong* UsedThreshold) const

HRegion HImage::BinaryThreshold(const char* Method, const char* LightDark, Hlong* UsedThreshold) const

void HOperatorSetX.BinaryThreshold(
[in] IHUntypedObjectX* Image, [out] IHUntypedObjectX*Region, [in] VARIANT Method, [in] VARIANT LightDark, [out] VARIANT* UsedThreshold)

IHRegionX* HImageX.BinaryThreshold(
[in] BSTR Method, [in] BSTR LightDark, [out] VARIANT* UsedThreshold)

static void HOperatorSet.BinaryThreshold(HObject image, out HObject region, HTuple method, HTuple lightDark, out HTuple usedThreshold)

HRegion HImage.BinaryThreshold(string method, string lightDark, out HTuple usedThreshold)

HRegion HImage.BinaryThreshold(string method, string lightDark, out int usedThreshold)

Beschreibung

binary_thresholdbinary_thresholdBinaryThresholdbinary_thresholdBinaryThresholdBinaryThreshold segmentiert ein einkanaliges Bild ImageImageImageImageImageimage mit einem automatisch bestimmten globalen Schwellwert und gibt die segmentierte RegionRegionRegionRegionRegionregion zurück. Dies ist z.B. für die Segmentierung von Buchstaben und Zeichen auf gleichmäßig beleuchtetem Hintergrund geeignet. binary_thresholdbinary_thresholdBinaryThresholdbinary_thresholdBinaryThresholdBinaryThreshold gibt auch den verwendeten Schwellwert in UsedThresholdUsedThresholdUsedThresholdUsedThresholdUsedThresholdusedThreshold zurück.

Der verwendete Schwellwert wird mit der in MethodMethodMethodMethodMethodmethod angegebenen Methode bestimmt. Derzeit stehen die beiden folgenden Methoden zur Verfügung: 'max_separability'"max_separability""max_separability""max_separability""max_separability""max_separability" und 'smooth_histo'"smooth_histo""smooth_histo""smooth_histo""smooth_histo""smooth_histo". Beide Verfahren sollten nur auf Bilder angewendet werden, die ein bimodales Histogramm haben.

Die Methode 'smooth_histo'"smooth_histo""smooth_histo""smooth_histo""smooth_histo""smooth_histo" stellt die Funktionalität zur Verfügung, die vom Operator bin_thresholdbin_thresholdBinThresholdbin_thresholdBinThresholdBinThreshold bereitgestellt wurde. Die Methode 'max_separability'"max_separability""max_separability""max_separability""max_separability""max_separability" ist weniger empfindlich gegenüber dünnen und isolierten Spitzen im Histogramm. Außerdem tendiert diese Methode dazu, Werte für UsedThresholdUsedThresholdUsedThresholdUsedThresholdUsedThresholdusedThreshold zu bestimmen, die näher am Schwerpunkt des Histogramms liegen. In vielen Fällen ist die Methode 'max_separability'"max_separability""max_separability""max_separability""max_separability""max_separability" schneller als 'smooth_histo'"smooth_histo""smooth_histo""smooth_histo""smooth_histo""smooth_histo".

Maximierung der Trennbarkeit

Bei der Wahl von 'max_separability'"max_separability""max_separability""max_separability""max_separability""max_separability" als Verfahren in MethodMethodMethodMethodMethodmethod wird eine automatische Bestimmung eines globalen Schwellwertes nach dem Verfahren von Otsu (siehe Referenzen) durchgeführt.

Der Algorithmus berechnet zuerst das Histogramm des Bildes und verwendet dann statistische Momente um die optimale Schwelle zu bestimmen. Die Schwelle trennt die Pixel so in Vordergrund und Hintergrund, dass die Streuung zwischen den beiden Klassen maximiert wird.

Das Verfahren 'max_separability' ist nur für byte- und uint2-Bilder verfügbar.

Verfahren mit Glättung des Histograms

Bei der Wahl von 'smooth_histo'"smooth_histo""smooth_histo""smooth_histo""smooth_histo""smooth_histo" als Verfahren in MethodMethodMethodMethodMethodmethod wird der optimale Schwellwert (r,c) wie folgt bestimmt: Als erstes wird dabei das relative Histogramm über den Grauwerten ermittelt. Dann werden im Histogramm relevante Minima gesucht, die als Schwellen für die Schwellenwertsegmentation dienen. Um die Anzahl der Minima zu reduzieren, wird das Histogramm wie bei auto_thresholdauto_thresholdAutoThresholdauto_thresholdAutoThresholdAutoThreshold mit einer Gaußmaske geglättet. Die Maske wird dabei so lange vergrößert, bis nur noch ein Minimum vorhanden ist.

Parallelisierung

Parameter

ImageImageImageImageImageimage (input_object)  singlechannelimage(-array) objectHImageHImageHImageHImageXHobject (byte / uint2)

Eingabebild.

RegionRegionRegionRegionRegionregion (output_object)  region(-array) objectHRegionHRegionHRegionHRegionXHobject *

Segmentierte Ausgaberegion.

MethodMethodMethodMethodMethodmethod (input_control)  string HTupleHTupleHTupleVARIANTHtuple (string) (string) (HString) (char*) (BSTR) (char*)

Auswahl des Verfahrens.

Defaultwert: 'max_separability' "max_separability" "max_separability" "max_separability" "max_separability" "max_separability"

Werteliste: 'max_separability'"max_separability""max_separability""max_separability""max_separability""max_separability", 'smooth_histo'"smooth_histo""smooth_histo""smooth_histo""smooth_histo""smooth_histo"

LightDarkLightDarkLightDarkLightDarkLightDarklightDark (input_control)  string HTupleHTupleHTupleVARIANTHtuple (string) (string) (HString) (char*) (BSTR) (char*)

Segmentierung des Vordergunds oder des Hintergrunds.

Defaultwert: 'dark' "dark" "dark" "dark" "dark" "dark"

Werteliste: 'dark'"dark""dark""dark""dark""dark", 'light'"light""light""light""light""light"

UsedThresholdUsedThresholdUsedThresholdUsedThresholdUsedThresholdusedThreshold (output_control)  number(-array) HTupleHTupleHTupleVARIANTHtuple (integer / string) (int / long / string) (Hlong / HString) (Hlong / char*) (Hlong / BSTR) (Hlong / char*)

Angewandte Schwelle.

Nachfolger

connectionconnectionConnectionconnectionConnectionConnection, select_shapeselect_shapeSelectShapeselect_shapeSelectShapeSelectShape, select_grayselect_graySelectGrayselect_graySelectGraySelectGray

Alternativen

auto_thresholdauto_thresholdAutoThresholdauto_thresholdAutoThresholdAutoThreshold, char_thresholdchar_thresholdCharThresholdchar_thresholdCharThresholdCharThreshold, local_thresholdlocal_thresholdLocalThresholdlocal_thresholdLocalThresholdLocalThreshold

Siehe auch

gray_histogray_histoGrayHistogray_histoGrayHistoGrayHisto, thresholdthresholdThresholdthresholdThresholdThreshold

Literatur

N. Otsu, „A threshold selection method from gray level histograms", IEEE Trans. Syst. Man. Cybern., Vol. SMC-9, 62-66 (1979)

Modul

Foundation


KlassenKlassenKlassenKlassen | | | | Operatoren