KlassenKlassenKlassenKlassen | | | | Operatoren

shape_histo_allT_shape_histo_allShapeHistoAllshape_histo_allShapeHistoAllShapeHistoAll (Operator)

Name

shape_histo_allT_shape_histo_allShapeHistoAllshape_histo_allShapeHistoAllShapeHistoAll — Ausprägung von Merkmalen entlang aller Schwellenwerte.

Signatur

shape_histo_all(Region, Image : : Feature : AbsoluteHisto, RelativeHisto)

Herror T_shape_histo_all(const Hobject Region, const Hobject Image, const Htuple Feature, Htuple* AbsoluteHisto, Htuple* RelativeHisto)

Herror shape_histo_all(Hobject Region, Hobject Image, const HTuple& Feature, HTuple* AbsoluteHisto, HTuple* RelativeHisto)

HTuple HRegion::ShapeHistoAll(const HImage& Image, const HTuple& Feature, HTuple* RelativeHisto) const

void ShapeHistoAll(const HObject& Region, const HObject& Image, const HTuple& Feature, HTuple* AbsoluteHisto, HTuple* RelativeHisto)

HTuple HRegion::ShapeHistoAll(const HImage& Image, const HString& Feature, HTuple* RelativeHisto) const

HTuple HRegion::ShapeHistoAll(const HImage& Image, const char* Feature, HTuple* RelativeHisto) const

void HOperatorSetX.ShapeHistoAll(
[in] IHUntypedObjectX* Region, [in] IHUntypedObjectX* Image, [in] VARIANT Feature, [out] VARIANT* AbsoluteHisto, [out] VARIANT* RelativeHisto)

VARIANT HRegionX.ShapeHistoAll(
[in] IHImageX* Image, [in] BSTR Feature, [out] VARIANT* RelativeHisto)

static void HOperatorSet.ShapeHistoAll(HObject region, HObject image, HTuple feature, out HTuple absoluteHisto, out HTuple relativeHisto)

HTuple HRegion.ShapeHistoAll(HImage image, string feature, out HTuple relativeHisto)

Beschreibung

shape_histo_allshape_histo_allShapeHistoAllshape_histo_allShapeHistoAllShapeHistoAll führt 255 Schwellenwertoperationen innerhalb von RegionRegionRegionRegionRegionregion mit den Grauwerten von ImageImageImageImageImageimage durch. Der Eintrag i im Histogramm entspricht dann der Anzahl der Zusammenhangskomponenten/Löcher dieses mit der Schwelle i segmentierten Bildes (FeatureFeatureFeatureFeatureFeaturefeature = 'connected_components'"connected_components""connected_components""connected_components""connected_components""connected_components", 'holes'"holes""holes""holes""holes""holes") bzw. dem Mittelwert der Merkmalswerte der so segmentierten Regionen (FeatureFeatureFeatureFeatureFeaturefeature = 'convexity'"convexity""convexity""convexity""convexity""convexity", 'compactness'"compactness""compactness""compactness""compactness""compactness", 'ansisometry'"ansisometry""ansisometry""ansisometry""ansisometry""ansisometry").

Mit set_paint(::WindowHandle,'component_histogram':)set_paint(WindowHandle,"component_histogram")SetPaint(WindowHandle,"component_histogram")set_paint(WindowHandle,"component_histogram")SetPaint(WindowHandle,"component_histogram")SetPaint(WindowHandle,"component_histogram") und disp_imagedisp_imageDispImagedisp_imageDispImageDispImage kann das Histogramm auch direkt als Graphik ausgegeben werden.

Achtung

shape_histo_allshape_histo_allShapeHistoAllshape_histo_allShapeHistoAllShapeHistoAll erwartet als Eingabe eine Region und genau ein Grauwertbild. Wegen der Mächtigkeit dieser Prozedur ist die Laufzeit von shape_histo_allshape_histo_allShapeHistoAllshape_histo_allShapeHistoAllShapeHistoAll relativ groß!

