diff --git a/buildspec.json b/buildspec.json index 8aa70abe..fceb9383 100644 --- a/buildspec.json +++ b/buildspec.json @@ -39,7 +39,7 @@ } }, "name": "obs-backgroundremoval", - "version": "1.1.11", + "version": "1.1.12", "author": "Roy Shilkrot", "website": "https://github.com/royshil/obs-backgroundremoval", "email": "roy.shil@gmail.com", diff --git a/src/background-filter.cpp b/src/background-filter.cpp index 9a667220..9ce62a0b 100644 --- a/src/background-filter.cpp +++ b/src/background-filter.cpp @@ -585,7 +585,8 @@ void background_removal_thread(void *data) } if (tf->enableImageSimilarity) { - if (!lastImageBGRA.empty()) { + if (!lastImageBGRA.empty() && !imageBGRA.empty() && + lastImageBGRA.size() == imageBGRA.size()) { // calculate PSNR double psnr = cv::PSNR(lastImageBGRA, imageBGRA);