提交 685b795e 编写于 作者: G gyc990326 提交者: Gines

Debug version support (#70)

* Create openCv.cpp

* Create fileSystem.cpp
上级 3b15986a
......@@ -57,7 +57,7 @@ namespace op
if (!directoryPath.empty())
{
std::replace(directoryPath.begin(), directoryPath.end(), '\\', '/'); // replace all '\\' to '/';
if (*directoryPath.cend() != '/')
if (*(directoryPath.cend() - 1) != '/')
directoryPath = directoryPath + "/";
}
return directoryPath;
......
......@@ -39,12 +39,11 @@ namespace op
const auto offsetChannelC = c*offsetBetweenChannels;
for (auto y = 0; y < resolutionSize.y; y++)
{
const auto cvMatOffsetY = y*resolutionSize.x;
const auto floatImageOffsetY = offsetChannelC + y*resolutionSize.x;
for (auto x = 0; x < resolutionSize.x; x++)
{
const auto value = uchar( fastTruncate(intRound(floatImage[floatImageOffsetY + x]), 0, 255) );
cvMat.at<uchar>(resolutionChannels*(cvMatOffsetY + x) + c) = value;
*(cvMat.ptr<uchar>(y) + x*resolutionChannels + c) = value;
}
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册