summaryrefslogtreecommitdiff
path: root/command/video.h
diff options
context:
space:
mode:
authorJochen Dolze <vdr@dolze.de>2010-10-03 23:30:02 +0200
committerJochen Dolze <vdr@dolze.de>2010-10-03 23:30:02 +0200
commit711def8f20707e2816c957d5d4edb8952b0876e6 (patch)
tree6b20a3570be535aabaae870d0104b0b165731429 /command/video.h
parent190b1e31a688117783b09a6edbbb15257655b9c2 (diff)
downloadvdr-plugin-markad-711def8f20707e2816c957d5d4edb8952b0876e6.tar.gz
vdr-plugin-markad-711def8f20707e2816c957d5d4edb8952b0876e6.tar.bz2
Added better detection for transparent logos, new logo filename scheme!
Diffstat (limited to 'command/video.h')
-rw-r--r--command/video.h31
1 files changed, 18 insertions, 13 deletions
diff --git a/command/video.h b/command/video.h
index 22bcec7..8be247b 100644
--- a/command/video.h
+++ b/command/video.h
@@ -83,18 +83,21 @@ private:
struct areaT
{
- uchar source[MAXPIXEL]; // original grayscale picture
- uchar sobel[MAXPIXEL]; // monochrome picture with edges (after sobel)
- uchar mask[MAXPIXEL]; // monochrome mask of logo
- uchar result[MAXPIXEL]; // result of sobel + mask
- int rpixel; // black pixel in result
- int mpixel; // black pixel in mask
- int status; // status = LOGO on, off, uninitialized
- int framenumber; // start/stop frame
- int counter; // how many logo on, offs detected?
- int corner; // which corner
+#ifdef VDRDEBUG
+ uchar source[4][MAXPIXEL]; // original picture
+#endif
+ uchar sobel[4][MAXPIXEL]; // monochrome picture with edges (after sobel)
+ uchar mask[4][MAXPIXEL]; // monochrome mask of logo
+ uchar result[4][MAXPIXEL]; // result of sobel + mask
+ int rpixel[4]; // black pixel in result
+ int mpixel[4]; // black pixel in mask
+ int status; // status = LOGO on, off, uninitialized
+ int framenumber; // start/stop frame
+ int counter; // how many logo on, offs detected?
+ int corner; // which corner
+ int intensity; // intensity (higher -> brighter)
MarkAdAspectRatio aspectratio; // aspectratio
- bool valid; // logo mask valid?
+ bool valid[4]; // logo mask valid?
} area;
int G[5][5];
@@ -102,9 +105,11 @@ private:
int GY[3][3];
MarkAdContext *macontext;
+ bool pixfmt_info;
+ int SobelPlane(int plane); // do sobel operation on plane
int Detect(int framenumber, int *logoframenumber); // ret 1 = logo, 0 = unknown, -1 = no logo
- int Load(char *directory, char *file);
- void Save(int framenumber, uchar *picture);
+ int Load(char *directory, char *file, int plane);
+ void Save(int framenumber, uchar picture[4][MAXPIXEL], int plane);
public:
cMarkAdLogo(MarkAdContext *maContext);
int Process(int FrameNumber, int *LogoFrameNumber);