From fab0c2867594cea4fa7f0c3aafa32704e4e3704e Mon Sep 17 00:00:00 2001 From: alfredtofu Date: Mon, 25 Aug 2014 16:22:52 +0800 Subject: [PATCH] fix bug for resizing images. --- src/caffe/util/io.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/caffe/util/io.cpp b/src/caffe/util/io.cpp index 4f20047..07c0b05 100644 --- a/src/caffe/util/io.cpp +++ b/src/caffe/util/io.cpp @@ -74,7 +74,7 @@ bool ReadImageToDatum(const string& filename, const int label, CV_LOAD_IMAGE_GRAYSCALE); if (height > 0 && width > 0) { cv::Mat cv_img_origin = cv::imread(filename, cv_read_flag); - cv::resize(cv_img_origin, cv_img, cv::Size(height, width)); + cv::resize(cv_img_origin, cv_img, cv::Size(width, height)); } else { cv_img = cv::imread(filename, cv_read_flag); } -- 2.7.4