2 #ifndef vil_find_plateaus_h_ 3 #define vil_find_plateaus_h_ 12 # include <vcl_msvc_warnings.h> 21 return v >= im[i_step]
25 &&
v >= im[i_step+j_step]
26 &&
v >= im[i_step-j_step]
27 &&
v >= im[j_step-i_step]
28 &&
v >= im[-i_step-j_step];
38 std::vector<unsigned>& pj,
47 const unsigned ni1=image.
ni()-1,nj1=image.
nj()-1;
48 const std::ptrdiff_t istep = image.
istep(),jstep=image.
jstep();
50 for (
unsigned j=1;j<nj1;++j,row+=jstep)
53 for (
unsigned i=1;i<ni1;++i,pixel+=istep)
62 #endif // vil_find_plateaus_h_ Concrete view of image data of type T held in memory.
void vil_find_plateaus_3x3(std::vector< unsigned > &pi, std::vector< unsigned > &pj, const vil_image_view< T > &image, const T &min_thresh, bool clear_list=true)
Return (pi,pj) for all points in image greater than or equal to all 8 neighbours.
bool vil_is_plateau_3x3(const T *im, std::ptrdiff_t i_step, std::ptrdiff_t j_step)
True if pixel at *im is greater than or equal to all 8 neighbours.
std::ptrdiff_t jstep() const
Add this to your pixel pointer to get next j pixel.
unsigned ni() const
Width.
unsigned nj() const
Height.
A base class reference-counting view of some image data.
T * top_left_ptr()
Pointer to the first (top left in plane 0) pixel.
std::ptrdiff_t istep() const
Add this to your pixel pointer to get next i pixel.