mirror of
https://github.com/hyperion-project/hyperion.ng.git
synced 2023-10-10 13:36:59 +02:00
Minor Updates (#1241)
This commit is contained in:
parent
016855898a
commit
feec395756
@ -154,7 +154,7 @@ namespace hyperion
|
|||||||
const unsigned _verticalBorder;
|
const unsigned _verticalBorder;
|
||||||
|
|
||||||
/// The absolute indices into the image for each led
|
/// The absolute indices into the image for each led
|
||||||
std::vector<std::vector<unsigned>> _colorsMap;
|
std::vector<std::vector<int32_t>> _colorsMap;
|
||||||
|
|
||||||
///
|
///
|
||||||
/// Calculates the 'mean color' of the given list. This is the mean over each color-channel
|
/// Calculates the 'mean color' of the given list. This is the mean over each color-channel
|
||||||
@ -166,7 +166,7 @@ namespace hyperion
|
|||||||
/// @return The mean of the given list of colors (or black when empty)
|
/// @return The mean of the given list of colors (or black when empty)
|
||||||
///
|
///
|
||||||
template <typename Pixel_T>
|
template <typename Pixel_T>
|
||||||
ColorRgb calcMeanColor(const Image<Pixel_T> & image, const std::vector<unsigned> & colors) const
|
ColorRgb calcMeanColor(const Image<Pixel_T> & image, const std::vector<int32_t> & colors) const
|
||||||
{
|
{
|
||||||
const auto colorVecSize = colors.size();
|
const auto colorVecSize = colors.size();
|
||||||
|
|
||||||
|
@ -580,7 +580,7 @@ void Hyperion::update()
|
|||||||
|
|
||||||
// copy image & process OR copy ledColors from muxer
|
// copy image & process OR copy ledColors from muxer
|
||||||
Image<ColorRgb> image = priorityInfo.image;
|
Image<ColorRgb> image = priorityInfo.image;
|
||||||
if(image.size() > 3)
|
if (image.width() > 1 || image.height() > 1)
|
||||||
{
|
{
|
||||||
emit currentImage(image);
|
emit currentImage(image);
|
||||||
_ledBuffer = _imageProcessor->process(image);
|
_ledBuffer = _imageProcessor->process(image);
|
||||||
|
@ -28,7 +28,7 @@ QString ImageProcessor::mappingTypeToStr(int mappingType)
|
|||||||
|
|
||||||
ImageProcessor::ImageProcessor(const LedString& ledString, Hyperion* hyperion)
|
ImageProcessor::ImageProcessor(const LedString& ledString, Hyperion* hyperion)
|
||||||
: QObject(hyperion)
|
: QObject(hyperion)
|
||||||
, _log(Logger::getInstance("BLACKBORDER"))
|
, _log(Logger::getInstance("IMAGETOLED"))
|
||||||
, _ledString(ledString)
|
, _ledString(ledString)
|
||||||
, _borderProcessor(new BlackBorderProcessor(hyperion, this))
|
, _borderProcessor(new BlackBorderProcessor(hyperion, this))
|
||||||
, _imageToLeds(nullptr)
|
, _imageToLeds(nullptr)
|
||||||
|
@ -59,7 +59,7 @@ ImageToLedsMap::ImageToLedsMap(
|
|||||||
const auto maxYLedCount = qMin(maxY_idx, yOffset+actualHeight);
|
const auto maxYLedCount = qMin(maxY_idx, yOffset+actualHeight);
|
||||||
const auto maxXLedCount = qMin(maxX_idx, xOffset+actualWidth);
|
const auto maxXLedCount = qMin(maxX_idx, xOffset+actualWidth);
|
||||||
|
|
||||||
std::vector<unsigned> ledColors;
|
std::vector<int32_t> ledColors;
|
||||||
ledColors.reserve((size_t) maxXLedCount*maxYLedCount);
|
ledColors.reserve((size_t) maxXLedCount*maxYLedCount);
|
||||||
|
|
||||||
for (unsigned y = minY_idx; y < maxYLedCount; ++y)
|
for (unsigned y = minY_idx; y < maxYLedCount; ++y)
|
||||||
|
@ -114,7 +114,7 @@ int LedDeviceFile::write(const std::vector<ColorRgb> & ledValues)
|
|||||||
}
|
}
|
||||||
|
|
||||||
#if (QT_VERSION >= QT_VERSION_CHECK(5, 14, 0))
|
#if (QT_VERSION >= QT_VERSION_CHECK(5, 14, 0))
|
||||||
out << "]" << Qt::endl;
|
out << QString("]") << Qt::endl;
|
||||||
#else
|
#else
|
||||||
out << "]" << endl;
|
out << "]" << endl;
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user