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 typedef struct AVFrame 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: */
unsigned int * sgm_init_exclude(unsigned int *sgm, const AVFrame *src, int srcheight, int excluderow, int excludecol, int excludewidth, int excludeheight)
virtual int setExcludeArea(int row, int col, int width, int height)
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)
struct AVFrame AVFrame
virtual ~EdgeDetector(void)=default
virtual const AVFrame * detectEdges(const AVFrame *pgm, int pgmheight, int percentile)=0