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