2 #ifndef vil_suppress_non_plateau_h_ 3 #define vil_suppress_non_plateau_h_ 14 # include <vcl_msvc_warnings.h> 31 T threshold=0, T non_max_value=0)
33 unsigned ni=src_im.
ni(),nj=src_im.
nj();
38 std::ptrdiff_t istep = src_im.
istep(),jstep=src_im.
jstep();
39 std::ptrdiff_t distep = dest_im.
istep(),djstep=dest_im.
jstep();
42 for (
unsigned j=1;j<nj-1;++j,row+=jstep,drow+=djstep)
46 for (
unsigned i=1;i<ni-1;++i,pixel+=istep,dpixel+=distep)
49 *dpixel = non_max_value;
62 #endif // vil_suppress_non_plateau_h_ Various functions for manipulating image views.
Concrete view of image data of type T held in memory.
void set_size(unsigned ni, unsigned nj) override
resize current planes to ni x nj.
Find plateau points in image.
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.
void vil_fill_col(vil_image_view< T > &view, unsigned i, T value)
Fill column i in view with given value.
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.
unsigned nplanes() const
Number of planes.
void vil_suppress_non_plateau_3x3(const vil_image_view< T > &src_im, vil_image_view< T > &dest_im, T threshold=0, T non_max_value=0)
Suppress all non-plateau pixels in the image.
std::ptrdiff_t istep() const
Add this to your pixel pointer to get next i pixel.
void vil_fill_row(vil_image_view< T > &view, unsigned j, T value)
Fill row j in view with given value.