Der Operator shape_histo_allshape_histo_allShapeHistoAllshape_histo_allShapeHistoAllShapeHistoAll berücksichtigt nur die mittels RegionRegionRegionRegionRegionregion übergebene Region und ignoriert jede Domäne, die zuvor für das Eingabebild ImageImageImageImageImageimage festgelegt wurde.

Parallelisierung

Parameter

RegionRegionRegionRegionRegionregion (input_object)  region objectHRegionHRegionHRegionHRegionXHobject

Region, in der die Merkmale betrachtet werden.

ImageImageImageImageImageimage (input_object)  singlechannelimage objectHImageHImageHImageHImageXHobject (byte)

Grauwertdaten.

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

Merkmal, das untersucht werden soll.

Defaultwert: 'connected_components' "connected_components" "connected_components" "connected_components" "connected_components" "connected_components"

Werteliste: 'anisometry'"anisometry""anisometry""anisometry""anisometry""anisometry", 'compactness'"compactness""compactness""compactness""compactness""compactness", 'connected_components'"connected_components""connected_components""connected_components""connected_components""connected_components", 'convexity'"convexity""convexity""convexity""convexity""convexity", 'holes'"holes""holes""holes""holes""holes"

AbsoluteHistoAbsoluteHistoAbsoluteHistoAbsoluteHistoAbsoluteHistoabsoluteHisto (output_control)  histogram-array HTupleHTupleHTupleVARIANTHtuple (real / integer) (double / int / long) (double / Hlong) (double / Hlong) (double / Hlong) (double / Hlong)

Absolute Verteilung des Merkmals.

RelativeHistoRelativeHistoRelativeHistoRelativeHistoRelativeHistorelativeHisto (output_control)  histogram-array HTupleHTupleHTupleVARIANTHtuple (real) (double) (double) (double) (double) (double)

Relative Verteilung des Merkmals.

Beispiel (HDevelop)

* Simulation of shape_histo_all with feature 'connected_components':
* my_shape_histo_all(Region,Image,AbsHisto,RelHisto):
reduce_domain(Region,Image,RegionGray)
for i := 0 to 255 by 1
    threshold(RegionGray,Seg,i,255)
    connect_and_holes (Seg, NumConnected, _)
    AbsHisto[i] := NumConnected
endfor
Sum := 0
for i := 0 to 255 by 1
    Sum := Sum+AbsHisto[i]
endfor
for i := 0 to 255 by 1
    RelHisto[i] := AbsHisto[i]/Sum
endfor
  

Beispiel (C)

/* Simulation of shape_histo_all with feature 'connected_components': */
my_shape_histo_all(Hobject Region,Hobject Image,
                 Hlong AbsHisto[], double RelHisto[])
{
  Hlong     i,sum;
  Hobject  RegionGray,Seg;

  reduce_domain(Region,Image,&RegionGray);
  for (i=0; i<256; i++) {
    threshold(RegionGray,&Seg,(double)i,255.0);
    connect_and_holes(Seg,&AbsHisto[i],NULL);
    clear_obj(Seg);
  }
  clear_obj(RegionGray); sum = 0;
  for (i=0; i<256; i++)
    sum += AbsHisto[i];
  for (i=0; i<256; i++)
    RelHist[i] = (double)AbsHisto[i]/Sum;
}

Beispiel (HDevelop)

* Simulation of shape_histo_all with feature 'connected_components':
* my_shape_histo_all(Region,Image,AbsHisto,RelHisto):
reduce_domain(Region,Image,RegionGray)
for i := 0 to 255 by 1
    threshold(RegionGray,Seg,i,255)
    connect_and_holes (Seg, NumConnected, _)
    AbsHisto[i] := NumConnected
endfor
Sum := 0
for i := 0 to 255 by 1
    Sum := Sum+AbsHisto[i]
endfor
for i := 0 to 255 by 1
    RelHisto[i] := AbsHisto[i]/Sum
endfor
  

Beispiel (HDevelop)

