1 #ifndef vil_binary_erode_h_ 2 #define vil_binary_erode_h_ 15 for (
unsigned i=0;i<n;++i)
if (!im[offset[i]])
return false;
22 template <
class imAccessorT>
26 unsigned n = element.
p_i().size();
27 for (
unsigned int k=0;k<n;++k)
29 unsigned int i = i0+element.
p_i()[k];
30 unsigned int j = j0+element.
p_j()[k];
31 if (!image(i,j,plane))
53 #endif // vil_binary_erode_h_ Structuring element for morphology represented as a list of non-zero pixels.
const std::vector< int > & p_j() const
j position of elements (i,j).
Structuring element for morphology represented as a list of non-zero pixels.
Border handling for images.
Border class. Makes pixel access outside image range transparent and configurable.
bool vil_binary_erode(const imAccessorT &image, unsigned plane, const vil_structuring_element &element, int i0, int j0)
Return false if any image pixel under element centred at (i0,j0) is zero.
A base class reference-counting view of some image data.
const std::vector< int > & p_i() const
i position of elements (i,j).