Commit e675fb1c authored by Lefebvre, Jordan's avatar Lefebvre, Jordan
Browse files

Merge branch 'marching-squares-bug' into 'master'

Fixing marching squares condition of acceptance above wash_threshold.

See merge request !34
parents 1e871ef8 5504ac9d
Pipeline #12792 passed with stages
in 9 minutes and 24 seconds
......@@ -74,6 +74,10 @@ std::vector<std::pair<int, int>> MarchingSquares<data_type>::march(
{
mBit[p_i] = 2;
}
else
{
mBit[p_i] = 0;
}
}
//
// connected component labeling is required for multiple groups
......@@ -158,7 +162,7 @@ bool MarchingSquares<data_type>::accepts(size_t r, size_t c) const
if (c < 0 || r < 0 || c >= mColumns || r >= mRows) return false;
// Check the data value
if (mData[mColumns * r + c] > 0) return true;
if (mBit[mColumns * r + c] == 1) return true;
return false;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment