2013-08-21 22:44:17 +02:00
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
// Local Hyperion includes
|
|
|
|
#include "BlackBorderDetector.h"
|
|
|
|
|
2013-08-23 07:08:44 +02:00
|
|
|
namespace hyperion
|
2013-08-21 22:44:17 +02:00
|
|
|
{
|
2013-08-23 07:08:44 +02:00
|
|
|
class BlackBorderProcessor
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
BlackBorderProcessor(
|
|
|
|
const unsigned unknownFrameCnt,
|
|
|
|
const unsigned borderFrameCnt,
|
|
|
|
const unsigned blurRemoveCnt);
|
2013-08-21 22:44:17 +02:00
|
|
|
|
2013-08-23 07:08:44 +02:00
|
|
|
BlackBorder getCurrentBorder() const;
|
2013-08-21 22:44:17 +02:00
|
|
|
|
2013-08-23 07:08:44 +02:00
|
|
|
bool process(const RgbImage& image);
|
2013-08-21 22:44:17 +02:00
|
|
|
|
2013-08-23 07:08:44 +02:00
|
|
|
private:
|
2013-08-21 22:44:17 +02:00
|
|
|
|
2013-08-23 07:08:44 +02:00
|
|
|
const unsigned _unknownSwitchCnt;
|
2013-08-21 22:44:17 +02:00
|
|
|
|
2013-08-23 07:08:44 +02:00
|
|
|
const unsigned _borderSwitchCnt;
|
2013-08-21 22:44:17 +02:00
|
|
|
|
2013-08-23 07:08:44 +02:00
|
|
|
unsigned _blurRemoveCnt;
|
2013-08-21 22:44:17 +02:00
|
|
|
|
2013-08-23 07:08:44 +02:00
|
|
|
BlackBorderDetector _detector;
|
2013-08-21 22:44:17 +02:00
|
|
|
|
2013-08-23 07:08:44 +02:00
|
|
|
BlackBorder _currentBorder;
|
2013-08-21 22:44:17 +02:00
|
|
|
|
2013-08-23 18:24:10 +02:00
|
|
|
BlackBorder _previousDetectedBorder;
|
2013-08-21 22:44:17 +02:00
|
|
|
|
2013-08-23 07:08:44 +02:00
|
|
|
unsigned _consistentCnt;
|
|
|
|
};
|
|
|
|
} // end namespace hyperion
|