#include <stat.hh>
Static Public Member Functions | |
V | max (const I &input, const typename mlc::exact< I >::ret::point_type &p, const E &se) |
Maximum of a structuring element. | |
V | min (const I &input, const typename mlc::exact< I >::ret::point_type &p, const E &se) |
Minimum of a structuring element. |
We need to use this inner definition in order to specialize max and min on binary images.
I | Image exact type. |
E | Structuring element type. |
V | Associated value type. |
Definition at line 51 of file morpho/stat.hh.
|
Maximum of a structuring element. Look for the maximum in the structuring element se disposed on the image input, at the point p.
Definition at line 64 of file morpho/stat.hh.
00065 { 00066 mlc::eq<I::dim, E::dim>::ensure(); 00067 00068 oln_iter_type(E) dp(se); 00069 dp = begin; 00070 V val = input[p + dp]; 00071 for_all_remaining (dp) 00072 if (val < input[p + dp]) 00073 val = input[p + dp]; 00074 return val; 00075 } |
|
Minimum of a structuring element. Look for the minimum in the structuring element se disposed on the image input, at the point p.
Definition at line 88 of file morpho/stat.hh.
00089 { 00090 mlc::eq<I::dim, E::dim>::ensure(); 00091 oln_iter_type(E) dp(se); 00092 dp = begin; 00093 V val = input[p + dp]; 00094 for_all_remaining (dp) 00095 if (val > input[p + dp]) 00096 val = input[p + dp]; 00097 return val; 00098 } |