shape_histo_allshape_histo_allShapeHistoAllShapeHistoAllShapeHistoAllshape_histo_all 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").
Achtung
shape_histo_allshape_histo_allShapeHistoAllShapeHistoAllShapeHistoAllshape_histo_all erwartet als Eingabe eine Region und genau
ein Grauwertbild. Wegen der Mächtigkeit dieser Prozedur ist die
Laufzeit von shape_histo_allshape_histo_allShapeHistoAllShapeHistoAllShapeHistoAllshape_histo_all relativ groß!
Der Operator shape_histo_allshape_histo_allShapeHistoAllShapeHistoAllShapeHistoAllshape_histo_all berücksichtigt nur die mittels
RegionRegionRegionRegionregionregion übergebene Region und ignoriert jede Domäne, die zuvor
für das Eingabebild ImageImageImageImageimageimage festgelegt wurde.
Ausführungsinformationen
Multithreading-Typ: reentrant (läuft parallel zu nicht-exklusiven Operatoren).
Multithreading-Bereich: global (kann von jedem Thread aufgerufen werden).
Wird ohne Parallelisierung verarbeitet.
Parameter
RegionRegionRegionRegionregionregion (input_object) region →objectHRegionHObjectHRegionHobject
* 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);
}
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
Komplexität
Sei F die Fläche der Eingaberegion und N die mittlere Anzahl
der Zusammenhangskomponenten, dann beträgt die Laufzeitkomplexität
.