This commit is contained in:
redpanther
2016-07-15 10:28:12 +02:00
parent b49ada956b
commit d3e77eb018
5 changed files with 42 additions and 13 deletions

View File

@@ -34,6 +34,18 @@ namespace hyperion
///
BlackBorder getCurrentBorder() const;
///
/// Return activation state of black border detector
/// @return The current border
///
bool enabled() const;
///
/// Set activation state of black border detector
/// @param enable current state
///
void setEnabled(bool enable);
///
/// Processes the image. This performs detecion of black-border on the given image and
/// updates the current border accordingly. If the current border is updated the method call
@@ -48,6 +60,11 @@ namespace hyperion
{
// get the border for the single image
BlackBorder imageBorder;
if (!enabled())
{
return false;
}
if (_detectionMode == "default") {
imageBorder = _detector.process(image);
} else if (_detectionMode == "classic") {
@@ -69,7 +86,6 @@ namespace hyperion
return borderUpdated;
}
private:
///
/// Updates the current border based on the newly detected border. Returns true if the
@@ -80,6 +96,9 @@ namespace hyperion
///
bool updateBorder(const BlackBorder & newDetectedBorder);
/// flag for blackborder detector usage
bool _enabled;
/// The number of unknown-borders detected before it becomes the current border
const unsigned _unknownSwitchCnt;