2
这里是我的功能OpenCV的图像调整比较MATLAB的
int* Utilities::MatlabImresize(int* channel,int width, int height, double scale)
{
cv::Mat src(width, height, CV_32F);
for (int i = 0; i < width * height; ++i)
{
src.at<float>(i) = channel[i];
}
cv::Mat dst;
cv::resize(src, dst, cv::Size(), 0.5, 0.5,cv::INTER_CUBIC);
ofstream myfile;
myfile.open("C:\\Users\\gdarmon\\Desktop\\OpenCV_CR.txt");
myfile << dst;
myfile.close();
return NULL;
}
正如我刚才的问题imresize - trying to understand the bicubic interpolation 我已经重新编译的OpenCV与-0.5f
代替-0.75f
但我仍然得到尽管输入不同的结果讨论是相同的,我想我使用resize()函数错误...你能帮忙吗?
的MATLAB代码只是
Gr = imresize(Gr, 0,5);
我记得你和Amro之间有一个很好的讨论。 +1 – rayryeng
@chappjc ohh我认为整点是匹配默认...,无论如何谢谢你,我会尽力与此工作。 – Gilad
@吉拉德不,重点是要做出任何匹配。没有确定系数,这是不可能发生的。 – chappjc