MythTV  master
EdgeDetector.h
Go to the documentation of this file.
1 /*
2  * EdgeDetector
3  *
4  * Declare routines that are likely to be useful for any edge-detection
5  * implementation.
6  */
7 
8 #ifndef EDGEDETECTOR_H
9 #define EDGEDETECTOR_H
10 
11 using AVFrame = struct AVFrame;
12 
13 namespace edgeDetector {
14 
15 /* Pass all zeroes to not exclude any areas from examination. */
16 
17 unsigned int *sgm_init_exclude(unsigned int *sgm,
18  const AVFrame *src, int srcheight,
19  int excluderow, int excludecol, int excludewidth, int excludeheight);
20 
21 int edge_mark_uniform_exclude(AVFrame *dst, int dstheight, int extramargin,
22  const unsigned int *sgm, unsigned int *sgmsorted, int percentile,
23  int excluderow, int excludecol, int excludewidth, int excludeheight);
24 
25 }; /* namespace */
26 
28 {
29 public:
30  virtual ~EdgeDetector(void) = default;
31 
32  /* Exclude an area from edge detection. */
33  virtual int setExcludeArea(int row, int col, int width, int height);
34 
35  /* Detect edges in "pgm" image. */
36  virtual const AVFrame *detectEdges(const AVFrame *pgm, int pgmheight,
37  int percentile) = 0;
38 };
39 
40 #endif /* !EDGEDETECTOR_H */
41 
42 /* vim: set expandtab tabstop=4 shiftwidth=4: */
edgeDetector::edge_mark_uniform_exclude
int edge_mark_uniform_exclude(AVFrame *dst, int dstheight, int extramargin, const unsigned int *sgm, unsigned int *sgmsorted, int percentile, int excluderow, int excludecol, int excludewidth, int excludeheight)
Definition: EdgeDetector.cpp:186
EdgeDetector::detectEdges
virtual const AVFrame * detectEdges(const AVFrame *pgm, int pgmheight, int percentile)=0
edgeDetector::sgm_init_exclude
unsigned int * sgm_init_exclude(unsigned int *sgm, const AVFrame *src, int srcheight, int excluderow, int excludecol, int excludewidth, int excludeheight)
Definition: EdgeDetector.cpp:25
EdgeDetector::setExcludeArea
virtual int setExcludeArea(int row, int col, int width, int height)
Definition: EdgeDetector.cpp:199
AVFrame
struct AVFrame AVFrame
Definition: BorderDetector.h:15
edgeDetector
Definition: EdgeDetector.cpp:20
EdgeDetector
Definition: EdgeDetector.h:27
EdgeDetector::~EdgeDetector
virtual ~EdgeDetector(void)=default