mirror of
https://github.com/lltcggie/waifu2x-caffe.git
synced 2025-06-26 05:32:47 +00:00
元の画像サイズより小さいサイズに変換(ただの縮小)すると変換後のサイズがおかしくなるバグを修正
This commit is contained in:
parent
af9d234fd3
commit
c936814264
@ -1652,7 +1652,7 @@ Waifu2x::eWaifu2xError Waifu2x::AfterReconstructFloatMatProcess(const bool isRec
|
||||
|
||||
const double ratio = CalcScaleRatio(image_size);
|
||||
const int scale2 = ceil(log2(ratio));
|
||||
const double shrinkRatio = ratio / std::pow(2.0, (double)scale2);
|
||||
const double shrinkRatio = ratio >= 1.0 ? ratio / std::pow(2.0, (double)scale2) : ratio;
|
||||
|
||||
cv::Mat alpha;
|
||||
if (floatim.channels() == 4)
|
||||
|
Loading…
x
Reference in New Issue
Block a user