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
11using AVFrame = struct AVFrame;
12
13namespace edgeDetector {
14
15/* Pass all zeroes to not exclude any areas from examination. */
16
17unsigned int *sgm_init_exclude(unsigned int *sgm,
18 const AVFrame *src, int srcheight,
19 int excluderow, int excludecol, int excludewidth, int excludeheight);
20
21int 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{
29public:
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: */
AVFrame AVFrame
virtual ~EdgeDetector(void)=default
virtual int setExcludeArea(int row, int col, int width, int height)
virtual const AVFrame * detectEdges(const AVFrame *pgm, int pgmheight, int percentile)=0
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)
unsigned int * sgm_init_exclude(unsigned int *sgm, const AVFrame *src, int srcheight, int excluderow, int excludecol, int excludewidth, int excludeheight)