Skip to content
This repository was archived by the owner on May 6, 2021. It is now read-only.

Commit 2d4660f

Browse files
committed
Disable the blackborder detector for effects
1 parent 26acf7d commit 2d4660f

File tree

3 files changed

+12
-1
lines changed

3 files changed

+12
-1
lines changed

include/hyperion/ImageProcessor.h

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,9 @@ class ImageProcessor
3737
///
3838
void setSize(const unsigned width, const unsigned height);
3939

40+
/// Enable or disable the black border detector
41+
void enableBalckBorderDetector(bool enable);
42+
4043
///
4144
/// Processes the image to a list of led colors. This will update the size of the buffer-image
4245
/// if required and call the image-to-leds mapping to determine the mean color per led.
@@ -142,7 +145,7 @@ class ImageProcessor
142145
const LedString _ledString;
143146

144147
/// Flag the enables(true)/disabled(false) blackborder detector
145-
const bool _enableBlackBorderRemoval;
148+
bool _enableBlackBorderRemoval;
146149

147150
/// The processor for black border detection
148151
hyperion::BlackBorderProcessor * _borderProcessor;

libsrc/effectengine/Effect.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,9 @@ Effect::Effect(PyThreadState * mainThreadState, int priority, int timeout, const
6464
{
6565
_colors.resize(_imageProcessor->getLedCount(), ColorRgb::BLACK);
6666

67+
// disable the black border detector for effects
68+
_imageProcessor->enableBalckBorderDetector(false);
69+
6770
// connect the finished signal
6871
connect(this, SIGNAL(finished()), this, SLOT(effectFinished()));
6972
}

libsrc/hyperion/ImageProcessor.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,11 @@ void ImageProcessor::setSize(const unsigned width, const unsigned height)
4343
_imageToLeds = new ImageToLedsMap(width, height, 0, 0, _ledString.leds());
4444
}
4545

46+
void ImageProcessor::enableBalckBorderDetector(bool enable)
47+
{
48+
_enableBlackBorderRemoval = enable;
49+
}
50+
4651
bool ImageProcessor::getScanParameters(size_t led, double &hscanBegin, double &hscanEnd, double &vscanBegin, double &vscanEnd) const
4752
{
4853
if (led < _ledString.leds().size())

0 commit comments

Comments
 (0)