mirror of
https://github.com/hyperion-project/hyperion.ng.git
synced 2025-03-01 10:33:28 +00:00
Added simple direct implementation of the frame-grabber using dispmanx (copied from https://github.com/brooc/boblight-rpi/tree/master/src/clients/boblight-dispmanx)
This commit is contained in:
@@ -65,20 +65,21 @@ void Hyperion::setInputSize(const unsigned width, const unsigned height)
|
||||
void Hyperion::commit()
|
||||
{
|
||||
// Derive the color per led
|
||||
const std::vector<RgbColor> ledColors = mLedsMap.getMedianLedColor();
|
||||
std::vector<RgbColor> ledColors = mLedsMap.getMeanLedColor();
|
||||
// const std::vector<RgbColor> ledColors = mLedsMap.getMedianLedColor();
|
||||
|
||||
// Write the Led colors to the led-string
|
||||
mDevice->write(ledColors);
|
||||
}
|
||||
|
||||
void Hyperion::operator() (const RgbImage& inputImage)
|
||||
{
|
||||
std::cout << "Cached image size: [" << mImage->width() << "x" << mImage->height() << "]. Input image size: [" << inputImage.width() << "x" << inputImage.height() << "]" << std::endl;
|
||||
// Copy the input-image into the buffer
|
||||
mImage->copy(inputImage);
|
||||
|
||||
// Derive the color per led
|
||||
// std::vector<RgbColor> ledColors = mLedsMap.getMeanLedColor();
|
||||
std::vector<RgbColor> ledColors = mLedsMap.getMedianLedColor();
|
||||
std::vector<RgbColor> ledColors = mLedsMap.getMeanLedColor();
|
||||
// std::vector<RgbColor> ledColors = mLedsMap.getMedianLedColor();
|
||||
applyTransform(ledColors);
|
||||
|
||||
// Write the Led colors to the led-string
|
||||
|
Reference in New Issue
Block a user