add support for kfactor

This commit is contained in:
2021-07-20 15:33:29 +02:00
parent 6fa7e9eb9d
commit f2d5a905e8
3 changed files with 83 additions and 3 deletions

View File

@ -211,7 +211,10 @@ int perfromOperation(int operation, char** fileNames, const Config& config)
map.outputCellSize = config.size;
if(!map.xMat.data)
{
Log(Log::ERROR)<<"could not load remap map from "<<std::string(fileNames[i])+".mat";
return -1;
}
RemapedImage norm;
if(!config.norm.empty())
@ -219,7 +222,7 @@ int perfromOperation(int operation, char** fileNames, const Config& config)
cv::Mat tmp = cv::imread(config.norm);
if(!tmp.data)
{
Log(Log::WARN)<<"could not open normalize file " <<config.norm;
Log(Log::WARN)<<"could not open normalize file "<<config.norm;
}
norm = applyRemap(tmp, map);
if(config.verbose)
@ -239,6 +242,13 @@ int perfromOperation(int operation, char** fileNames, const Config& config)
{
cv::imshow( "Viewer", remaped.image );
cv::waitKey(0);
cv::imshow( "Viewer", remaped.angleX);
cv::waitKey(0);
cv::imshow( "Viewer", remaped.angleY);
cv::waitKey(0);
applyKfactor(remaped.image, remaped.angleX, 3);
cv::imshow( "remaped.image", remaped.image );
cv::waitKey(0);
}
remapedImages.push_back(remaped);