1 #ifndef vil_binary_dilate_h_ 2 #define vil_binary_dilate_h_ 15 for (
unsigned i=0;i<n;++i)
if (im[offset[i]])
return true;
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];
53 #endif // vil_binary_dilate_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_dilate(const imAccessorT &image, unsigned plane, const vil_structuring_element &element, int i0, int j0)
Return true if any image pixel under element centred at (i0,j0) is non-zero.
A base class reference-counting view of some image data.
const std::vector< int > & p_i() const
i position of elements (i,j).