Motion detection was still not scanning the entire block. potential fix
in secDiff(), correcting offsets in the for loops.
This commit is contained in:
Maurice ONeal 2022-10-06 19:41:47 -04:00
parent 4bf3672a39
commit 17c136b6bc
2 changed files with 3 additions and 3 deletions

View File

@ -37,7 +37,7 @@ using namespace std;
using namespace std::filesystem;
#define BUF_SZ 10
#define APP_VER "1.4.t8"
#define APP_VER "1.4.t9"
struct shared_t
{

View File

@ -31,9 +31,9 @@ void secDiff(const Mat &imgA, const Mat &imgB, int rows, int cols, int rowOffs,
{
auto pnts = 0;
for (auto y = rowOffs; y < rows; y++)
for (auto y = rowOffs; y < (rowOffs + rows); y++)
{
for (auto x = colOffs; x < cols; x++)
for (auto x = colOffs; x < (colOffs + cols); x++)
{
auto pixA = imgA.at<uchar>(Point(x, y));
auto pixB = imgB.at<uchar>(Point(x, y));