8 #include <utils/Logger.h> 9 #include <utils/settings.h> 10 #include <utils/Components.h> 13 #include "BlackBorderDetector.h" 63 template <
typename Pixel_T>
73 _currentBorder = imageBorder;
77 if (_detectionMode ==
"default") {
78 imageBorder = _detector->
process(image);
79 }
else if (_detectionMode ==
"classic") {
81 }
else if (_detectionMode ==
"osd") {
94 const bool borderUpdated = updateBorder(imageBorder);
103 void handleSettingsUpdate(
const settings::type& type,
const QJsonDocument& config);
121 bool updateBorder(
const BlackBorder & newDetectedBorder);
127 unsigned _unknownSwitchCnt;
130 unsigned _borderSwitchCnt;
133 unsigned _maxInconsistentCnt;
136 unsigned _blurRemoveCnt;
139 QString _detectionMode;
151 unsigned _consistentCnt;
153 unsigned _inconsistentCnt;
155 double _oldThreshold;
BlackBorder getCurrentBorder() const
Return the current (detected) border.
Definition: BlackBorderProcessor.cpp:107
The main class of Hyperion.
Definition: Hyperion.h:57
Provide utility methods for Hyperion class.
Definition: BlackBorderDetector.h:7
The BlackBorder processor is a wrapper around the black-border detector for keeping track of detected...
Definition: BlackBorderProcessor.h:23
int verticalSize
The size of the detected vertical border.
Definition: BlackBorderDetector.h:21
BlackBorder process_osd(const Image< Pixel_T > &image)
osd detection mode (find x then y at detected x to avoid changes by osd overlays) ...
Definition: BlackBorderDetector.h:182
Result structure of the detected blackborder.
Definition: BlackBorderDetector.h:12
void setHardDisable(const bool &disable)
Sets the _hardDisabled state, if True prevents the enable from COMP_BLACKBORDER state emit (mimiks wr...
Definition: BlackBorderProcessor.cpp:92
bool enabled() const
Return activation state of black border detector.
Definition: BlackBorderProcessor.cpp:112
BlackBorder process(const Image< Pixel_T > &image)
default detection mode (3lines 4side detection)
Definition: BlackBorderDetector.h:68
BlackBorder process_classic(const Image< Pixel_T > &image)
classic detection mode (topleft single line mode)
Definition: BlackBorderDetector.h:125
bool process(const Image< Pixel_T > &image)
Processes the image.
Definition: BlackBorderProcessor.h:64
void setEnabled(bool enable)
Set activation state of black border detector.
Definition: BlackBorderProcessor.cpp:117
Components
Enumeration of components in Hyperion.
Definition: Components.h:10
bool unknown
Falg indicating if the border is unknown.
Definition: BlackBorderDetector.h:15
int horizontalSize
The size of the detected horizontal border.
Definition: BlackBorderDetector.h:18
The BlackBorderDetector performs detection of black-borders on a single image.
Definition: BlackBorderDetector.h:46