From 6ea9a33fa5328d3c4b85982112b8d04c4d2ec905 Mon Sep 17 00:00:00 2001 From: lltcggie Date: Sun, 3 Jul 2016 21:31:10 +0900 Subject: [PATCH] =?UTF-8?q?Y=E3=83=A2=E3=83=87=E3=83=AB=E3=81=A7=E3=82=A2?= =?UTF-8?q?=E3=83=AB=E3=83=95=E3=82=A1=E3=83=81=E3=83=A3=E3=83=B3=E3=83=8D?= =?UTF-8?q?=E3=83=AB=E3=81=8C=E6=B6=88=E5=A4=B1=E3=81=99=E3=82=8B=E3=83=90?= =?UTF-8?q?=E3=82=B0=E3=82=92=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- common/stImage.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/common/stImage.cpp b/common/stImage.cpp index c2189f6..66f5665 100644 --- a/common/stImage.cpp +++ b/common/stImage.cpp @@ -414,6 +414,7 @@ void stImage::ConvertToNetFormat(const int input_plane, const int alpha_offset) AlphaMakeBorder(planes, mTmpImageA, alpha_offset); // 透明なピクセルと不透明なピクセルの境界部分の色を広げる + // CreateBrightnessImage()でBGRからYに変換するので特にRGBに変えたりはしない cv::merge(planes, mTmpImageRGB); } @@ -589,6 +590,17 @@ void stImage::DeconvertFromNetFormat(const int input_plane) cv::cvtColor(converted_image, mEndImage, BGRToConvertInverseMode); converted_image.release(); + + if (!mTmpImageA.empty()) // Aもあるので合体 + { + std::vector planes; + cv::split(mEndImage, planes); + + planes.push_back(mTmpImageA); + mTmpImageA.release(); + + cv::merge(planes, mEndImage); + } } } else // RGBモデル