diff --git a/src/image.cpp b/src/image.cpp index b9c5e88..4787b85 100644 --- a/src/image.cpp +++ b/src/image.cpp @@ -5,7 +5,10 @@ Image::Image () { } Mat Image::getBlank () { - return Mat::zeros(height, width, CV_8UC3); + if (blank.empty()) { + blank = Mat::zeros(height, width, CV_8UC3); + } + return blank; } Mat Image::loadImage (string& image_path, uint64_t& x, uint64_t& y, uint64_t& w, uint64_t& h) {