* Simulation of shape_histo_all with feature 'connected_components':
* my_shape_histo_all(Region,Image,AbsHisto,RelHisto):
reduce_domain(Region,Image,RegionGray)
for i := 0 to 255 by 1
    threshold(RegionGray,Seg,i,255)
    connect_and_holes (Seg, NumConnected, _)
    AbsHisto[i] := NumConnected
endfor
Sum := 0
for i := 0 to 255 by 1
    Sum := Sum+AbsHisto[i]
endfor
for i := 0 to 255 by 1
    RelHisto[i] := AbsHisto[i]/Sum
endfor
  

Beispiel (HDevelop)

* Simulation of shape_histo_all with feature 'connected_components':
* my_shape_histo_all(Region,Image,AbsHisto,RelHisto):
reduce_domain(Region,Image,RegionGray)
for i := 0 to 255 by 1
    threshold(RegionGray,Seg,i,255)
    connect_and_holes (Seg, NumConnected, _)
    AbsHisto[i] := NumConnected
endfor
Sum := 0
for i := 0 to 255 by 1
    Sum := Sum+AbsHisto[i]
endfor
for i := 0 to 255 by 1
    RelHisto[i] := AbsHisto[i]/Sum
endfor
  

Beispiel (HDevelop)

* Simulation of shape_histo_all with feature 'connected_components':
* my_shape_histo_all(Region,Image,AbsHisto,RelHisto):
reduce_domain(Region,Image,RegionGray)
for i := 0 to 255 by 1
    threshold(RegionGray,Seg,i,255)
    connect_and_holes (Seg, NumConnected, _)
    AbsHisto[i] := NumConnected
endfor
Sum := 0
for i := 0 to 255 by 1
    Sum := Sum+AbsHisto[i]
endfor
for i := 0 to 255 by 1
    RelHisto[i] := AbsHisto[i]/Sum
endfor
  

Komplexität

Sei F die Fläche der Eingaberegion und N die mittlere Anzahl der Zusammenhangskomponenten, dann beträgt die Laufzeitkomplexität .

Ergebnis

shape_histo_allshape_histo_allShapeHistoAllshape_histo_allShapeHistoAllShapeHistoAll liefert den Wert 2 (H_MSG_TRUE), falls ein Bild mit definierten Grauwerten eingegeben wird. Das Verhalten bei leerer Eingabe (keine Bilder) wird mit set_system(::'no_object_result',<Result>:)set_system("no_object_result",<Result>)SetSystem("no_object_result",<Result>)set_system("no_object_result",<Result>)SetSystem("no_object_result",<Result>)SetSystem("no_object_result",<Result>), das bei leerer Region mit set_system(::'empty_region_result',<Result>:)set_system("empty_region_result",<Result>)SetSystem("empty_region_result",<Result>)set_system("empty_region_result",<Result>)SetSystem("empty_region_result",<Result>)SetSystem("empty_region_result",<Result>) festgelegt. Gegebenenfalls wird eine Fehlerbehandlung durchgeführt.

Nachfolger

histo_to_threshhisto_to_threshHistoToThreshhisto_to_threshHistoToThreshHistoToThresh, thresholdthresholdThresholdthresholdThresholdThreshold, gen_region_histogen_region_histoGenRegionHistogen_region_histoGenRegionHistoGenRegionHisto

Alternativen

shape_histo_pointshape_histo_pointShapeHistoPointshape_histo_pointShapeHistoPointShapeHistoPoint

Siehe auch

connectionconnectionConnectionconnectionConnectionConnection, convexityconvexityConvexityconvexityConvexityConvexity, compactnesscompactnessCompactnesscompactnessCompactnessCompactness, connect_and_holesconnect_and_holesConnectAndHolesconnect_and_holesConnectAndHolesConnectAndHoles, entropy_grayentropy_grayEntropyGrayentropy_grayEntropyGrayEntropyGray, gray_histogray_histoGrayHistogray_histoGrayHistoGrayHisto, set_paintset_paintSetPaintset_paintSetPaintSetPaint, count_objcount_objCountObjcount_objCountObjCountObj

Modul

Foundation


KlassenKlassenKlassenKlassen | | | | Operatoren